Thursday, August 25, 2011

Color indexing not supported.

I'm going to start documenting the solutions to errors I encounter while programming when I feel the error is likely to be encountered by others. So, anyhow, this is the first one.

When trying to compile the GLUT redbook examples, you may get the following runtime error:
craigp@liasson> make && ./aaindex.bin
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
What was happening in my case was that the system dose not support color indexing mode. Change the following line
glutInitDisplayMode (GLUT_SINGLE | GLUT_INDEX);
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
* Initialization functions, see fglut_init.c
. . .
FGAPI void FGAPIENTRY glutInitDisplayMode(unsigned int displayMode);
. . .
so if you absolutely must know, that may be the place to start looking.

Friday, August 12, 2011

Sphere inversion versus spherical reflection

A reflection in a spherical mirror is not exactly the sphere inversion (1), but it is awfully close (2).

Friday, August 5, 2011

Degenerate fun

Thinking about how homogenous coordinates degenerate to lower dimensions. For one dimension, you can scale and shift points on a number line. For zero dimensions, you get the identity matrix. I wonder if it's rotation all the way up, or if there are better ways to view the higher level transformations that open up in larger matrices.