Jump to content
  • Advertisement
Sign in to follow this  

what is buffer and glutSwapBuffers?

This topic is 4312 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

"Buffer" here refers to the region of (video) memory where the computer renders image frames.

With double-buffering, two such buffers are used, the front buffer and the back buffer. The front buffer is the one that contains the frame you are currently seeing. The back buffer is the one in which the computer is currently busy rendering the next frame. When that rendering is done, the two buffers are swapped, instantly updating the image you see to be the next-now-current frame. The computer then again moves on to rendering a new frame in what is now its current back buffer.

This technique ensures that you only ever see fully rendered frames rather than "work in progress".

glutSwapBuffers() is the GLUT function that instructs the computer that you are done with the current frame and the buffers should be swapped so that that frame be displayed and so that you can begin working on the next.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!