+ case Dali::Geometry::TRIANGLE_FAN:
+ {
+ geometryGLType = GL_TRIANGLE_FAN;
+ break;
+ }
+ case Dali::Geometry::LINE_LOOP:
+ {
+ geometryGLType = GL_LINE_LOOP;
+ break;
+ }
+ case Dali::Geometry::LINE_STRIP:
+ {
+ geometryGLType = GL_LINE_STRIP;
+ break;
+ }
+ }
+
+ //Draw call
+ if( mIndexBuffer && geometryGLType != GL_POINTS )
+ {
+ //Indexed draw call
+ mIndexBuffer->Bind( context, GpuBuffer::ELEMENT_ARRAY_BUFFER );
+ // numIndices truncated, no value loss happening in practice
+ context.DrawElements( geometryGLType, static_cast<GLsizei>( numIndices ), GL_UNSIGNED_SHORT, reinterpret_cast<void*>( firstIndexOffset ) );
+ }
+ else
+ {
+ //Unindex draw call
+ GLsizei numVertices(0u);
+ if( vertexBufferCount > 0 )
+ {
+ // truncated, no value loss happening in practice
+ numVertices = static_cast<GLsizei>( mVertexBuffers[0]->GetElementCount() );
+ }
+
+ context.DrawArrays( geometryGLType, 0, numVertices );
+ }
+
+ //Disable attributes
+ for( auto&& attribute : attributeLocation )
+ {
+ if( attribute != -1 )
+ {
+ context.DisableVertexAttributeArray( static_cast<GLuint>( attribute ) );
+ }