OpenGL arrays

Started by
0 comments, last by Andrea 23 years, 9 months ago
A question about OpenGL arrays. In my simple OpenGL object renderer I render polygons using glVertex3f(x,y,z) glNormal3f(...) // optional if I use prelighted vertices glTexCoord(...) glColor(...) for every vertex in the polygon and for every polygon in the object. I think : glVertexv or glDrawArray should be faster because they dont pass 3 float on stack for every vertex (plus normal, texture coordinates and color !) I''ve made a simple test: I''ve used glVertex, glVertexv and arrays with and without glList. I''ve rendered a wire frame sphere (3600 polygons !!!) so the stack is critical. Here is the result: without glList : let be glVertex 100% (speed) so glVertexv 94% ? glDrawArray 36% ??? with glList : glVertex 112% glVertexv 112% glDrawArray 119% I tried to render a texture mapped sphere but there is not difference because passing arguments on the stack is less critical. There is little change to the code so I''m going to include glList, glVertex3f and glDrawArray as rendering options but it''s not clear why arrays are so slow (less than 40%!!!). I can use glList but I get only 20% more speed. To the gurus: have you get different results ?
IpSeDiXiT
Advertisement
have u got a nvidia card read the lastest optimization info.
certain methods are optimized better than others

eg cva''s with vertex, colour and texcoords is optimized
and vertex, texcoords and normals ain''t.

the first is what q3 uses. though they seem quite a bit better than other companies and prolly will optimize the others later on.

this info prolly applicable to most other cards though

This topic is closed to new replies.

Advertisement