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.6KB

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