View Full Version : loos focus and display by resize window
05-24-2005, 10:24 PM
I created a 3D animation with is not displayed after resize the window. in addition I loos the focus of the window and the only way to exit the animation is to stop the debuger.
Here are the code:
GLvoid Resize(GLsizei breite, GLsizei hoehe)
glViewport(0, 0, breite, hoehe);
Who has an idea, what's going on? Thanks for help.
05-24-2005, 11:59 PM
Not an advanced OpenGL question.
Read the manual on what values to return if your message handler handled a particular message.
WM_SIZE needs to return zero here to keep the break from running though the default window message handler proc.
How do you resize the window in a way to lose focus? Manually can't loose the focus.
SetFocus(HWND) could be used to regain focus.
A resize message is normally followed by a WM_PAINT message. If that's not working your message handler is incorrect.
Check if you have an OpenGL context current while you send the GL commands.
What HW, video memory amount and viewport sizes are you using? Maybe you fell back to software rendering for bigger windows and it just took an awful lot of time to redraw.
If you're switching desktop resolutions, don't do this while OpenGL is running. There are enough implementations not handling this.
05-26-2005, 08:40 PM
Everything works until SwapBuffers(deviceContext) is reached after resize the window. It's like an endless loop. Since today it's not even possible to use the debugger. Because after setting an breakpoint in the Main Loop there is no way to get back to the animation-window. It's not responding anymore. It's very strange.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.