Jump to content

  • Log In with Google      Sign In   
  • Create Account


CVA isn't any faster...


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 gimp   Members   -  Reputation: 142

Like
Likes
Like

Posted 05 August 2001 - 11:55 PM

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

Sponsor:

#2 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 06 August 2001 - 04:49 AM

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

#3 zedzeek   Members   -  Reputation: 528

Like
Likes
Like

Posted 06 August 2001 - 11:02 AM

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();


#4 gimp   Members   -  Reputation: 142

Like
Likes
Like

Posted 06 August 2001 - 01:05 PM

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





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS