I have an app that has problems with flickering.
Let me explain how the application works which is non-standard.
-
I use wglChoosePixelFormatARB with a parameter of 4 to try to find 4x multisampling. If that fails i try for 2x, otherwise i default to normal pixel format.
-
I am enabling 4xAA using glEnable(GL_MULTISAMPLE_ARB) when I init.
-
I once per second, I use simple gl commands to draw to the back buffer and call glFinish, then copy the backbuffer to a DIB using glReadPixels where I am doing some extra processing to the image using GDI.
-
The result is finally drawn to windows using UpdateLayeredWindow.
I can see that when I call UpdateLayeredWindow the resultant DIB does appear on the screen, but the temporary backbuffers flicker on the screen as well.
What could cause the back buffer to appear on the windows desktop. Im not calling swapbuffers at all, as far as I know.