Properly implement the OpenGL saving/restoring function so the Engine
doesn’t have to link with OpenGL.