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

zfunction Subroutine

Purpose

Specifies the function used for depth comparison.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void zfunction(Int32 func)

FORTRAN Syntax

SUBROUTINE ZFUNCT(func)
INTEGER*4 func

Description

The zfunction subroutine compares the z value of the current contents (destination value) of a pixel against the z value for the contents that you want to write to that pixel (source, or incoming, value).

For example, if the func parameter is ZF_LESS and if the source z is less than the destination z, the system overwrites the destination pixel value with the source pixel value.

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

Parameter

func Expects one of eight possible flags used when comparing z values. The available flags are:
C FORTRAN Description
ZF_NEVER ZFNEVE Never overwrite the destination pixel value.
ZF_LESS ZFLESS Overwrite the destination pixel value if the z of the source pixel value is less than the z of destination value.
ZF_EQUAL ZFEQUA Overwrite the destination pixel value if the z of the source pixel value is equal to the z of destination value.
ZF_LEQUAL ZFLEQU Overwrite the destination pixel value if the z of the source pixel value is less than or equal to the z of destination value. (This is the default value.)
ZF_GREATER ZFGREA Overwrite the destination pixel value if the z of the source pixel value is greater than the z of destination value.
ZF_NOTEQUAL ZFNOTE Overwrite the destination pixel value if the z of the source pixel value is not equal to the z of destination value.
ZF_GEQUAL ZFGEQU Overwrite the destination pixel value if the z of the source pixel value is greater than or equal to the z of destination value.
ZF_ALWAYS ZFALWA Always overwrite the destination pixel value.

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.

Initiating z-buffer mode with the zbuffer subroutine.

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

AIX Graphics Library Overview, Writemasks and Logical Operations, and Removing Hidden Surfaces.


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