GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


Manpage of GLCOPYTEXSUBIMAGE2D

GLCOPYTEXSUBIMAGE2D

Index
 

NAME

glCopyTexSubImage2D - copy a two-dimensional texture subimage

 

C SPECIFICATION

void f3glCopyTexSubImage2DfP( GLenum fItargetfP,
f2targetfP
Specifies the target texture.
Must be %f3GL_TEXTURE_2DfP.
f2levelfP
Specifies the level-of-detail number. Level 0 is the base image level. Level f2nfP is the f2nfPth mipmap reduction image.
f2xoffsetfP
Specifies a texel offset in the x direction within the texture array.
f2yoffsetfP
Specifies a texel offset in the y direction within the texture array.
f2xfP, f2yfP
Specify the window coordinates of the lower left corner of the rectangular region of pixels to be copied.
f2widthfP
Specifies the width of the texture subimage.
f2heightfP
Specifies the height of the texture subimage.
 

DESCRIPTION

%f3glCopyTexSubImage2DfP replaces a rectangular portion of a two-dimensional texture image with pixels from the current %f3GL_READ_BUFFERfP (rather than from main memory, as is the case for %f3glTexSubImage2DfP). The screen-aligned pixel rectangle with lower left corner at (f2xfP, f2yfP) and with width f2widthfP and height f2heightfP replaces the portion of the texture array with x indices f2xoffsetfP through f2xoffsetfP$~+~$f2widthfP$~-~$1, inclusive, and y indices f2yoffsetfP through f2yoffsetfP$~+~$f2heightfP$~-~$1, inclusive, at the mipmap level specified by f2levelfP. The pixels in the rectangle are processed exactly as if %f3glCopyPixelsfP 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. The destination rectangle in the texture array may not include any texels outside the texture array as it was originally specified. It is not an error to specify a subtexture with zero width or height, but such a specification has no effect. If any of the pixels within the specified rectangle of the current %f3GL_READ_BUFFERfP are outside the read window associated with the current rendering context, then the values obtained for those pixels are undefined. No change is made to the f2internalformatfP, f2widthfP, f2heightfP, or f2borderfP parameters of the specified texture array or to texel values outside the specified subregion.  

NOTES

%f3glCopyTexSubImage2DfP is available only if the GL version is 1.1 or greater. Texturing has no effect in color index mode. %f3glPixelStorefP and %f3glPixelTransferfP modes affect texture images in exactly the way they affect %f3glDrawPixelsfP. When the %f3GL_ARB_imagingfP extension is supported, the RGBA components read from the framebuffer may be processed by the imaging pipeline. See %f3glTexImage1DfP for specific details.  

ERRORS

%f3GL_INVALID_ENUMfP is generated if f2targetfP is not %f3GL_TEXTURE_2DfP. %f3GL_INVALID_OPERATIONfP is generated if the texture array has not been defined by a previous %f3glTexImage2DfP or %f3glCopyTexImage2DfP operation. %f3GL_INVALID_VALUEfP is generated if f2levelfP is less than 0. %f3GL_INVALID_VALUEfP may be generated if f2levelfP is greater than $log sub 2 max$, where $max$ is the returned value of %f3GL_MAX_TEXTURE_SIZEfP. %f3GL_INVALID_VALUEfP is generated if f2xfP$ ~<~ ~-b$ or if f2yfP$ ~<~ ~-b$, where $b$ is the border width of the texture array. %f3GL_INVALID_VALUEfP is generated if $"xoffset" ~<~ -b$, (f2xoffsetfP$~+~$f2widthfP)$~>~(w ~-~b)$, f2yoffsetfP$~<~ ~-b$, or (f2yoffsetfP$~+~$f2heightfP)$~>~(h ~-~b)$, where $w$ is the %f3GL_TEXTURE_WIDTHfP, $h$ is the %f3GL_TEXTURE_HEIGHTfP, and $b$ is the %f3GL_TEXTURE_BORDERfP of the texture image being modified. Note that $w$ and $h$ include twice the border width. %f3GL_INVALID_OPERATIONfP is generated if %f3glCopyTexSubImage2DfP is executed between the execution of %f3glBeginfP and the corresponding execution of %f3glEndfP.  

ASSOCIATED GETS

%f3glGetTexImagefP
%f3glIsEnabledfP with argument %f3GL_TEXTURE_2DfP  

SEE ALSO

%f3glCopyPixels(3G)fP, %f3glCopyTexImage1D(3G)fP, %f3glCopyTexImage2D(3G)fP, %f3glCopyTexSubImage1D(3G)fP, %f3glCopyTexSubImage3D(3G)fP, %f3glPixelStore(3G)fP, %f3glPixelTransfer(3G)fP, %f3glReadBuffer(3G)fP, %f3glTexEnv(3G)fP, %f3glTexGen(3G)fP, %f3glTexImage1D(3G)fP, %f3glTexImage2D(3G)fP, %f3glTexImage3D(3G)fP, %f3glTexParameter(3G)fP, %f3glTexSubImage1D(3G)fP, %f3glTexSubImage2D(3G)fP, %f3glTexSubImage3D(3G)fP


 

Index

NAME
C SPECIFICATION
DESCRIPTION
NOTES
ERRORS
ASSOCIATED GETS
SEE ALSO