Porting Color, Shading, and Writemask Code
When porting color, shading, and writemask code to OpenGL, keep the following points in mind:
-
Though you can set color-map indexes with the OpenGL glIndex function, OpenGL does not have a function for loading color-map indexes.
-
Color values are normalized to their data type. (For information about color values, see glColor).
-
There is no simple equivalent for cpack.
-
You may have to translate code that includes the c or color functions to glClearColor or glClearIndex instead of glColor or glIndex.
-
The RGBA writemask applies to each component but not for each bit.
-
IRIS GL provides defined color constants: BLACK, BLUE, RED, GREEN, MAGENTA, CYAN, YELLOW, and WHITE. OpenGL does not provide these constants.