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

bgnline or endline Subroutine

Purpose

Begins or ends interpretation of vertex routines as line vertices.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void bgnline( )
void endline( )

FORTRAN Syntax

SUBROUTINE BGNLIN
SUBROUTINE ENDLIN

Description

The bgnline subroutine begins the interpretation of vertex (begin-end style) subroutines as line vertices. It is like the bgnclosedline subroutine, except that the last vertex does not connect to the first vertex.

Vertices specified after the bgnline subroutine and before the endline subroutine are interpreted as endpoints of a series of line segments. Use the v subroutine to specify a vertex. The first vertex connects to the second; the second connects to the third; and so on until the next-to-last vertex connects to the last one. All segments use the current linestyle and linewidth.

After the endline subroutine executes, the current graphics position is undefined.

All line segments use the current linestyle and linewidth. The bgnline 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 endline subroutine is reached. To reset the pattern, call the endline subroutine and then the bgnline 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 bgnline and endline subroutines, you can issue calls to the following Graphics Library 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 POWER Gt4, POWER Gt4x, and POWER GXT1000 adapters support an arbitrary number of vertices between the bgnline and endline subroutines.

The POWERgraphics GTO and the 3-D Color Graphics Processor support a maximum of 255 vertices between the bgnline and endline subroutines.

The POWER Gt4x will restart the linestyle stipple pattern periodically if a large number of vertices is issued between a bgnline() and endline pair. Such a reset will not occur within the first 255 vertices but will occur sometime between the first 400 and 2000 vertices and will then restart at multiples of this amount. The actual point at which the restart occurs depends on whether normals, colors, and/or materials have been specified in addition to the vertex data.

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 closed line vertices with the bgnclosedline subroutine.

Setting the current color in RGB mode with the c subroutine.

Selecting the shading model with the shademodel 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 ]