i tried to improve the performance of my display (around 1million quads) by using glVertexPointer and glDrawElements. Since i had to display with flat shade mode, i looped over each quad and supplied one normal and then glDrawElements for each element as below
glVertexPointer(3, GL_FLOAT, 0, (const GLvoid*)xyz);
for(i=0; i<n_elements; i++, pIndices+=4, nxyz+=3)
glNormal3fv((const GLfloat *)nxyz);
glDrawElements(GL_QUADS, 4, GL_UNSIGNED_INT, pIndeces);
but this turns to be slower than my immediate mode rendering using 4 glVertex3fv calls instead of glVertexPointer and glDrawElements,
can you please help me understand why the usage of glVertexPointer is slower than using glVertex3fv?
with immediate mode rendering i get around 13fps and with the usage of glVertexPointer and glDrawElements, i get 8fps