-
Vertex array not much faster?
I am outputing some triangle fans in my program.
but in immediate mode, calling glTexCoord2fv and glVertex3fv, I have a FPS of 82.
When calling glDrawElements(), FPS was 84, only a little faster.
Is this a resonable result?
my card is TNT2 Pro
-
Advanced Member
Frequent Contributor
Re: Vertex array not much faster?
Looks like your application is not CPU-limited, so you can't expect it to be faster with VAs.
Y.
-
Re: Vertex array not much faster?
Store vertex atribs. in video-memory.
-
Re: Vertex array not much faster?
On a TNT2, using DrawElement or friends
instead of immediate mode will not save as
much, because the CPU still needs to fetch
all the data and do the transform, so your
two bottlenecks are typically CPU transform
and texture fill.
Immediate mode adds some function call
overhead, which accounts for the 2 fps speed-
up you saw. Putting your vertex attributes
on the card (or in AGP memory) only helps on
cards with hardware transform, because there
the bottlenecks are different.
Thus, profile your code to see if you're fill
rate limited or vertex transform limited;
then take the appropriate algorithmic action
to reduce that part of your work (typically
by doing smarter culling or clipping in these
cases).
-
Re: Vertex array not much faster?
Excuse me please, you wrote TNT2 PRO,
I read GF2 PRO ;-).
-
Re: Vertex array not much faster?
How do you store vertex atribs in video memory?
-
Junior Member
Regular Contributor
Re: Vertex array not much faster?
Yeah?? what do you mean by that?? is this the locking system??
-
Re: Vertex array not much faster?
To Zedus:Storing vertex information in video memory is useful for GeForce 1-2 cards. There is NV_vertex_array_range extension. It's very easy to use this extension:
buffer=wglAllocateMemoryNV(sizeof(...)0,0,0);
glVertexArrayRangeNV(sizeof(...),buffer);
You can find demo at www.nvidia.com
-
Senior Member
OpenGL Guru
Re: Vertex array not much faster?
You shouldn't just draw 'some triangles' and then say something like, 'it's not that much faster'. You say your application was running at 82-84 fps, which can easily be the refreshrate of your monitor, and the driver is waiting for a new refresh before swapping the buffers (more commonly known as vertical retrace). What you need to do to be able to come with a more correct conclusion is to draw more that just a few triangles. I would say you need to draw several thousands of them. Begin with 10k or 100k or so.
And by the way, try turn off the 'wait for vertical retrace' if it is on,and if it was you will probably see a giant leap in performance.
-
Advanced Member
Frequent Contributor
Re: Vertex array not much faster?
I did some experiments with this: http://www.gamedeveloper.org/delphi3...d/transfer.zip
I also have a TNT2, and I found vertex arrays or display lists to be MUCH faster than the equivalent glVertex*() calls.
- Tom
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules