Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
save and restore uniform buffer bindings during batch renderer selection
When Maya is using OpenGL Core Profile as the rendering engine (in either compatibility or strict mode), batch renders like those done in the "Render View" window or through the ogsRender command do not properly track uniform buffer binding state. This was causing issues where the first batch render performed would look correct, but then all subsequent renders done in that Maya session would be completely black (no alpha), even if the frame contained only Maya-native geometry or if a new scene was created/opened. To avoid this problem, we need to save and restore Maya's bindings across Hydra calls. We try not to bog down performance by saving and restoring *all* GL_MAX_UNIFORM_BUFFER_BINDINGS possible bindings, so instead we only do just enough to avoid issues. Empirically, the problematic binding has been the material binding at index 4. This workaround was already being used during rendering, but this change applies it during selection as well.
- Loading branch information