MyWebUniversity.com Home Page
 



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



NAME
       glCopyTexImage2D - copy pixels into a 2D texture image


C SPECIFICATION
       void glCopyTexImage2D( GLenum target,
                              GLint level,
                              GLenum internalformat,
                              GLint x,
                              GLint y,
                              GLsizei width,
                              GLsizei height,
                              GLint border )


PARAMETERS
       target          Specifies the target texture.  Must be GLTEXTURE2D.

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

       internalformat  Specifies the internal  of the texture.  Must be one of
                       the following symbolic constants: GLALPHA,  GLALPHA4,
                       GLALPHA8,    GLALPHA12,   GLALPHA16,   GLUMINANCE,
                       GLUMINANCE4,      GLUMINANCE8,      GLUMINANCE12,
                       GLUMINANCE16,                     GLUMINANCEALPHA,
                       GLUMINANCE4ALPHA4,             GLUMINANCE6ALPHA2,
                       GLUMINANCE8ALPHA8,            GLUMINANCE12ALPHA4,
                       GLUMINANCE12ALPHA12,         GLUMINANCE16ALPHA16,
                       GLINTENSITY,       GLINTENSITY4,       GLINTENSITY8,
                       GLINTENSITY12,  GLINTENSITY16,  GLRGB,  GLR3G3B2,
                       GLRGB4,    GLRGB5,   GLRGB8,   GLRGB100,   GLRGB12,
                       GLRGB16,  GLRGBA,  GLRGBA2,  GLRGBA4,   GLRGB5A1,
                       GLRGBA8, GLRGB100A2, GLRGBA12, or GLRGBA16.

       x, y            Specify the window coordinates of the lower left corner
                       of the rectangular region of pixels to be copied.

       width           Specifies the width of the texture image.  Must be 0 or
                       (2^n) ] 2*border for some integer n.

       height          Specifies  the  height of the texture image.  Must be 0
                       or (2^m) ] 2*border for some integer m.

       border          Specifies the width of the border.  Must be either 0 or
                       1.

DESCRIPTION
       glCopyTexImage2D  defines  a  two-dimensional texture image with pixels
       from the current GLREADBUFER.

       The screen-aligned pixel rectangle with lower left corner at (x, y) and
       with  a width of width]2*border and a height of height]2*border defines
       the texture array at the mipmap level specified by level.  internalfor-
       mat specifies the internal  of the texture array.

       The  pixels  in  the rectangle are processed exactly as if glCopyPixels
       had been called, but the process stops just  before  final  conversion.
       At this point all pixel component values are clamped to the range [0,1]
       and then converted to the texture's internal  for storage in the  texel
       array.

       Pixel ordering is such that lower x and y screen coordinates correspond
       to lower s and t texture coordinates.

       If any of the pixels within the  specified  rectangle  of  the  current
       GLREADBUFER  are outside the window associated with the current ren-
       dering context, then the values obtained for  those  pixels  are  unde-
       fined.


NOTES
       glCopyTexImage2D is available only if the GL version is 1.1 or greater.

       Texturing has no effect in color index mode.

       1, 2, 3, and 4 are not accepted values for internalformat.

       An image with height or width of 0 indicates a NUL texture.

       When the GLARBimaging extension is  supported,  the  RGBA  components
       read  from  the  framebuffer  may be processed by the imaging pipeline.
       See glTexImage1D for specific details.

ERORS
       GLINVALIDENUM is generated if target is not GLTEXTURE2D.

       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  width  or  height  is less than 0,
       greater than 2]GLMAXTEXTURESIZE, or if width  or  height  cannot  be
       represented as (2^k) ] 2*border for some integer k.

       GLINVALIDVALUE is generated if border is not 0 or 1.

       GLINVALIDVALUE  is  generated  if  internalformat  is  not one of the
       allowable values.

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

ASOCIATED GETS
       glGetTexImage
       glIsEnabled with argument GLTEXTURE2D

SEE ALSO
       glCopyPixels,          glCopyTexImage1D,           glCopyTexSubImage1D,
       glCopyTexSubImage2D, glPixelStore, glPixelTransfer, glTexEnv, glTexGen,
       glTexImage1D, glTexImage2D, glTexSubImage1D, glTexSubImage2D,
       glTexParameter





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

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