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:
committed by
Paul Chote
parent
95ac1aa5b2
commit
8ec90525e3
@@ -130,7 +130,7 @@ namespace OpenRA.Platforms.Default
|
||||
}
|
||||
}
|
||||
|
||||
public void Render(Action a)
|
||||
public void PrepareRender()
|
||||
{
|
||||
VerifyThreadAffinity();
|
||||
OpenGL.glUseProgram(program);
|
||||
@@ -143,8 +143,6 @@ namespace OpenRA.Platforms.Default
|
||||
}
|
||||
|
||||
OpenGL.CheckGLError();
|
||||
a();
|
||||
OpenGL.CheckGLError();
|
||||
}
|
||||
|
||||
public void SetTexture(string name, ITexture t)
|
||||
|
||||
Reference in New Issue
Block a user