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

blink Subroutine

Purpose

Changes a color map entry at a selectable rate.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void blink(Int16 rate, Colorindex color, Int16 red, Int16 green, Int16 blue)

FORTRAN Syntax

SUBROUTINE BLINK(rate, color, red, green, blue)
INTEGER*4 rate, color, red, green, blue
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.

Description

The blink subroutine alternates the color located at index color in the current color map with the color defined by the parameters red, green, and blue. The rate at which the two colors are alternated is set by the rate parameter.

Up to 20 colors can blink simultaneously, each at a different rate. The blink rate is changed by calling the blink subroutine with the same color parameter and a different rate parameter.

For example, if the rate parameter is 3, the color changes (blinks) every third vertical retrace. Its value alternates between the original value and the new value supplied by the parameters red, green, and blue.

The length of time between retraces varies according to the monitor used. When using a 60Hz monitor, a rate of 60 would cause the color to change once every second.

To terminate blinking and restore the original color for a single color map entry, set the color parameter to the color map entry for which to stop blinking and call the blink subroutine with the rate parameter set to 0.

To terminate all blinking colors simultaneously, call the blink subroutine with the rate parameter set to -1. When rate is -1, the other parameters are ignored.

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

Parameters

rate Specifies the number of vertical retraces per blink. On a standard 60 Hz monitor, there are 60 vertical retraces per second.
color Specifies the index into the current color map. The color defined at that index is the color that is blinked (alternated).
red Specifies the red value of the alternate color that blinks against the color selected from the color map by the color parameter.
green Specifies the green value of the alternate color that blinks against the color selected from the color map by the color parameter.
blue Specifies the blue value of the alternate color that blinks against the color selected from the color map by the color parameter.

Implementation Specifics

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

The POWER GXT1000 adapter does not support the blink subroutine.

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 current color in color map mode with the color subroutine.

Changing a color map entry to a specified RGB value with the mapcolor subroutine.

Understanding the Hardware Used by GL in GL3.2 Version 4 for AIX: Programming Concepts.

Working in Color Map and RGB Modes, Creating a Cursor, Creating Animated Scenes.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]