14 std::cerr<<
"Warning trying to draw an unallocated VOA\n";
18 std::cerr<<
"Warning trying to draw an unbound VOA\n";
44 std::cerr<<
"trying to set VOA data when unbound\n";
63 default : std::cerr<<
"wrong data type send for index value\n";
break;
virtual void removeVAO()
remove the VAO and buffers created
#define GL_ELEMENT_ARRAY_BUFFER
#define glDeleteVertexArrays
GLint GLenum GLsizei GLint GLsizei const void * data
implementation files for RibExport class
GLenum m_mode
the draw mode
const GLvoid * m_indexData
bool m_bound
debug flag to indicate if the vao is bound.
GLenum m_indexType
data type of the index data (e.g. GL_UNSIGNED_INT)
virtual ~SimpleIndexVAO()
dtor don't do anything as the remove clears things
virtual void draw() const
draw the VAO using glDrawArrays
GLuint m_id
the id of the VAO allocated from OpenGL
void unbind()
unbind the VAO by binding default 0
#define GL_UNSIGNED_SHORT
GLuint m_buffer
the id of the buffer for the VAO
size_t m_indicesCount
the number of indices stored in the VAO.
bool m_allocated
debug flag to indicate if data has been set for the VAO
virtual void setData(const AbstractVAO::VertexData &_data)
, this method sets the data for the VAO if data has already been set it will remove the existing data...
GLAPI void GLAPIENTRY glDrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices)