Returns a range of color map RGB values.
FORTRAN (libfgl.a)
void getmcolors(Int16 start_idx, Int16 end_idx, Int16 *r, Int16 *g, Int16 *b)
SUBROUTINE GETMCOLORS (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 started from a FORTRAN program, although it accepts short integers when started from a C program. The C and FORTRAN syntax shown here reflect this difference.
The getmcolors subroutine returns a range of color map table entries. The range that is returned begins with the start_idx parameter and ends with the end_idx parameter, inclusive. The length of the array must be equal to end_idx - start_idx + 1. For instance, to return only one color map entry, set start_idx and end_idx to the same number. To return two entries, set end_idx to start_idx + 1.
The getmcolors subroutine is functionally equivalent to the C code shown in the following fragment, although it executes considerably faster.
{ int i; for ( i=0; i < (end_idx - start_idx + 1); i++ ) getmcolors (start_idx+i,&r[i],&g[i],&b[i]); }
The getmcolors subroutine can be used to read the underlay, overlay, cursor, pop-up, or main frame buffer color map. Which map is read depends on the current drawing mode (as set by the drawmode subroutine).
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.
/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.
Returning the current RGB color with the gRGBcolor subroutine.
Loading a range of color map entries with the mapcolors subroutine
Querying the System.
Working in Color Map and RGB Modes.