Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Are VBOs only for OpenGL 3.x?

I'm using immediate mode and I know it's bad, slow, and deprecated. But then I looked at display lists but they are deprecated too. I guess the VBO is the only one left so is it only for OpenGL 3.x?

share|improve this question
1  
Welcome to the site. This is a Q&A site, not a discussion forum, so we prefer that you ask only a single question per post. I have thus removed your secondary questions from this post; you may re-post them as separate questions if you like (but search first, to make sure they aren't duplicates). See the help center for more. –  Josh Petrie May 9 at 16:18

4 Answers 4

up vote 4 down vote accepted

The vertex buffer object APIs were added to OpenGL's core API in version 1.5. At some point, they were available as extensions, such as ARB_vertex_buffer_object.

Wikipedia has a good overview of the version history of OpenGL.

share|improve this answer
    
I believe VBOs exist since OpenGL 1.5. –  Sri Harsha Chilakapati May 9 at 16:29
    
Do you have a link to a source? The version history linked above suggests they were an extension in 1.5, as does the usage example (which actually suggests 1.4). I don't have older copies of the relevant specifications handy to check directly against them. –  Josh Petrie May 9 at 16:36
    
LWJGL documentation says that glGenBuffers() and the rest functions are in GL15 class. [lwjgl.org/javadoc/org/lwjgl/opengl/GL15.html#glBindBuffer(int, int)](GL15) –  Sri Harsha Chilakapati May 9 at 16:38
    
I'm not sure I'd consider that an authoritative source, since it could very well be calling the extension function under the hood (and that's sort of what it appears to be doing from my limited understanding of the source). –  Josh Petrie May 9 at 16:51
    
@JoshPetrie opengl.org/wiki/GlGenBuffers "Core since version 1.5." Also the extension function is afaik indistinguishable from the core function. –  Colonel Thirty Two May 9 at 23:00

VBOs have been available since OpenGL 1.4 as an extension and were added to the core in OpenGL 1.5. You can use either version depending on your needs, if you strictly want to use OpenGL 3.1 with the core profile only, then VBOs are your only option.

If you want to use compatibility profile, you can always use the deprecated functions. Keep in mind that "deprecated" only means that it might be removed from the standard, but no major vendors have plans drop support for it.

share|improve this answer
    
I believe VBOs exist since OpenGL 1.5. –  Sri Harsha Chilakapati May 9 at 16:30
    
I don't believe in OpenGL 1.x ;) –  cubuspl42 May 9 at 18:18

No, VBOs are not only for 3.x, they are 3.x+ (including 4.x) and even back to the 2.x specification at least, probably earlier. It's safe to assume that any platform supporting OpenGL will (likely) support at-least 2.1, so you'd be safe to use buffer objects if your worried about gpu support (and maintaining code.)

VAOs are a bit of a different story, they weren't around in 2.1, and are required with 3.x+ core profiles (though not necessarily with a compatibility profile.)

If you feel to bad about using Immediate-Mode, and don't want to switch, you could probably find/create an API that has the Immediate-Mode functions but renders the primitives using the newer API versions. That wouldn't be the suggested rout though.

share|improve this answer
    
if you can't even be bothered researching the answer ("... probably earlier", etc.) then don't post. –  Miles Rout May 10 at 2:45

There is a lot of misinformation floating around here. Buffer Objects were introduced into core in OpenGL 1.5. They existed in extension form as far back as OpenGL 1.4.

Vertex Buffer Objects are basically an evolution of ATi's original Vertex Array Object extension. That extension has the unfortunate honor of sharing its name with a completely different concept by the same name in modern OpenGL. In fact, Buffer Objects now describe a generic source of dedicated server (GPU) storage. You can use this memory for vertices, indices, textures, uniforms, transform feedback, pixel transfer, and so on in modern GL.

Prior to Vertex Buffer Objects, vertex memory was transferred from client (CPU)->server (GPU) everytime you called glDrawArrays (...). That is because GL did not own the memory referenced by vertex array pointers, and the CPU and GPU generally operate asynchronously with potentially many frames queued up in advance. Since the CPU could modify vertex memory at any time without the GPU's knowledge, implementations either had to copy data immediately when glDraw* (...) was called or block the CPU until vertex processing finished. Many attempts were made to address this issue over the years, including things like NVIDIA's Vertex Array Range, which allocated special memory for DMA data transfer. However, ultimately VBOs were the only real way to solve it.

VBOs plug that hole by making the only way to access vertex memory by using GL commands. Now GL knows anytime memory is changed and does not have to waste time copying data for every draw command.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.