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

clear Subroutine

Purpose

Clears to the screenmask.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void clear( )

FORTRAN Syntax

SUBROUTINE CLEAR

Description

The clear subroutine sets the screen area inside the current screenmask to the current color, using the current writemask and pattern. Only the portion of the current screenmask that is inside the current window is actually cleared.

By default, the screenmask is exactly the same size as the window. Use the scrmsk subroutine to change the size of the screenmask.

Note: The viewport subroutine resets the screenmask to be precisely the same size as the viewport.

Example

The example C language program boxcirc.c uses the clear subroutine to clear the viewport before drawing a box and a circle.

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

Clearing the color bitplanes and the z-buffer simultaneously with the czclear subroutine.

Drawing a filled screen-aligned rectangle with the sboxf subroutine.

Clearing the z-buffer with the zclear subroutine.

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

Clearing, Resetting, and Initializing GL, Setting Drawing Attributes, and Using Viewports and Screenmasks.


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