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

bgnpolygon or endpolygon Subroutine

Purpose

Begins or ends interpretation of vertex subroutines as polygon vertices.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void bgnpolygon( )
void endpolygon( )

FORTRAN Syntax

SUBROUTINE BGNPOL
SUBROUTINE ENDPOL

Description

The bgnpolygon subroutine begins the interpretation of vertex (begin-end style) subroutines as polygon vertices. Vertices specified after the bgnpolygon subroutine and before the endpolygon subroutine form a single polygon.

Self-intersecting polygons (other than four-point bowties) may render incorrectly. To force the system to render concave polygons correctly, call the concave subroutine with the parameter set to True.

Between the bgnpolygon and endpolygon subroutines, you can issue only the following Graphics Library subroutines:

After the endpolygon subroutine completes, the current graphics position is undefined.

Use the lmbind and lmdef subroutines to respecify only materials and their properties.

Use the v subroutine to specify a vertex.

Use the backface subroutine to eliminate backfacing polygons. Polygons with vertices specified in clockwise order are not drawn.

Attention: Calling concave(TRUE) guarantees that all polygons are drawn correctly, but may cause degradation of performance. Do not set concave(TRUE) if you plan to draw only convex polygons.

Example

The example C language program cylinder2.c uses the bgnpolygon subroutine to define the beginning of a description of a polygon.

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 adapters support only a limited number of vertices between the bgnpolygon and endpolygon subroutines. The actual limit can vary from less than 200 vertices to more than 400 vertices, depending on whether or not colors, normals, or material properties are specified between the begin and end pair. If only vertices are specified between a begin and end pair, then at least 255 vertices are supported. Specifying normals, colors, or material properties decreases the overall maximum number of vertices.

The POWERgraphics GTO and the 3D Color Graphics Processor support a maximum of 255 vertices between the bgnpolygon and endpolygon subroutines.

The POWERgraphics GXT1000 supports an arbitrary number of vertices between the bgnpolygon and endpolygon subroutines, if the concave flag has been set to FALSE. If concave polygon checking is enabled, then a maximum of 255 vertices is supported.

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

Allowing the system to draw concave polygons with the concave subroutine.

Transferring a vertex to the graphics pipe with the v subroutine.

AIX Graphics Library Overview, Drawing with Begin-End Style Subroutines, Understanding the Hardware Used by GL, and Working in Color Map and RGB Modes.


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