-
- //Draw call
- if( mIndexBuffer && geometryGLType != GL_POINTS )
- {
- //Indexed draw call
- mIndexBuffer->Bind( GpuBuffer::ELEMENT_ARRAY_BUFFER );
- context.DrawElements(geometryGLType, numIndices, GL_UNSIGNED_SHORT, reinterpret_cast<void*>(firstIndexOffset));
- }
- else
- {
- //Unindex draw call
- unsigned int numVertices(0u);
- if( vertexBufferCount > 0 )
- {
- numVertices = mVertexBuffers[0]->GetElementCount();
- }
-
- context.DrawArrays( geometryGLType, 0, numVertices );
- }
-
- //Disable attributes
- for( unsigned int i = 0; i < attributeLocation.Count(); ++i )
- {
- if( attributeLocation[i] != -1 )
- {
- context.DisableVertexAttributeArray( attributeLocation[i] );
- }
- }