Ocular Engine
Ocular::Graphics::D3D11IndexBuffer Class Reference
Inheritance diagram for Ocular::Graphics::D3D11IndexBuffer:
Ocular::Graphics::IndexBuffer

Public Member Functions

 D3D11IndexBuffer (ID3D11Device *device, ID3D11DeviceContext *context)
 
virtual bool build () override
 
virtual void bind () override
 
virtual void unbind () override
 
ID3D11Buffer * getD3DIndexBuffer ()
 
- Public Member Functions inherited from Ocular::Graphics::IndexBuffer
virtual void addIndex (uint32_t index)
 
virtual void addIndices (std::vector< uint32_t > const &indices)
 
virtual void addIndices (std::vector< uint32_t > const &indices, uint32_t count)
 
virtual void addIndices (uint32_t const *indices, uint32_t count)
 
uint32_t getIndex (uint32_t index)
 
std::vector< uint32_t > const & getIndices () const
 
uint32_t getNumIndices () const
 

Protected Attributes

ID3D11Device * m_D3DDevice
 
ID3D11DeviceContext * m_D3DDeviceContext
 
ID3D11Buffer * m_D3DIndexBuffer
 
- Protected Attributes inherited from Ocular::Graphics::IndexBuffer
std::vector< uint32_t > m_Indices
 

Member Function Documentation

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

Binds the index buffer for use in rendering.

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

Reimplemented from Ocular::Graphics::IndexBuffer.

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

Builds the index 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 IndexBuffer and not a child implementation (ie D3D11IndexBuffer, 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::IndexBuffer.

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

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

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

Reimplemented from Ocular::Graphics::IndexBuffer.


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