help, vert array mesh with TRIANGLE_STRIP

Started by
17 comments, last by skow 20 years, 1 month ago
In a display list the vertices are dereferenced at display list creation time and compiled. If you create a vertex array list, then create a display list from that array list and then change the data in the array list the display list will still contain the old data.

So whether you use array lists or immediate mode the vertices end up stored in the same manner in the display list. The only difference is the speed at which the lists are compiled (many function calls vs few function calls).

Enigma
Advertisement
So VBO''s arn''t any faster at drawing than a vertex array? I coulda swore some one did some tests and got a huge prefomance increase when he put the vert arrays in dlists.

Sorry for basily asking the same question, I just don''t wana misunderstand.
Enigma,

will a diplay list with:

for(i=0;i<something;++i)
{
glbegin(tri_strips);
//
//draw some verts
//
glend();
}

inside of it run as fast as a display list with:

glbegin(tri_strip);
draw_vertex_array(); // 1 tri long strip with deg. tri''s
glend();


??????
AP, I hope that isn''t how you use vert arrays
AP: providing the vertices are exactly the same they should render at exactly the same speed (i.e both methods use 1 triangle strip with degenerate triangles). A caveat that I should have mentioned before is that the drivers may compile the data differently, in which case there may be a speed difference. I do not know whether there are any drivers that do this. Any speed difference will be entirely due to driver implentation though, there is no functional reason for a speed difference.

skow: Vertex Buffer Objects are different to array lists in display lists. Also see my caveat above. If you can find the source of those test I'd be interested to see. Simplest way to check for yourself is to try it. Just make sure you use a large data set though.

Enigma

EDIT: clarification

[edited by - Enigma on February 26, 2004 12:48:11 PM]
skow,
I have never used vertex arrays before, but I assume that there are NOT multiple glbegin() & glend() calls in them, I assume you just call the gl_graw_vertex() function (or whatever its named) & pass it one long tri strip & it renders it all at once, versus say... that first method I showed above where I draw something using several glbegin() & glend() calls to draw the entity with several smaller tri strips. Instead of the one long tri strip for the vert array.

the point to the Q above was... is using one big vertex array in a display list better than just drawing several smaller tri strips (inside a loop).
Enigma I'll try it out later and see if there is any diffrence. Right now the terrain I'm doing is much to large for displaylists (4.6+ milllion verts, broken down into 260,000 5X5 meshes). But when I have a chance I'll do so testing to be sure.

Thanks again.

[edited by - skow on February 26, 2004 1:43:10 PM]
Vertex arrays are used with glDrawElements and such.

Using Blender I have been able to pull out the vertex points AND ther index points AND the normals so I can draw any mesh I export from blender into opengl using a custom Python exporter in blender and my model loading code in Blender. Texturing should be easy, I have yet to do that part of it. My next goal is to see if I can pull out armature information from Blender and then have skeletally animated models for OpenGL from a free modeler. If anyone is interested in seeing the end result of this let me know.

Clutch
AP: I imagine there is likely to be some performance difference in favour of vertex arrays in that case, but it will be driver dependant as to how much of a difference.

Enigma.

This topic is closed to new replies.

Advertisement