BuGLe: questions that nobody has asked yet, but which they might...
===================================================================
Note that compilation problems are addressed in TROUBLESHOOTING.

Q. My program crashes, somewhere deep inside the OpenGL driver and I
can't get a stack trace. How can I tell what caused it?
A. Use the "unwindstack" filterset, and see the manual page for
documentation.
A. Use the "log" filterset, and turn on the flush option (see the example
in doc/examples/filters). Then after your program crashes, the last entry
in the log file will most likely be the one just before the crash.

Q. I don't want to have to set BUGLE_CHAIN all the time; can't I
specify a default?
A. The first chain in the configuration file is the default.

Q. I don't want to have to set LD_PRELOAD all the time, or it is not
available on my system. Can I just link directly to BuGLe?
A. Yes, you can specify -lbugle in place of -lGL when you link. If it
is not installed in a standard directory, you may need extra compiler
flags, such as -L/path/to/bugle -Wl,-rpath -Wl,/path/to/bugle

Q. What is the performance penality?
A. That depends on what you're doing with the library, but to give you
an example, here are some rough numbers for Quake3 1.32 on demo 'four'
(not even remotely scientificly collected, and probably out of date).

without BuGLe: 133fps
with just the "invoke" filterset: 125fps
with the wireframe filterset: 125fps
with logging to /dev/null: 48fps
with logging to file: 47fps

So in this case, the framework adds a little, and logging adds a lot.
The overhead will depend greatly on how much work you get OpenGL to do
with each call; for example, glxgears suffers almost no penalty because
it uses display lists heavily.

Q. How do you get Quake3 to use BuGLe?
A. Run it as quake3 +set r_glDriver /path/to/libbugle.so

Q. Why is there a mix of C and C++ code?
A. The library itself is written entirely in C. This is mainly because
a C++ library will drag libstdc++ in with it, and this has been found to
create some problems when forcing linking to an application that already
depends on a conflicting version of libstdc++. There is still a
dependence on libc, but libc is less of a moving target. The code
generator is written in C++, since it makes the coding easier and does
not introduce the dependency issues above.

Q. Why is a recent (>3.0) version of gcc required?
A. BuGLe is driven by a number of tables that list all the information
about the various types and functions in OpenGL. To capture this
information, it is necessary to parse the OpenGL header files. It would
be very difficult to write a parser to do this robustly, but gcc
already knows how to do this. Unfortunately, the ability to extract a
parse tree from gcc (the -fdump-translation-unit option)
was only added sometime after 3.0.
