Saturday, March 25, 2017

c++ - Multiple buffering in OpenGL on Windows



  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 ?




Answer



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.



No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...