MyWebUniversity.com Home Page
 



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



NAME
       glSeparableFilter2D  -  define  a separable two-dimensional convolution
       filter


C SPECIFICATION
       void glSeparableFilter2D( GLenum target,
                                 GLenum internalformat,
                                 GLsizei width,
                                 GLsizei height,
                                 GLenum format,
                                 GLenum type,
                                 const GLvoid *row,
                                 const GLvoid *column )


PARAMETERS
       target          Must be GLSEPARABLE2D.

       internalformat  The internal  of the convolution  filter  kernel.   The
                       allowable  values  are  GLALPHA, GLALPHA4, GLALPHA8,
                       GLALPHA12,  GLALPHA16,  GLUMINANCE,  GLUMINANCE4,
                       GLUMINANCE8,      GLUMINANCE12,     GLUMINANCE16,
                       GLUMINANCEALPHA,               GLUMINANCE4ALPHA4,
                       GLUMINANCE6ALPHA2,             GLUMINANCE8ALPHA8,
                       GLUMINANCE12ALPHA4,          GLUMINANCE12ALPHA12,
                       GLUMINANCE16ALPHA16,   GLINTENSITY,  GLINTENSITY4,
                       GLINTENSITY8,     GLINTENSITY12,      GLINTENSITY16,
                       GLR3G3B2,   GLRGB,   GLRGB4,   GLRGB5,   GLRGB8,
                       GLRGB100,  GLRGB12,   GLRGB16,   GLRGBA,   GLRGBA2,
                       GLRGBA4, GLRGB5A1, GLRGBA8, GLRGB100A2, GLRGBA12,
                       or GLRGBA16.

       width           The number of elements in the pixel array referenced by
                       row.   (This  is the width of the separable filter ker-
                       nel.)

       height          The number of elements in the pixel array referenced by
                       column.   (This  is  the height of the separable filter
                       kernel.)

       format          The  of the pixel data in row and column.   The  allow-
                       able  values  are  GLRED, GLGREN, GLBLUE, GLALPHA,
                       GLRGB,   GLBGR,   GLRGBA,   GLBGRA,   GLINTENSITY,
                       GLUMINANCE, and GLUMINANCEALPHA.

       type            The type of the pixel data in row and column.  Symbolic
                       constants   GLUNSIGNEDBYTE,    GLBYTE,    GLBITMAP,
                       GLUNSIGNEDSHORT,  GLSHORT,  GLUNSIGNEDINT, GLINT,
                       GLFLOAT,                       GLUNSIGNEDBYTE332,
                       GLUNSIGNEDBYTE233REV,    GLUNSIGNEDSHORT565,
                       GLUNSIGNEDSHORT565REV, GLUNSIGNEDSHORT4444,
                       GLUNSIGNEDSHORT4444REV,
                       GLUNSIGNEDSHORT5551,
                       GLUNSIGNEDSHORT1555REV, GLUNSIGNEDINT8888,
                       GLUNSIGNEDINT8888REV,
                       GLUNSIGNEDINT1001001002,                         and
                       GLUNSIGNEDINT2100100100REV are accepted.

       row             Pointer to a one-dimensional array of pixel  data  that
                       is processed to build the row filter kernel.

       column          Pointer  to  a one-dimensional array of pixel data that
                       is processed to build the column filter kernel.

