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.
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.
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.