Public Member Functions | |
| void | SetMessageCallback (GraphicsDeviceMessageCallback callback) |
| constexpr GraphicsDeviceType | GetType () |
| const NxnaResultDetails * | GetErrorDetails () |
| Capabilities * | GetCaps () |
| void | SetViewport (int x, int y, int width, int height) |
| Sets the current viewport. | |
| void | SetViewport (Viewport viewport) |
| Sets the current viewport. | |
| NxnaResult | CreateShader (ShaderType type, const void *bytecode, int bytecodeLength, Shader *result) |
| void | DestroyShader (Shader *shader) |
| NxnaResult | CreateTexture2D (const TextureCreationDesc *desc, Texture2D *result) |
| void | BindTexture (Texture2D *texture, int textureUnit) |
| void | DestroyTexture2D (Texture2D *texture) |
| NxnaResult | CreateShaderPipeline (const ShaderPipelineDesc *desc, ShaderPipeline *result) |
| void | SetShaderPipeline (ShaderPipeline *pipeline) |
| void | DestroyShaderPipeline (ShaderPipeline *pipeline) |
| NxnaResult | CreateBlendState (const BlendStateDesc *desc, BlendState *result) |
| void | SetBlendState (BlendState *state) |
| void | DestroyBlendState (BlendState *state) |
| NxnaResult | CreateRasterizerState (const RasterizerStateDesc *desc, RasterizerState *result) |
| void | SetRasterizerState (RasterizerState *state) |
| void | DestroyRasterizerState (RasterizerState *state) |
| NxnaResult | CreateIndexBuffer (const IndexBufferDesc *desc, IndexBuffer *result) |
| void | DestroyIndexBuffer (IndexBuffer buffer) |
| void | UpdateIndexBuffer (IndexBuffer buffer, unsigned int startOffset, void *data, unsigned int dataLengthInBytes) |
| void | SetIndices (IndexBuffer indices) |
| NxnaResult | CreateVertexBuffer (const VertexBufferDesc *desc, VertexBuffer *result) |
| void | DestroyVertexBuffer (VertexBuffer buffer) |
| void | UpdateVertexBuffer (VertexBuffer buffer, unsigned int startOffset, void *data, unsigned int dataLengthInBytes) |
| void | SetVertexBuffer (VertexBuffer vertexBuffer, unsigned int offset, unsigned int stride) |
| NxnaResult | CreateConstantBuffer (const ConstantBufferDesc *desc, ConstantBuffer *result) |
| void | UpdateConstantBuffer (ConstantBuffer buffer, void *data, unsigned int dataLengthInBytes) |
| void | SetConstantBuffer (ConstantBuffer buffer, int index) |
| void | DestroyConstantBuffer (ConstantBuffer *buffer) |
| void * | MapBuffer (IndexBuffer buffer, MapType type) |
| void * | MapBuffer (VertexBuffer buffer, MapType type) |
| void * | MapBuffer (ConstantBuffer buffer, MapType type) |
| void | UnmapBuffer (IndexBuffer buffer) |
| void | UnmapBuffer (VertexBuffer buffer) |
| void | UnmapBuffer (ConstantBuffer buffer) |
| void | DrawIndexedPrimitives (PrimitiveType primitiveType, int baseVertex, int minVertexIndex, int numVertices, int startIndex, int primitiveCount) |
| void | DrawPrimitives (PrimitiveType primitiveType, int startVertex, int primitiveCount) |
| void | Clear (float r, float g, float b, float a) |
| void | Present () |
Static Public Member Functions | |
| static NxnaResult | CreateGraphicsDevice (const GraphicsDeviceDesc *params, GraphicsDevice *result) |
| static void | DestroyGraphicsDevice (GraphicsDevice *device) |
| NxnaResult Nxna::Graphics::GraphicsDevice::CreateBlendState | ( | const BlendStateDesc * | desc, |
| BlendState * | result | ||
| ) |
Create a new BlendState object
| [in] | desc | A pointer to a BlendStateDesc object describing the new blend state |
| [out] | result | A pointer to a BlendState object |
| NxnaResult Nxna::Graphics::GraphicsDevice::CreateConstantBuffer | ( | const ConstantBufferDesc * | desc, |
| ConstantBuffer * | result | ||
| ) |
Create a new ConstantBuffer object
| [in] | desc | A pointer to a ConstantBufferDesc object describing the new constant buffer |
| [out] | result | A pointer to a ConstantBuffer object |
|
static |
Initializes a new GraphicsDevice
| [in] | params | A pointer to a filled out GraphicsDeviceDesc struct describing the new GraphicsDevice |
| [out] | result | A pointer to a GraphicsDevice object |
| NxnaResult Nxna::Graphics::GraphicsDevice::CreateIndexBuffer | ( | const IndexBufferDesc * | desc, |
| IndexBuffer * | result | ||
| ) |
Create a new IndexBuffer object
| [in] | desc | A pointer to a IndexBufferDesc object describing the new index buffer |
| [out] | result | A pointer to a IndexBuffer object |
| NxnaResult Nxna::Graphics::GraphicsDevice::CreateShader | ( | ShaderType | type, |
| const void * | bytecode, | ||
| int | bytecodeLength, | ||
| Shader * | result | ||
| ) |
Creates a new shader object
| [in] | type | The type of shader to create |
| [in] | bytecode | A pointer to the bytecode of the shader. This can be Direct3D bytecode, or GLSL source code. |
| [in] | bytecodeLength | The length in bytes of the bytecode |
| [out] | result | A pointer to a Shader object |
| NxnaResult Nxna::Graphics::GraphicsDevice::CreateShaderPipeline | ( | const ShaderPipelineDesc * | desc, |
| ShaderPipeline * | result | ||
| ) |
Create a new ShaderPipeline object
| [in] | desc | A pointer to a ShaderPipelineDesc object describing the new shader pipeline |
| [out] | result | A pointer to a Texture2D object |
| NxnaResult Nxna::Graphics::GraphicsDevice::CreateTexture2D | ( | const TextureCreationDesc * | desc, |
| Texture2D * | result | ||
| ) |
Create a new texture object
| [in] | desc | A pointer to a TextureCreationDesc object describing the new texture |
| [out] | result | A pointer to a Texture2D object |
| NxnaResult Nxna::Graphics::GraphicsDevice::CreateVertexBuffer | ( | const VertexBufferDesc * | desc, |
| VertexBuffer * | result | ||
| ) |
Create a new VertexBuffer object
| [in] | desc | A pointer to a VertexBufferDesc object describing the new vertex buffer |
| [out] | result | A pointer to a VertexBuffer object |
| void Nxna::Graphics::GraphicsDevice::DestroyBlendState | ( | BlendState * | state | ) |
Destroys an existing shader object
| [in] | state | A pointer to the blend state to delete |
| void Nxna::Graphics::GraphicsDevice::DestroyConstantBuffer | ( | ConstantBuffer * | buffer | ) |
Destroys an existing vertex buffer
| [in] | buffer | A pointer to the constant buffer to delete |
| void Nxna::Graphics::GraphicsDevice::DestroyIndexBuffer | ( | IndexBuffer | buffer | ) |
Destroys an existing index buffer
| [in] | buffer | The index buffer to delete |
| void Nxna::Graphics::GraphicsDevice::DestroyShader | ( | Shader * | shader | ) |
Destroys an existing shader object
| [in] | shader | A pointer to the shader object to delete |
Destroying a shader that is being used (including as part of a ShaderPipeline) is allowed. The underlying API will delete the shader when appropriate.
| void Nxna::Graphics::GraphicsDevice::DestroyShaderPipeline | ( | ShaderPipeline * | pipeline | ) |
Destroys an existing shader pipeline object
| [in] | pipeline | A pointer to the shader pipeline object to delete |
| void Nxna::Graphics::GraphicsDevice::DestroyTexture2D | ( | Texture2D * | texture | ) |
Destroys an existing texture object
| [in] | texture | A pointer to the texture to delete |
| void Nxna::Graphics::GraphicsDevice::DestroyVertexBuffer | ( | VertexBuffer | buffer | ) |
Destroys an existing vertex buffer
| [in] | buffer | The vertex buffer to delete |
| void * Nxna::Graphics::GraphicsDevice::MapBuffer | ( | IndexBuffer | buffer, |
| MapType | type | ||
| ) |
Maps an IndexBuffer for writing or reading
| [in] | buffer | An index buffer to map |
| [in] | type | The type of mapping to perform |
This is equivalent to glMapBufferRange() on OpenGL or ID3D11DeviceContext::Map() on Direct3D 11
| void * Nxna::Graphics::GraphicsDevice::MapBuffer | ( | VertexBuffer | buffer, |
| MapType | type | ||
| ) |
Maps a VertexBuffer for writing or reading
| [in] | buffer | A vertex buffer to map |
| [in] | type | The type of mapping to perform |
This is equivalent to glMapBufferRange() on OpenGL or ID3D11DeviceContext::Map() on Direct3D 11
| void * Nxna::Graphics::GraphicsDevice::MapBuffer | ( | ConstantBuffer | buffer, |
| MapType | type | ||
| ) |
Maps a ConstantBuffer for writing or reading
| [in] | buffer | A constant buffer to map |
| [in] | type | The type of mapping to perform |
This is equivalent to glMapBufferRange() on OpenGL or ID3D11DeviceContext::Map() on Direct3D 11
| void Nxna::Graphics::GraphicsDevice::UnmapBuffer | ( | IndexBuffer | buffer | ) |
Unmaps a previously mapped IndexBuffer
| [in] | buffer | An index buffer |
| void Nxna::Graphics::GraphicsDevice::UnmapBuffer | ( | VertexBuffer | buffer | ) |
Unmaps a previously mapped VertexBuffer
| [in] | buffer | A vertex buffer |
| void Nxna::Graphics::GraphicsDevice::UnmapBuffer | ( | ConstantBuffer | buffer | ) |
Unmaps a previously mapped ConstantBuffer
| [in] | buffer | A constant buffer |
| void Nxna::Graphics::GraphicsDevice::UpdateConstantBuffer | ( | ConstantBuffer | buffer, |
| void * | data, | ||
| unsigned int | dataLengthInBytes | ||
| ) |
Updates the contents of a ConstantBuffer
This is equivalent to glBufferSubData() on OpenGL and ID3D11DeviceContext::UpdateSubresource() on Direct3D 11
| void Nxna::Graphics::GraphicsDevice::UpdateIndexBuffer | ( | IndexBuffer | buffer, |
| unsigned int | startOffset, | ||
| void * | data, | ||
| unsigned int | dataLengthInBytes | ||
| ) |
Updates the contents of an IndexBuffer
This is equivalent to glBufferSubData() on OpenGL and ID3D11DeviceContext::UpdateSubresource() on Direct3D 11
| void Nxna::Graphics::GraphicsDevice::UpdateVertexBuffer | ( | VertexBuffer | buffer, |
| unsigned int | startOffset, | ||
| void * | data, | ||
| unsigned int | dataLengthInBytes | ||
| ) |
Updates the contents of a VertexBuffer
This is equivalent to glBufferSubData() on OpenGL and ID3D11DeviceContext::UpdateSubresource() on Direct3D 11
1.8.7