fixed OpenGL texture offset bug

This commit is contained in:
Chris Forbes
2010-02-16 19:55:52 +13:00
parent 4258e78049
commit 8d22e23cae

View File

@@ -19,10 +19,10 @@ namespace OpenRa.Graphics
this.channel = channel; this.channel = channel;
uv = new RectangleF( uv = new RectangleF(
(float)(bounds.Left + .5f) / sheet.Size.Width, (float)(bounds.Left) / sheet.Size.Width,
(float)(bounds.Top + .5f) / sheet.Size.Height, (float)(bounds.Top) / sheet.Size.Height,
(float)(bounds.Width - .5f) / sheet.Size.Width, (float)(bounds.Width) / sheet.Size.Width,
(float)(bounds.Height - .5f) / sheet.Size.Height); (float)(bounds.Height) / sheet.Size.Height);
uvhax = new float2[] uvhax = new float2[]
{ {