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

frontface Subroutine

Purpose

Controls frontfacing polygon removal.

Library

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void frontface (Int32 mode)

FORTRAN Syntax

SUBROUTINE FRONTF(mode)
INTEGER*4 mode

Description

The frontface subroutine allows or suppresses the display of frontfacing filled polygons. With the backface subroutine, it is useful for drawing polygons that have different colors on each side. The frontface subroutine can also be useful for performing a primitive kind of hidden surface removal.

A frontfacing polygon is defined as a polygon whose vertices are in counterclockwise order in screen coordinates. When frontfacing polygon removal is on, the system displays only polygons whose vertices are in clockwise order.

If both frontfacing and backfacing polygon removal is enabled, no filled polygons are displayed. (An exception is made if the graphics pipeline cannot determine if a polygon is front- or backfacing because it is degenerate or otherwise exceptional.)

Notes:
  1. Matrices that negate coordinates, such as scale(-1.0, 1.0, 1.0) , reverse the directional order of a polygon's points and can cause the frontface subroutine to do the opposite of what is intended.
  2. If a polygon is extremely small or has degenerate vertices, the graphics pipeline cannot determine if the polygon is frontfacing. In such cases, the polygon is rendered by default.

Parameters

mode Sets action of subroutine:
True = Enables frontfacing polygon removal.
False = Disables frontfacing polygon removal.

Implementation Specifics

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

The 3-D Color Graphics Processor does not support this subroutine. It has no effect and is ignored.

On the POWERgraphics GTO adapter On the POWERgraphics GTO and POWER GXT1000 adapters, either frontfacing polygon removal or backfacing polygon removal can be specified, but not both simultaneously. Enabling frontfacing culling disables backfacing culling.

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

Enabling or disabling backfacing polygon removal with the backface subroutine.

AIX Graphics Library Overview and Removing Hidden Surfaces.


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