-
VBOs for 2D
G'day,
Well, most of my books start with teaching glVertex*() and so-forth, only to mention in later chapters that they're deprecated in favor of VBOs.
However, upon researching VBOs it appears not all cards support them -- well the older ones don't.
So my question is, should I be using VBOs for simple (low performance) 2D tile-like games? The only thing I'm explicitly using card memory for is textures.
Thanks
Zac
-
glBegin(), glEnd() and glVertex*() are the immediate mode and it is so slow because of the function overhead.
I tried loading a heightmaps with 522,422 triangles on my 3D engine a while ago with vertex array only and it runs at 52fps. With VBO, it runs at 132fps.
So, I guess it really depends on how heavy your program is. Why don't you just check if the card supports VBO? If so, use VBO otherwise, use vertex arrays.
Coldviper
-
Well, thanks for the reply. I plan on having about 1000 or so triangles on screen at a time.
But I shall do what you recommended with VBOs :-).
Thanks again.