Add TextureChannel.RGBA for RBGA sprites.

This commit is contained in:
Paul Chote
2018-05-31 21:54:07 +01:00
committed by reaperrr
parent c307b3e291
commit ba38878933
10 changed files with 28 additions and 27 deletions

View File

@@ -72,7 +72,7 @@ namespace OpenRA.Mods.Common.Widgets
0,
video.Width,
video.Height),
TextureChannel.Alpha);
TextureChannel.RGBA);
var scale = Math.Min((float)RenderBounds.Width / video.Width, (float)RenderBounds.Height / video.Height * AspectRatio);
videoOrigin = new float2(
@@ -93,7 +93,7 @@ namespace OpenRA.Mods.Common.Widgets
var overlaySheet = new Sheet(SheetType.BGRA, new Size(1, Exts.NextPowerOf2(scaledHeight)));
overlaySheet.GetTexture().SetData(overlay);
overlaySprite = new Sprite(overlaySheet, new Rectangle(0, 0, 1, scaledHeight), TextureChannel.Alpha);
overlaySprite = new Sprite(overlaySheet, new Rectangle(0, 0, 1, scaledHeight), TextureChannel.RGBA);
}
public override void Draw()