Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Caching of GLSL uniform locations (via Parameter objects) #316
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.
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