Add depth buffer support to sprites and sequences.

This commit is contained in:
Paul Chote
2015-10-01 18:55:54 +01:00
parent 2634643d91
commit 2915db67c4
15 changed files with 44 additions and 39 deletions

View File

@@ -66,7 +66,7 @@ namespace OpenRA.Graphics
{
// Don't bother allocating empty sprites
if (size.Width == 0 || size.Height == 0)
return new Sprite(current, Rectangle.Empty, spriteOffset, channel, BlendMode.Alpha);
return new Sprite(current, Rectangle.Empty, 0, spriteOffset, channel, BlendMode.Alpha);
var rect = Allocate(size, spriteOffset);
Util.FastCopyIntoChannel(rect, src);
@@ -129,7 +129,7 @@ namespace OpenRA.Graphics
p = new Point(0, 0);
}
var rect = new Sprite(current, new Rectangle(p, imageSize), spriteOffset, channel, BlendMode.Alpha);
var rect = new Sprite(current, new Rectangle(p, imageSize), 0, spriteOffset, channel, BlendMode.Alpha);
p.X += imageSize.Width;
return rect;