PDA

View Full Version : Swap Exchange - Swap copy



Blustuff
02-07-2004, 06:33 AM
The SwapBuffers function copies the back buffer to the front buffer. There is a way to exchange buffer instead copying, but i don't know how. I've try to pass PFD_SWAP_EXCHANGE as flag for PIXELFORMATDESCRIPTOR and to call glAddSwapHintRectWIN. In fact, windows still copies not exchange. What should i do ?

roffe
02-10-2004, 06:39 PM
Use WGL_ARB_pixel_format to iterate through pixelformats by querying WGL_SWAP_METHOD_ARB attribute and check for WGL_SWAP_EXCHANGE_ARB.
http://oss.sgi.com/projects/ogl-sample/registry/ARB/wgl_pixel_format.txt

However, make sure you initially receive a hw accelerated pixelformat to create a context where you have support for WGL_ARB_pixel_format.