Change Shader.Render to Shader.PrepareRender.

Instead of running the shader operation as an action, just run it after the shader is prepared.
This commit is contained in:
RoosterDragon
2018-04-26 21:18:14 +01:00
committed by Paul Chote
parent 95ac1aa5b2
commit 8ec90525e3
4 changed files with 8 additions and 9 deletions

View File

@@ -278,7 +278,8 @@ namespace OpenRA.Graphics
shader.SetVec("AmbientLight", ambientLight, 3);
shader.SetVec("DiffuseLight", diffuseLight, 3);
shader.Render(() => renderer.DrawBatch(cache.VertexBuffer, renderData.Start, renderData.Count, PrimitiveType.TriangleList));
shader.PrepareRender();
renderer.DrawBatch(cache.VertexBuffer, renderData.Start, renderData.Count, PrimitiveType.TriangleList);
}
public void BeginFrame()