gleSetJoinStyle(3GLE)
β¨ gleSetJoinStyle β bestie, let's talk join styles β¨
okay so this is the 3GLE manual, and today's main character is gleSetJoinStyle, plus its lowkey iconic sidekick gleGetJoinStyle. They're literally a matched set: one sets, one gets, and both are about the GLE join style flags. π
πΈ NAME πΈ
gleSetJoinStyle, gleGetJoinStyle β query and set the GLE join style flags. That's it, that's the vibe. π
β¨ SYNTAX β¨
void gleSetJoinStyle (int style);
int gleGetJoinStyle (void);
look at them. so clean. so concise. π¦
π§ ARGUMENTS π§
styleβ a bitwise OR of flags. that's the whole assignment bestie, just OR a bunch of flags together and hand it over.
π DESCRIPTION π
So this pair queries and sets the GLE join style flags. The style word is β and I cannot stress this enough β a bitwise OR of the flags listed below. Not a sum, not a list, not a vibe. A bitwise OR. π«Ά
The initial join style (the one you get before you touch anything) is:
TUBE_JN_ANGLE | TUBE_JN_CAP | TUBE_NORM_FACET
no cap, that's the factory setting.
π₯ Extrusion Join Styles π₯
TUBE_JN_RAWβ draws polycylinders, polycones, extrusions, etc. with no special treatment of the extrusion ends. feral. unbothered. raw, as advertised. πTUBE_JN_ANGLEβ draws polycylinders, polycones, extrusions, etc. by extending the different segments until they butt into each other in an angular style. angular! sharp! geometric! πTUBE_JN_CUTβ draws polycylinders, polycones, extrusions, etc. by joining the different segments together and slicing off the joint at half the angle between the segments. A cap is drawn. Heads up: the slicing plane runs through the origin of the contour coordinate system. So if you want to change how much gets sliced, offset the contour relative to the origin. π―
β οΈ and when two segments meet at a shallow angle, the cut join style can potentially shave off a whole lot of the contour, leading to "surprising" results... and by "surprising" we mean π. you have been warned, bestie.
TUBE_JN_ROUNDβ joints get rounded. Strictly speaking, the part of the joint above the origin gets rounded. The part below the origin comes together in an angular join. so it's giving half-round, half-angular. still cute. πTUBE_JN_MASKβ mask bits! use this to mask off the bit field that defines the join style. it's the little eraser for that section of the flag word. β¨
π End Caps π
TUBE_JN_CAPβ if this is set, a cap will be drawn at each end of the extrusion. both ends. equal treatment. slay. π
π Automatic Normal Vector Generation π
TUBE_NORM_FACETβ a normal vector is generated per facet. Useful when you want an extrusion to have that "faceted" look β like when you extrude a square and each of the four sides of the square looks flat. very crisp, very deliberate. π¦TUBE_NORM_EDGEβ normal vectors are generated so they lie along edges. Useful for making angular things look rounded under lighting. example: extrude a hexagon with this flag and it'll look (more like) a smooth, perfectly round cylinder instead of a six-sided shape. glow-up achieved. β¨TUBE_NORM_PATH_EDGEβ normal vectors are generated so they both lie on edges and interpolate between neighboring segments. Useful for drawing "spaghetti" β extrusions that follow a spline path. π Because the spline path has to be "tessellated" into small straight segments, each segment will look straight unless this flag is set. so set it if you want smooth noodles.TUBE_NORM_MASKβ a mask, useful for masking out the "norm" bits. bye norm bits. π
π Closed or Open Contours π
TUBE_CONTOUR_CLOSEDβ if this bit is set, the contour is treated as a "closed" contour, where the last point connects back up to the first. It's useful to set this flag when drawing closed shapes β extruded cylinders, star-shapes, I-Beams, etc. BUT β when you're drawing open extrusions (e.g.corrugated sheet metal), you DON'T want to set this flag. respectfully. please. π
π BUGS π
Multiple threads using GLE share a single global join style. yes, one join style for everyone, like one group chat. π
though ngl, this should be easily fixable, because GLE does use a centralized graphics context. so it's giving "fixable, just not fixed." iykyk.
π«Ά SEE ALSO π«Ά
gleExtrusion, gleTextureMode β go read those too, bestie, they're in the same friend group.
π AUTHOR π
Linas Vepstas (linas@linas.org) β the legend himself. π
and that's the whole page!! this was the GLE manual, version 3.0, and yes it's literally titled gleSetJoinStyle(3GLE) at the top like a little name tag. π go forth and OR your flags correctly, bestie β no cap, you've got this. πβ¨π¦
π¦ where this page comes from
- debian bookworm: libgle3-dev 3.1.0-10 Β· GPL-2.0-only
- debian trixie: libgle3-dev 3.1.2-1+b2 Β· GPL-2.0-only
- fedora 43: libgle-devel 3.1.0-36.fc43 Β· GPL-2.0-only OR (ClArtistic AND LicenseRef-Callaway-MIT)
- fedora 43: libgle-devel 3.1.0-36.fc43 Β· GPL-2.0-only OR (ClArtistic AND LicenseRef-Callaway-MIT)
- fedora 44: libgle-devel 3.1.0-37.fc44 Β· GPL-2.0-only OR (ClArtistic AND LicenseRef-Callaway-MIT)
- fedora 44: libgle-devel 3.1.0-37.fc44 Β· GPL-2.0-only OR (ClArtistic AND LicenseRef-Callaway-MIT)
- nixos 26.05: gle 3.1.2
- nixpkgs unstable: gle 3.1.2
- opensuse-leap 16.0: gle-devel 3.1.2-bp160.1.13 Β· GPL-2.0-or-later
- opensuse-leap 16.0: gle-devel 3.1.2-bp160.1.13 Β· GPL-2.0-or-later
- opensuse-leap 16.0: gle-devel 3.1.2-bp160.1.13 Β· GPL-2.0-or-later
- opensuse-leap 16.0: gle-devel 3.1.2-bp160.1.13 Β· GPL-2.0-or-later
- ubuntu jammy: libgle3-dev 3.1.0-10 Β· GPL-2.0-only
- ubuntu noble: libgle3-dev 3.1.2-1build1 Β· GPL-2.0-only
- ubuntu questing: libgle3-dev 3.1.2-1build1
- ubuntu resolute: libgle3-dev 3.1.2-1build2 Β· GPL-2.0-only
- ubuntu stonking: libgle3-dev 3.1.2-1build2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms