I've been using OpenGL for a short time now- and I'd like some clarification on VBOs. As I understand it, a VBO is an object stored on VRAM. In immediate mode, to apply a texture we simply bind it and specify the texture coordinates before the vertex coordinates, however it doesn't seem that way with VBOs.
Question 1: Can I specify texture data in a VBO? What portion of the data?
Normally when I make a game in 2d I'd store all of my objects in instances of different classes, then when my drawing routine comes up- just draw the objects that are on screen. With a 3D environment it would be a bit more difficult to just draw the objects on the screen but with some math I'm sure it's doable.
Question 2: Once we figure out which objects need to be rendered, would it be acceptably fast to send those corresponding objects an "apply" request, and have them apply themselves? Or is there a better way?
Question 3: If I have a completely dynamic map, but with objects that won't change very often, are there any guidelines as to the performance differences between GL_STATIC_DRAW
and GL_DYNAMIC_DRAW
?
Final Question: Should I even consider using vertex lists? Or are VBOs just a better option?
glDrawElements
in each object- or should I store everything as triangles and just have oneglDrawElements
? Is either way viable? \$\endgroup\$