Jump to content
  • Advertisement
Sign in to follow this  
theunicorn

Meshes dont show properly

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

I hope that there is a very simple answer to this question. My application runs in full screen and has a fixed resolution which I initiate direct3D with. Whenever I load in a mesh however they stretch out a little bit to compensate for the screen. They are fine if I have a window with an equal x and y-value but now it seams to stretch. Any help would be much appreciated.

Share this post


Link to post
Share on other sites
Advertisement
This is actually correct behaviour. You can control it, however. The projection matrix determines how the 3D objects are rastered onto a 2D plane (the back buffer). It has a horizontal viewing angle (in 3D terms) and a vertical viewing angle (respetively X-field-of-view and Y-field-of-view). You have to make their ratio equivalent to the aspect ratio of the screen. Such that

fovx / fovy ~ width / height

If you are using D3DX as well, this can be accomplished by passing only fovy and the aspect ratio to D3DXMatrixProjectionFovYLH().

Greetz,

Illco

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!