Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MESA_sprite_point.spec 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. Name
  2. MESA_sprite_point
  3. Name Strings
  4. GL_MESA_sprite_point
  5. Contact
  6. Brian Paul, VA Linux Systems Inc. (brianp 'at' valinux.com)
  7. Status
  8. Obsolete - see GL_ARB_point_sprite.
  9. Version
  10. $Id: MESA_sprite_point.spec,v 1.2 2003/09/19 14:58:21 brianp Exp $
  11. Number
  12. ???
  13. Dependencies
  14. GL_EXT_point_parameters effects the definition of this extension
  15. GL_ARB_multitexture effects the definition of this extension
  16. Overview
  17. This extension modifies the way in which points are rendered,
  18. specifically when they're textured. When SPRITE_POINT_MESA is enabled
  19. a point is rendered as if it were a quadrilateral with unique texture
  20. coordinates at each vertex. This extension effectively turns points
  21. into sprites which may be rendered more easily and quickly than using
  22. conventional textured quadrilaterals.
  23. When using point size > 1 or attenuated points this extension is an
  24. effective way to render many small sprite images for particle systems
  25. or other effects.
  26. Issues:
  27. 1. How are the texture coordinates computed?
  28. The lower-left corner has texture coordinate (0,0,r,q).
  29. The lower-right, (1,0,r,q). The upper-right, (1,1,r,q).
  30. The upper-left, (0,1,r,q).
  31. 2. What about texgen and texture matrices?
  32. Texgen and the texture matrix have no effect on the point's s and t
  33. texture coordinates. The r and q coordinates may have been computed
  34. by texgen or the texture matrix. Note that with a 3D texture and/or
  35. texgen that the r coordinate could be used to select a slice in the
  36. 3D texture.
  37. 3. What about point smoothing?
  38. When point smoothing is enabled, a triangle fan could be rendered
  39. to approximate a circular point. This could be problematic to
  40. define and implement so POINT_SMOOTH is ignored when drawing sprite
  41. points.
  42. Smoothed points can be approximated by using an appropriate texture
  43. images, alpha testing and blending.
  44. POLYGON_SMOOTH does effect the rendering of the quadrilateral, however.
  45. 4. What about sprite rotation?
  46. There is none. Sprite points are always rendered as window-aligned
  47. squares. One could define rotated texture images if desired. A 3D
  48. texture and appropriate texture r coordinates could be used to
  49. effectively specify image rotation per point.
  50. 5. What about POLYGON_MODE?
  51. POLYGON_MODE does not effect the rasterization of the quadrilateral.
  52. 6. What about POLYGON_CULL?
  53. TBD. Polygon culling is normally specified and implemented in the
  54. transformation stage of OpenGL. However, some rasterization hardware
  55. implements it later during triangle setup.
  56. Polygon culling wouldn't be useful for sprite points since the
  57. quadrilaterals are always defined in counter-clockwise order in
  58. window space. For that reason, polygon culling should probably be
  59. ignored.
  60. 7. Should sprite points be alpha-attenuated if their size is below the
  61. point parameter's threshold size?
  62. 8. Should there be an advertisized maximum sprite point size?
  63. No. Since we're rendering the point as a quadrilateral there's no
  64. need to limit the size.
  65. New Procedures and Functions
  66. None.
  67. New Tokens
  68. Accepted by the <pname> parameter of Enable, Disable, IsEnabled,
  69. GetIntegerv, GetBooleanv, GetFloatv and GetDoublev:
  70. SPRITE_POINT_MESA 0x????
  71. MAX_SPRITE_POINT_SIZE_MESA 0x???? (need this?)
  72. Additions to Chapter 2 of the 1.1 Specification (OpenGL Operation)
  73. None
  74. Additions to Chapter 3 of the 1.1 Specification (Rasterization)
  75. Section ???.
  76. When SPRITE_POINT_MESA is enabled points are rasterized as screen-
  77. aligned quadrilaterals. If the four vertices of the quadrilateral
  78. are labeled A, B, C, and D, starting at the lower-left corner and moving
  79. counter-clockwise around the quadrilateral, then the vertex and
  80. texture coordinates are computed as follows:
  81. vertex window coordinate texture coordinate
  82. A (x-r, y-r, z, w) (0, 0, r, q)
  83. B (x+r, y-r, z, w) (1, 0, r, q)
  84. C (x+r, y+r, z, w) (1, 1, r, q)
  85. D (x-r, y+r, z, w) (0, 1, r, q)
  86. where x, y, z, w are the point's window coordinates, r and q are the
  87. point's 3rd and 4th texture coordinates and r is half the point's
  88. size. The other vertex attributes (such as the color and fog coordinate)
  89. are simply duplicated from the original point vertex.
  90. Point size may either be specified with PointSize or computed
  91. according to the EXT_point_parameters extension.
  92. The new texture coordinates are not effected by texgen or the texture
  93. matrix. Note, however, that the texture r and q coordinates are passed
  94. unchanged and may have been computed with texgen and/or the texture
  95. matrix.
  96. If multiple texture units are present the same texture coordinate is
  97. used for all texture units.
  98. The point is then rendered as if it were a quadrilateral using the
  99. normal point sampling rules. POLYGON_MODE does not effect the
  100. rasterization of the quadrilateral but POLYGON_SMOOTH does.
  101. POINT_SMOOTH has no effect when SPRITE_POINT_MESA is enabled.
  102. Additions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations
  103. and the Frame Buffer)
  104. None.
  105. Additions to Chapter 5 of the 1.1 Specification (Special Functions)
  106. None
  107. Additions to Chapter 6 of the 1.1 Specification (State and State Requests)
  108. None
  109. Additions to the GLX Specification
  110. None
  111. GLX Protocol
  112. TBD
  113. Errors
  114. None
  115. New State
  116. Add boolean variable SPRITE_POINT_MESA to the point attribute group.
  117. Revision History
  118. Version 1.0 - 4 Dec 2000
  119. Original draft.