Vertex buffer object

A vertex buffer object (VBO) is an OpenGL feature that provides methods for uploading vertex data (position, normal vector, color, etc.) to the video device for non-immediate-mode rendering. VBOs offer substantial performance gains over immediate mode rendering primarily because the data reside in video device memory rather than system memory and so it can be rendered directly by the video device. These are equivalent to vertex buffers in Direct3D.

The vertex buffer object specification has been standardized by the OpenGL Architecture Review Board as of OpenGL Version 1.5 (in 2003). Similar functionality was available before the standardization of VBOs via the Nvidia-created extension "vertex array range" or ATI's "vertex array object" extension.

Basic VBO functions
The following functions form the core of VBO access and manipulation:


 * In OpenGL 1.4:
 * glGenBuffersARB(sizei n, uint *buffers)
 * Generates a new VBO and returns its ID number as an unsigned integer. Id 0 is reserved.


 * glBindBufferARB(enum target, uint buffer)
 * Use a previously created buffer as the active VBO.


 * glBufferDataARB(enum target, sizeiptrARB size, const void *data, enum usage)
 * Upload data to the active VBO.


 * glDeleteBuffersARB(sizei n, const uint *buffers)
 * Deletes the specified number of VBOs from the supplied array or VBO id.


 * In OpenGL 2.1, OpenGL 3.x and OpenGL 4.x:
 * glGenBuffers(sizei n, uint *buffers)
 * Generates a new VBO and returns its ID number as an unsigned integer. Id 0 is reserved.


 * glBindBuffer(enum target, uint buffer)
 * Use a previously created buffer as the active VBO.


 * glBufferData(enum target, sizeiptrARB size, const void *data, enum usage)
 * Upload data to the active VBO.


 * glDeleteBuffers(sizei n, const uint *buffers)
 * Deletes the specified number of VBOs from the supplied array or VBO id.

In C, using OpenGL 3.x and OpenGL 4.x
Vertex Shader: Fragment Shader: Main OpenGL Program: