GLUNEXTCONTOUR(3G)
β¨ GLUNEXTCONTOUR β¨
okay bestie, so this is a page from the 3G manual β GLU land, the OpenGL Utility library π
β and it's all about gluNextContour, aka "new contour, who dis?" π¦
πΈ NAME πΈ
gluNextContour β mark the beginning of another contour π
π C SPECIFICATION π
void gluNextContour( GLUtesselator* tess,
GLenum type )
π«Ά PARAMETERS π«Ά
tessβ the tessellation object, the one you made withgluNewTess. that's your lil guy, your main character π«§typeβ what kind of contour you're about to define. the valid values areGLU_EXTERIOR,GLU_INTERIOR,GLU_UNKNOWN,GLU_CCW, andGLU_CW. pick one, no wrong answers (well, technically there are wrong answers, and they're the ones not on that list π)
π DESCRIPTION π
gluNextContour is how you describe polygons that have multiple contours β the multi-contour moment, if you will β¨
the flow is: you describe your first contour with a whole series of gluTessVertex calls. then you hit it with a gluNextContour call, which is basically the library equivalent of saying "okay that one's done, next!!" β it says the previous contour is complete and the next one is about to begin. then you do another series of gluTessVertex calls to describe the new contour. repeat until all your contours are described. it's giving assembly line, it's giving pipeline π
type is what tells it what type of contour comes next. the legal contour types are:
GLU_EXTERIORβ an exterior contour defines an exterior boundary of the polygon. the outer edge, the perimeter, the ~vibe boundary~ π«GLU_INTERIORβ an interior contour defines an interior boundary of the polygon (such as a hole). yes bestie, holes count as boundaries too πGLU_UNKNOWNβ an unknown contour gets analyzed by the library to figure out whether it's interior or exterior. it'll just, like, look at it and decide π§GLU_CCW,GLU_CWβ the firstGLU_CCWorGLU_CWcontour you define is considered to be exterior. all the other contours are considered exterior if they're oriented in the same direction (clockwise or counterclockwise) as that first contour, and interior if they're not. orientation-based, lowkey genius β
heads up: if one contour is of typeGLU_CCWorGLU_CW, then all contours must be of the same type. if they are not, then allGLU_CCWandGLU_CWcontours will be changed toGLU_UNKNOWN. so like, pick a lane π¨
also, fun fact: there is no real difference between the GLU_CCW and GLU_CW contour types. they're the same thing wearing different outfits π
before the first contour is described, you can call gluNextContour to define the type of the first contour. and if you don't call gluNextContour before that first contour, then the first contour is marked GLU_EXTERIOR by default. no pressure either way π
π¨ obsolete alert π¨ this command is obsolete and is provided for backward compatibility only. calls togluNextContourare mapped togluTessEndContourfollowed bygluTessBeginContour. so it still works, it's just an icon living in the past π
π EXAMPLE π
say you want a quadrilateral with a triangular hole in it. iconic shape. here's how you'd describe it:
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 how gluNextContour(tobj, GLU_INTERIOR) is just chillin' there at the end of the outer four vertices, right before the hole's three vertices start? that's the whole trick β¨
π SEE ALSO π
gluBeginPolygon(3G), gluNewTess(3G), gluTessCallback(3G), gluTessVertex(3G), gluTessBeginContour(3G)
and that's the whole page, bestie π«Ά this was GLUNEXTCONTOUR(3G) from the GLUNEXTCONTOUR(3G) manual β go forth and tessellate, you absolute legend ππ
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- fedora 43: gl-manpages 1.1-34.20190306.fc43 Β· Apache-2.0 AND HPND AND HPND-sell-variant AND MIT AND OpenPBS-2.3 AND SGI-B-2.0 AND W3C-19980720 AND X11
- fedora 44: gl-manpages 1.1-35.20190306.fc44 Β· Apache-2.0 AND HPND AND HPND-sell-variant AND MIT AND OpenPBS-2.3 AND SGI-B-2.0 AND W3C-19980720 AND X11
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms