what is the motivation behind the cache that you use in the deferred rending demo ?
CPVRTMap<int, int> *m_pUniformMapping;
should it be handled by the TOOLS ( if i remember , you were doing the same caching technique in the POWERVR Engine).
if it is part of best practice on performance , why it is not use everywhere else ?
It’s a good practice to cache values in your app to keep calls into GL to a minimum. Although the Get operations are very cheap, not doing them at all is even better
The DeferredRendering demo used this technique as it has to manage multiple effects. In other demos (e.g. the Water demo), the values are cached, but a map hasn’t been used.
You’re right that we should use techniques like this consistently. When we move to an updated tools framework in the future, it will be a good opportunity to clean up a bit.