Archived

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

gimp

CVA isn't any faster...

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 this post


Link to post
Share on other sites
Guest Anonymous Poster
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 this post


Link to post
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 this post


Link to post
Share on other sites