OpenGL Resize-Problem in a MFC-App

Started by
-1 comments, last by PGmeiner 21 years, 9 months ago
Hello, I have a strange problem with OpenGL and an MFC-Application. I have set up a simple MFC-Dialog, put a Picture-Box on it which is the Drawing-Region. Now when i Resize the Dialog and the Picture-Box(Drawing-Region) I set the viewport and the projection-Matrix corresponding to the new size of the Drawing-Region. The Problem is when i resize the Dialog to a special greater size i get a black Region in a part of the Drawing-Region. It looks like that the OpenGL-Drawing-Window is limited to a special size and only there we can draw. But I do not find such a limitation (also the viewport-Max Values were not exceeded). I think that this has to do with windows-settings. Perhaps somebody knows more about this phenomen. Thanks for any help. Peter G. P.S.: during Resizing following OpenGL-Action were done: glViewport(0, 0, (GLsizei) width, (GLsizei) height); glMatrixMode (GL_PROJECTION); glLoadIdentity (); // Set the Projection-Matrix gluOrtho2D( 0, // left width, // right height, // bottom 0); // top // Switch to ModelView-Mode glMatrixMode (GL_MODELVIEW); glLoadIdentity (); Peter Gmeiner
Peter Gmeiner

This topic is closed to new replies.

Advertisement