Jump to content
  • Advertisement
Sign in to follow this  
d000hg

2D using Direct3D - RHW Vs Ortho?

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

For menus and other 2D stuff in my 3D project, I currently use a pre-transformed FVF with RHW. This is satisfactory except that pre-transformed vertices don't get adjusted for the viewport in use, which for a split-screen project is a problem. Obviously, knowing the viewport I can scale the vertices myself, but I wondered if there's a better way to get D3D to do the transforms (and also clipping etc) for free without having to do ugly hacks like projecting from 2D into 3D first...? I remember that there is a different view type which avoids perspective being used - an Orthogonal projection I think? What do the rest of you use for your 2D stuff?

Share this post


Link to post
Share on other sites
Advertisement
I use ortho, not for viewport stuff but because it allows you to use shaders and transforms. I've written an open source 2D library in C# with samples if you're curious about ways to implement orthogonal 2D rendering/what you can do with it, my method is a little bit different from the stuff I've seen in tutorials: http://www.flecko.net/trans2d, gamedev.net therad here

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!