glow
glow copied to clipboard
get_uniform_location() fails to return the proper location
Summary
When calling the get_uniform_location()
function in certain situations it returns a None
value instead of a Some
value.
I have made sure (to the best of my ability as a beginner) that there are no reasons the uniform would be optimized out or otherwise have a typo on either the rust or shader side, as well as making sure to use the shader program before trying to retrieve the location.
Reproduction
I tried to make the repro code as concise as possible here's the link: Repro
Additional Notes
I have also written the same reproduction code using the glad bindings that can be generated on the webservice. This works fine and is able to retrieve the uniform location.
the code can be found here
I've recently experienced this as well. Not exactly the same but I did observe a mismatch between GL_ACTIVE_UNIFORMS
and glGetActiveUniform
. It was platform (and maybe browser or driver) specific behavior.
In the end, I just accepted that the uniform wasn't there which is not a particularly useful answer in this context but I wanted to add my voice to this issue. Happy to accept that these are unrelated.