Quake 3 and Vertex Arrays

How can Quake 3 render almost all it’s geometry with one glDrawElements if it use triangles strips?

Hi!
1.Q3 doesn´t render it´s geometry in nearly one glDrawElements() call. It always renders the faces with the same shader in one glDrawElements() call.
2.What prohibits rendering triangle strips with glDrawElements()?
3.AFAIK Q3 does only render triangle strips if no CVA´s are available on the target hardware.´Cause strip-finding takes time and gives nearly no speedup if CVA´s are used.
´Cause with a good driver vertices should only get transformed once with CVA´s and therefore the triangle strips would give no advantage.

HTH, XBTC!

Originally posted by Quaternion:
How can Quake 3 render almost all it’s geometry with one glDrawElements if it use triangles strips?

Very easily…it doesnt use triangle strips. It uses indexed triangle lists. Read this document:
http://www.quake3arena.com/news/glopt.html

What carmack said about the quake 3 engine is that:
-It renders triangles, not strips
-they all go through a single opengl function, glDrawElements, which is different from saying that it renders all triangles using a single call to glDrawElements.

Any opengl app MUST use multiple glDrawElements calls if it uses more than one material or texture, or it it uses more than one strip is using strips.

“What prohibits rendering triangle strips with glDrawElements()?”

Nothing. But if you want to render a object, that have BOTH triangle strips and triangle you must use multiple calls of glDrawElements…

> But if you want to render a object, that have BOTH triangle strips and triangle you must use multiple calls of glDrawElements…

IBM’s Fire GL1/2/3 can do it in one call. They have GL_IBM_multimode_draw_arrays extension.