Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


OpenGL OpenGL Resize-Problem in a MFC-App

This topic is 5915 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!