I have been unable to get an 8-bit color OpenGL application to work under win95/98. Oddly, it works fine on WinNT. It seems that calls to glIndexi(indx) or
glMateriali(GL_FRONT_AND_BACK, GL_COLOR_INDEXES, indx) are somehow getting
mangled, so that the color index that’s used to render the object is not the
same as what’s passed in this call. This happens no matter whether lighting and dithering are enabled or disabled, and I’m running in color index mode (not 8-bit rgba). For example, I give it material indexes of,
say, (10,10,10) - i.e. a solid color using the first non-static color in the
system palette I’ve carefully set up - but when the object is drawn,
suddenly it’s using some other random color index (one of the static colors
with index < 10), which I can see on the screen since it’s the wrong color,
as well as through glReadPixels which return the incorrect index.
Has anyone else had this problem or know how I can get win95/8’s OpenGL to
let me index the system palette reliably?
Thanks in advance,