Jump to content
  • Advertisement

Archived

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

jgoewert

Orthogonal Techniques Questions

This topic is 5306 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 am using an engine that basically makes a call through to either the Open GL or DirectX ortho functions, but I am encountering some issues that I don''t understand if they are correct or not. Every Orthogonal tutorial I have seen says to set the min and max values to -1 and 1. But when I do this, anything that I set to more than 1.0 on the Z axis doesn''t render, which I almost understand. So, since I place 3D elements up to 16 units away on the Z, I set my min and max distances to -16 and 16. Is this a valid way to use Ortho views or should I be handling the rendering order and putting every block in the -1 to 1 Z-axis range? The second part to the question lies in a tutorial I wrote. http://www.saigumi.net/archives/000067.html The engine I use has a function that looks like the OpenGL and DX Ortho view functions. MyMatrix.buildProjectionMatrixOrthoLH(16.0f,12.0f,3.5f,-3.5f); But if I swap the min and max numbers as the tutorials I have seen do, the rendering order is backwards. (Look at the bottom of the guide. Am I thinking about Ortho views wrong and doing everything backwards?

Share this post


Link to post
Share on other sites
Advertisement
Most people are using ortho to display in 2D, in which case -1 to 1 will work fine. If you using it for 3D, then no, -1 to 1 won''t work atall and you need to set them to sensible values, ie your -16 to 16. It''s fine. Don''t worry about it :o)

Share this post


Link to post
Share on other sites
Thanks, that makes sense then.

I was worried that what I was doing was a kind of work-around that would bite me later.

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!