Is there a way to issue a batch of commands in OpenGL which have no effect to the outside world, just like Push-Pop Matrix.
For example, I want my Rendering environment to have a specified Fill mode(Solid,wire,point). But I want each individual 3D objects to override it if they wish. In order to do that, I have to issue glPolygonMode before drawing the object that want fill mode different to that of the environment. After the drawing command I have to issue glPolygonMode again to restore the environments Fill Mode.
Is there a way to avoid issuing twice such commands?