pixelmap.3gl 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. '\" te
  2. '\"! tbl|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 pixelmap.
  9. .ds Xs 20188 9 pixelmap.gl
  10. .TH GLPIXELMAP 3G
  11. .SH NAME
  12. .B "glPixelMapfv, glPixelMapuiv, glPixelMapusv
  13. \- set up pixel transfer maps
  14. .SH C SPECIFICATION
  15. void \f3glPixelMapfv\fP(
  16. GLenum \fImap\fP,
  17. .nf
  18. .ta \w'\f3void \fPglPixelMapfv( 'u
  19. GLint \fImapsize\fP,
  20. const GLfloat \fI*values\fP )
  21. .fi
  22. void \f3glPixelMapuiv\fP(
  23. GLenum \fImap\fP,
  24. .nf
  25. .ta \w'\f3void \fPglPixelMapuiv( 'u
  26. GLint \fImapsize\fP,
  27. const GLuint \fI*values\fP )
  28. .fi
  29. void \f3glPixelMapusv\fP(
  30. GLenum \fImap\fP,
  31. .nf
  32. .ta \w'\f3void \fPglPixelMapusv( 'u
  33. GLint \fImapsize\fP,
  34. const GLushort \fI*values\fP )
  35. .fi
  36. .EQ
  37. delim $$
  38. .EN
  39. .SH PARAMETERS
  40. .TP \w'\fImapsize\fP\ \ 'u
  41. \f2map\fP
  42. .na
  43. Specifies a symbolic map name.
  44. Must be one of the following:
  45. \%\f3GL_PIXEL_MAP_I_TO_I\fP,
  46. \%\f3GL_PIXEL_MAP_S_TO_S\fP,
  47. \%\f3GL_PIXEL_MAP_I_TO_R\fP,
  48. \%\f3GL_PIXEL_MAP_I_TO_G\fP,
  49. \%\f3GL_PIXEL_MAP_I_TO_B\fP,
  50. \%\f3GL_PIXEL_MAP_I_TO_A\fP,
  51. \%\f3GL_PIXEL_MAP_R_TO_R\fP,
  52. \%\f3GL_PIXEL_MAP_G_TO_G\fP,
  53. \%\f3GL_PIXEL_MAP_B_TO_B\fP, or
  54. \%\f3GL_PIXEL_MAP_A_TO_A\fP.
  55. .TP
  56. \f2mapsize\fP
  57. Specifies the size of the map being defined.
  58. .TP
  59. \f2values\fP
  60. Specifies an array of \f2mapsize\fP values.
  61. .SH DESCRIPTION
  62. \%\f3glPixelMap\fP sets up translation tables,
  63. or \f2maps\fP,
  64. used by
  65. \%\f3glCopyPixels\fP,
  66. \%\f3glCopyTexImage1D\fP,
  67. \%\f3glCopyTexImage2D\fP,
  68. \%\f3glCopyTexSubImage1D\fP,
  69. \%\f3glCopyTexSubImage2D\fP,
  70. \%\f3glCopyTexSubImage3D\fP,
  71. \%\f3glDrawPixels\fP,
  72. \%\f3glReadPixels\fP,
  73. \%\f3glTexImage1D\fP,
  74. \%\f3glTexImage2D\fP,
  75. \%\f3glTexImage3D\fP,
  76. \%\f3glTexSubImage1D\fP,
  77. \%\f3glTexSubImage2D\fP, and
  78. \%\f3glTexSubImage3D\fP.
  79. Additionally, if the \%\f3GL_ARB_imaging\fP subset is supported, the
  80. routines
  81. \%\f3glColorTable\fP,
  82. \%\f3glColorSubTable\fP,
  83. \%\f3glConvolutionFilter1D\fP,
  84. \%\f3glConvolutionFilter2D\fP,
  85. \%\f3glHistogram\fP,
  86. \%\f3glMinmax\fP, and
  87. \%\f3glSeparableFilter2D\fP.
  88. Use of these maps is described completely in the
  89. \%\f3glPixelTransfer\fP reference page,
  90. and partly in the reference pages for the pixel and texture image commands.
  91. Only the specification of the maps is described in this reference page.
  92. .P
  93. \f2map\fP is a symbolic map name,
  94. indicating one of ten maps to set.
  95. \f2mapsize\fP specifies the number of entries in the map,
  96. and \f2values\fP is a pointer to an array of \f2mapsize\fP map values.
  97. .P
  98. The ten maps are as follows:
  99. .TP 30
  100. \%\f3GL_PIXEL_MAP_I_TO_I\fP
  101. Maps color indices to color indices.
  102. .TP
  103. \%\f3GL_PIXEL_MAP_S_TO_S\fP
  104. Maps stencil indices to stencil indices.
  105. .TP
  106. \%\f3GL_PIXEL_MAP_I_TO_R\fP
  107. Maps color indices to red components.
  108. .TP
  109. \%\f3GL_PIXEL_MAP_I_TO_G\fP
  110. Maps color indices to green components.
  111. .TP
  112. \%\f3GL_PIXEL_MAP_I_TO_B\fP
  113. Maps color indices to blue components.
  114. .TP
  115. \%\f3GL_PIXEL_MAP_I_TO_A\fP
  116. Maps color indices to alpha components.
  117. .TP
  118. \%\f3GL_PIXEL_MAP_R_TO_R\fP
  119. Maps red components to red components.
  120. .TP
  121. \%\f3GL_PIXEL_MAP_G_TO_G\fP
  122. Maps green components to green components.
  123. .TP
  124. \%\f3GL_PIXEL_MAP_B_TO_B\fP
  125. Maps blue components to blue components.
  126. .TP
  127. \%\f3GL_PIXEL_MAP_A_TO_A\fP
  128. Maps alpha components to alpha components.
  129. .P
  130. The entries in a map can be specified as single-precision
  131. floating-point numbers,
  132. unsigned short integers,
  133. or unsigned long integers.
  134. Maps that store color component values
  135. (all but \%\f3GL_PIXEL_MAP_I_TO_I\fP and \%\f3GL_PIXEL_MAP_S_TO_S\fP)
  136. retain their values in floating-point ,
  137. with unspecified mantissa and exponent sizes.
  138. Floating-point values specified by \%\f3glPixelMapfv\fP are converted directly
  139. to the internal floating-point of these maps,
  140. then clamped to the range [0,1].
  141. Unsigned integer values specified by \%\f3glPixelMapusv\fP and
  142. \%\f3glPixelMapuiv\fP are converted linearly such that
  143. the largest representable integer maps to 1.0,
  144. and 0 maps to 0.0.
  145. .P
  146. Maps that store indices,
  147. \%\f3GL_PIXEL_MAP_I_TO_I\fP and \%\f3GL_PIXEL_MAP_S_TO_S\fP,
  148. retain their values in fixed-point ,
  149. with an unspecified number of bits to the right of the binary point.
  150. Floating-point values specified by \%\f3glPixelMapfv\fP are converted directly
  151. to the internal fixed-point of these maps.
  152. Unsigned integer values specified by \%\f3glPixelMapusv\fP and
  153. \%\f3glPixelMapuiv\fP specify integer values,
  154. with all 0's to the right of the binary point.
  155. .P
  156. The following table shows the initial sizes and values for each of the maps.
  157. Maps that are indexed by either color or stencil indices must have
  158. \f2mapsize\fP = $2 sup n$ for some $n$ or the results are undefined.
  159. The maximum allowable size for each map depends on the implementation
  160. and can be determined by calling \%\f3glGet\fP with argument
  161. \%\f3GL_MAX_PIXEL_MAP_TABLE\fP.
  162. The single maximum applies to all maps; it is at
  163. least 32.
  164. .bp
  165. .TS
  166. center tab(:) delim($$) ;
  167. lb cb cb cb cb
  168. l c c c c.
  169. _
  170. \f2map\fP:Lookup Index:Lookup Value:Initial Size:Initial Value
  171. _
  172. \%\f3GL_PIXEL_MAP_I_TO_I\fP:color index:color index:1:0
  173. \%\f3GL_PIXEL_MAP_S_TO_S\fP:stencil index :stencil index :1:0
  174. \%\f3GL_PIXEL_MAP_I_TO_R\fP:color index :R:1:0
  175. \%\f3GL_PIXEL_MAP_I_TO_G\fP:color index :G:1:0
  176. \%\f3GL_PIXEL_MAP_I_TO_B\fP:color index:B:1:0
  177. \%\f3GL_PIXEL_MAP_I_TO_A\fP:color index:A:1:0
  178. \%\f3GL_PIXEL_MAP_R_TO_R\fP:R:R:1:0
  179. \%\f3GL_PIXEL_MAP_G_TO_G\fP:G:G:1:0
  180. \%\f3GL_PIXEL_MAP_B_TO_B\fP:B:B:1:0
  181. \%\f3GL_PIXEL_MAP_A_TO_A\fP:A:A:1:0
  182. _
  183. .TE
  184. .RE
  185. .SH ERRORS
  186. \%\f3GL_INVALID_ENUM\fP is generated if \f2map\fP is not an accepted value.
  187. .P
  188. \%\f3GL_INVALID_VALUE\fP is generated if \f2mapsize\fP is less than one
  189. or larger than \%\f3GL_MAX_PIXEL_MAP_TABLE\fP.
  190. .P
  191. \%\f3GL_INVALID_VALUE\fP is generated if \f2map\fP is
  192. \%\f3GL_PIXEL_MAP_I_TO_I\fP,
  193. \%\f3GL_PIXEL_MAP_S_TO_S\fP,
  194. \%\f3GL_PIXEL_MAP_I_TO_R\fP,
  195. \%\f3GL_PIXEL_MAP_I_TO_G\fP,
  196. \%\f3GL_PIXEL_MAP_I_TO_B\fP, or
  197. \%\f3GL_PIXEL_MAP_I_TO_A\fP,
  198. and \f2mapsize\fP is not a power of two.
  199. .P
  200. \%\f3GL_INVALID_OPERATION\fP is generated if \%\f3glPixelMap\fP
  201. is executed between the execution of \%\f3glBegin\fP
  202. and the corresponding execution of \%\f3glEnd\fP.
  203. .SH ASSOCIATED GETS
  204. \%\f3glGetPixelMap\fP
  205. .br
  206. \%\f3glGet\fP with argument \%\f3GL_PIXEL_MAP_I_TO_I_SIZE\fP
  207. .br
  208. \%\f3glGet\fP with argument \%\f3GL_PIXEL_MAP_S_TO_S_SIZE\fP
  209. .br
  210. \%\f3glGet\fP with argument \%\f3GL_PIXEL_MAP_I_TO_R_SIZE\fP
  211. .br
  212. \%\f3glGet\fP with argument \%\f3GL_PIXEL_MAP_I_TO_G_SIZE\fP
  213. .br
  214. \%\f3glGet\fP with argument \%\f3GL_PIXEL_MAP_I_TO_B_SIZE\fP
  215. .br
  216. \%\f3glGet\fP with argument \%\f3GL_PIXEL_MAP_I_TO_A_SIZE\fP
  217. .br
  218. \%\f3glGet\fP with argument \%\f3GL_PIXEL_MAP_R_TO_R_SIZE\fP
  219. .br
  220. \%\f3glGet\fP with argument \%\f3GL_PIXEL_MAP_G_TO_G_SIZE\fP
  221. .br
  222. \%\f3glGet\fP with argument \%\f3GL_PIXEL_MAP_B_TO_B_SIZE\fP
  223. .br
  224. \%\f3glGet\fP with argument \%\f3GL_PIXEL_MAP_A_TO_A_SIZE\fP
  225. .br
  226. \%\f3glGet\fP with argument \%\f3GL_MAX_PIXEL_MAP_TABLE\fP
  227. .SH SEE ALSO
  228. \%\f3glColorTable(3G)\fP,
  229. \%\f3glColorSubTable(3G)\fP,
  230. \%\f3glConvolutionFilter1D(3G)\fP,
  231. \%\f3glConvolutionFilter2D(3G)\fP,
  232. \%\f3glCopyPixels(3G)\fP,
  233. \%\f3glCopyTexImage1D(3G)\fP,
  234. \%\f3glCopyTexImage2D(3G)\fP,
  235. \%\f3glCopyTexSubImage1D(3G)\fP,
  236. \%\f3glCopyTexSubImage2D(3G)\fP,
  237. \%\f3glDrawPixels(3G)\fP,
  238. \%\f3glHistogram(3G)\fP,
  239. \%\f3glMinmax(3G)\fP,
  240. \%\f3glPixelStore(3G)\fP,
  241. \%\f3glPixelTransfer(3G)\fP,
  242. \%\f3glReadPixels(3G)\fP,
  243. \%\f3glSeparableFilter2D(3G)\fP,
  244. \%\f3glTexImage1D(3G)\fP,
  245. \%\f3glTexImage2D(3G)\fP,
  246. \%\f3glTexImage3D(3G)\fP,
  247. \%\f3glTexSubImage1D(3G)\fP,
  248. \%\f3glTexSubImage2D(3G)\fP,
  249. \%\f3glTexSubImage3D(3G)\fP