PDA

View Full Version : Vertices...



Allan Walton
04-30-2003, 12:01 AM
Morning,

I've been experimenting with getting my models displaying as quickly as possible over the last few days and have reached a sticking point.

i've broken the models down by material and triangle stripped the indices (using nvTriStrip)

Q1. Is it (generally) better to have one long strip with degenerate tris or several smaller strips?

My drawing is done by using glInterleavedArrays and glDrawElements which is where the red book stops on possible performance gains.

Q2. Is there any other areas i should be looking into?

Q3. I've heard of GL_ARB_vertex_program,
GL_ARB_vertex_buffer_object and GL_EXT_vertex_array Can someone give me a little more info on these please? (i know, i know RTFM) http://www.opengl.org/discussion_boards/ubb/wink.gif

Cheers,

Allan

Arath
04-30-2003, 07:24 AM
Q1 : keep as much as possible strip long, you must batch as you can to limit the number of DrawPrimitive/DrawElement calls. Read nvidia/ati gdc2003 on it (on their respective web sites). Also you can concatenate two strips, like it is explained in this doc http://www.codercorner.com/Strips.htm

Q2 : renderstate switching, batch, texture sizes can be an issue ... read gdc2003 paper you've got a full description to tune a engine and find where it is bound.

Q3 : GL_EXT_vertex_array shouldn't be used now, GL_ARB_vbo is very useful to speed up vertices transformation by putting directly in VRAM or in AGP RAM vertex arrays and index arrays. And at last, gl_arb_vp won't give you a speed-up, since the fixed pipeline is the fastest at this time.

Cheers,
Arath

graphicsMan
04-30-2003, 01:19 PM
You can use the vertex program and fragment program to POTENTIALLY speed up rendering. This depends entirely on how much stuff you are doing while rendering (# of light sources, etc...)

Also, maybe I missed something, but using display lists on large amounts of static geometry is almost always a good idea.

(note that static just means the specified vertices don't change, not that you can't change how they are viewed)

Brian