Internet
Fact-checked

At EasyTechJunkie, we're committed to delivering accurate, trustworthy information. Our expert-authored content is rigorously fact-checked and sourced from credible authorities. Discover how we uphold the highest standards in providing you with reliable knowledge.

Learn more...

What Are OpenGL® Buffers?

Eugene P.
Eugene P.

OpenGL® buffers are areas in computer memory that are used to store sequences of information so they can be accessed very quickly and easily without the need to re-calculate the data each time. Although, as in normal computer programming, OpenGL® buffers are basically just consecutive blocks of allocated computer memory, OpenGL® itself actually structures the buffers within a program by defining what type of information will be held within the buffer so certain optimizations can be used. There are several types of OpenGL® buffers including framebuffers, pixel buffers and vertex buffers to name just a few. One of the important features of the buffers under OpenGL® is that they can be stored in areas of memory where access to the information within the buffer can be faster than normal. The intended amount of use for an OpenGL® buffer can help to determine where the buffer is actually stored, with the usage defined by declaring the buffer as static, dynamic or stream.

One of the advantages of using OpenGL® buffers is that they are able to be located in memory that is accessed very quickly. Important types of buffers, such as framebuffers, can actually be placed directly into the memory of the graphics card being used. This means information can be passed directly from the buffer to the graphics processing unit (GPU) without having to travel from one physical hardware board to another. Moving raw information, such as a pre-rendered screen inside of a framebuffer, to another memory location without any type of processing is a technique known as blitting, and it is one of the fastest ways to move information in memory.

OpenGL® is often used to render three-dimensional graphics objects.
OpenGL® is often used to render three-dimensional graphics objects.

There are several types of OpenGL® buffers, although each is really just a block of memory. One of the most used is called a framebuffer. A framebuffer holds the information necessary to display the current frame to the display device. The information inside a framebuffer is ordered in the same way as the memory used to control what the monitor displays. This means that, if a framebuffer is located on a graphics card, then the image can be blitted to the screen nearly instantly, although it does take time to actually render the scene into the buffer first.

Other types of OpenGL® buffers, such as a vertex buffer, can hold entire sequences of information. These types of buffers are used to keep sequential blocks of information that could need to be accessed or changed many times every second. Additionally, the OpenGL® buffers themselves can often be passed as arguments to functions that can take advantage of the ordered state of the buffer and perform calculations very quickly.

Discuss this Article

Post your comments
Login:
Forgot password?
Register:
    • OpenGL® is often used to render three-dimensional graphics objects.
      By: maya2008
      OpenGL® is often used to render three-dimensional graphics objects.