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

Caching of GLSL uniform locations (via Parameter objects) #316

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@spate

spate commented Nov 17, 2012

I've added caching of GLSL uniform locations to save the overhead of the string hash check in the driver. Not sure if this is something that you're interested in, but I've at least done this much. Feel free to integrate it if it interests you. I won't be offended if you decide not to use it. :)

Oh, and I switched which GL constant is checked for max texture image units. That one is a straight-up fix, from what I can tell. I'd recommend grabbing that commit even if you don't want the parameter cache stuff, since it's typically the difference between using just 8 textures, or as many as the card can actually support.

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Nov 17, 2012

Member

Thank you for sharing your work.

I don't want to make the API more complicated, so far nobody seems to be annoyed by the lack of optimization on parameter locations.

Thanks for the max texture unit fix. But according to the doc, the correct value is max(GL_MAX_TEXTURE_COORDS, GL_MAX_TEXTURE_IMAGE_UNITS).

Member

LaurentGomila commented Nov 17, 2012

Thank you for sharing your work.

I don't want to make the API more complicated, so far nobody seems to be annoyed by the lack of optimization on parameter locations.

Thanks for the max texture unit fix. But according to the doc, the correct value is max(GL_MAX_TEXTURE_COORDS, GL_MAX_TEXTURE_IMAGE_UNITS).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment