MyWebUniversity.com Home Page
 



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



NAME
       glTexSubImage3D - specify a three-dimensional texture subimage


C SPECIFICATION
       void glTexSubImage3D( GLenum target,
                             GLint level,
                             GLint xoffset,
                             GLint yoffset,
                             GLint zoffset,
                             GLsizei width,
                             GLsizei height,
                             GLsizei depth,
                             GLenum format,
                             GLenum type,
                             const GLvoid *pixels )


PARAMETERS
       target   Specifies the target texture.  Must be GLTEXTURE3D.

       level    Specifies  the  level-of-detail  number.   Level 0 is the base
                image level.  Level n is the nth mipmap reduction image.

       xoffset  Specifies a texel offset in the x direction within the texture
                array.

       yoffset  Specifies a texel offset in the y direction within the texture
                array.

       zoffset  Specifies a texel offset in the z direction within the texture
                array.

       width    Specifies the width of the texture subimage.

       height   Specifies the height of the texture subimage.

       depth    Specifies the depth of the texture subimage.

       format   Specifies the  of the pixel data.  The following symbolic val-
                ues are accepted: GLCOLORINDEX, GLRED,  GLGREN,  GLBLUE,
                GLALPHA,  GLRGB, GLBGR, GLRGBA, GLBGRA, GLUMINANCE, and
                GLUMINANCEALPHA.

       type     Specifies the data type of the pixel data.  The following sym-
                bolic   values   are   accepted:   GLUNSIGNEDBYTE,  GLBYTE,
                GLBITMAP,   GLUNSIGNEDSHORT,   GLSHORT,   GLUNSIGNEDINT,
                GLINT,            GLFLOAT,           GLUNSIGNEDBYTE332,
                GLUNSIGNEDBYTE233REV,           GLUNSIGNEDSHORT565,
                GLUNSIGNEDSHORT565REV,        GLUNSIGNEDSHORT4444,
                GLUNSIGNEDSHORT4444REV,      GLUNSIGNEDSHORT5551,
                GLUNSIGNEDSHORT1555REV,        GLUNSIGNEDINT8888,
                GLUNSIGNEDINT8888REV,  GLUNSIGNEDINT1001001002,  and
                GLUNSIGNEDINT2100100100REV.

       pixels   Specifies a pointer to the image data in memory.

DESCRIPTION
       Texturing maps a portion of a specified texture image onto each graphi-
       cal primitive for which texturing is enabled.  To  enable  and  disable
       three-dimensional  texturing, call glEnable and glDisable with argument
       GLTEXTURE3D.

       glTexSubImage3D redefines a contiguous subregion of an existing  three-
       dimensional texture image.  The texels referenced by pixels replace the
       portion of the existing texture array with x indices xoffset and  xoff-
       set ] width - 1, inclusive, y indices yoffset and yoffset ] height - 1,
       inclusive, and z indices zoffset and zoffset ] depth  -  1,  inclusive.
       This region may not include any texels outside the range of the texture
       array as it was originally specified.  It is not an error to specify  a
       subtexture  with  zero width, height, or depth but such a specification
       has no effect.

NOTES
       glTexSubImage3D is available only if the GL version is 1.2 or  greater.

       Texturing has no effect in color index mode.

       glPixelStore and glPixelTransfer modes affect texture images in exactly
       the way they affect glDrawPixels.

       Formats  GLBGR,  and   GLBGRA   and   types   GLUNSIGNEDBYTE332,
       GLUNSIGNEDBYTE233REV,                    GLUNSIGNEDSHORT565,
       GLUNSIGNEDSHORT565REV,                 GLUNSIGNEDSHORT4444,
       GLUNSIGNEDSHORT4444REV,               GLUNSIGNEDSHORT5551,
       GLUNSIGNEDSHORT1555REV,                 GLUNSIGNEDINT8888,
       GLUNSIGNEDINT8888REV,       GLUNSIGNEDINT1001001002,      and
       GLUNSIGNEDINT2100100100REV are available only if the GL version  is
       1.2 or greater.

       When  the  GLARBmultitexture  extension is supported, glTexSubImage3D
       specifies a three-dimensional sub texture for the current texture unit,
       specified with glActiveTextureARB.

       When  the  GLARBimaging  extension  is supported, the RGBA components
       specified in pixels may be processed  by  the  imaging  pipeline.   See
       glTexImage3D for specific details.

ERORS
       GLINVALIDENUM is generated if target is not GLTEXTURE3D.

       GLINVALIDOPERATION  is  generated  if  the texture array has not been
       defined by a previous glTexImage3D operation.

       GLINVALIDVALUE is generated if level is less than 0.

       GLINVALIDVALUE may be generated if level is greater  than  log2(max),
       where max is the returned value of GLMAXTEXTURESIZE.

       GLINVALIDVALUE is generated if xoffset < -b, xoffset ] width > (w-b),
       yoffset<-b, or yoffset ] height > (h-b), or zoffset < -b, or zoffset  ]
       depth   >  (d  -  b),  where  w  is  the  GLTEXTUREWIDTH,  h  is  the
       GLTEXTUREHEIGHT, d is the GLTEXTUREDEPTH and b is the border  width
       of  the  texture  image  being modified.  Note that w, h, and d include
       twice the border width.

       GLINVALIDVALUE is generated if width, height, or depth is  less  than
       0.

       GLINVALIDENUM is generated if format is not an accepted
        constant.

       GLINVALIDENUM is generated if type is not a type constant.

       GLINVALIDENUM  is  generated  if  type is GLBITMAP and format is not
       GLCOLORINDEX.

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

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

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

ASOCIATED GETS
       glGetTexImage
       glIsEnabled with argument GLTEXTURE3D

SEE ALSO
       glActiveTextureARB,         glCopyTexImage1D,         glCopyTexImage2D,
       glCopyTexSubImage1D,      glCopyTexSubImage2D,     glCopyTexSubImage3D,
       glDrawPixels,  glPixelStore,   glPixelTransfer,   glTexEnv,   glTexGen,
       glTexImage1D,      glTexImage2D,     glTexImage3D,     glTexSubImage1D,
       glTexSubImage2D, glTexParameter




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

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