BuGLe is a tool for OpenGL debugging, implemented as a wrapper library that sits between your program and OpenGL. While still in development, it can already do the following:
Dump a textual log of all GL calls made.
Take a screenshot or capture a video.
Call glGetError after each call to check for errors, and wrap glGetError so that this checking is transparent to your program.
Capture and display statistics (such as frame rate)
Force a wireframe mode
Recover a backtrace from segmentation faults inside the driver, even if the driver is compiled without symbols.
In addition, there is a debugger (gldb) that lets you set breakpoints and examine backtraces. It also lets you examine OpenGL state, enable and disable filters, and drop into gdb.