Skip to content

Commit

Permalink
added logger error for bad uniform location name
Browse files Browse the repository at this point in the history
  • Loading branch information
i-make-robots committed Dec 17, 2023
1 parent add61ac commit dd20241
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ public int getProgramId() {
}

public int getUniformLocation(GL3 gl, String name) {
return gl.glGetUniformLocation(programId, name);
int result = gl.glGetUniformLocation(programId, name);
if(result==-1) {
logger.error("Could not find uniform "+name);
}
return result;
}

public void set1f(GL3 gl, String name, float v0) {
Expand Down

0 comments on commit dd20241

Please sign in to comment.