Jump to content
  • Advertisement
Sign in to follow this  
jagguy

running 2D with DX9

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

if you want to do 2D games with dx9c then what do you do? Is it easier to just use an earlier version of directX?

Share this post


Link to post
Share on other sites
Advertisement
Yes, it is possible. However, the trick is to actually use 3D to do your 2D work. Basically, you have two main types of viewing: projection, and orthographic. Projection creates the illusion of depth, where objects can appear further away from the camera. Orthographic on the other hand, does not do this, thus creating the illusion that there is no depthto the scene (and in effect, only two dimensions. This is how 2D is done. I mainly use OpenGL, so I cant help you with changing the viewing mode of DirectX, but check out the tutorials here.

Share this post


Link to post
Share on other sites
You have a couple of options, my explanation will be brief and not very technical but you should get the general idea. For basic polygon drawing you can render just like 3D except set everything's z-value to 1.0. As Liam M said make sure you set your camera to orthagonal. For texture rendering you have the D3DXSprite interface and for font rendering you have the D3DXFont interface.

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!