Source code of Windows XP (NT5)
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.

217 lines
6.1 KiB

  1. Syntax Rules for OpenGL Extensions
  2. ----------------------------------
  3. This is a preliminary document. No ARB vote has been taken!
  4. Required abbreviations
  5. ----------------------
  6. Accum Accumulation Buffer
  7. Attrib Attribute
  8. Aux Auxiliary
  9. CCW Counter Clockwise
  10. Clip Clipping
  11. CMYK Cyan Magenta Yellow Black
  12. Coeff Coefficient
  13. Coord Coordinate
  14. CW Clockwise
  15. Decr Decrement
  16. Dim Dimension
  17. Dst Destination
  18. Env Environment
  19. Eval Evaluate
  20. Exp Exponential
  21. Func Function
  22. Gequal Greater than or equal to
  23. Gen Generate
  24. Incr Increment
  25. Index Color Index
  26. Lequal Less than or equal to
  27. Light Model Lighting Model
  28. List Display List
  29. LSB Least significant bit
  30. Mag Magnify
  31. Max Maximum
  32. Min Minify
  33. Mult Multiply
  34. Op Operation
  35. Ortho Orthographic
  36. Pname ParameterName
  37. Pos Position (function names only)
  38. Quad Quadrilateral
  39. Rect Rectangle
  40. Ref Reference
  41. RGB Red Green Blue
  42. RGBA Red Green Blue Alpha
  43. Shade Model Shading Model
  44. Src Source
  45. Tex Texture (function names only)
  46. Abbreviations specifically not allowed
  47. --------------------------------------
  48. Bgn Begin
  49. C Color
  50. Pnt Point
  51. Cpack Color Pack
  52. N Normal
  53. Poly Polygon Poly means multiple
  54. T Texture Coordinate
  55. Tri Triangle
  56. V Vertex
  57. Compound words
  58. --------------
  59. Antialias
  60. Bitmap
  61. Cutoff
  62. Doublebuffer
  63. Feedback
  64. Framebuffer
  65. Modelview
  66. Noop
  67. Notequal
  68. Subpixel
  69. Viewport
  70. Writemask
  71. Name rules (for all names)
  72. --------------------------
  73. Always use the specified abbreviations. Never abbreviate terms
  74. that are already in the OpenGL API and are not abbreviated. If you
  75. add terms to your extensions, abbreviate consistently, maintaining
  76. a local versions of extensions to the list of abbreviations.
  77. Use Depth, never Z.
  78. Procedure name rules
  79. --------------------
  80. Limit procedure names to 2 words, 3 for procedures that return state.
  81. (This is really a recommendation, not a rule.)
  82. Never use set, as in SetFeedbackBuffer.
  83. Begin each word with a capital letter, except the second word of
  84. compound words.
  85. Use Verb-noun (DeleteList) and adjective-noun (EdgeFlag) formats.
  86. Append a corporate-specific suffix to all procedures. For example:
  87. glNewCommandSGI. All upper case is preferred for this suffix, but
  88. is not required. The suffix is always last, following OpenGL type
  89. and count suffixes. (e.g. glNewVertex3iSGI, not glNewVertexSGI3i.)
  90. Definition name rules
  91. ---------------------
  92. Use all capital letters.
  93. Separate words with underbars, except words within compound words.
  94. Append simple numeric suffixes directly to the end of definition
  95. tokens (LIGHT0). Begin these sequences with 0.
  96. Use an underbar to separate complex suffixes from the token body
  97. (MAP_3V).
  98. Append a corporate-specific suffix to the token, after any other
  99. suffixes. For example: GL_NEW_TOKEN0_SGI. All upper case is
  100. required.
  101. Parameter name rules
  102. --------------------
  103. <target> is reserved for the notion of "which is affected", and for
  104. the corresponding "which is returned" get commands.
  105. <params> is reserved for an array of parameters whose contents are
  106. defined by a second enumerated argument, called <pname>.
  107. Begin number sequences with 1, not 0. (e.g. u1,u2, not u0,u1)
  108. Parameter order
  109. ---------------
  110. <X> precedes <Y> precedes <Z> precedes <W>.
  111. <R> precedes <G> precedes <B> precedes <A>.
  112. The array being passed is always the last argument.
  113. If a passed array has a type, the type specification argument immediately
  114. precedes the array.
  115. <pname> always precedes <params>.
  116. <x> and <y> precede <width> and <height>
  117. <format> precedes <type>
  118. <target> is first
  119. <face> is first
  120. Parameter types
  121. ---------------
  122. All integer quantity parameters (widths, heights, array lengths, etc.)
  123. should be typed GLsizei, not GLint or GLuint. Note that GLsizei
  124. generates an error only for negative values, so all integer quantity
  125. parameters should accept the value zero.
  126. Names (of display lists, textures, etc.) should be typed GLuint.
  127. Generic masks that do not have explicitly defined bit values (e.g.
  128. color index write masks and stencil write masks) should be typed
  129. GLuint. GLuint is also used for unsigned integer components, such as
  130. color components and depth components.
  131. Masks that do have explicitly defined bit values (e.g. attribute mask,
  132. clear mask) should be typed GLbitfield, not GLuint.
  133. All floating point parameters that are clamped to the range [0,1] when
  134. received should be typed GLclampf or GLclampd, not GLfloat or GLdouble.
  135. Extension name rules
  136. --------------------
  137. An extension name is prefixed with the same string that suffixes its
  138. procedures and definitions. The prefix and the individual words are
  139. separated with underbars, the prefix is all upper case, and the other
  140. text is all lower case. For example, extension SGI_cool_feature, which
  141. specifies glCoolProcedureSGI() and defines GL_COOL_DEFINITION_SGI.
  142. Suffix codes
  143. ------------
  144. i signed 32-bit integer
  145. ui unsigned 32-bit integer
  146. s signed 16-bit integer
  147. us unsigned 16-bit integer
  148. b signed 8-bit integer
  149. ub unsigned 8-bit integer
  150. l signed 64-bit integer
  151. ul unsigned 64-bit integer
  152. f 32-bit float
  153. d 64-bit float
  154. v vector format
  155. Shared extensions
  156. -----------------
  157. An OpenGL extension may be deemed a shared extension if either:
  158. 1. Two or more OpenGL licensees agree in good faith to implement
  159. and ship the extension, or
  160. 2. The OpenGL ARB determines that it is in the best interest of
  161. the licensees that the extension be shared.
  162. The procedures and definitions that are defined by a shared extension
  163. are suffixed with EXT, rather than by a company-specific suffix.
  164. Likewise, the extension name is prefixed by EXT. To avoid name
  165. conflicts Silicon Graphics will maintain a registry of EXT extensions,
  166. including all their procedures and definitions, in a location that is
  167. accessible to all licensees.