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

RGBwritemask Subroutine

Purpose

Grants write access to a subset of available bitplanes.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void RGBwritemask
(Int16 red,
Int16 green,
Int16 blue)

FORTRAN Syntax

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

Description

The RGBwritemask subroutine sets the bitplane writemask in RGB mode. Writemasks are used to shield portions of the frame buffer from being written into. A writemask is a small set of bits (3 masks of 8 bits each in RGB mode), one bit for each bitplane of the frame buffer.

If a bit is set (1), the corresponding bitplane is enabled for writing, and any routine that draws into the frame buffer will be able to write into that bitplane. If a bit is reset (0), the corresponding bitplane is marked as read only, and the values stored in that bitplane are not changed.

Note that the writemask protects planes in the color frame buffer. Thus, writemasks essentially prevent certain colors from being written into the frame buffer. Colors that are drawn while a writemask is enabled appear different, depending on the color, the writemask, and the color value currently stored in the frame buffer (at a given pixel).

Writemasks are useful for emulating overlay/underlay planes.

The RGBwritemask subroutine is intended for use in RGB mode only. To set the writemask in color map mode, use the writemask or wmpack subroutine.

Parameters

red Specifies the mask for the corresponding red bitplanes.
green Specifies the mask for the corresponding green bitplanes.
blue Specifies the mask for the corresponding blue bitplanes.

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 supports only on/off control of individual R, G, and B bitplanes. Individual bits cannot be masked in the color planes.

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

Returning the current RGB value with the gRGBcolor subroutine.

Returning the current RGB writemask with the gRGBmask subroutine.

Specifying the RGBA writemask with a single packed integer with the wmpack subroutine.

Granting write permission to available bitplanes with the writemask subroutine.

Configuring the Frame Buffer.

Writemasks and Logical Operations and Working in Color Map and RGB Modes.


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