GLAPI/glPointSize: Difference between revisions

From OpenGL Wiki
Jump to navigation Jump to search
m (Bot: Adjusting API page category.)
 
(6 intermediate revisions by one other user not shown)
Line 8: Line 8:
== Function Definition ==
== Function Definition ==


   void '''glPointSize'''(GLfloat ''size'');
   void '''glPointSize'''(GLfloat {{param|size}});


; size
; size
Line 15: Line 15:
== Description ==
== Description ==


'''glPointSize''' specifies the rasterized diameter of points. If point size mode is disabled (see [[GLAPI/glEnable|glEnable]] with parameter {{code|GL_PROGRAM_POINT_SIZE}}), this value will be used to rasterize points. Otherwise, the value written to the shading language built-in variable {{code|gl_PointSize}} will be used.
'''glPointSize''' specifies the rasterized diameter of points. If point size mode is disabled (see {{apifunc|glEnable}} with parameter {{enum|GL_PROGRAM_POINT_SIZE}}), this value will be used to rasterize points. Otherwise, the value written to the shading language built-in variable {{code|gl_PointSize}} will be used.


== Notes ==
== Notes ==


The point size specified by '''glPointSize''' is always returned when {{code|GL_POINT_SIZE}} is queried. Clamping and rounding for points have no effect on the specified value.
The point size specified by '''glPointSize''' is always returned when {{enum|GL_POINT_SIZE}} is queried. Clamping and rounding for points have no effect on the specified value.


== Errors ==
== Errors ==


{{code|GL_INVALID_VALUE}} is generated if ''size'' is less than or equal to 0.
{{enum|GL_INVALID_VALUE}} is generated if {{param|size}} is less than or equal to 0.


== Associated Gets ==
== Associated Gets ==


[[GLAPI/glGet|glGet]] with argument {{code|GL_POINT_SIZE_RANGE}}
{{apifunc|glGet}} with argument {{enum|GL_POINT_SIZE_RANGE}}


[[GLAPI/glGet|glGet]] with argument {{code|GL_POINT_SIZE_GRANULARITY}}
{{apifunc|glGet}} with argument {{enum|GL_POINT_SIZE_GRANULARITY}}


[[GLAPI/glGet|glGet]] with argument {{code|GL_POINT_SIZE}}
{{apifunc|glGet}} with argument {{enum|GL_POINT_SIZE}}


[[GLAPI/glGet|glGet]] with argument {{code|GL_POINT_SIZE_MIN}}
{{apifunc|glGet}} with argument {{enum|GL_POINT_FADE_THRESHOLD_SIZE}}


[[GLAPI/glGet|glGet]] with argument {{code|GL_POINT_SIZE_MAX}}
{{apifunc|glIsEnabled}} with argument {{enum|GL_PROGRAM_POINT_SIZE}}
 
[[GLAPI/glGet|glGet]] with argument {{code|GL_POINT_FADE_THRESHOLD_SIZE}}
 
[[GLAPI/glIsEnabled|glIsEnabled]] with argument {{code|GL_PROGRAM_POINT_SIZE}}


== See Also ==
== See Also ==


[[GLAPI/glEnable|glEnable]], [[GLAPI/glPointParameter|glPointParameter]]
{{apifunc|glEnable|(GL_PROGRAM_POINT_SIZE)}}, {{apifunc|glPointParameter}}


== Copyright ==
== Copyright ==


Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed under the SGI Free Software B License. For details, see [http://oss.sgi.com/projects/FreeB/ http://oss.sgi.com/projects/FreeB/].
Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed under the SGI Free Software B License. For details, see [https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt LicenseRef-FreeB].


[[Category:API Reference 4|PointSize]]
[[Category:Core API Ref Rasterization|PointSize]]
[[Category:GL 4 API Rasterization|PointSize]]
[[Category:Core API Reference|PointSize]]

Latest revision as of 21:23, 5 February 2021

glPointSize
Core in version 4.6
Core since version 1.0

glPointSize: specify the diameter of rasterized points

Function Definition

 void glPointSize(GLfloat size​);
size
Specifies the diameter of rasterized points. The initial value is 1.

Description

glPointSize specifies the rasterized diameter of points. If point size mode is disabled (see glEnable with parameter GL_PROGRAM_POINT_SIZE), this value will be used to rasterize points. Otherwise, the value written to the shading language built-in variable gl_PointSize will be used.

Notes

The point size specified by glPointSize is always returned when GL_POINT_SIZE is queried. Clamping and rounding for points have no effect on the specified value.

Errors

GL_INVALID_VALUE is generated if size​ is less than or equal to 0.

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

See Also

glEnable(GL_PROGRAM_POINT_SIZE), glPointParameter

Copyright

Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed under the SGI Free Software B License. For details, see LicenseRef-FreeB.