'\" t .\" Title: glCopyTexSubImage2D .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 05/30/2012 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "GLCOPYTEXSUBIMAGE2D" "3G" "05/30/2012" "[FIXME: source]" "[FIXME: manual]" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" glCopyTexSubImage2D \- copy a two\-dimensional texture subimage .SH "C SPECIFICATION" .HP \w'void\ glCopyTexSubImage2D('u .BI "void glCopyTexSubImage2D(GLenum\ " "target" ", GLint\ " "level" ", GLint\ " "xoffset" ", GLint\ " "yoffset" ", GLint\ " "x" ", GLint\ " "y" ", GLsizei\ " "width" ", GLsizei\ " "height" ");" .PP .SH "PARAMETERS" .PP \fItarget\fR .RS 4 Specifies the target texture\&. Must be \fBGL_TEXTURE_2D\fR, \fBGL_TEXTURE_CUBE_MAP_POSITIVE_X\fR, \fBGL_TEXTURE_CUBE_MAP_NEGATIVE_X\fR, \fBGL_TEXTURE_CUBE_MAP_POSITIVE_Y\fR, \fBGL_TEXTURE_CUBE_MAP_NEGATIVE_Y\fR, \fBGL_TEXTURE_CUBE_MAP_POSITIVE_Z\fR, or \fBGL_TEXTURE_CUBE_MAP_NEGATIVE_Z\fR\&. .RE .PP \fIlevel\fR .RS 4 Specifies the level\-of\-detail number\&. Level 0 is the base image level\&. Level \fIn\fR is the \fIn\fRth mipmap reduction image\&. .RE .PP \fIxoffset\fR .RS 4 Specifies a texel offset in the x direction within the texture array\&. .RE .PP \fIyoffset\fR .RS 4 Specifies a texel offset in the y direction within the texture array\&. .RE .PP \fIx\fR, \fIy\fR .RS 4 Specify the window coordinates of the lower left corner of the rectangular region of pixels to be copied\&. .RE .PP \fIwidth\fR .RS 4 Specifies the width of the texture subimage\&. .RE .PP \fIheight\fR .RS 4 Specifies the height of the texture subimage\&. .RE .SH "DESCRIPTION" .PP \fBglCopyTexSubImage2D\fR replaces a rectangular portion of a two\-dimensional texture image or cube\-map texture image with pixels from the current \fBGL_READ_BUFFER\fR (rather than from main memory, as is the case for \fBglTexSubImage2D\fR())\&. .PP The screen\-aligned pixel rectangle with lower left corner at x y and with width \fIwidth\fR and height \fIheight\fR replaces the portion of the texture array with x indices \fIxoffset\fR through xoffset + width \- 1, inclusive, and y indices \fIyoffset\fR through yoffset + height \- 1, inclusive, at the mipmap level specified by \fIlevel\fR\&. .PP The pixels in the rectangle are processed exactly as if \fBglReadPixels\fR() 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\*(Aqs internal format for storage in the texel array\&. .PP 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\&. .PP If any of the pixels within the specified rectangle of the current \fBGL_READ_BUFFER\fR are outside the read window associated with the current rendering context, then the values obtained for those pixels are undefined\&. .PP No change is made to the \fIinternalformat\fR, \fIwidth\fR, \fIheight\fR, or \fIborder\fR parameters of the specified texture array or to texel values outside the specified subregion\&. .SH "NOTES" .PP \fBglPixelStore\fR() modes affect texture images\&. .SH "ERRORS" .PP \fBGL_INVALID_ENUM\fR is generated if \fItarget\fR is not \fBGL_TEXTURE_2D\fR, \fBGL_TEXTURE_CUBE_MAP_POSITIVE_X\fR, \fBGL_TEXTURE_CUBE_MAP_NEGATIVE_X\fR, \fBGL_TEXTURE_CUBE_MAP_POSITIVE_Y\fR, \fBGL_TEXTURE_CUBE_MAP_NEGATIVE_Y\fR, \fBGL_TEXTURE_CUBE_MAP_POSITIVE_Z\fR, or \fBGL_TEXTURE_CUBE_MAP_NEGATIVE_Z\fR\&. .PP \fBGL_INVALID_OPERATION\fR is generated if the texture array has not been defined by a previous \fBglTexImage2D\fR() or \fBglCopyTexImage2D\fR() operation\&. .PP \fBGL_INVALID_VALUE\fR is generated if \fIlevel\fR is less than 0\&. .PP \fBGL_INVALID_VALUE\fR may be generated if level > log 2 ⁡ max, where max is the returned value of \fBGL_MAX_TEXTURE_SIZE\fR\&. .PP \fBGL_INVALID_VALUE\fR is generated if xoffset < \- b, xoffset + width > w \- b, yoffset < \- b, or yoffset + height > h \- b, where w is the \fBGL_TEXTURE_WIDTH\fR, h is the \fBGL_TEXTURE_HEIGHT\fR, and b is the \fBGL_TEXTURE_BORDER\fR of the texture image being modified\&. Note that w and h include twice the border width\&. .SH "ASSOCIATED GETS" .PP \fBglGetTexImage\fR() .SH "SEE ALSO" .PP \fBglCopyTexImage1D\fR(), \fBglCopyTexImage2D\fR(), \fBglCopyTexSubImage1D\fR(), \fBglCopyTexSubImage3D\fR(), \fBglPixelStore\fR(), \fBglReadBuffer\fR(), \fBglTexImage1D\fR(), \fBglTexImage2D\fR(), \fBglTexImage3D\fR(), \fBglTexParameter\fR(), \fBglTexSubImage1D\fR(), \fBglTexSubImage2D\fR(), \fBglTexSubImage3D\fR() .SH "COPYRIGHT" .PP Copyright \(co 1991\-2006 Silicon Graphics, Inc\&. This document is licensed under the SGI Free Software B License\&. For details, see \m[blue]\fBhttp://oss\&.sgi\&.com/projects/FreeB/\fR\m[]\&.