Ocular Engine
|
#include <VertexBuffer.hpp>
Public Member Functions | |
virtual bool | build () |
virtual void | bind () |
virtual void | unbind () |
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 | |
std::vector< Vertex > | m_Vertices |
Generic VertexBuffer 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, VertexBuffers should generally not be directly created (via new or other means), but instead be requested for with the current GraphicsDriver. Example:
|
virtual |
Adds (appends) a vertex to the internal vertex buffer.
[in] | vertex |
|
virtual |
Adds (appends) a vector of vertices to the internal vertex buffer.
[in] | vertices |
|
virtual |
Adds (appends) a vector of indices to the internal index buffer.
[in] | vertices | |
[in] | count | The number of vertices to append from the provided vector |
|
virtual |
Adds (appends) an array of indices to the internal index buffer.
[in] | vertices | |
[in] | count | The number of vertices to append from the provided vector |
|
virtual |
Binds the vertex buffer for use in rendering.
Reimplemented in Ocular::Graphics::D3D11VertexBuffer.
|
virtual |
Builds the vertex buffer. Must be called prior to first use, or after any changes to the contents of the buffer.
Reimplemented in Ocular::Graphics::D3D11VertexBuffer.
uint32_t Ocular::Graphics::VertexBuffer::getNumVertices | ( | ) | const |
Vertex const * Ocular::Graphics::VertexBuffer::getVertex | ( | uint32_t | index | ) | const |
[in] | index | Index of the vertex to retrieve on range [0, getNumVertices()) |
std::vector< Vertex > const & Ocular::Graphics::VertexBuffer::getVertices | ( | ) | const |
|
virtual |
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.
Reimplemented in Ocular::Graphics::D3D11VertexBuffer.