PDA

View Full Version : Windows Menu & OpenGL



AhmedSabry
02-13-2008, 12:16 PM
Hello All
I am using MFC with OpenGL to code multimedia application, I am using SDI architecture, and I found that when I open any menu item and select it, windows sometimes donít erase the menu area immediately, and it appears like a shadow over the OpenGL window, until I do any repaint action it disappears
It seems to me that it is windows issue, but I am not sure!
i had posted this issue in another forum, but i still couldn't able to solve it
http://www.codeproject.com/script/Forums/View.aspx?fid=1647&msg=2426136

Zengar
02-13-2008, 12:41 PM
Your OpenGL window is responcible for repainting itself, the OS won't cache the image. Actually your window should receive a invalidating message in such case? Hovewer, I never worked with MFC and have no idea how it works...

AhmedSabry
02-13-2008, 12:55 PM
i can send you a screenshot, if you want to understand what i mean exactly

kampretz
02-13-2008, 03:55 PM
my guess is that you use only a single thread.
if you do only use a single thread, most likely this kind of things might happened. what happened is before your program completely clear the menu, it already busy doing something else (maybe drawing your opengl things). you can prevent this by using multithreading.