GLPOINTSIZE(3G)
π GLPOINTSIZE(3G) β like, the whole entire manual page, bestie
okay so. welcome to GLPOINTSIZE(3G), the page where we learn how to make dots bigger. yes that's the whole vibe. β¨ it's a C function, it lives in the 3G manual, and it's about to be your new hyperfixation. let's go π«Ά
β¨ NAME β¨
glPointSize β specify the diameter of rasterized points π―
πΈ C SPECIFICATION πΈ
void glPointSize( GLfloat size )
that's it. that's the whole signature. she's simple, she's iconic π
π PARAMETERS π
sizeβ Specifies the diameter of rasterized points. The initial value is1. yep, defaults to one. baby steps π£
π¦ DESCRIPTION π¦
k so glPointSize specifies the rasterized diameter of both aliased and antialiased points. no discrimination here, she serves both π but ngl, using a point size other than 1 has different effects depending on whether point antialiasing is enabled or not. to turn point antialiasing on and off, you call glEnable and glDisable with argument GL_POINT_SMOOTH. and heads up: point antialiasing is initially disabled. π«
if point antialiasing is disabled (the default, remember?), the actual size is determined by rounding the supplied size to the nearest integer. (and if the rounding results in the value 0, it's as if the point size were 1 β she refuses to be nothing π). if the rounded size is odd, then the center point (x, y) of the pixel fragment that represents the point is computed as:
( βxwβ+.5, βywβ+.5)
where the w subscripts indicate window coordinates. all pixels that lie within the square grid of the rounded size centered at (x, y) make up the fragment. and if the size is even, the center point is:
( βxw+.5β, βyw+.5β)
and the rasterized fragment's centers are the half-integer window coordinates within the square of the rounded size centered at (x, y). all pixel fragments produced in rasterizing a nonantialiased point are assigned the same associated data β that of the vertex corresponding to the point. periodt π
if antialiasing is enabled, then point rasterization produces a fragment for each pixel square that intersects the region lying within the circle having diameter equal to the current point size and centered at the point's (xw, yw). the coverage value for each fragment is the window coordinate area of the intersection of the circular region with the corresponding pixel square. this value is saved and used in the final rasterization step. the data associated with each fragment is the data associated with the point being rasterized. so, like, soft dots. gorgeous. π
and now the sad part π β not all sizes are supported when point antialiasing is enabled. if an unsupported size is requested, the nearest supported size is used. only size1is guaranteed to be supported; the others depend on the implementation. if you wanna query the range of supported sizes and the size difference between supported sizes within the range, callglGetwith argumentsGL_SMOOTH_POINT_SIZE_RANGEandGL_SMOOTH_POINT_SIZE_GRANULARITY. for aliased points, query the supported ranges and granularity withglGetwith argumentsGL_ALIASED_POINT_SIZE_RANGEandGL_ALIASED_POINT_SIZE_GRANULARITY. iykyk π
π NOTES π
- the point size specified by
glPointSizeis always returned whenGL_POINT_SIZEis queried. clamping and rounding for aliased and antialiased points have no effect on the specified value. she's honest, she tells you what you set, not what she did with it π - a non-antialiased point size may be clamped to an implementation-dependent maximum. although this maximum cannot be queried, it must be no less than the maximum value for antialiased points, rounded to the nearest integer value. so there's a ceiling, but it's a mystery ceiling π
- big deprecated energy:
GL_POINT_SIZE_RANGEandGL_POINT_SIZE_GRANULARITYare deprecated in GL versions1.2and greater. their functionality has been replaced byGL_SMOOTH_POINT_SIZE_RANGEandGL_SMOOTH_POINT_SIZE_GRANULARITY. rip to the old ones, they served their time π―οΈ
π₯ ERRORS π₯
GL_INVALID_VALUEis generated ifsizeis less than or equal to0. so zero and negatives? absolutely not, we do not stan π«π ββοΈGL_INVALID_OPERATIONis generated ifglPointSizeis executed between the execution ofglBeginand the corresponding execution ofglEnd. read the room, bestie, don't do that in between π€
β ASSOCIATED GETS β
like, the stuff you can go ask about later π¬
glGet with argument GL_POINT_SIZE
glGet with argument GL_ALIASED_POINT_SIZE_RANGE
glGet with argument GL_ALIASED_POINT_SIZE_GRANULARITY
glGet with argument GL_SMOOTH_POINT_SIZE_RANGE
glGet with argument GL_SMOOTH_POINT_SIZE_GRANULARITY
glIsEnabled with argument GL_POINT_SMOOTH
π SEE ALSO π
glEnable(3G)β go read that one next, it's giving sibling energy π«Ά
and that's the whole page!! mwah π this was GLPOINTSIZE(3G), brought to you straight from the 3G manual β same name up top, same name down here, no date on this one so don't come for me πΈ go forth and render some extremely correct dots β¨ππ¦
π¦ where this page comes from
- opensuse-leap 16.0: Mesa-libGL-devel 24.1.7-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms