Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.
  1. What is the most common way modern games perform triple buffering ?
  2. What does the SwapBuffers exactly do in terms of OpenGL states ?
  3. Is it possible to perform double and triple buffering independently of window system (for example, by manipulating with glDrawBuffer or by using FBO/PBO) ? If so, any hints ?
  4. Does 3. even make sense in terms of performance and flexibility ?
share|improve this question

1 Answer 1

up vote 2 down vote accepted

This quote answers most of your questions:

You cannot control whether a driver does triple buffering. You could try to implement it yourself using a FBO. But if the driver is already doing triple buffering, your code will only turn it into quadruple buffering. Which is usually overkill.

http://www.opengl.org/wiki/Common_Mistakes#Triple_Buffering

What does the SwapBuffers exactly do in terms of OpenGL states ?

From what I understand, it doesn't really do anything other than flushing GL and swapping the buffers.

share|improve this answer
    
"You could try to implement it yourself using a FBO." it says "You could", but would FBO be actually the best approach ? –  user Apr 3 '12 at 22:22
    
@geneotech The best approach seems to involve no FBO - just let the driver do the buffering. Otherwise, a FBO should be ideal. –  Pubby Apr 3 '12 at 22:25
    
That's what I wanted to hear. So, referring to the game development, I should probably implement both double and triple buffering and leave an option in graphics settings, so when the user is aware of his driver settings, he can turn off multiple buffering in my application at all, and let it be done by driver. Am I right ? –  user Apr 3 '12 at 22:43
1  
@geneotech: Or... not. Just let the driver do its job and you do your job. Triple buffering exists to solve a problem. If you're not having that problem, then why would you implement it? –  Nicol Bolas Apr 3 '12 at 23:47
1  
@geneotech: are any of these games using OpenGL, or are the ones you're thinking of using Direct3D? –  Sean Middleditch Apr 4 '12 at 7:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.