DESCRIPTION
       glSeparableFilter2D builds a two-dimensional separable convolution fil-
       ter kernel from two arrays of pixels.

       The  pixel  arrays specified by (width, format, type, row) and (height,
       format, type, column) are processed just as if they had been passed  to
       glDrawPixels, but processing stops after the final expansion to RGBA is
       completed.

       Next, the R, G, B, and A components of all pixels in  both  arrays  are
       scaled  by the four separable 2D GLCONVOLUTIONFILTERSCALE parameters
       and biased by the four separable 2D GLCONVOLUTIONFILTERBIAS  parame-
       ters.  (The scale and bias parameters are set by glConvolutionParameter
       using     the     GLSEPARABLE2D     target     and     the      names
       GLCONVOLUTIONFILTERSCALE and GLCONVOLUTIONFILTERBIAS.  The param-
       eters themselves are vectors of four values that are  applied  to  red,
       green,  blue, and alpha, in that order.)  The R, G, B, and A values are
       not clamped to [0,1] at any time during this process.

       Each pixel is then converted to the internal  specified by internalfor-
       mat.  This conversion simply maps the component values of the pixel (R,
       G, B, and A) to the values included in the internal  (red, green, blue,
       alpha, luminance, and intensity).  The mapping is as follows:

       ------------------------------------------------------------------------
       Internal Format      Red   Green   Blue   Alpha   Luminance   Intensity
       ------------------------------------------------------------------------
       GLUMINANCE                                          R
       GLUMINANCEALPHA                          A         R
       GLINTENSITY                                                      R
       GLRGB                R      G      B
       GLRGBA               R      G      B       A
       ------------------------------------------------------------------------


       The  red, green, blue, alpha, luminance, and/or intensity components of
       the resulting pixels are stored in floating-point rather  than  integer
       They  form  two one-dimensional filter kernel images.  The row image is
       indexed by coordinate i starting at zero and increasing  from  left  to
       right.   Each  location  in  the row image is derived from element i of
       row.  The column image is indexed by coordinate j starting at zero  and
       increasing  from  bottom  to top.  Each location in the column image is
       derived from element j of column.

       Note that after a convolution is performed, the resulting color  compo-
       nents      are      also      scaled     by     their     corresponding
       GLPOSTCONVOLUTIONcSCALE parameters and biased by their  correspond-
       ing  GLPOSTCONVOLUTIONcBIAS parameters (where c takes on the values
       RED,  GREN,  BLUE,  and  ALPHA).   These   parameters   are   set   by
       glPixelTransfer.

NOTES
       glSeparableFilter2D  is present only if GLARBimaging is returned when
       glGetString is called with an argument of GLEXTENSIONS.

ERORS
       GLINVALIDENUM is generated if target is not GLSEPARABLE2D.

       GLINVALIDENUM is generated if internalformat is not one of the allow-
       able values.

       GLINVALIDVALUE  is  generated  if  width is less than zero or greater
       than the maximum supported value.   This  value  may  be  queried  with
       glGetConvolutionParameter   using   target   GLSEPARABLE2D  and  name
       GLMAXCONVOLUTIONWIDTH.

       GLINVALIDVALUE is generated if height is less than  zero  or  greater
       than  the  maximum  supported  value.   This  value may be queried with
       glGetConvolutionParameter  using  target   GLSEPARABLE2D   and   name
       GLMAXCONVOLUTIONHEIGHT.

       GLINVALIDENUM is generated if format is not one of the allowable val-
       ues.

       GLINVALIDENUM is generated if type is not one of the  allowable  val-
       ues.

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

       GLINVALIDOPERATION    is    generated    if    height   is   one   of
       GLUNSIGNEDBYTE332,                     GLUNSIGNEDBYTE233REV,
       GLUNSIGNEDSHORT565,  or  GLUNSIGNEDSHORT565REV and format is
       not GLRGB.

       GLINVALIDOPERATION   is   generated   if    height    is    one    of
       GLUNSIGNEDSHORT4444,               GLUNSIGNEDSHORT4444REV,
       GLUNSIGNEDSHORT5551,               GLUNSIGNEDSHORT1555REV,
       GLUNSIGNEDINT8888,                   GLUNSIGNEDINT8888REV,
       GLUNSIGNEDINT1001001002, or GLUNSIGNEDINT2100100100REV and  for-
       mat is neither GLRGBA nor GLBGRA.

ASOCIATED GETS
       glGetConvolutionParameter, glGetSeparableFilter

SEE ALSO
       glConvolutionFilter1D,  glConvolutionFilter2D,  glConvolutionParameter,
       glPixelTransfer



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

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