---
name: "gleSetJoinStyle"
section: "3xgle"
platform: "linux"
package: "glut-doc"
version: "3.7-5"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/gleSetJoinStyle/3xgle"
---

# gleSetJoinStyle(3xgle)

Query and Set the GLE join style flags.

## NAME

gleSetJoinStyle, gleGetJoinStyle - Query and Set the GLE join style flags.

## SYNTAX

void gleSetJoinStyle (int style); int gleGetJoinStyle (void);

## ARGUMENTS

- *style*

  bitwise OR of flags

## DESCRIPTION

Query and set the GLE join style flags. This word is a bitwise OR of the flags described below.

The initial join style is TUBE\_JN\_ANGLE \| TUBE\_JN\_CAP \| TUBE\_NORM\_FACET.

**Extrusion Join Styles**

- **TUBE\_JN\_RAW**

  Draw polycylinders, polycones, extrusions, etc. with no special
   treatment of the extrusion ends.

- **TUBE\_JN\_ANGLE**

  Draw polycylinders, polycones, extrusions, etc. by extending the
   different segments until they butt into each other with an
   angular style.

- **TUBE\_JN\_CUT**

  Draw polycylinders, polycones, extrusions, etc. by joining together the
   different segments and slicing off the joint at half the angle between
   the segments. A cap is drawn. Note that the slicing plane runs through
   the origin of the contour coordinate system. Thus, the amount of slice
   can be varied by offsetting the contour with respect to the origin.

  Note that when two segments meet at a shallow angle, the cut join style
   will potentially shave off a whole lot of the contour, leading to
   "surprising" results...

- **TUBE\_JN\_ROUND**

  Joints will be rounded. Strictly speaking, the part of the joint above
   the origin will be rounded. The part below the origin will come
   together in an angular join.

- **TUBE\_JN\_MASK**

  Mask bits. This can be used to mask off the bit field that defines the
   join style.

  **End Caps**

- **TUBE\_JN\_CAP**

  If this is set, a cap will be drawn at each end of the extrusion.

  **Automatic Normal Vector Generation**

- **TUBE\_NORM\_FACET**

  A normal vector is generated per facet. Useful for having an extrusion
   have a "faceted" look, such as when extruding a square -- each of the
   four sides of the square will look flat.

- **TUBE\_NORM\_EDGE**

  Normal vectors are generated so that they lie along edges. Useful for
   making angular things look rounded under lighting. For example, when
   extruding a hexagon and using this flag, the hexagonal extrusion will
   look (more like a) smooth perfectly round cylinder, rather than a
   six-sided shape.

- **TUBE\_NORM\_PATH\_EDGE**

  Normal vectors are generated so that they both lie on edges, and so
   that they interpolate between neighboring segments. Useful for drawing
   "spaghetti" -- extrusions that follow a spline path.  Because the
   spline path must be "tessellated" into small straight segments, each
   segment will look straight unless this flag is set.

- **TUBE\_NORM\_MASK**

  A mask useful for masking out the "norm" bits.

  **Closed or Open Contours**

- **TUBE\_CONTOUR\_CLOSED**

  If this bit is set, the contour will be treated as a "closed" contour,
   where the last point connects back up to the first. It is useful to set
   this flag when drawing closed shapes (such as extruded cylinders,
   star-shapes, I-Beams, etc. When drawing open extrusions (e.g.
   corrugated sheet metal), you DON'T want to set this flag.

## BUGS

Multiple threads using GLE share a single global join style.

## SEE ALSO

gleExtrusion, gleTextureMode

## AUTHOR

Linas Vepstas (linas@fc.net)
