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

Started by
-1 comments, last by Heandel 13 years, 12 months ago
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

This topic is closed to new replies.

Advertisement