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

zbuffer Subroutine

Purpose

Enables or disables the z-buffer for storing depth information.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void zbuffer(Int32 bool )

FORTRAN Syntax

SUBROUTINE ZBUFFE(bool)
LOGICAL bool

Description

The zbuffer subroutine enables or disables the z-buffer for storing depth information. Each pixel has an associated z value. To draw a pixel, the system compares the new z value with the existing one. If the new value is less than or equal to the existing value, the zbuffer subroutine stores a new color and z value in the bitplanes.

Drawing to the z-buffer with the zdraw subroutine must be disabled in order for the z-buffer to be enabled.

Parameter

bool Specifies a value for the state of drawing to the z-buffer. The settings for the bool parameter are:
True = drawing to the z-buffer is enabled.
False = drawing to the z-buffer is disabled.

Example

The example C language programs zbuffer1.c and zbuffer2.c enable z-buffering with the zbuffer subroutine to disable the display of hidden surfaces.

Implementation Specifics

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

The POWER Gt4, and POWER Gt4x, and POWER GXT1000 adapters do not support hidden-line and hidden-surface removal when rendering into the overlay planes. The z-buffer is automatically disabled when drawmode (OVERDRAW) is specified. The z-buffer is automatically enabled when drawmode (NORMALDRAW) is specified.

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

Determining whether z-buffering is on or off with the getzbuffer subroutine.

Setting a depth range with the lsetdepth subroutine.

Clearing the z-buffer with the zclear subroutine.

Enabling drawing to the z-buffer with the zdraw subroutine.

Specifying the function used for depth comparison with the zfunction subroutine.

Selecting depth or color as the source for z comparisons with the zsource subroutine.

Specifying which bits of the z-buffer are written during normal z-buffer operation with the zwritemask subroutine.

AIX Graphics Library Overview, Configuring the Frame Buffer, and Removing Hidden Surfaces.


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