re-enabled state caching for shaderprogram and textures, no side effects so far