This topic is now archived and is closed to further replies.


What's with EXT_compiled_vertex_array?

Recommended Posts

hh10k    589
I don''t understand why, but EXT_compiled_vertex_array seems to give me slower performance than without it. My little glut ''test'' program goes like this:
glVertexPointer(3, GL_FLOAT, sizeof(grid[0]), grid);
glLockArraysEXT(0, GRID_X * GRID_Y);
for (int reps = 0; reps < 1000; ++reps)
	for (int i = 0; i < GRID_X - 1; ++i)
		glDrawElements(GL_TRIANGLE_STRIP, GRID_Y * 2, GL_UNSIGNED_INT, &indicies[i * GRID_Y * 2]);
''grid'' is an array of GRID_X by GRID_Y verticies, and ''indicies'' are (surpise) the indicies that make the rows. Using a grid of 8 by 8 and shrinking the render window to an insignificant size (so fill rates do not influence the test), I get 253 FPS. If I remove glLockArraysEXT/glUnlockArraysEXT, this goes up to 550 FPS! Surely drawing something 1000 times with the same array should benefit from CVAs? I''ve tried playing with the grid size, repetitions and such, but no matter what I do the CVA version is always slower. If this happens to be a NVidia problem, I have a Geforce FX 5600 with 53.03 drivers. (also, I know VBOs are the way to go, but this is my fallback option for older cards)

Share this post

Link to post
Share on other sites
666_1337    122
I also have a fx 5600 and detonator 1.0.5336 ( yes, linux ).
At me locking the arrays has NO effect on terrain-meshes ( i guess that is what your grid is supposed to be ) with a size less than 64x64, and it''s little ( at most 5% ) faster than unlocked arrays at increased mesh size (the largest i tested was 512x512) ...

Share this post

Link to post
Share on other sites
_the_phantom_    11250
the CVA extension really only comes into play when you are doing multiple pass rendering.
By locking the array you are telling OpenGL it can copy/cache the content until you unlock as you wont be changing it.
This means that on the 2nd pass with the same vertex data OGL can use the cache''d version which is possibly in faster ram, to let the 2nd pass run faster.
Doing what you are doing wont help at all as the vertex data doesnt get reused and cached in fast ram, you''ll be better off with normal VA or VBOs

Share this post

Link to post
Share on other sites
memon    152
Just try to upgrade drivers. I got boost from 7fps to 37 fps, just by downloading the latest drivers (this is on nVidia).

The funny thing is that on some older drivers with the same scene I got 90 fps with the VCA, and 80fps with VBO. Not I get ~30 fps with VCA, and 50 with VBO :/ Funny...

I suggest to go for VBO if possible... especially if you have static geometry. If you have the VCA up and running, it''s quite easy to add the VBO thing there too.

Share this post

Link to post
Share on other sites