-
Junior Member
Regular Contributor
glDrawArrays vs glDrawElements
here's the deal: I'm drawing a mesh 20*20=400 quads total. To improve performance I choosed to use triangles and vertex arrays, so my vertex array is 400*6=2400 (6 because 2 triangles in a square). This is what I do:
GLfloat mesh[4200][3];
//fill up array
glVertexPointer(3, GL_FLOAT, 0, mesh);
glDrawArrays(GL_TRIANGLES,0,2400);
How can I use glDrawElements, is it faster? What's the diference?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules