Ocular Engine
Ocular::Graphics::D3D11VertexBuffer Class Reference
Inheritance diagram for Ocular::Graphics::D3D11VertexBuffer:
Ocular::Graphics::VertexBuffer

Public Member Functions

 D3D11VertexBuffer (ID3D11Device *device, ID3D11DeviceContext *context)
 
virtual bool build () override
 
virtual void bind () override
 
virtual void unbind () override
 
ID3D11Buffer * getD3DVertexBuffer ()
 
- Public Member Functions inherited from Ocular::Graphics::VertexBuffer
virtual void addVertex (Vertex const &vertex)
 
virtual void addVertices (std::vector< Vertex > const &vertices)
 
virtual void addVertices (std::vector< Vertex > const &vertices, uint32_t count)
 
virtual void addVertices (Vertex const *vertices, uint32_t count)
 
Vertex const * getVertex (uint32_t index) const
 
std::vector< Vertex > const & getVertices () const
 
uint32_t getNumVertices () const
 

Protected Attributes

ID3D11Device * m_D3DDevice
 
ID3D11DeviceContext * m_D3DDeviceContext
 
ID3D11Buffer * m_D3DVertexBuffer
 
- Protected Attributes inherited from Ocular::Graphics::VertexBuffer
std::vector< Vertexm_Vertices
 

Member Function Documentation

void Ocular::Graphics::D3D11VertexBuffer::bind ( )
overridevirtual

Binds the vertex buffer for use in rendering.

Note
If this is an instance of VertexBuffer and not a child implementation (ie D3D11VertexBuffer, etc.) then this call will do nothing.

Reimplemented from Ocular::Graphics::VertexBuffer.

bool Ocular::Graphics::D3D11VertexBuffer::build ( )
overridevirtual

Builds the vertex buffer. Must be called prior to first use, or after any changes to the contents of the buffer.

Note
If this is an instance of VertexBuffer and not a child implementation (ie D3D11VertexBuffer, etc.) then this call will do nothing and always return FALSE.
Returns
TRUE if the buffer was successfully built. Will return FALSE if there was an error.

Reimplemented from Ocular::Graphics::VertexBuffer.

void Ocular::Graphics::D3D11VertexBuffer::unbind ( )
overridevirtual

Unbinds the vertex buffer and sets the currently bound vertex buffer to NULL.
This has no effect if this buffer is not the currently bound buffer.

Note
If this is an instance of VertexBuffer and not a child implementation (ie D3D11VertexBuffer, etc.) then this call will do nothing.

Reimplemented from Ocular::Graphics::VertexBuffer.


The documentation for this class was generated from the following files: