Nxna2
 All Classes Namespaces Functions Enumerations Enumerator Pages
Classes | Typedefs | Enumerations | Functions | Variables
Nxna::Graphics Namespace Reference

Graphics. More...

Classes

struct  BlendState
 
struct  BlendStateDesc
 
struct  Buffer
 
union  Capabilities
 
struct  ConstantBuffer
 
struct  ConstantBufferDesc
 
class  GraphicsDevice
 
struct  GraphicsDeviceDebugMessage
 
struct  GraphicsDeviceDesc
 
struct  IndexBuffer
 
struct  IndexBufferDesc
 
struct  InputElement
 
class  PipelineState
 
struct  PipelineStateDesc
 
struct  RasterizerState
 
struct  RasterizerStateDesc
 
struct  RenderTargetBlendStateDesc
 
struct  Shader
 
struct  ShaderBytecode
 
struct  ShaderPipeline
 
struct  ShaderPipelineDesc
 
struct  Texture2D
 
struct  Texture2DExtra
 
struct  TextureCreationDesc
 
struct  VertexBuffer
 
struct  VertexBufferDesc
 
struct  Viewport
 

Typedefs

typedef void(* GraphicsDeviceMessageCallback )(GraphicsDeviceDebugMessage)
 

Enumerations

enum  GraphicsDeviceType {
  GraphicsDeviceType::None, GraphicsDeviceType::OpenGl41, GraphicsDeviceType::OpenGLES3, GraphicsDeviceType::Direct3D11,
  LAST
}
 The type of graphics device. More...
 
enum  Usage { Usage::Default, Usage::Immutable, Usage::Dynamic }
 
enum  PrimitiveType { PrimitiveType::TriangleList, PrimitiveType::TriangleStrip }
 
enum  IndexElementSize { IndexElementSize::SixteenBits = 2, IndexElementSize::ThirtyTwoBits = 4 }
 
enum  BufferType { BufferType::Index, BufferType::Vertex, BufferType::Constant }
 
enum  ShaderType { Vertex, Pixel }
 
enum  SurfaceFormat {
  Color, Bgr565, Bgra5551, Bgra4444,
  Dxt1, Dxt3, Dxt5, Pvrtc4
}
 
enum  MapType { Write, WriteDiscard, WriteNoOverwrite }
 
enum  Blend : nxna_byte {
  Zero, One, SourceAlpha, InverseSourceAlpha,
  DestinationAlpha, InverseDestinationAlpha
}
 
enum  BlendFunction : nxna_byte {
  BlendFunction::Add, BlendFunction::Max, BlendFunction::Min, BlendFunction::ReverseSubtract,
  BlendFunction::Subtract
}
 
enum  InputElementFormat {
  InputElementFormat::Single = 1, InputElementFormat::Vector2, InputElementFormat::Vector3, InputElementFormat::Vector4,
  InputElementFormat::Color
}
 
enum  InputElementUsage { Position, Normal, TextureCoordinate, Color }
 
enum  PrimitiveTopologyType : nxna_byte {
  Undefined, Points, Lines, Triangles,
  Patches
}
 
enum  CullMode : nxna_byte { None, CullFrontFaces, CullBackFaces }
 
enum  FillMode : nxna_byte { Solid, Wireframe }
 

Functions

void GLEWAPIENTRY glDebugOutputCallback (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const void *userParam)
 
void GetAdditiveBlendState (BlendStateDesc *state)
 
void GetNonPreMultipliedBlendState (BlendStateDesc *state)
 
void GetOpaqueBlendState (BlendStateDesc *state)
 

Variables

GraphicsDeviceMessageCallback g_callbacks [g_numDeviceTypes]
 

Detailed Description

Graphics.

Enumeration Type Documentation

enum Nxna::Graphics::BlendFunction : nxna_byte
strong
Enumerator
Add 

Add sources 1 and 2.

Max 

Use the maximum of sources 1 and 2.

Min 

Use the minimum of sources 1 and 2.

ReverseSubtract 

Subtract source 2 from source 1.

Subtract 

Subtract source 1 from source 2.

Enumerator
Index 

An index buffer.

Vertex 

A vertex buffer.

Constant 

A constant (or uniform) buffer.

The type of graphics device.

Enumerator
None 

Represents no renderer.

OpenGl41 

OpenGL 4.1.

OpenGLES3 

OpenGL ES 3.0.

Direct3D11 

Direct3D 11.

Enumerator
SixteenBits 

16 bit indices

ThirtyTwoBits 

32 bit indices

Enumerator
Single 

A single 32-bit floating point number.

Vector2 

Two 32-bit floating point numbers.

Vector3 

Three 32-bit floating point numbers.

Vector4 

Four 32-bit floating point numbers.

Color 

Four bytes of color info, packed as RGBA.

Enumerator
TriangleList 

A list of triangles.

TriangleStrip 

A triangle strip.

enum Nxna::Graphics::Usage
strong
Enumerator
Default 

Default write-only usage.

Immutable 

Write-once.

Dynamic 

Write lots of times.