pointsize.3gl 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. '\" e
  2. '\"! eqn | mmdoc
  3. '\"macro stdmacro
  4. .ds Vn Version 1.2
  5. .ds Dt 24 September 1999
  6. .ds Re Release 1.2.1
  7. .ds Dp Jan 14 18:30
  8. .ds Dm 01 pointsize
  9. .ds Xs 46128 6 pointsize.gl
  10. .TH GLPOINTSIZE 3G
  11. .SH NAME
  12. .B "glPointSize
  13. \- specify the diameter of rasterized points
  14. .SH C SPECIFICATION
  15. void \f3glPointSize\fP(
  16. GLfloat \fIsize\fP )
  17. .nf
  18. .fi
  19. .EQ
  20. delim $$
  21. .EN
  22. .SH PARAMETERS
  23. .TP \w'\f2size\fP\ \ 'u
  24. \f2size\fP
  25. Specifies the diameter of rasterized points.
  26. The initial value is 1.
  27. .SH DESCRIPTION
  28. \%\f3glPointSize\fP specifies the rasterized diameter of both aliased and antialiased
  29. points.
  30. Using a point size other than 1 has different effects,
  31. depending on whether point antialiasing is enabled.
  32. To enable and disable point antialiasing, call
  33. \%\f3glEnable\fP and \%\f3glDisable\fP
  34. with argument \%\f3GL_POINT_SMOOTH\fP. Point antialiasing is initially disabled.
  35. .P
  36. If point antialiasing is disabled,
  37. the actual size is determined by rounding the supplied size
  38. to the nearest integer.
  39. (If the rounding results in the value 0,
  40. it is as if the point size were 1.)
  41. If the rounded size is odd,
  42. then the center point
  43. ($ x $, $ y $)
  44. of the pixel fragment that represents the point is computed as
  45. .sp
  46. .ce
  47. ( $ \(lf ~ x sub w ~ \(rf ~+~ .5 $, $ \(lf ~ y sub w ~ \(rf ~+~ .5 $)
  48. .sp
  49. where $w$ subscripts indicate window coordinates.
  50. All pixels that lie within the square grid of the rounded size centered at
  51. ($ x $, $ y $)
  52. make up the fragment.
  53. If the size is even,
  54. the center point is
  55. .sp
  56. .ce
  57. ( $ \(lf ~ x sub w ~+~ .5 ~ \(rf$, $ \(lf ~ y sub w ~+~ .5 ~ \(rf $)
  58. .sp
  59. and the rasterized fragment's centers are the half-integer window coordinates
  60. within the square of the rounded size centered at
  61. ($ x $, $ y $).
  62. All pixel fragments produced in rasterizing a nonantialiased point are
  63. assigned the same associated data,
  64. that of the vertex corresponding to the point.
  65. .P
  66. If antialiasing is enabled,
  67. then point rasterization produces a fragment for each pixel square
  68. that intersects the region lying within the circle having diameter
  69. equal to the current point size and centered at the point's
  70. ($ x sub w $, $ y sub w $).
  71. The coverage value for each fragment is the window coordinate area
  72. of the intersection of the circular region with the corresponding pixel square.
  73. This value is saved and used in the final rasterization step.
  74. The data associated with each fragment is the data associated with
  75. the point being rasterized.
  76. .P
  77. Not all sizes are supported when point antialiasing is enabled.
  78. If an unsupported size is requested,
  79. the nearest supported size is used.
  80. Only size 1 is guaranteed to be supported;
  81. others depend on the implementation.
  82. To query the range of supported sizes and the size difference between
  83. supported sizes within the range, call
  84. \%\f3glGet\fP with arguments
  85. \%\f3GL_SMOOTH_POINT_SIZE_RANGE\fP and
  86. \%\f3GL_SMOOTH_POINT_SIZE_GRANULARITY\fP.
  87. For aliased points, query the supported ranges and granularity with
  88. \%\f3glGet\fP with arguments
  89. \%\f3GL_ALIASED_POINT_SIZE_RANGE\fP and
  90. \%\f3GL_ALIASED_POINT_SIZE_GRANULARITY\fP.
  91. .SH NOTES
  92. The point size specified by \%\f3glPointSize\fP is always returned when \%\f3GL_POINT_SIZE\fP
  93. is queried.
  94. Clamping and rounding for aliased and antialiased points have no effect
  95. on the specified value.
  96. .P
  97. A non-antialiased point size may be clamped to an implementation-dependent
  98. maximum.
  99. Although this maximum cannot be queried,
  100. it must be no less than the maximum value for antialiased points,
  101. rounded to the nearest integer value.
  102. .P
  103. \%\f3GL_POINT_SIZE_RANGE\fP and \%\f3GL_POINT_SIZE_GRANULARITY\fP are
  104. deprecated in GL versions 1.2 and greater. Their functionality has been
  105. replaced by \%\f3GL_SMOOTH_POINT_SIZE_RANGE\fP and
  106. \%\f3GL_SMOOTH_POINT_SIZE_GRANULARITY\fP.
  107. .SH ERRORS
  108. \%\f3GL_INVALID_VALUE\fP is generated if \f2size\fP is less than or equal to 0.
  109. .P
  110. \%\f3GL_INVALID_OPERATION\fP is generated if \%\f3glPointSize\fP
  111. is executed between the execution of \%\f3glBegin\fP
  112. and the corresponding execution of \%\f3glEnd\fP.
  113. .SH ASSOCIATED GETS
  114. \%\f3glGet\fP with argument \%\f3GL_POINT_SIZE\fP
  115. .br
  116. \%\f3glGet\fP with argument \%\f3GL_ALIASED_POINT_SIZE_RANGE\fP
  117. .br
  118. \%\f3glGet\fP with argument \%\f3GL_ALIASED_POINT_SIZE_GRANULARITY\fP
  119. .br
  120. \%\f3glGet\fP with argument \%\f3GL_SMOOTH_POINT_SIZE_RANGE\fP
  121. .br
  122. \%\f3glGet\fP with argument \%\f3GL_SMOOTH_POINT_SIZE_GRANULARITY\fP
  123. .br
  124. \%\f3glIsEnabled\fP with argument \%\f3GL_POINT_SMOOTH\fP
  125. .SH SEE ALSO
  126. \%\f3glEnable(3G)\fP