Add TextureChannel.RGBA for RBGA sprites.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -72,5 +72,6 @@ namespace OpenRA.Graphics
|
||||
Green = 1,
|
||||
Blue = 2,
|
||||
Alpha = 3,
|
||||
RGBA = 4
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user