I’d like to be able to dump every state in opengl to debug a program, so I can do a diff on 2 dumps where one program works and the other one doesn’t.
I can’t find such a function in opengl. I could write one that calls glGets about 350 times, etc, but it would take a long time. Does one already exist?
What’s your purpose? Is it for debugging? If so you can use external OpenGL debugging tools. On Linux, I use BuGLe. It has a command line executable as well as a GUI. In the GUI you can listen to states that have changed since the last GL breakpoint (so an OpenGL state diff, as it looks it is what you want). On Mac, I use the OpenGL profiler tool, it can track state change as well.