I have made an OpenGL program using FLTK. The user of the program has
Ubuntu installed, which, apparently, only provides freeglut and not the
old version of glut, which I uses. When the program is run, the
following error message appears:
freeglut ERROR: Function <glutStrokeLength> called without first
This error obviously comes from the call to
FREEGLUT_EXIT_IF_NOT_INITIALISED() in glutStrokeLength().
Must you absolutely check for this at every single frame during the
entire execution of a program?
In my program, I have statements like this:
if (column >= maxNumberOfColumns)
for handling rarely occurring errors, that do not depend on the input
data of a program. When developing, DEBUG is always defined, but when a
program is working correctly, I can make an optimized version of it
without this code. The point is that I thereby can insert these kinds of
checks all over the code, without being concerned with the program
slowing down. In your case, you could provide two libraries optim and
devel/debug, where the first is optimized and the other is for
development. If you did this, freeglut programs would run faster and the
problem with the incompatibility with FLTK would go away.