gleExtrusion(3GLE)
β¨ gleExtrusion β¨
okay bestie, welcome to the GLE corner of the man pages, this one is gleExtrusion(3GLE) and it is literally the glow-up your 2D shapes have been waiting for π
πΈ NAME πΈ
gleExtrusion β extrude an arbitrary 2D contour along an arbitrary 3D path. yes bestie, arbitrary on both sides, we contain multitudes π¦
β¨ SYNTAX β¨
void gleExtrusion (int ncp,
gleDouble contour[][2],
gleDouble cont_normal[][2],
gleDouble up[3],
int npoints,
gleDouble point_array[][3],
float color_array[][3]);
π ARGUMENTS π
ncpβ number of contour points. how many lil guys are in your contour, fr fr.contourβ the 2D contour itself. this is the shape getting yeeted along the path.cont_normalβ the 2D contour normals. the directional vibe of each contour point.upβ up vector for the contour. tells the contour's y-axis where "up" is in real 3D space.npointsβ numpoints in the poly-line. the count of vertices in your path.point_arrayβ polyline vertices. this is the actual path the contour rides along, main character energy πcolor_arrayβ colors at polyline verts. per-vertex color drip.
π DESCRIPTION π
So here's the tea: gleExtrusion extrudes an arbitrary 2D contour along an arbitrary 3D path. The argument contour specifies the 2D contour to be extruded, while the argument point_array specifies the path along which to extrude. And the vector up defines the orientation of the contour y-axis in real 3D space. like, it's giving geometry with attitude.
β οΈ now pay attention because this one is a sneaky lil trap: neither the very first segment, nor the very last segment are drawn. The first and last segments serve only to define the angle of the join at the very ends of the polyline. So the math is: to draw one segment, three must be specified. To draw two segments, four must be specified, etc. not me getting jumpscared by that the first time π the segments are there for vibes only, they're scaffolding, they're the backstage crew, they do NOT walk the runway.
The normal array may be NULL. If it is, normal vectors will NOT be automatically generated, and the object will look terrible when lit. π i said what i said. no normals, no shading, just a sad flat blob under the lights. you have been warned, bestie.
The color array may be NULL. If NULL, the current color is used. If not NULL, the glColor3f() routine is used to set the color; therefore, specifying the glColorMaterial() subroutine before this primitive can be used to set diffuse, specular, ambient, etc. colors. so yeah, you can absolutely curate the whole lighting lewk before you call this π¨β¨
π¦ SEE ALSO π¦
gleTwistExtrusiongleSuperExtrusion
(they're the cousins, go say hi π)
π AUTHOR π
Linas Vepstas (linas@linas.org) β thank you for the shapes, king π«Ά
okay that's the whole page, mwah π this was brought to you by GLE version 3.0, so go forth and extrude responsibly, bestie. periodt. π β¨
π¦ 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