Fix OpenGL state in RetainedScene.