use byte[] backing for Sheet. bitmap backing is still available for Chrome RGBA hack.

This commit is contained in:
Chris Forbes
2010-08-19 19:22:03 +12:00
parent 1595c6a0ed
commit 0a041fe425
4 changed files with 23 additions and 40 deletions

View File

@@ -52,7 +52,7 @@ namespace OpenRA.Graphics
}
else if (bitmap != null)
{
texture.SetData(Bitmap);
texture.SetData(bitmap);
dirty = false;
}
}
@@ -61,9 +61,7 @@ namespace OpenRA.Graphics
}
}
public Bitmap Bitmap { get { if (bitmap == null) bitmap = new Bitmap(Size.Width, Size.Height); return bitmap; } }
public byte[] Data { get { if (data == null) data = new byte[4 * Size.Width * Size.Height]; return data; } }
public void MakeDirty() { dirty = true; }
}
}