PDA

View Full Version : function to get entire opengl state?



wwuster
12-07-2009, 07:07 AM
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?

thanks,
William

Jan
12-07-2009, 08:07 AM
Not that i know, unfortunately.

Jan.

yooyo
12-07-2009, 08:22 AM
Try to use glIntercept (google for it). It can dump whole frame in HTML file with screengrabs befora and after each draw call.

overlay
12-07-2009, 08:48 AM
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.

ZbuffeR
12-07-2009, 08:54 AM
There are tools that allow to do that.
glIntercept :
http://glintercept.nutty.org/
BuGLe :
http://www.opengl.org/sdk/tools/BuGLe/
and gDEBugger (commercial license) :
http://www.gremedy.com/download.php

EDIT: oops, was a bit slow :-)