GLPOINTSIZE(3G)

πŸ’– GLPOINTSIZE (3G) πŸ’–

okay bestie, so this one's from the 3G manual section β€” yeah, the OpenGL one β€” and it's literally just about making your points bigger or smaller. one function, one float, so much slay potential. let's go ✨


πŸŽ€ NAME πŸŽ€

glPointSize β€” specify the diameter of rasterized points

no cap, that's the whole job description. she sets the diameter, she minds her business πŸ’…


🌸 C SPECIFICATION 🌸

void glPointSize(GLfloat size);

that's it. that's the girl. one GLfloat, one dream πŸ¦‹


πŸ’œ PARAMETERS πŸ’œ

  • size β€” specifies the diameter of rasterized points. the initial value is 1. and yes, that's the starting number before you come in and start messing with it πŸ™ˆ

✨ DESCRIPTION ✨

so, glPointSize specifies the rasterized diameter of points. like, the actual size of the little dots once they hit the screen πŸ’«

here's the tea though β€” it depends on point size mode, so pay attention:

  • if point size mode is disabled (check out glEnable() with parameter GL_PROGRAM_POINT_SIZE), then this size value is the one that gets used to rasterize points.
  • otherwise β€” meaning the mode is enabled β€” the value written to the shading language built-in variable gl_PointSize is what gets used instead.

so like, your glPointSize call is lowkey just the backup plan in that second case. iykyk 😭


πŸ¦‹ NOTES πŸ¦‹

  • the point size you specified with glPointSize is always returned when GL_POINT_SIZE is queried. always. she's consistent πŸ‘‘
  • clamping and rounding for points have no effect on the specified value. none. zero. the value lives exactly as you left it, periodt ✨

πŸ”₯ ERRORS πŸ”₯

  • GL_INVALID_VALUE is generated if size is less than or equal to 0. so like... don't pass zero. don't pass negative. that's the vibe check she fails πŸ’€

🌈 ASSOCIATED GETS 🌈

  • glGet() with argument GL_POINT_SIZE_RANGE
  • glGet() with argument GL_POINT_SIZE_GRANULARITY
  • glGet() with argument GL_POINT_SIZE
  • glGet() with argument GL_POINT_FADE_THRESHOLD_SIZE
  • glIsEnabled() with argument GL_PROGRAM_POINT_SIZE

all the receipts you could ever want πŸ§ΎπŸ’–


⭐ VERSION SUPPORT ⭐

okay so the original had this big cute grid with Function / Feature Name down the side, OpenGL Version across the top, versions 2.0, 2.1, 3.0, 3.1, 3.2, 3.3, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5 β€” and glPointSize is a check mark βœ” in every single one of them. she ate and left no crumbs πŸ‘‘

  • glPointSize β€” βœ” 2.0
  • glPointSize β€” βœ” 2.1
  • glPointSize β€” βœ” 3.0
  • glPointSize β€” βœ” 3.1
  • glPointSize β€” βœ” 3.2
  • glPointSize β€” βœ” 3.3
  • glPointSize β€” βœ” 4.0
  • glPointSize β€” βœ” 4.1
  • glPointSize β€” βœ” 4.2
  • glPointSize β€” βœ” 4.3
  • glPointSize β€” βœ” 4.4
  • glPointSize β€” βœ” 4.5

twelve for twelve, literally iconic 🌟


πŸ’« SEE ALSO πŸ’«

  • glEnable()
  • glPointParameter()

go read those next, bestie, they're the friend group 🫢


Copyright Β© 1991-2006 Silicon Graphics, Inc. Copyright Β© 2010-2014 Khronos Group. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.

and then, because they really wanted you to remember it, here it is again:

Copyright Β© 1991-2006 Silicon Graphics, Inc. Copyright Β© 2010-2014 Khronos Group


lowkey warning bestie: size less than or equal to 0 β†’ GL_INVALID_VALUE. no exceptions, no mercy πŸ’€

okay that's the whole page, mwah πŸ’‹ β€” this cutie came from [FIXME: source], stamped 08/09/2021, and yes she's still GLPOINTSIZE(3G). go forth and size those points, queen πŸŒΈπŸ‘‘πŸ’–

πŸ“¦ where this page comes from