What Is an OpenGL® Vertex Buffer?

Article Details
  • Written By: Eugene P.
  • Edited By: Angela B.
  • Last Modified Date: 12 January 2020
  • Copyright Protected:
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
Researchers have developed an online game that helps people become more aware and more skeptical about "fake news."  more...

January 17 ,  1946 :  The United Nations Security Council held its first meeting.  more...

An Open Graphics Library® (OpenGL®) vertex buffer is an area of computer memory often located directly on a graphics card that allows very fast access to an array of vertices and their properties. Most often, an OpenGL® vertex buffer is used to create a vertex buffer object (VBO), allowing objects within a three-dimensional (3D) scene to be rendered as part of a display list and not in immediate mode. Occasionally, however, a vertex buffer can be used outside a VBO to store information about an object or to help make transformations easier on complex models. It should be noted that a vertex buffer does not have to be located in the graphics card memory, because it can be allocated like any data structure. If the OpenGL® vertex buffer is going to be used as part of a VBO, then the graphics card being used must support the special OpenGL® VBO extension to ensure the buffer is placed in graphics memory.

At the most basic level, an OpenGL® vertex buffer is just a simple buffer, an allocated area of memory in which data can be stored. It becomes a vertex buffer when a vertex array is stored within it. An OpenGL® vertex array is an array of data structures that defines all the properties of individual vertices. This information can include the X, Y and Z locations of the vertex in the 3D scene, the color of the vertex, the normal and other properties.


In immediate mode rendering, OpenGL® commands are executed directly as they are called from within a program. It is unnecessary in these cases to have a vertex array, because the commands for placing and drawing a vertex can be given directly to the hardware, although this can cause serious performance issues. For non-immediate mode rendering, the information about a 3D object or model needs first to be placed in a vertex array so it has a structure that OpenGL® can easily interpret; that array must then be stored in a special area of memory known as an OpenGL® vertex buffer.

By itself, the vertex buffer does not necessarily have any special attributes other than being a complete collection of information used to draw an object. When the OpenGL® vertex buffer is converted into an OpenGL® vertex buffer object through the OpenGL extension, however, a special sequence of events occurs to help optimize the drawing of the object defined in the vertex buffer. Namely, the buffer is allocated and stored in graphics card memory, on the server side of the client-server setup OpenGL® uses. Some calculations also can be performed in advance on the VBO so it can be rendered as fast as possible. Outside of a VBO, a plain vertex buffer does not usually receive this treatment and can be allocated and used like any other data type.


You might also Like


Discuss this Article

Post your comments

Post Anonymously


forgot password?