Open bejayoharen opened 7 years ago
Please do, not sure what you mean by that. But any optimization is always wellcome
Sorry I can't test it at the moment, but I thought I'd send a pull request anyway so even if it's wrong you can see what I'm talking about:
Sorry for the double replay... may be here is better.
GlslCanvas (that is use by glslEditor) have as main feature, allowing you to reload different vert/frag shaders. Seams like keeping a record of the location will prevent access for future locations in case the code change and new shader programs are running.
I noticed that every time you update a uniform value the code calls this:
It's my understanding that this is (or can be) a pretty slow call. An easy fix would be to lazy initialize the value.
see for example: http://nical.github.io/onGameStart2013/ (slide 7)
If you like I supply a patch.