|
|
@ -993,12 +993,13 @@ public class LwjglRenderer implements Renderer { |
|
|
|
|
|
|
|
|
|
|
|
public void setShader(Shader shader) { |
|
|
|
public void setShader(Shader shader) { |
|
|
|
if (shader == null) { |
|
|
|
if (shader == null) { |
|
|
|
if (context.boundShaderProgram > 0) { |
|
|
|
throw new IllegalArgumentException("shader cannot be null"); |
|
|
|
glUseProgram(0); |
|
|
|
// if (context.boundShaderProgram > 0) {
|
|
|
|
statistics.onShaderUse(null, true); |
|
|
|
// glUseProgram(0);
|
|
|
|
context.boundShaderProgram = 0; |
|
|
|
// statistics.onShaderUse(null, true);
|
|
|
|
boundShader = null; |
|
|
|
// context.boundShaderProgram = 0;
|
|
|
|
} |
|
|
|
// boundShader = null;
|
|
|
|
|
|
|
|
// }
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (shader.isUpdateNeeded()) { |
|
|
|
if (shader.isUpdateNeeded()) { |
|
|
|
updateShaderData(shader); |
|
|
|
updateShaderData(shader); |
|
|
|