The glBugger Project
NOTE (May 2005) - Please refer to the latest glBugger project
This project was developed by Haim Grosman and Einan Japheth, under the guidance of Dr. Gershon Elber, as part of the "Computer Graphics Lab" course (234326) - of the Computer Science Department in the Technion , Israel.
OpenGL is a very popular library for 3D computer graphics.
GlBugger is a program that provides tools to trace the continuity and order of calls to the OpenGL library, be it for debugging or optimization needs. This tracing is performed by swapping the opengl32.dll , while reaching the original libraries. The software being checked behaves as normal (perhaps a little slower), without being called upon to do any compilation. The tracing is executed in a GUI window and log files, with control of the tracing being done through interaction with the GUI. GlBugger supports the following features:
Documentation of the order of calls of OpenGL commands, including parameters,
returned value and time.
ability to stop a command with a certain type.
parameters that includes the option of changing them and continuing running the
The ability to fix which
functions one does not want to trace.
Give an ability to
control and change OpenGL states at runtime
Write to images the
texture used by the application
Write 3D Modeling
information produced by the application
Warn the user of any kind
of error produced by OpenGL
Many more features to come in next glBugger versions...
Development tools and environment
This program was developed in C++ using Visual Studio .Net and Visual Studio 6.0.
In order to run the program on your PC, you need to fill the following requirements:
get the latest FreeImage
dlls libs and include files from :
you can also use the files provided for you in our lib, src and include directories.
use your Microsoft VisualStudio 6.0 in order to build
glBugger.dsw which is in the main directory.
Just double click on the file, and click build project.
(you can also use Visual Studio .NET 7.0, we used VC 6.0 for this tak)
use Microsoft Visual Studio in order to build
glBuggerGui.sln which is located in glBuggerGui directory,
again, just one double click in order to open the file in you visual studio, and click rebuild all in order to build the project
you are now ready to Install and run the program,
notice that All the binaries files including fake OpenGL Dll is located in BIN
in order to prepare the program for running you will
have to create a System Variable as explained in Installation section, or use
setup,iss script provided for you in the main directory (please visit
www.innosetup.com) for further assistance
with the script file.
1. In order to run glBugger you have to download the source files. Click here to Download a zip file with the sources.
2. Unzip the files into a preferred directory (for example: c:\glBugger\ ).
3. Create a System
Variable named : GL_BUGGER_ROOT
This Variable will hold the path to the glBugger root directory (in our example c:\glBugger\ ).
4. Restart the computer (so GL_BUGGER_ROOT will be created).
5. Run glBuggerGUIDebug.exe or glBuggerGUIRelease.exe
6. you can use InnoSetup program in order to prepare installation script which will configure glBugger on your system (use setup.ini file , in glBugger main directory, please contact us, if you want us to send you a prepared setup.exe file).
- The fake dll is : glBugger_directory\opengl32.dll
The glBugger gui consists of six main screens:
● The Main Window - The glBugger main window.
● The Configuration Screen - In which you can configure the application settings, the output files paths and the Text editor to use.
● The Function State Dialog - In which you can go over the OpenGL function list and trace a specific function, change it's state and pause the application every time it calls this function.
● The State Window - In which you can go over the OpenGL states, change their status and protect/unprotect them.
● The Value Window - In which you can observe a specific value - as a matrix , a bit mask or as a GLEnum.
Matrix Stacks Window
- In which you can perform a constant number of operations on OpenGL
glBugger is not yet thread safe, it uses Sleep() function to stop the
application from running.
○ all the application and the fake OpenGL dll were written as a project for the university from scratch in a very short period of time (two month), which means there are many sides we haven't thought about, and left for future versions of the program. You are very welcome to test and send us you opinions and feedbacks.
○ glBugger uses FreeImage library in order to write images (texture images and buffer snapshot images). Many thanks to them please visit their project at www.sf.net.
○ Hope this will help you make some cool OpenGL applications more easily ;)