PDA

View Full Version : Vertex Arrays



Phoenix
12-13-2001, 10:16 AM
Hi!

I am having some doubts with vertex arrays. Do you think that glDrawArrays is faster than glDrawElements??? ...I have also another problem: I use 3d-exploration to convert 3d models but it produces arrays that are not suitable with glDrawElements or glDrawArrays...and this is a problem that arise always if you have faces of an object that share some vertices-coordinates but have different texture coordinates at each vertex...do you know a good converter that solve this problem or I have to it by myself?
thanx in advance!

Nutty
12-14-2001, 11:49 AM
DrawElements can be faster, if you reuse vertices alot, and you aren't bandwidth limited. Most cards have a vertex cache, that can reuse pre-transformed vertices, but this only happens in indexed mode.

I sometimes use 3D exploration myself. I wrote a program to output a more vertex array friendly data file.

Nutty

Phoenix
12-15-2001, 01:53 AM
Thanx a lot Nutty!...

But if I have many triangles that share vertex-coordinates but DON'T share texture-coordinates, drawArrays() should be faster??? and anyway, how could I know the bandwidth limit so that I render my object in more than one pass if it is needed???

Nutty
12-15-2001, 02:49 AM
IF you dont have any vertices that get re-used, than draw arrays will probably be faster, yes.

To find out if you're bandwidth limited can be quite tricky, but chances are that you aren't. You'll become fill rate limited, and geometry transformation limited before that.

Nutty