GLGETPOLYGONSTIPPLE(3G)

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

✨ GLGETPOLYGONSTIPPLE πŸ’–

okay bestie, welcome to the 3G section of the manual, this one's all about glGetPolygonStipple β€” the lil' function that hands you back the polygon stipple pattern. no cap, that's literally its whole job. πŸŽ€


🌸 NAME 🌸

glGetPolygonStipple β€” return the polygon stipple pattern πŸ¦‹


πŸ’… C SPECIFICATION πŸ’…

void glGetPolygonStipple( GLubyte *mask )

πŸŽ€ PARAMETERS πŸŽ€

  • mask β€” returns the stipple pattern. the initial value is all 1's, periodt. ⭐

🌈 DESCRIPTION 🌈

so here's the tea: glGetPolygonStipple returns to mask a 32Γ—32 polygon stipple pattern. iconic. πŸ‘‘

the way the pattern gets packed into memory? it's as if you called glReadPixels with both height and width of 32, a type of GL_BITMAP, and a format of GL_COLOR_INDEX β€” and the stipple pattern was sitting in an internal 32Γ—32 color index buffer the whole time. it's giving readpixels but make it stipple. ✨

but β€” and this is the important bit, don't skip it β€” unlike glReadPixels, the pixel transfer operations (shift, offset, pixel map) are not applied to the returned stipple image. so no extra glow-up on the way out. πŸ’…


🫢 NOTES 🫢

if an error is generated, no change is made to the contents of mask. your buffer stays exactly how it was, fr fr. πŸ™ˆ


πŸ’€ ERRORS πŸ’€

  • GL_INVALID_OPERATION gets generated if glGetPolygonStipple is executed between the execution of glBegin and the corresponding execution of glEnd. do not do this. it's the forbidden zone, iykyk. 😭

πŸ¦‹ SEE ALSO πŸ¦‹

  • glPixelStore(3G)
  • glPixelTransfer(3G)
  • glPolygonStipple(3G)
  • glReadPixels(3G)

and that's the whole page, bestie!! this one came straight outta the GLGETPOLYGONSTIPPLE(3G) manual page, footer and all β€” same name up top, same name at the bottom. go forth and stipple responsibly πŸ’–βœ¨πŸŒΈ

πŸ“¦ where this page comes from