To render the contents of clVertexAttribs
, we need to convert its data into a set of API-specific buffers and API function invocations. This is done in the clGLVertexArray
class by creating Vertex Array Object (VOA) and Vertex Buffer Object (VBO) OpenGL objects and fetching contents from clVertexAttribs
:
class clGLVertexArray: public iInusiveCounter { public: clGLVertexArray(); virtual ~clGLVertexArray();
The Draw()
method does the actual rendering and it is the lowest level possible with our abstraction layer to actually render anything:
void Draw( bool Wireframe ) const; void SetVertexAttribs( const clPtr<clVertexAttrs>& Attribs ); private: void Bind() const; private: Luint FVBOID; Luint FVAOID;
These pointers are actually offsets of vertex data inside the vertex buffer:
std::vector<const void*> FAttribVBOOffset;
And these pointers point to the actual data from clVertexAttribs
:
std::vector<const void*> FEnumeratedStreams...