Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_uniform_location() fails to return the proper location #247

Open
IllusionMan1212 opened this issue Apr 26, 2023 · 1 comment
Open

get_uniform_location() fails to return the proper location #247

IllusionMan1212 opened this issue Apr 26, 2023 · 1 comment

Comments

@IllusionMan1212
Copy link

IllusionMan1212 commented Apr 26, 2023

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

@TannerRogalsky
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants