glslDevil is an OpenGL/GLSL debugger. You can start a program in it, and it will trace OpenGL calls. There is an option to stop the program at a shader change, at a draw call or at a given GL command. Sadly, it does not display the parameters of the GL calls. It counts each call to a GL commands, and can display statistics for either all calls, or calls made for the current frame. It can capture the rendered image in its own UI. Its primary function is debugging of GLSL shaders. When the program calls a draw command which uses a shader, glslDevil displays the source code of the shaders, and gives options to debug the vertex, geometry or fragment shader.
On Radeon 9700 the GLSL debugging does not work at all (only the shader source is displayed) but it works nicely on nVidia 8800. The debugger works in parallel on each vertex/fragment which the GPU currently processes. There is option for stepping trough the shader code and for adding watches. Watches can be selected from the OpenGL fixed-function context, the user-supplied attributes or the variables used in the shader. All the values of a variable in each parallel shader is displayed in table. Its a nice feature for comparing different cases. The values can also be plotted, but i didn’t yet understand how that works.
Here is a quick ANT script hack i made for running the jME test chooser in glslDevil:
<target name="run-testchooser-in-glslDevil" description="Runs the TestChooser in glslDevil OpenGL debugger">
<pathconvert property="jarclasspathlibs" pathsep=";" dirsep="/">
<path>
<fileset dir="${libs}">
<include name="*.jar" />
</fileset>
</path>
<mapper type="regexp" from=".*(lib.*)" to="1" />
</pathconvert>
<pathconvert property="jarclasspathrelease" pathsep=";" dirsep="/">
<path>
<fileset dir="${jars}">
<include name="*.jar" />
</fileset>
</path>
<mapper type="regexp" from=".*(target.*)" to="1" />
</pathconvert>
<echo>${jarclasspathlibs};${jarclasspathrelease}</echo>
<exec dir="${basedir}" executable="C:Program FilesVISglslDevilglsldb.exe" >
<arg line="java.exe -cp ${jarclasspathlibs};${jarclasspathrelease} -Djava.library.path=${libs} jmetest.TestChooser"/>
</exec>
</target>
If you have experience with OpenGL or GLSL debuggers, i'd like to hear some opinion. Cant wait the day when such debuggers will be integrated into the IDE.