Jump to content
  • Advertisement


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


How is it possible to disable perspective in D3D?

This topic is 6778 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''m using D3D for my render engine, and in one of my little demo''s it is supposed to simulate a RTS with an overhead view. I want to render the 3D units over a 2D terrain - I have it all working but D3D is mucking it up! My units, as they move away from the center of the screen, appear to warp (its the perspective, I know that) - does anyone know how I can turn it off so that all things are flat? It''s hard to describe, so I''ll do some ASCII art (hehe) What it does: ______ / \ <- 3D object ++ <- camera What I want: -------- <- 3D object ++ <- camera If you have ever played the game Total Annihilation (or the sequal) - that''s what I''m going for. They used their own render API, but I don''t want to do that... Thanks for any help, Ben Vanik

Share this post

Link to post
Share on other sites
You can create an orthogonal projection matrix instead of the usual perspective projection matrix. My suggestion is to use D3DXMatrixOrthoLH() to do this.

D3DXMatrix Ortho;
D3DXMatrixOrthoLH(&Ortho, w, h, n, f);

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!