Hi folks;
I’m working on an interactive modeling program using OpenGL. My application runs on Win32, and I’m using double buffering. Sometimes I need to use GDI to do some drawing on top of the window after I have called SwapBuffers().
I’ve experimented some, and I am coming to the inescapable conclusion that the actual buffer swap is delayed and is happening after I make my GDI calls. Here’s the order of things:
- Do OpenGL rendering
- SwapBuffers()
- glFlush()
- GDI calls
And yet it seems that my OpenGL graphics are in fact overwriting the display generated by my GDI calls.
If I insert a long delay between just before calling GDI, then it works as expected.
Can anyone explain what is going on here?
Thanks,
Dan