Original Post
I have a weird problem in my OpenGL application ( which is a game engine ). One of the options in this application is to render in multiple screens at different frame rates with a single game thread ( which is the application main thread ). First of all, I've disabled the vsync option with the GL extension "wglSwapIntervalEXT". Everything works fine here even though there is some screen-shearing ( a understandable problem with the vsync disabled ). Then I coded my own system to synchronize the rendering using the multimedia timer. The timer callback does nothing by itself, it just increments a value by a value determined by the fastest FPS. The main code that chooses if the rendering should be done is called in the main thread. Here again, the rendering works fine if my used-defined vsync is disabled ( but the multimedia timer is still running with a callback that does nothing ). The problem occurs when I enable my user-defined vsync. The screens are not refresh. All the calls to OpenGL ( including glFlush, glFinish and SwapBuffers ) are done at the correct framerate. It looks like Windows does not receive any drawing message to update the screen ( WM_PAINT or something like that ) in windowed mode and in full screen. I've run my application in gDebugger ( a great OpenGL debugging tool, I migh add ) and I see the OpenGL frame counter is always at 0. But as soon as I resize the window, the screen is updated for 1 frame. Like I said, if I disable my vsync code, the screens are updated correctly. Anyone can shed some light on this problem??? I've been trying to find the probleme for the last 2 weeks or so... Thankx!