![]() -> Click here to learn how to get live help <- |
GLCOPYTEXIMAGE2DIndexNAMEglCopyTexImage2D - copy pixels into a 2D texture imageC SPECIFICATIONvoid f3glCopyTexImage2DfP( GLenum fItargetfP,f2targetfP Specifies the target texture. Must be %f3GL_TEXTURE_2DfP.
DESCRIPTION%f3glCopyTexImage2DfP defines a two-dimensional texture image with pixels from the current %f3GL_READ_BUFFERfP. The screen-aligned pixel rectangle with lower left corner at (f2xfP, f2yfP) and with a width of f2widthfP$~+~2~*~$f2borderfP and a height of f2heightfP$~+~2~*~$f2borderfP defines the texture array at the mipmap level specified by f2levelfP. f2internalformatfP specifies the internal of the texture array. 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. 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 %f3GL_READ_BUFFERfP are outside the window associated with the current rendering context, then the values obtained for those pixels are undefined.NOTES%f3glCopyTexImage2DfP 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 f2internalformatfP. An image with height or width of 0 indicates a NULL texture. 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_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 f2widthfP or f2heightfP is less than 0, greater than $2~+~$%f3GL_MAX_TEXTURE_SIZEfP, or if f2widthfP or f2heightfP cannot be represented as $2 sup k ~+~ 2~*~$f2borderfP for some integer $k$. %f3GL_INVALID_VALUEfP is generated if f2borderfP is not 0 or 1. %f3GL_INVALID_VALUEfP is generated if f2internalformatfP is not one of the allowable values. %f3GL_INVALID_OPERATIONfP is generated if %f3glCopyTexImage2DfP 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, %f3glCopyTexSubImage1D(3G)fP, %f3glCopyTexSubImage2D(3G)fP, %f3glPixelStore(3G)fP, %f3glPixelTransfer(3G)fP, %f3glTexEnv(3G)fP, %f3glTexGen(3G)fP, %f3glTexImage1D(3G)fP, %f3glTexImage2D(3G)fP, %f3glTexSubImage1D(3G)fP, %f3glTexSubImage2D(3G)fP,%f3glTexParameter(3G)fP
Index |