Re-add uniform location checks even though they aren't needed
Spec says that setting uniform -1 does nothing.
This commit is contained in:
parent
7c7c4aaadc
commit
198e230cdc
1 changed files with 6 additions and 3 deletions
|
@ -236,11 +236,14 @@ void FramebufferManager::CompileDraw2DProgram() {
|
|||
}
|
||||
|
||||
int deltaLoc = glsl_uniform_loc(postShaderProgram_, "u_texelDelta");
|
||||
glUniform2f(deltaLoc, u_delta, v_delta);
|
||||
if (deltaLoc != -1)
|
||||
glUniform2f(deltaLoc, u_delta, v_delta);
|
||||
int pixelDeltaLoc = glsl_uniform_loc(postShaderProgram_, "u_pixelDelta");
|
||||
glUniform2f(pixelDeltaLoc, u_pixel_delta, v_pixel_delta);
|
||||
if (pixelDeltaLoc != -1)
|
||||
glUniform2f(pixelDeltaLoc, u_pixel_delta, v_pixel_delta);
|
||||
timeLoc_ = glsl_uniform_loc(postShaderProgram_, "u_time");
|
||||
glUniform4f(timeLoc_, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
if (timeLoc_ != -1)
|
||||
glUniform4f(timeLoc_, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
usePostShader_ = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue