hx3d  1
2D/3D Simple Game Framework
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | List of all members
hx3d::graphics::buffers::IndexArrayBuffer Class Reference

Indexed array buffer. More...

#include <index_array_buffer.hpp>

Public Member Functions

 IndexArrayBuffer ()
 Build an empty index buffer.
 
 IndexArrayBuffer (const std::vector< GLushort > values)
 Build an index buffer with values. More...
 
virtual void upload () override
 Upload the data to the GPU.
 
virtual void begin (const Ptr< Shader > &shader) override
 Begin the use with a shader. More...
 
virtual void end (const Ptr< Shader > &shader) override
 End the use with a shader. More...
 
- Public Member Functions inherited from hx3d::graphics::buffers::Buffer< GLushort >
void set (const std::vector< GLushort > &values)
 Set the buffer values. More...
 
void add (const std::vector< GLushort > &values)
 Add buffer values. More...
 
GLushort * data ()
 Get the buffer values. More...
 
GLuint getId ()
 Get the buffer ID. More...
 
unsigned int size ()
 Get the buffer size. More...
 
std::vector< GLushort > & getVector ()
 Get the vector. More...
 
GLushort getValue (unsigned int i)
 Get a value. More...
 
void setValue (const unsigned int i, const GLushortvalue)
 Set a value. More...
 
void clear ()
 Clear all values.
 

Additional Inherited Members

- Protected Attributes inherited from hx3d::graphics::buffers::Buffer< GLushort >
std::vector< GLushort > _vector
 Data.
 
GLuint _buf
 Internal ID.
 

Detailed Description

Indexed array buffer.

Definition at line 33 of file index_array_buffer.hpp.

Constructor & Destructor Documentation

hx3d::graphics::buffers::IndexArrayBuffer::IndexArrayBuffer ( const std::vector< GLushort >  values)

Build an index buffer with values.

Parameters
valuesValues

Definition at line 31 of file index_array_buffer.cpp.

Member Function Documentation

void hx3d::graphics::buffers::IndexArrayBuffer::begin ( const Ptr< Shader > &  shader)
overridevirtual

Begin the use with a shader.

Parameters
shaderShader (Ptr)

Implements hx3d::graphics::buffers::ArrayBuffer< GLushort >.

Definition at line 47 of file index_array_buffer.cpp.

void hx3d::graphics::buffers::IndexArrayBuffer::end ( const Ptr< Shader > &  shader)
overridevirtual

End the use with a shader.

Parameters
shaderShader (Ptr)

Implements hx3d::graphics::buffers::ArrayBuffer< GLushort >.

Definition at line 54 of file index_array_buffer.cpp.


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