Sign in to follow this  

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

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

This topic is 2793 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this