Made Sheet.Texture into Sheet.GetTexture() since we will want to call it for side-effects.
Do the same for Sheet.Data since it has the side effect of generating a buffer.
This commit is contained in:
committed by
RoosterDragon
parent
ff16690b86
commit
a6f5a21ed4
@@ -32,7 +32,7 @@ namespace OpenRA.Graphics
|
||||
{
|
||||
if (nv > 0)
|
||||
{
|
||||
shader.SetTexture("DiffuseTexture", currentSheet.Texture);
|
||||
shader.SetTexture("DiffuseTexture", currentSheet.GetTexture());
|
||||
|
||||
renderer.Device.SetBlendMode(currentBlend);
|
||||
shader.Render(() =>
|
||||
@@ -109,7 +109,7 @@ namespace OpenRA.Graphics
|
||||
|
||||
public void DrawVertexBuffer(IVertexBuffer<Vertex> buffer, int start, int length, PrimitiveType type, Sheet sheet)
|
||||
{
|
||||
shader.SetTexture("DiffuseTexture", sheet.Texture);
|
||||
shader.SetTexture("DiffuseTexture", sheet.GetTexture());
|
||||
renderer.Device.SetBlendMode(BlendMode.Alpha);
|
||||
shader.Render(() => renderer.DrawBatch(buffer, start, length, type));
|
||||
renderer.Device.SetBlendMode(BlendMode.None);
|
||||
|
||||
Reference in New Issue
Block a user