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

lmcolor Subroutine

Purpose

Changes the target of the color commands while lighting is active.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void lmcolor(Int32 mode)

FORTRAN Syntax

SUBROUTINE LMCOLO(mode)
INTEGER*4 mode

Description

The lmcolor subroutine changes the target of the RGB color subroutines while lighting is active.

Properties of the currently bound material can be changed by calls to the lmdef subroutine, but that subroutine is relatively slow to execute. The lmcolor subroutine is provided to support fast and efficient changes to the current material as maintained in the graphics hardware without changing the definition of the currently bound material. Changes made by the lmcolor subroutine are lost when a new material is bound.

The standard RGB color subroutines (RGBcolor, c, cpack) are used to change material properties efficiently. The lmcolor subroutine specifies which material property is to be affected by these subroutines. Because the lmcolor subroutine is effective only when lighting is active, the standard color subroutines are used to change the current color when lighting is off.

Note: The operation of this subroutine for the Supergraphics Processor Subsystem is modified. (See "Hardware Considerations".)

Parameter

mode Specifies the name of the mode to be used in conjunction with RGB color subroutines. Possible modes are:
Mode Constants
C FORTRAN Description
LMC_COLOR LMCCOL Color subroutines set the current color. If a color is the last thing sent before a vertex, the vertex will be colored. If a normal is the last thing sent before a vertex, the vertex is lighted. LMC_COLOR is the default mode.
LMC_EMISSION LMCEMI Color subroutines set the current EMISSION color property of the current material.
LMC_AMBIENT LMCAMB Color subroutines set the current AMBIENT color property of the current material.
LMC_DIFFUSE LMCDIF Color subroutines set the current DIFFUSE color property of the current material. Alpha, the fourth color component specified by RGB color subroutines, sets the ALPHA property of the current material.
LMC_SPECULAR LMCSPE Color subroutines set the current SPECULAR color property of the current material.
LMC_AD LMCAD Color subroutines set the current DIFFUSE and AMBIENT color properties of the current material. Alpha, the fourth color component specified by RGB color subroutines, sets the ALPHA property of the current material.
LMC_NULL LMCNUL RGB subroutines are ignored.

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

Specifying RGBA colors as vectors using the c subroutine.

Specifying RGBA colors with a single packed 32-bit integer using the cpack subroutine.

Making a new material, light, or lighting model definition active with the lmbind subroutine.

Defining a new material, light, or lighting model with the lmdef subroutine.

Setting the current color in RGB mode with the RGBcolor subroutine.

AIX Graphics Library Overview, Creating Lighting Effects, Setting Pipeline Options, and Working in Color Map and RGB Modes.


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