'\" t .\" Title: glCopyTexSubImage2D .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 01/03/2018 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "GLCOPYTEXSUBIMAGE2D" "3G" "01/03/2018" "[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, glCopyTextureSubImage2D \- 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" ");" .HP \w'void\ glCopyTextureSubImage2D('u .BI "void glCopyTextureSubImage2D(GLuint\ " "texture" ", GLint\ " "level" ", GLint\ " "xoffset" ", GLint\ " "yoffset" ", GLint\ " "x" ", GLint\ " "y" ", GLsizei\ " "width" ", GLsizei\ " "height" ");" .SH "PARAMETERS" .PP \fItarget\fR .RS 4 Specifies the target to which the texture object is bound for \fBglCopyTexSubImage2D\fR function\&. Must be \fBGL_TEXTURE_1D_ARRAY\fR, \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, \fBGL_TEXTURE_CUBE_MAP_NEGATIVE_Z\fR, or \fBGL_TEXTURE_RECTANGLE\fR\&. .RE .PP \fItexture\fR .RS 4 Specifies the texture object name for \fBglCopyTextureSubImage2D\fR function\&. .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 and \fBglCopyTextureSubImage2D\fR replace a rectangular portion of a two\-dimensional texture image, cube\-map texture image, rectangular image, or a linear portion of a number of slices of a one\-dimensional array texture 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 When \fItarget\fR is \fBGL_TEXTURE_1D_ARRAY\fR then the y coordinate and height are treated as the start slice and number of slices to modify\&. .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, or \fIheight\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, \fBGL_TEXTURE_CUBE_MAP_NEGATIVE_Z\fR, \fBGL_TEXTURE_1D_ARRAY\fR, or \fBGL_RECTANGLE\fR\&. .PP \fBGL_INVALID_FRAMEBUFFER_OPERATION\fR is generated if the object bound to \fBGL_READ_FRAMEBUFFER_BINDING\fR is not framebuffer complete\&. .PP \fBGL_INVALID_OPERATION\fR is generated if the texture array has not been defined by a previous \fBglTexImage2D\fR(), \fBglTexStorage2D\fR() or \fBglCopyTexImage2D\fR() operation\&. .PP \fBGL_INVALID_OPERATION\fR is generated by \fBglCopyTextureSubImage2D\fR if \fItexture\fR is not the name of an existing texture object\&. .PP \fBGL_INVALID_OPERATION\fR is generated by \fBglCopyTextureSubImage2D\fR if the effective target of texture does not correspond to one of the texture targets supported by the function\&. .PP \fBGL_INVALID_VALUE\fR is generated if \fIlevel\fR is less than 0\&. .PP \fBGL_INVALID_VALUE\fR is generated if the effective target is \fBGL_TEXTURE_RECTANGLE\fR and \fIlevel\fR is not zero\&. .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 < 0, xoffset + width > w, yoffset < 0, or yoffset + height > 0,, where w is the \fBGL_TEXTURE_WIDTH\fR, h is the \fBGL_TEXTURE_HEIGHT\fR and of the texture image being modified\&. .PP \fBGL_INVALID_OPERATION\fR is generated if: .PP .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} the read buffer is \fBGL_NONE\fR, or .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} the value of \fBGL_READ_FRAMEBUFFER_BINDING\fR is non\-zero, and: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} the read buffer selects an attachment that has no image attached, or .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} the effective value of \fBGL_SAMPLE_BUFFERS\fR for the read framebuffer is one\&. .RE .RE .SH "ASSOCIATED GETS" .PP \fBglGetTexImage\fR() .SH "VERSION SUPPORT" .TS allbox tab(:); lB cB s s s s s s s s s s s lB cB cB cB cB cB cB cB cB cB cB cB cB. T{ T}:T{ \fBOpenGL Version\fR T} T{ \fBFunction / Feature Name\fR T}:T{ \fB2\&.0\fR T}:T{ \fB2\&.1\fR T}:T{ \fB3\&.0\fR T}:T{ \fB3\&.1\fR T}:T{ \fB3\&.2\fR T}:T{ \fB3\&.3\fR T}:T{ \fB4\&.0\fR T}:T{ \fB4\&.1\fR T}:T{ \fB4\&.2\fR T}:T{ \fB4\&.3\fR T}:T{ \fB4\&.4\fR T}:T{ \fB4\&.5\fR T} .T& l c c c c c c c c c c c c l c c c c c c c c c c c c. T{ \fBglCopyTexSubImage2D\fR T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T} T{ \fBglCopyTextureSubImage2D\fR T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ ✔ T} .TE .sp 1 .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\&. Copyright \(co 2012\-2014 Khronos Group\&. This document is licensed under the SGI Free Software B License\&. For details, see \m[blue]\fBhttp://oss\&.sgi\&.com/projects/FreeB/\fR\m[]\&. .SH "COPYRIGHT" .br Copyright \(co 2014 Khronos Group .br