PDA

View Full Version : Vertex Arrays and VBOs



myk45
10-16-2012, 01:34 AM
Hello All!

I just started to take a look at how GL provides for specifying vertices(i mean OpenGL version >= 3.3 and in the core profile).
I see that we can use Vertex Arrays and VBOs.

Now, i had a few doubts:

Aren't Vertex Arrays also stored in the VRAM? (same as the VBO?) Why then do we need VBOs exactly? Since both are stored on the server side memory, i was wondering why exactly we have these two approaches?

Could anyone please explain this for me?

Alfonse Reinheart
10-16-2012, 01:41 AM
Your use of terminology is very confused. You should go read this (http://www.opengl.org/wiki/Vertex_Specification).

Here's the short version. "Vertex array" means exactly that: an array of vertex data. Where that array is store is not relevant to the concept of a series of bytes that represent and array of vertex data. "Vertex Buffer Object" is the common name for a Buffer Object that is used to store vertex array data in server-side memory. "Vertex Array Object" is an object that represents the information needed for OpenGL to interpret the data stored in buffer objects as vertex array data.

You create some buffer objects, store vertex array data in them, and then associate those buffer objects with vertex array objects so that OpenGL knows what to do with them.

V-man
10-16-2012, 10:54 PM
The old fashion vertex arrays are in RAM and when you draw with them, they get copied over to VRAM. That copy operation happens every time make a draw call. That's why VBO came along.
http://www.opengl.org/wiki/FAQ#Should_I_use_display_lists.2C_vertex_arrays_or _vertex_buffer_objects.3F

myk45
10-17-2012, 10:39 AM
Thanks Alfonse Reinheart, V-man,

> The old fashion vertex arrays are in RAM and when you draw with them

Yes, that was what had confused me. Now it is clear after reading the links provided by both of you. Thanks!