Jump to content
  • Advertisement
Sign in to follow this  
Heandel

[SlimDX] Having trouble to set up an orthographic projection matrix

This topic is 3005 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 all, I'm trying to achieve manually the same result of this code : Sprite.Begin(SpriteFlags.None); Sprite.Draw(Texture, Vector3.Zero, Position, System.Drawing.Color.White); Sprite.End(); ------------------------------------------------------------ To get the same result, I tried setting up the following matrices : Matrix Projection = Matrix.OrthoLH(RenderForm.Width, RenderForm.Height, 0.0f, 1.0f); Matrix World = Matrix.Identity; Vector3 eye = new Vector3(0.0f, 0.0f, 0.0f); Vector3 target = new Vector3(0.0f, 0.0f, 100.0f); Vector3 up = new Vector3(0.0f, -1.0f, 0.0f); Matrix View = Matrix.LookAtLH(eye, target, up); But whenever I do : Sprite.Begin(SpriteFlags.ObjectSpace); Sprite.Draw(Texture, Vector3.Zero, Position, System.Drawing.Color.White); Sprite.End(); The texture appears reversed horizontally, and is displayed in the center of the rendering area. What am I doing wrong ? Thank you for your replies

Share this post


Link to post
Share on other sites
Advertisement
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!