Sign in to follow this  

Aspect ratio changing when window size changes

This topic is 4692 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

When running my program in windowed mode resizing the window will cause the objects to be drawn with incorrect aspect ratios. I made a fix by recalculating the projection matrix evertime i get the WM_SIZE message. This seems to work fine, but is there a better solution? Also I am using D3DXFont and eventhough Im recalculating the projection matrix it still gets drawn incorrectly. I have tried redoing D3DXCreateFont() everytime I detect a size change but it doesnt help.

Share this post


Link to post
Share on other sites
If you don't change the viewport size when the window size changes, you don't have to change the projection matrix. Otherwise, you have to change the projection matrix whenever the aspect ratio of the viewport changes.

Share this post


Link to post
Share on other sites

This topic is 4692 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this