[ Previous | Next | Contents | Glossary | Home | Search ]
GL3.2 for AIX: Graphics Library (GL) Technical Reference

getcolor Subroutine

Purpose

Returns the current color.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

Int32 getcolor( )

FORTRAN Syntax

INTEGER*4 FUNCTION GETCOL

Description

The getcolor subroutine returns the current index into the color map for the current drawing mode. In NORMALDRAW, an index from 0 to 4095 is returned. In OVERDRAW and UNDERDRAW, an index from 0 to 15 is returned. The under/over planes have a color map that is separate from the main color map.

Note: This subroutine cannot be used to add to a display list.

Return Value

An index into the color map for the current color.

Implementation Specifics

This subroutine is part of GL in the AIXwindows Environment/6000 Version 1, Release 2 with AIXwindows/3D Feature.

Files

/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.

Related Information

Setting the color index in the current mode with the color subroutine.

Specifying the target framebuffer of the drawing subroutines with the drawmode subroutine.

Returning a color map entry with the getmcolor subroutine.

Returning the current RGB value with the gRGBcolor subroutine.

AIX Graphics Library Overview, Creating Animated Scenes, Querying the System, Setting Drawing Attributes, Understanding the Hardware Used by GL, Drawing Rectangles, Circles, Arcs, and Polygons, and Working in Color Map and RGB Modes.


[ Previous | Next | Contents | Glossary | Home | Search ]