Skip to content

Commit

Permalink
opengl: print an error if trying to set uniforms which don't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
ammen99 committed Feb 24, 2024
1 parent 857e210 commit 91fb217
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/opengl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,11 @@ class program_t::impl
uniforms[active_program_idx][name] =
GL_CALL(glGetUniformLocation(id[active_program_idx], name.c_str()));

if (uniforms[active_program_idx][name] == -1)
{
LOGE("Uniform ", name, " not found in program");
}

return uniforms[active_program_idx][name];
}

Expand Down

0 comments on commit 91fb217

Please sign in to comment.