Reuse bindProgram in OGLESShaderRenderer
This commit is contained in:
parent
4717e7006f
commit
1a8e6f1644
@ -688,21 +688,10 @@ public class OGLESShaderRenderer implements Renderer {
|
||||
}
|
||||
|
||||
protected void updateUniform(Shader shader, Uniform uniform) {
|
||||
int shaderId = shader.getId();
|
||||
|
||||
assert uniform.getName() != null;
|
||||
assert shader.getId() > 0;
|
||||
|
||||
if (context.boundShaderProgram != shaderId) {
|
||||
GLES20.glUseProgram(shaderId);
|
||||
RendererUtil.checkGLError();
|
||||
|
||||
statistics.onShaderUse(shader, true);
|
||||
boundShader = shader;
|
||||
context.boundShaderProgram = shaderId;
|
||||
} else {
|
||||
statistics.onShaderUse(shader, false);
|
||||
}
|
||||
bindProgram(shader);
|
||||
|
||||
int loc = uniform.getLocation();
|
||||
if (loc == -1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user