When trying to compile the GLUT redbook examples, you may get the following runtime error:
craigp@liasson> make && ./aaindex.binWhat was happening in my case was that the system dose not support color indexing mode. Change the following line
gcc -Wall -I/lusr/X11/include -I/lusr/include -o aaindex.bin -L/lusr/X11/lib -L/lusr/lib -lglut -lGLU -lGL -lpthread -lm aaindex.c
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 128 (GLX)
Minor opcode of failed request: 26 (X_GLXMakeContextCurrent)
Serial number of failed request: 49
Current serial number in output stream: 49
glutInitDisplayMode (GLUT_SINGLE | GLUT_INDEX);to
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGBA);I'm not exactly sure where to view the capabilities of X11 or if it is possible to enable color indexing mode at all without root access. The header states
/*so if you absolutely must know, that may be the place to start looking.
* Initialization functions, see fglut_init.c
. . .
FGAPI void FGAPIENTRY glutInitDisplayMode(unsigned int displayMode);
. . .