Loads a range of the color map.
FORTRAN (libfgl.a)
void mapcolors(Int16 start_idx, Int16 end_idx, Int16 r [ ], Int16 g [ ], Int16 b [ ] )
SUBROUTINE MAPCOLORS (start_idx, end_idx, r, g, b) INTEGER*4 start_idx, end_idx INTEGER*2 r(1), g(1), b(1)
Note: For FORTRAN users, this subroutine accepts long integer parameters (INTEGER*4) when invoked from a FORTRAN program, although it accepts short integers when invoked from a C program. The C and FORTRAN syntax shown here reflect this difference.
The mapcolors subroutine loads a range of color map table entries. The range that is loaded begins with start_idx and ends with end_idx, inclusive. The length of the array must be equal to end_idx - start_idx + 1. For instance to load only one color map entry, set start_idx and end_idx to the same number. To load two entries, set end_idx to start_idx + 1.
The mapcolors subroutine is functionally equivalent to the C code shown in the following fragment, although it will execute considerably faster.
{ int i; for (i=0; i< (end_idx - start_idx + 1); i++) mapcolor (start_idx+i, r[i],g[i],b[i]); }
The mapcolors subroutine can be used to load the underlay, overlay, cursor, popup, or main frame buffer color map. Which map is loaded depends on the current drawing mode (as set by the drawmode subroutine).
In multimap mode, the mapcolors subroutine updates only the small color map currently selected by the setmap subroutine. The system ignores invalid indexes.
Note: This subroutine cannot be used to add to a display list.
This subroutine is part of GL in the AIXwindows Environment/6000 Version 1, Release 2 with AIXwindows/3D Feature.
The POWERgraphics GXT1000 supports a 12-bit colorindex frame buffer.
/usr/include/gl/gl.h | Contains C language constant and variable type definitions for GL. |
/usr/include/gl/fgl.h | Contains FORTRAN constant and variable type definitions for GL. |
Choosing a set of bitplanes for drawing with the drawmode subroutine.
Defining a color map ramp for gamma correction with the gammaramp subroutine.
Getting a range of color map RGB entries with the getmcolors subroutine.
Organizing the color map as one large map with the onemap subroutine.
Organizing the color map as 16 small maps with the multimap subroutine.
Setting the number of bitplanes used for overlay colors with the overlay subroutine.
Selecting one of 16 small color maps with the setmap subroutine.
Setting the number of bitplanes used for underlay colors with the underlay subroutine.
Working in Color Map and RGB Modes.