Hi lads,
I’m kinda banging my head against a brick wall at the moment. So, onto the problem…
// given an M by N height field such as:
GLfloat* vertices = new GLfloat[MN3];
GLubyte* colours = new GLubyte[MN4];
GLfloat* texels0 = new GLfloat[MN2];
// draw the triangles within the height field 30 times:
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glVertexPointer(3, GL_FLOAT, 0, vertices);
glColorPointer(4, GL_UNSIGNED_BYTE, 0, colours);
glTexCoordPointer(2, GL_FLOAT, 0, texels0);
glLockArraysEXT(0, M*N);
for(i=0; i<30; i++)
{
glDrawElements(GL_TRIANGLES, numIndices, GL_UNSIGNED_INT, indices);
}
glUnlockArraysEXT();
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_COLOR_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
Even thought the extension is enabled (GL_EXT_compiled_vertex_array), locking the vertex arrays when rendering the same height field multiple times makes absolutely no difference in terms of performance. I’m even timing the number of CPU ticks using QueryPerformanceCounter().
I’ve tried numerous other experiments and I can’t seem to generate any increased rendering performance when using this extension. I’m using Microsoft Visual Studio 6.0 C++ on Windows 2000 and running a GeForce3 Ti 500 graphics card with version 41.09 of the Detonator drivers from NVIDIA.
Any ideas why its not improving the frame rate?
regards,
Lloyd