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 GLCOPYTEXIMAGE2D

GLCOPYTEXIMAGE2D

Index
 

NAME

glCopyTexImage2D - copy pixels into a 2D texture image

 

C SPECIFICATION

void f3glCopyTexImage2DfP( 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.
f2internalformatfP
Specifies the internal of the texture. Must be one of the following symbolic constants: %f3GL_ALPHAfP, %f3GL_ALPHA4fP, %f3GL_ALPHA8fP, %f3GL_ALPHA12fP, %f3GL_ALPHA16fP, %f3GL_LUMINANCEfP, %f3GL_LUMINANCE4fP, %f3GL_LUMINANCE8fP, %f3GL_LUMINANCE12fP, %f3GL_LUMINANCE16fP, %f3GL_LUMINANCE_ALPHAfP, %f3GL_LUMINANCE4_ALPHA4fP, %f3GL_LUMINANCE6_ALPHA2fP, %f3GL_LUMINANCE8_ALPHA8fP, %f3GL_LUMINANCE12_ALPHA4fP, %f3GL_LUMINANCE12_ALPHA12fP, %f3GL_LUMINANCE16_ALPHA16fP, %f3GL_INTENSITYfP, %f3GL_INTENSITY4fP, %f3GL_INTENSITY8fP, %f3GL_INTENSITY12fP, %f3GL_INTENSITY16fP, %f3GL_RGBfP, %f3GL_R3_G3_B2fP, %f3GL_RGB4fP, %f3GL_RGB5fP, %f3GL_RGB8fP, %f3GL_RGB10fP, %f3GL_RGB12fP, %f3GL_RGB16fP, %f3GL_RGBAfP, %f3GL_RGBA2fP, %f3GL_RGBA4fP, %f3GL_RGB5_A1fP, %f3GL_RGBA8fP, %f3GL_RGB10_A2fP, %f3GL_RGBA12fP, or %f3GL_RGBA16fP.
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 image. Must be 0 or $2 sup n ~+~ 2*$f2borderfP for some integer $n$.
f2heightfP
Specifies the height of the texture image. Must be 0 or $2 sup m ~+~ 2*$f2borderfP for some integer $m$.
f2borderfP
Specifies the width of the border. Must be either 0 or 1.
 

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

NAME
C SPECIFICATION
DESCRIPTION
NOTES
ERRORS
ASSOCIATED GETS
SEE ALSO