MyWebUniversity.com Home Page
 



Darwin Mac OS X man pages main menu
GLPIXELMAP(3G)                                                  GLPIXELMAP(3G)



NAME
       glPixelapfv,, glPixelapuiv,, glPixelapusv - set up pixel transfer maps


C SPECIFICATION
       void glPixelapfv( GLenum map,
                          GLint mapsize,
                          const GLfloat *values )
       void glPixelapuiv( GLenum map,
                           GLint mapsize,
                           const GLuint *values )
       void glPixelapusv( GLenum map,
                           GLint mapsize,
                           const GLushort *values )


PARAMETERS
       map      Specifies a symbolic map name.  Must be one of the following:
                GLPIXELMAPITOI, GLPIXELMAPSTOS, GLPIXELMAPITOR,
                GLPIXELMAPITOG, GLPIXELMAPITOB, GLPIXELMAPITOA,
                GLPIXELMAPRTOR, GLPIXELMAPGTOG, GLPIXELMAPBTOB,
                or GLPIXELMAPATOA.

       mapsize  Specifies the size of the map being defined.

       values   Specifies an array of mapsize values.

DESCRIPTION
       glPixelap sets up translation tables, or maps, used by glCopyPixels,
       glCopyTexImage1D, glCopyTexImage2D, glCopyTexSubImage1D,
       glCopyTexSubImage2D, glCopyTexSubImage3D, glDrawPixels, glReadPixels,
       glTexImage1D, glTexImage2D, glTexImage3D, glTexSubImage1D,
       glTexSubImage2D, and glTexSubImage3D.  Additionally, if the
       GLARBimaging subset is supported, the routines glColorTable,
       glColorSubTable, glConvolutionFilter1D, glConvolutionFilter2D,
       glHistogram, glinmax, and glSeparableFilter2D.  Use of these maps is
       described completely in the glPixelTransfer 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.

       map is a symbolic map name, indicating one of ten maps to set.  mapsize
       specifies the number of entries in the map, and values is a pointer to
       an array of mapsize map values.

       The ten maps are as follows:

       GLPIXELMAPITOI           Maps color indices to color indices.

       GLPIXELMAPSTOS           Maps stencil indices to stencil indices.

       GLPIXELMAPITOR           Maps color indices to red components.

       GLPIXELMAPITOG           Maps color indices to green components.

       GLPIXELMAPITOB           Maps color indices to blue components.

       GLPIXELMAPITOA           Maps color indices to alpha components.

       GLPIXELMAPRTOR           Maps red components to red components.

       GLPIXELMAPGTOG           Maps green components to green compo-
                                     nents.

       GLPIXELMAPBTOB           Maps blue components to blue components.

       GLPIXELMAPATOA           Maps alpha components to alpha compo-
                                     nents.

       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 GLPIXELMAPITOI and
       GLPIXELMAPSTOS) retain their values in floating-point , with
       unspecified mantissa and exponent sizes.  Floating-point values speci-
       fied by glPixelapfv are converted directly to the internal floating-
       point  of these maps, then clamped to the range [0,1].  Unsigned inte-
       ger values specified by glPixelapusv and glPixelapuiv are converted
       linearly such that the largest representable integer maps to 1.0, and 0
       maps to 0.0.

       Maps that store indices, GLPIXELMAPITOI and GLPIXELMAPSTOS,
       retain their values in fixed-point , with an unspecified number of bits
       to the right of the binary point.  Floating-point values specified by
       glPixelapfv are converted directly to the internal fixed-point  of
       these maps.  Unsigned integer values specified by glPixelapusv and
       glPixelapuiv specify integer values, with all 0's to the right of the
       binary point.

       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 mapsize = 2^n for some n or the results are undefined.  The maxi-
       mum allowable size for each map depends on the implementation and can
       be determined by calling glGet with argument GLMAXPIXELMAPTABLE.
       The single maximum applies to all maps; it is at least 32.

        map               Lookup Lookup Initial Initial
                                 Index  Value  Size    Value

        GLPIXELMAPITOI      color  color    1       0
                                 index  index
        GLPIXELMAPSTOS     stencil stencil  1       0
                                 index   index
        GLPIXELMAPITOR      color    R      1       0
                                 index
        GLPIXELMAPITOG      color    G      1       0
                                 index
        GLPIXELMAPITOB      color    B      1       0
                                 index
        GLPIXELMAPITOA      color    A      1       0
                                 index
        GLPIXELMAPRTOR        R      R      1       0
        GLPIXELMAPGTOG        G      G      1       0
        GLPIXELMAPBTOB        B      B      1       0
        GLPIXELMAPATOA        A      A      1       0


ERORS
       GLINVALIDENUM is generated if map is not an accepted value.

       GLINVALIDVALUE is generated if mapsize is less than one or larger
       than GLMAXPIXELMAPTABLE.

       GLINVALIDVALUE is generated if map is GLPIXELMAPITOI,
       GLPIXELMAPSTOS, GLPIXELMAPITOR, GLPIXELMAPITOG,
       GLPIXELMAPITOB, or GLPIXELMAPITOA, and mapsize is not a power
       of two.

       GLINVALIDOPERATION is generated if glPixelap is executed between the
       execution of glBegin and the corresponding execution of glEnd.

ASOCIATED GETS
       glGetPixelap
       glGet with argument GLPIXELMAPITOISIZE
       glGet with argument GLPIXELMAPSTOSIZE
       glGet with argument GLPIXELMAPITORSIZE
       glGet with argument GLPIXELMAPITOGSIZE
       glGet with argument GLPIXELMAPITOBSIZE
       glGet with argument GLPIXELMAPITOASIZE
       glGet with argument GLPIXELMAPRTORSIZE
       glGet with argument GLPIXELMAPGTOGSIZE
       glGet with argument GLPIXELMAPBTOBSIZE
       glGet with argument GLPIXELMAPATOASIZE
       glGet with argument GLMAXPIXELMAPTABLE

SEE ALSO
       glColorTable, glColorSubTable, glConvolutionFilter1D,
       glConvolutionFilter2D, glCopyPixels, glCopyTexImage1D,
       glCopyTexImage2D, glCopyTexSubImage1D, glCopyTexSubImage2D,
       glDrawPixels, glHistogram, glinmax, glPixelStore, glPixelTransfer,
       glReadPixels, glSeparableFilter2D, glTexImage1D, glTexImage2D,
       glTexImage3D, glTexSubImage1D, glTexSubImage2D, glTexSubImage3D



                                                                GLPIXELMAP(3G)
Darwin Mac OS X man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™