Rendering gets "crackly" when moving the window...

Started by
2 comments, last by Gumgo 16 years, 11 months ago
Whenever I resize my OpenGL window it does this: Before After What can I do to fix this? Alternatively, how can I disable resizing of the window and maximizing (that may be more about Windows API)
Advertisement
by window do you mean MS window or openGL viewport ?

To prevent resizing the openGL viewport, just don't send any glViewport command. To prevent resizing a window, just suppress the resize/maximize buttons.
If you resize the window, always insure you resize the viewport to the
new window size.

Also, after resizing the window and viewport, insure you clear the color
and z buffers, and reset the identity matrix via glLoadIdentity()

This might fix the problem.

If you dont want to allow resizing, just use the WS_OVERLAPPED or
WS_POPUP window styles when calling CreateWindow/CreateWindowEx

Hope this helps!
( WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX ) does the trick, thanks!

This topic is closed to new replies.

Advertisement