Vertex Arrays, Vertex Buffer Objects
by seskapeel » Sat, 12 Jul 2003 20:30:10 GMT
Hi list.
I implemented rendering using display lists, vertex arrays, and vertex
buffer objects. And guess what was the faster ? ... display lists !
It should mean that I implemented badly those array stuff.
For the VBO part, I'm quite sure that today drivers are not correctly
implemented - systematically crash on some ATI hardware, even if
extention is detected, poor perfs on nVidia. After all, it runs as
fast as plain vertex arrays.
For the VA part ... I guess all static geometry could be rendered
using glLockArray() ... ? I think this is called compiled vertex array
? Is this an improvement compared to plain vertex arrays ?
Will I have to go to VAR to achieve correct perfs ?
Thx for enlightments
SeskaPeel.
Re: Vertex Arrays, Vertex Buffer Objects
by fungus » Sat, 12 Jul 2003 21:17:53 GMT
On the previous generation of drivers, display lists
were faster on NVIDIA cards and ATI_vertex_array_object
was faster on ATI cards.
On the very latest drivers VBO seems to be optimal
on both brands of card so I think VBOs are the way
forward...
I've had lots of problems with display lists on ATI.
> I think this is called compiled vertex array?
Yes, it's a CVA.
If you're sharing vertices between multiple polyons
with indexing then "yes". If not, it won't make much
difference.
I wouldn't recommend it. VAR is obsolete and only
works on one brand of card. With the latest drivers
VBO is just as fast.
--
<\___/> For email, remove my socks.
/ O O \
\_____/ FTB. Why isn't there mouse-flavored cat food?
Re: Vertex Arrays, Vertex Buffer Objects
by Johan "MrDutchy"van den Broek » Sun, 13 Jul 2003 00:25:26 GMT
> For the VA part ... I guess all static geometry could be rendered
I use vbo's in my program too and i'd like to know what glLockArray() does.
Where can i find documentation on this? Google only got a few hits to
useless sites. My geometry is static too, would it be faster using
glLockArray()?
MrDutchy.
Re: Vertex Arrays, Vertex Buffer Objects
by Johan "MrDutchy"van den Broek » Sun, 13 Jul 2003 01:44:12 GMT
I found more documentation when i was searching for LockArraysEXT, i believe
it is what SeskaPeel referred to.
Here is what i found in the nvOpenGLspecs, it doesnt mention vbo's directly,
though it sounds like it would speed them up by saving some transformations
in the case 2 vbo's have shared vertices.
Please correct me if i'm wrong.
"For example, rendering an M by N mesh of quadrilaterals can be
accomplished by setting up vertex arrays containing all of the
vertexes in the mesh and issuing M DrawElements commands each of
which operate on 2 * N vertexes. Each DrawElements command after
the first will share N vertexes with the preceding DrawElements
command. If the vertex array data is locked while the DrawElements
commands are executed, then OpenGL may be able to transform each
of these shared vertexes just once."
MrDutchy.
Re: Vertex Arrays, Vertex Buffer Objects
by fungus » Sun, 13 Jul 2003 04:52:52 GMT
> glLockArray() does.
It tells openGL that you're not going to change
any values in the arrays.
This gives OpenGL the chance to upload them to
the card, transform them as a big block instead
of transforming individually, etc.
I mean, if it wants to. It migh not, you're just
giving it the option.
--
<\___/> For email, remove my socks.
/ O O \
\_____/ FTB. Why isn't there mouse-flavored cat food?
Re: Vertex Arrays, Vertex Buffer Objects
by seskapeel » Mon, 14 Jul 2003 01:42:53 GMT
> On the very latest drivers VBO seems to be optimal
From my point of view, it really doesn't add any improvement.
I was speaking of crashes with buffer objects on ATI cards, not
display lists. Display lists always ran fine on both vendors.
I just can't seem to figure out where VBO improves anything on any
card ...
Of course I am. Is this extention widely supported ?
When you say it will improve, what will it give compared to VBO ?
compared to plain vertex arrays ? compared to display lists ?
Thanks,
SeskaPeel.
Re: Vertex Arrays, Vertex Buffer Objects
by fungus » Mon, 14 Jul 2003 14:09:28 GMT
With the latest drivers? I haven't had any problems so far...
But that's only on *your* card. YMMV but from my timings
(done this week with the latest drivers and quite a few
graphics cards) VBO is as fast as any other method and
is the most flexible. I think it's best all-round option
for new development.
Display lists can be as fast but they have a number of
disadvantages, eg. you can't change the data in them.
Yes. It's possibly the most widely supported extension
of them all.
http://www.**--****.com/
VBO will be faster simply because the data is (usually)
stored on the graphics card. With CVA the data is in
main memory and has to be sent to the card every time.
--
<\___/> For email, remove my socks.
/ O O \
\_____/ FTB. Why isn't there mouse-flavored cat food?
Re: Vertex Arrays, Vertex Buffer Objects
by seskapeel » Tue, 15 Jul 2003 01:19:32 GMT
Similar Threads:
1.Changing vertex color after vertex buffer and index buffer definition
Hi,
Say you have this custom vertex structure:
struct CUSTOMVERTEX
{
float x, y, z;
DWORD color;
};
Is it possible once you've defined values for a vertex
buffer using that structure to subsequently change the
color for a vertex that you defined? If so, how?
Thanks :)
2.Vertex arrays: vertices shared, tex coords not shared
Hi,
I'm trying to use Vertex arrays to draw multiple
triangles that share a vertex. The triangles are
textured, BUT the texture coordinates are not
shared ie. the shared vertex has different texture
coordinates for each triangle that shares it.
Can vertex arrays can be used in this situation?
To explain it more fully, consider the following.
Two triangles share a vertex. The triangles are
textured, using the same texture image, but
from completely different parts of the image
==> the shared vertex has two sets of texture coords.,
one for each triangle
I specify what data is to be used:
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
and then tell it to draw the faces by specifying
one or more indices, which reference the arrays
that store the vertex, normal, tex coord data
etc. As far as I can see, the index is applied
to all arrays simultaneously. That is OK for the
vertex data, but not for the texture coords.
Is there some way of using a different index for
the texture coordinate array than the vertex array?
steve
3.Find vertices inside a vertex array
Is there any way using openGL functions to find if a set of vertices
is contained in a vertex array?
Thanks,
Antonatos Spiros
4.Large Vertex Buffers and Vertex Streams?
5.vertex array with multiple closed loop objects
Dear All,
I would like to use one big memory array, which i fill with xyz vertices
and corresponding colors, and then I call indiced version of drawing
(glDrawElements). But my question is: i would like to use MORE
GL_LINE_LOOP objects in one big array. Is there some way how to tell to
openGL, that at certain point starts new GL_LINE_LOOP element (so he is
supposed to close the previous one and start new one)?
Thanks
david
6. about vertex array and wire objects...
7. Multiple objects in a single vertex buffer.
8. how scale a pVB vertex buffer object ?