We are independent & ad-supported. We may earn a commission for purchases made through our links.
Advertiser Disclosure
Our website is an independent, advertising-supported platform. We provide our content free of charge to our readers, and to keep it that way, we rely on revenue generated through advertisements and affiliate partnerships. This means that when you click on certain links on our site and make a purchase, we may earn a commission. Learn more.
How We Make Money
We sustain our operations through affiliate commissions and advertising. If you click on an affiliate link and make a purchase, we may receive a commission from the merchant at no additional cost to you. We also display advertisements on our website, which help generate revenue to support our work and keep our content free for readers. Our editorial team operates independently of our advertising and affiliate partnerships to ensure that our content remains unbiased and focused on providing you with the best information and recommendations based on thorough research and honest evaluations. To remain transparent, we’ve provided a list of our current affiliate partners here.
Hardware

Our Promise to you

Founded in 2002, our company has been a trusted resource for readers seeking informative and engaging content. Our dedication to quality remains unwavering—and will never change. We follow a strict editorial policy, ensuring that our content is authored by highly qualified professionals and edited by subject matter experts. This guarantees that everything we publish is objective, accurate, and trustworthy.

Over the years, we've refined our approach to cover a wide range of topics, providing readers with reliable and practical advice to enhance their knowledge and skills. That's why millions of readers turn to us each year. Join us in celebrating the joy of learning, guided by standards you can trust.

What Is an OpenGL® Vertex Buffer?

By Eugene P.
Updated: May 17, 2024
Views: 6,808
References
Share

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.

Share
WiseGeek is dedicated to providing accurate and trustworthy information. We carefully select reputable sources and employ a rigorous fact-checking process to maintain the highest standards. To learn more about our commitment to accuracy, read our editorial process.
Link to Sources

Editors' Picks

Discussion Comments
Share
https://www.wisegeek.net/what-is-an-opengl-vertex-buffer.htm
Copy this link
WiseGeek, in your inbox

Our latest articles, guides, and more, delivered daily.

WiseGeek, in your inbox

Our latest articles, guides, and more, delivered daily.