123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253 |
- '\" te
- '\"! tbl|eqn | mmdoc
- '\"macro stdmacro
- .ds Vn Version 1.2
- .ds Dt 24 September 1999
- .ds Re Release 1.2.1
- .ds Dp Jan 14 18:30
- .ds Dm 01 pixelmap.
- .ds Xs 20188 9 pixelmap.gl
- .TH GLPIXELMAP 3G
- .SH NAME
- .B "glPixelMapfv, glPixelMapuiv, glPixelMapusv
- \- set up pixel transfer maps
- .SH C SPECIFICATION
- void \f3glPixelMapfv\fP(
- GLenum \fImap\fP,
- .nf
- .ta \w'\f3void \fPglPixelMapfv( 'u
- GLint \fImapsize\fP,
- const GLfloat \fI*values\fP )
- .fi
- void \f3glPixelMapuiv\fP(
- GLenum \fImap\fP,
- .nf
- .ta \w'\f3void \fPglPixelMapuiv( 'u
- GLint \fImapsize\fP,
- const GLuint \fI*values\fP )
- .fi
- void \f3glPixelMapusv\fP(
- GLenum \fImap\fP,
- .nf
- .ta \w'\f3void \fPglPixelMapusv( 'u
- GLint \fImapsize\fP,
- const GLushort \fI*values\fP )
- .fi
- .EQ
- delim $$
- .EN
- .SH PARAMETERS
- .TP \w'\fImapsize\fP\ \ 'u
- \f2map\fP
- .na
- Specifies a symbolic map name.
- Must be one of the following:
- \%\f3GL_PIXEL_MAP_I_TO_I\fP,
- \%\f3GL_PIXEL_MAP_S_TO_S\fP,
- \%\f3GL_PIXEL_MAP_I_TO_R\fP,
- \%\f3GL_PIXEL_MAP_I_TO_G\fP,
- \%\f3GL_PIXEL_MAP_I_TO_B\fP,
- \%\f3GL_PIXEL_MAP_I_TO_A\fP,
- \%\f3GL_PIXEL_MAP_R_TO_R\fP,
- \%\f3GL_PIXEL_MAP_G_TO_G\fP,
- \%\f3GL_PIXEL_MAP_B_TO_B\fP, or
- \%\f3GL_PIXEL_MAP_A_TO_A\fP.
- .TP
- \f2mapsize\fP
- Specifies the size of the map being defined.
- .TP
- \f2values\fP
- Specifies an array of \f2mapsize\fP values.
- .SH DESCRIPTION
- \%\f3glPixelMap\fP sets up translation tables,
- or \f2maps\fP,
- used by
- \%\f3glCopyPixels\fP,
- \%\f3glCopyTexImage1D\fP,
- \%\f3glCopyTexImage2D\fP,
- \%\f3glCopyTexSubImage1D\fP,
- \%\f3glCopyTexSubImage2D\fP,
- \%\f3glCopyTexSubImage3D\fP,
- \%\f3glDrawPixels\fP,
- \%\f3glReadPixels\fP,
- \%\f3glTexImage1D\fP,
- \%\f3glTexImage2D\fP,
- \%\f3glTexImage3D\fP,
- \%\f3glTexSubImage1D\fP,
- \%\f3glTexSubImage2D\fP, and
- \%\f3glTexSubImage3D\fP.
- Additionally, if the \%\f3GL_ARB_imaging\fP subset is supported, the
- routines
- \%\f3glColorTable\fP,
- \%\f3glColorSubTable\fP,
- \%\f3glConvolutionFilter1D\fP,
- \%\f3glConvolutionFilter2D\fP,
- \%\f3glHistogram\fP,
- \%\f3glMinmax\fP, and
- \%\f3glSeparableFilter2D\fP.
- Use of these maps is described completely in the
- \%\f3glPixelTransfer\fP reference page,
- and partly in the reference pages for the pixel and texture image commands.
- Only the specification of the maps is described in this reference page.
- .P
- \f2map\fP is a symbolic map name,
- indicating one of ten maps to set.
- \f2mapsize\fP specifies the number of entries in the map,
- and \f2values\fP is a pointer to an array of \f2mapsize\fP map values.
- .P
- The ten maps are as follows:
- .TP 30
- \%\f3GL_PIXEL_MAP_I_TO_I\fP
- Maps color indices to color indices.
- .TP
- \%\f3GL_PIXEL_MAP_S_TO_S\fP
- Maps stencil indices to stencil indices.
- .TP
- \%\f3GL_PIXEL_MAP_I_TO_R\fP
- Maps color indices to red components.
- .TP
- \%\f3GL_PIXEL_MAP_I_TO_G\fP
- Maps color indices to green components.
- .TP
- \%\f3GL_PIXEL_MAP_I_TO_B\fP
- Maps color indices to blue components.
- .TP
- \%\f3GL_PIXEL_MAP_I_TO_A\fP
- Maps color indices to alpha components.
- .TP
- \%\f3GL_PIXEL_MAP_R_TO_R\fP
- Maps red components to red components.
- .TP
- \%\f3GL_PIXEL_MAP_G_TO_G\fP
- Maps green components to green components.
- .TP
- \%\f3GL_PIXEL_MAP_B_TO_B\fP
- Maps blue components to blue components.
- .TP
- \%\f3GL_PIXEL_MAP_A_TO_A\fP
- Maps alpha components to alpha components.
- .P
- The entries in a map can be specified as single-precision
- floating-point numbers,
- unsigned short integers,
- or unsigned long integers.
- Maps that store color component values
- (all but \%\f3GL_PIXEL_MAP_I_TO_I\fP and \%\f3GL_PIXEL_MAP_S_TO_S\fP)
- retain their values in floating-point ,
- with unspecified mantissa and exponent sizes.
- Floating-point values specified by \%\f3glPixelMapfv\fP are converted directly
- to the internal floating-point of these maps,
- then clamped to the range [0,1].
- Unsigned integer values specified by \%\f3glPixelMapusv\fP and
- \%\f3glPixelMapuiv\fP are converted linearly such that
- the largest representable integer maps to 1.0,
- and 0 maps to 0.0.
- .P
- Maps that store indices,
- \%\f3GL_PIXEL_MAP_I_TO_I\fP and \%\f3GL_PIXEL_MAP_S_TO_S\fP,
- retain their values in fixed-point ,
- with an unspecified number of bits to the right of the binary point.
- Floating-point values specified by \%\f3glPixelMapfv\fP are converted directly
- to the internal fixed-point of these maps.
- Unsigned integer values specified by \%\f3glPixelMapusv\fP and
- \%\f3glPixelMapuiv\fP specify integer values,
- with all 0's to the right of the binary point.
- .P
- The following table shows the initial sizes and values for each of the maps.
- Maps that are indexed by either color or stencil indices must have
- \f2mapsize\fP = $2 sup n$ for some $n$ or the results are undefined.
- The maximum allowable size for each map depends on the implementation
- and can be determined by calling \%\f3glGet\fP with argument
- \%\f3GL_MAX_PIXEL_MAP_TABLE\fP.
- The single maximum applies to all maps; it is at
- least 32.
- .bp
- .TS
- center tab(:) delim($$) ;
- lb cb cb cb cb
- l c c c c.
- _
- \f2map\fP:Lookup Index:Lookup Value:Initial Size:Initial Value
- _
- \%\f3GL_PIXEL_MAP_I_TO_I\fP:color index:color index:1:0
- \%\f3GL_PIXEL_MAP_S_TO_S\fP:stencil index :stencil index :1:0
- \%\f3GL_PIXEL_MAP_I_TO_R\fP:color index :R:1:0
- \%\f3GL_PIXEL_MAP_I_TO_G\fP:color index :G:1:0
- \%\f3GL_PIXEL_MAP_I_TO_B\fP:color index:B:1:0
- \%\f3GL_PIXEL_MAP_I_TO_A\fP:color index:A:1:0
- \%\f3GL_PIXEL_MAP_R_TO_R\fP:R:R:1:0
- \%\f3GL_PIXEL_MAP_G_TO_G\fP:G:G:1:0
- \%\f3GL_PIXEL_MAP_B_TO_B\fP:B:B:1:0
- \%\f3GL_PIXEL_MAP_A_TO_A\fP:A:A:1:0
- _
- .TE
- .RE
- .SH ERRORS
- \%\f3GL_INVALID_ENUM\fP is generated if \f2map\fP is not an accepted value.
- .P
- \%\f3GL_INVALID_VALUE\fP is generated if \f2mapsize\fP is less than one
- or larger than \%\f3GL_MAX_PIXEL_MAP_TABLE\fP.
- .P
- \%\f3GL_INVALID_VALUE\fP is generated if \f2map\fP is
- \%\f3GL_PIXEL_MAP_I_TO_I\fP,
- \%\f3GL_PIXEL_MAP_S_TO_S\fP,
- \%\f3GL_PIXEL_MAP_I_TO_R\fP,
- \%\f3GL_PIXEL_MAP_I_TO_G\fP,
- \%\f3GL_PIXEL_MAP_I_TO_B\fP, or
- \%\f3GL_PIXEL_MAP_I_TO_A\fP,
- and \f2mapsize\fP is not a power of two.
- .P
- \%\f3GL_INVALID_OPERATION\fP is generated if \%\f3glPixelMap\fP
- is executed between the execution of \%\f3glBegin\fP
- and the corresponding execution of \%\f3glEnd\fP.
- .SH ASSOCIATED GETS
- \%\f3glGetPixelMap\fP
- .br
- \%\f3glGet\fP with argument \%\f3GL_PIXEL_MAP_I_TO_I_SIZE\fP
- .br
- \%\f3glGet\fP with argument \%\f3GL_PIXEL_MAP_S_TO_S_SIZE\fP
- .br
- \%\f3glGet\fP with argument \%\f3GL_PIXEL_MAP_I_TO_R_SIZE\fP
- .br
- \%\f3glGet\fP with argument \%\f3GL_PIXEL_MAP_I_TO_G_SIZE\fP
- .br
- \%\f3glGet\fP with argument \%\f3GL_PIXEL_MAP_I_TO_B_SIZE\fP
- .br
- \%\f3glGet\fP with argument \%\f3GL_PIXEL_MAP_I_TO_A_SIZE\fP
- .br
- \%\f3glGet\fP with argument \%\f3GL_PIXEL_MAP_R_TO_R_SIZE\fP
- .br
- \%\f3glGet\fP with argument \%\f3GL_PIXEL_MAP_G_TO_G_SIZE\fP
- .br
- \%\f3glGet\fP with argument \%\f3GL_PIXEL_MAP_B_TO_B_SIZE\fP
- .br
- \%\f3glGet\fP with argument \%\f3GL_PIXEL_MAP_A_TO_A_SIZE\fP
- .br
- \%\f3glGet\fP with argument \%\f3GL_MAX_PIXEL_MAP_TABLE\fP
- .SH SEE ALSO
- \%\f3glColorTable(3G)\fP,
- \%\f3glColorSubTable(3G)\fP,
- \%\f3glConvolutionFilter1D(3G)\fP,
- \%\f3glConvolutionFilter2D(3G)\fP,
- \%\f3glCopyPixels(3G)\fP,
- \%\f3glCopyTexImage1D(3G)\fP,
- \%\f3glCopyTexImage2D(3G)\fP,
- \%\f3glCopyTexSubImage1D(3G)\fP,
- \%\f3glCopyTexSubImage2D(3G)\fP,
- \%\f3glDrawPixels(3G)\fP,
- \%\f3glHistogram(3G)\fP,
- \%\f3glMinmax(3G)\fP,
- \%\f3glPixelStore(3G)\fP,
- \%\f3glPixelTransfer(3G)\fP,
- \%\f3glReadPixels(3G)\fP,
- \%\f3glSeparableFilter2D(3G)\fP,
- \%\f3glTexImage1D(3G)\fP,
- \%\f3glTexImage2D(3G)\fP,
- \%\f3glTexImage3D(3G)\fP,
- \%\f3glTexSubImage1D(3G)\fP,
- \%\f3glTexSubImage2D(3G)\fP,
- \%\f3glTexSubImage3D(3G)\fP
|