robertmachardy
03-05-2009, 06:09 AM
I am new to OpenGL. I have successfully built and run a minimal tutorial using OpenGL and the Win32API. I am attempting to implement double buffering. I have a timer that fires ticks to observers, as in the observer pattern. Currently and undesireably the application redraws the scene and calls the Windows command SwapBuffers(hdc) on every WM_PAINT. The application should redraw the scene and swap the buffers in response to a timer tick. A window should repaint itself with its front buffer on a WM_PAINT. How do I instruct a window to paint itself using its front buffer?
My application is set to double buffer by specifying PFD_DOUBLEBUFFER in the PIXELFORMATDESCRIPTOR. Should I look at implementing double buffering a different, more flexible way? One that doesn't rely on the Windows command SwapBuffers? Handle my own buffers? Does this functionality lie in pbuffers?
I research this as I go. I google search, I look at the OpenGL SDK, forums, and a couple text books. What are some other good online references?
My application is set to double buffer by specifying PFD_DOUBLEBUFFER in the PIXELFORMATDESCRIPTOR. Should I look at implementing double buffering a different, more flexible way? One that doesn't rely on the Windows command SwapBuffers? Handle my own buffers? Does this functionality lie in pbuffers?
I research this as I go. I google search, I look at the OpenGL SDK, forums, and a couple text books. What are some other good online references?