Ocular Engine
|
#include <IndexBuffer.hpp>
Public Member Functions | |
virtual bool | build () |
virtual void | bind () |
virtual void | unbind () |
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 | |
std::vector< uint32_t > | m_Indices |
Generic IndexBuffer for use in rendering meshes and other geometric objects.
It should be noted that attempting to build, bind, or unbind an instance of this parent class will have no effect. Because of this, IndexBuffers should generally not be directly created (via new or other means), but instead be requested for with the current GraphicsDriver. Example:
|
virtual |
Adds (appends) an index to the internal index buffer.
[in] | index |
|
virtual |
Adds (appends) a vector of indices to the internal index buffer.
[in] | indices |
|
virtual |
Adds (appends) a vector of indices to the internal index buffer.
[in] | indices | |
[in] | count | The number of indices to append from the provided vector |
|
virtual |
Adds (appends) an array of indices to the internal index buffer.
[in] | indices | |
[in] | count | The number of indices to append from the provided vector |
|
virtual |
Binds the index buffer for use in rendering.
Reimplemented in Ocular::Graphics::D3D11IndexBuffer.
|
virtual |
Builds the index buffer. Must be called prior to first use, or after any changes to the contents of the buffer.
Reimplemented in Ocular::Graphics::D3D11IndexBuffer.
uint32_t Ocular::Graphics::IndexBuffer::getIndex | ( | uint32_t | index | ) |
[in] | index | Index of the index to retrieve on range [0, getNumIndices()) |
std::vector< uint32_t > const & Ocular::Graphics::IndexBuffer::getIndices | ( | ) | const |
uint32_t Ocular::Graphics::IndexBuffer::getNumIndices | ( | ) | const |
|
virtual |
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.
Reimplemented in Ocular::Graphics::D3D11IndexBuffer.