GLUBEGINPOLYGON(3G)

πŸ“¦ version 1.1, in centos-stream 9, fedora 43, fedora 44

✨ GLUBEGINPOLYGON πŸ’…

okay bestie, welcome to the GLUBEGINPOLYGON(3G) page, aka the manual for gluBeginPolygon and gluEndPolygon β€” the two lil functions that delimit a polygon description πŸŽ€ no cap.


🌸 NAME 🌸

gluBeginPolygon, gluEndPolygon β€” delimit a polygon description. that's it, that's the whole job 🫢


πŸ’– C SPECIFICATION πŸ’–

void gluBeginPolygon( GLUtesselator* tess )

void gluEndPolygon( GLUtesselator* tess )

πŸ¦‹ PARAMETERS πŸ¦‹

  • tess β€” specifies the tessellation object, and you make one of those with gluNewTess. that's the one, that's your girl ✨

πŸŽ€ DESCRIPTION πŸŽ€

so gluBeginPolygon and gluEndPolygon delimit the definition of a nonconvex polygon. the way that works is:

  1. first you call gluBeginPolygon.
  2. then you define the contours of the polygon by calling gluTessVertex for each vertex, and gluNextContour to start each new contour.
  3. finally you call gluEndPolygon to signal that the definition is done, periodt.

if you want more deets, the gluTessVertex and gluNextContour reference pages are right there, go read them πŸ“š

once gluEndPolygon gets called, the polygon is tessellated, and the resulting triangles are described through callbacks. gluTessCallback has the descriptions of those callback functions, iykyk πŸ’«


πŸ‘‘ NOTES πŸ‘‘

this command is obsolete and is provided for backward compatibility only. it's giving legacy, fr fr πŸ’€

calls to gluBeginPolygon are mapped to gluTessBeginPolygon followed by gluTessBeginContour. calls to gluEndPolygon are mapped to gluTessEndContour followed by gluTessEndPolygon. so like, it still works, it's just the old route 🌈


⭐ EXAMPLE ⭐

a quadrilateral with a triangular hole in it can be described like this, and yes this is the exact code, no edits bestie:

gluBeginPolygon(tobj);
   gluTessVertex(tobj, v1, v1);
   gluTessVertex(tobj, v2, v2);
   gluTessVertex(tobj, v3, v3);
   gluTessVertex(tobj, v4, v4); gluNextContour(tobj, GLU_INTERIOR);
   gluTessVertex(tobj, v5, v5);
   gluTessVertex(tobj, v6, v6);
   gluTessVertex(tobj, v7, v7); gluEndPolygon(tobj);

πŸ’œ SEE ALSO πŸ’œ

  • gluNewTess(3G)
  • gluNextContour(3G)
  • gluTessCallback(3G)
  • gluTessVertex(3G)
  • gluTessBeginPolygon(3G)
  • gluTessBeginContour(3G)

and that's the whole page, bestie 🫢 this was GLUBEGINPOLYGON(3G) β€” same title, same version, sitting right there at the bottom where it always is. go tessellate something iconic πŸ‘‘βœ¨

πŸ“¦ where this page comes from