15 std::cerr<<
"Warning trying to draw an unallocated VOA\n";
19 std::cerr<<
"Warning trying to draw an unbound VOA\n";
44 std::cerr<<
"trying to set VOA data when unbound\n";
virtual void setData(const VertexData &_data)
, this method sets the data for the VAO if data has already been set it will remove the existing data...
#define glDeleteVertexArrays
virtual void removeVAO()
remove the VAO and buffers created
implementation files for RibExport class
GLdouble GLdouble GLdouble b
GLenum m_mode
the draw mode
bool m_bound
debug flag to indicate if the vao is bound.
GLAPI void GLAPIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count)
virtual GLuint getBufferID(unsigned int _id)
return the id of the buffer, if there is only 1 buffer just return this if we have the more than one ...
GLuint m_id
the id of the VAO allocated from OpenGL
std::vector< GLuint > m_vboIDs
the id of the buffers for the VAO
void unbind()
unbind the VAO by binding default 0
virtual void draw() const
draw the VAO using glDrawArrays
size_t m_indicesCount
the number of indices stored in the VAO.
#define NGL_ASSERT(X)
re-define the standard assert to work for ngl first check to see if assert is defined and undef it th...
bool m_allocated
debug flag to indicate if data has been set for the VAO
virtual ~MultiBufferVAO()
dtor don't do anything as the remove clears things
re impliment asserts so we don't exit on failure