#### Archived

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

# CVA isn't any faster...

This topic is 6134 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I''ve just implemented Compile vertex arrays but it doesn''t seem any faster than normals arrays, at all. Specifics: Drawing individual models of 200-600 polygons each, with one at 14000. Not textured, just lit and coloured. Total scene polygons : ~25000 at 32fps. System: Athlon 700, 384mb(133mhz) ram, Geforce2. Here is how I use CVA''s:
  m_LockArrays(0, a_Mesh.Indices.size()-1); glDrawElements(GL_TRIANGLES, a_Mesh.Indices.size(), GL_UNSIGNED_SHORT, a_Mesh.Indices.begin()); m_UnlockArrays(); 
At first I thought I might be fill limited as there is a fair amount of overdraw, however when I reduce the size from 800*600 to 100*100 the speed change is minimal (35fps in test above). I profiled the application, by far largest function time is the rendering function. Any idea''s? Many thanks Chris Brodie http:\\fourth.flipcode.com

##### Share on other sites
Are you drawing the same model many times or just many different models? If you are doing the latter, you won''t get a speed up. The point of compiled vertex arrays is to allow the driver to cache the transformed vertices so you can draw the same geometry many times without having to re-transform the vertices each time you draw it.

Nate

##### Share on other sites
also 14000 is prolly to many in one hit break that in two.
also m_LockArrays(0, a_Mesh.Indices.size()-1); is wrong its not the number of indices but the number of vertices.
but most of all for the example u gave i dont expect a speed up

try this

m_LockArrays(0, numverts);
glDrawElements(GL_TRIANGLES, a_Mesh.Indices.size(), GL_UNSIGNED_SHORT, a_Mesh.Indices.begin());
change texture

glDrawElements(GL_TRIANGLES, a_Mesh.Indices.size(), GL_UNSIGNED_SHORT, a_Mesh.Indices.begin());
m_UnlockArrays();

##### Share on other sites
Thanks, I think I have a better understanding of this now... Though doing state changes betwen mesh rendering will require a number of engine changes...

Back to the drawing board...

Chris Brodie
http:\\fourth.flipcode.com

• 15
• 13
• 23
• 10
• 19