Hello I'm having trouble rendering correctly sprite with SlimDX. It draws a little scaled just like .NET Drawing DrawImageUnscaled does. I'm not using any transformations.
Init:
Vector2 position;
Sprite sprite;
Size size;
Texture texture;
sprite = new Sprite(Device);
string filename = /*some bitmap*/;
using (Image b = Bitmap.FromFile(filename))
size = b.Size;
position = new Vector2(550, 230);
texture = Texture.FromFile(Device, filename);
Rendering:
Device.Clear(ClearFlags.Target, Color.Black, 1.0f, 0);
Device.BeginScene();
sprite.Begin(SpriteFlags.None);
sprite.Draw(texture, new Vector3(size.Width / 2, size.Height / 2, 0), new Vector3(position, 0), Color.White);
sprite.End();
Device.EndScene();
EDIT: If you don't know how to imagine the wrong rendering, here is what I get rendered and reference (ignore that white color, it's just transparent PNG). Notice how the first image is scaled Wrong Correct