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

@@ -29,7 +29,7 @@ namespace OpenRA.Graphics
public Sprite GetImage(Sheet s)
{
return new Sprite(s, rect, TextureChannel.Alpha);
return new Sprite(s, rect, TextureChannel.RGBA);
}
public MiniYaml Save(string defaultSrc)

View File

@@ -54,7 +54,7 @@ namespace OpenRA.Graphics
public SheetBuilder(SheetType t, Func<Sheet> allocateSheet)
{
channel = TextureChannel.Red;
channel = t == SheetType.Indexed ? TextureChannel.Red : TextureChannel.RGBA;
Type = t;
current = allocateSheet();
sheets.Add(current);
@@ -121,7 +121,7 @@ namespace OpenRA.Graphics
current.ReleaseBuffer();
current = allocateSheet();
sheets.Add(current);
channel = TextureChannel.Red;
channel = Type == SheetType.Indexed ? TextureChannel.Red : TextureChannel.RGBA;
}
else
channel = next.Value;

View File

@@ -72,5 +72,6 @@ namespace OpenRA.Graphics
Green = 1,
Blue = 2,
Alpha = 3,
RGBA = 4
}
}