17 #ifndef VERTEXARRAYOBJECT_H_ 18 #define VERTEXARRAYOBJECT_H_ 24 #define BUFFER_OFFSET(i) (reinterpret_cast<void*>(i)) 49 #warning This Class is deprecated and should not be used. [[deprecated("use factories instead")]] 166 GLuint getVBOid(
unsigned int _index );
175 void draw(
GLenum _mode)
const;
182 void draw(
unsigned int _startIndex,
unsigned int _numVerts,
GLenum _mode=
GL_TRIANGLES )
const;
188 void drawInstanced(
GLenum _n)
const;
208 Real *getDataPointer(
unsigned int _vbo,
GLenum _accessMode);
215 void freeDataPointer();
bool m_indexed
flag to indicate if we have an index or non index vao to draw
main definition of types and namespace
bool isAllocated() const
accesor to see if VOA has allocated data
GLenum m_drawMode
the draw mode of the VAO e.g. GL_TRIANGLES
bool isBound() const
accesor to see if VOA is bound
implementation files for RibExport class
GLuint getID() const
accesor for the VOA id
PRECISION Real
create a variable called Real which is the main data type we use (GLfloat for most cases) ...
static VertexArrayObject * createVOA(GLenum _mode)
method to return a newVOA object
bool m_bound
flag to indicate if we are bound
VertexArrayObject()
hide the ctor as we want to create static factory only
unsigned int getNumIndices() const
get the number of indices in the vao
bool m_allocated
flag to indicate if we have allocated the data to the VAO
GLuint m_id
the id of the VAO allocated by OpenGL
std::vector< GLuint > m_vboIDs
an array of VBO associated with this VAO
void setNumIndices(size_t _n)
set the number of faces to draw
a class to encapsulate an OpenGL VAO
GLuint m_indicesCount
the number of faces to draw
GLuint m_iboID
the id of the index bufffer object
GLenum m_indexType
Specifies the type of the values in the indices buffer. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT.
~VertexArrayObject()
dtor doesn't do anything use the removeVAO method instead