GLEDGEFLAG(3G)

πŸ“¦ version 24.3.3, in opensuse-leap 16.0

✨ GLEDGEFLAG(3G) ✨

okay bestie, welcome to the GLEDGEFLAG page, section 3G of the manual πŸ’… this one is all about telling OpenGL which edges are boundary and which are nonboundary, and honestly? it's giving "small function, big vibes" πŸ¦‹


🌸 NAME 🌸

glEdgeFlag, glEdgeFlagv β€” flag edges as either boundary or nonboundary πŸŽ€


🧚 C SPECIFICATION 🧚

void glEdgeFlag( GLboolean flag )

πŸ“ PARAMETERS πŸ“

  • flag β€” this is the current edge flag value you're setting, and it's either GL_TRUE or GL_FALSE. the initial value is GL_TRUE, no cap πŸ‘‘

🧚 C SPECIFICATION 🧚

void glEdgeFlagv( const GLboolean *flag )

πŸ“ PARAMETERS πŸ“

  • flag β€” a pointer to an array holding a single boolean element, and that element replaces the current edge flag value ✨

πŸ’– DESCRIPTION πŸ’–

so here's the tea β˜• every vertex of a polygon, separate triangle, or separate quadrilateral that you specify between a glBegin/glEnd pair gets marked as the start of either a boundary edge or a nonboundary edge. if the current edge flag is true at the moment you specify that vertex, the vertex is marked as the start of a boundary edge πŸ”₯ otherwise, it's marked as the start of a nonboundary edge.

glEdgeFlag sets the edge flag bit to GL_TRUE if flag is GL_TRUE, and to GL_FALSE otherwise. simple as that, periodt πŸ’…

now the important part bestie, don't skip this: the vertices of connected triangles and connected quadrilaterals are always marked as boundary, regardless of what the edge flag value is. like, the flag doesn't even get a vote there 😭

and one more thing β€” boundary and nonboundary edge flags on vertices are significant only if GL_POLYGON_MODE is set to GL_POINT or GL_LINE. see glPolygonMode for that whole situation 🫢


πŸŽ€ NOTES πŸŽ€

the current edge flag can be updated at any time ⏰ in particular, glEdgeFlag can be called between a call to glBegin and the corresponding call to glEnd. yes, right in the middle of the pair. iconic behaviour, we love to see it ✨


πŸ‘‘ ASSOCIATED GETS πŸ‘‘

  • glGet with argument GL_EDGE_FLAG 🌈

πŸ¦‹ SEE ALSO πŸ¦‹

  • glBegin(3G)
  • glEdgeFlagPointer(3G)
  • glPolygonMode(3G)

and that's the whole page, bestie!! this was GLEDGEFLAG(3G) from the OpenGL manual, section 3G β€” same title on the way out as on the way in, because symmetry is iconic πŸ’œ go flag some edges, you're doing amazing sweetie 🫢✨

πŸ“¦ where this page comes from