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

bgnclosedline or endclosedline Subroutine

Purpose

Begins or ends interpretation of vertex routines as closed line vertices.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void bgnclosedline( )
void endclosedline( )

FORTRAN Syntax

SUBROUTINE BGNCLO
SUBROUTINE ENDCLO

Description

The bgnclosedline subroutine marks the start of a group of vertex (begin-end style) subroutines to be interpreted as points on a closed line. It is the same as the bgnline subroutine, except that it connects the last vertex to the first. For example,

bgnclosedline();
v3f(vert1);
v3f(vert2);
v3f(vert3);
endclosedline();

draws the outline of a triangle.

The group of begin-end style subroutines terminates with the endclosedline subroutine. After the endclosedline subroutine, the system draws a line from the final vertex back to the initial vertex, and the current graphics position is left undefined.

All line segments use the current linestyle and linewidth. The bgnclosedline subroutine resets the linestyle counter; that is, the first pixel drawn uses the first bit of the linestyle, and so on. The linestyle counter is not reset on subsequent vertices; instead, the pattern continues around corners, until the endclosedline subroutine is reached. To reset the pattern, call the endclosedline subroutine and then the bgnclosedline subroutine again.

If the color changes between a pair of vertices, the color of the line segment is constant if the current shading model is FLAT and interpolated if the current shading model is GOURAUD. In color map mode, the colors vary through the color map; to get reasonable results, the color map should contain a gamma ramp.

Between calls to the bgnclosedline and endclosedline subroutines, you can issue calls to the following GL subroutines only:

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

Implementation Specifics

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

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

The POWERgraphics Gt4 and GXT1000 support an arbitrary number of vertices between the bgnclosedline and endclosedline subroutines.

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

Drawing vertex-based lines with the bgnline subroutine.

Selecting a linestyle pattern with the setlinestyle 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 ]