'\" t .\" Title: glCopyTexImage2D .\" 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 "GLCOPYTEXIMAGE2D" "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" glCopyTexImage2D \- copy pixels into a 2D texture image .SH "C SPECIFICATION" .HP \w'void\ glCopyTexImage2D('u .BI "void glCopyTexImage2D(GLenum\ " "target" ", GLint\ " "level" ", GLenum\ " "internalformat" ", GLint\ " "x" ", GLint\ " "y" ", GLsizei\ " "width" ", GLsizei\ " "height" ", GLint\ " "border" ");" .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 \fIinternalformat\fR .RS 4 Specifies the internal format of the texture\&. Must be one of the following symbolic constants: \fBGL_COMPRESSED_RED\fR, \fBGL_COMPRESSED_RG\fR, \fBGL_COMPRESSED_RGB\fR, \fBGL_COMPRESSED_RGBA\fR\&. \fBGL_COMPRESSED_SRGB\fR, \fBGL_COMPRESSED_SRGB_ALPHA\fR\&. \fBGL_DEPTH_COMPONENT\fR, \fBGL_DEPTH_COMPONENT16\fR, \fBGL_DEPTH_COMPONENT24\fR, \fBGL_DEPTH_COMPONENT32\fR, \fBGL_STENCIL_INDEX8\fR, \fBGL_RED\fR, \fBGL_RG\fR, \fBGL_RGB\fR, \fBGL_R3_G3_B2\fR, \fBGL_RGB4\fR, \fBGL_RGB5\fR, \fBGL_RGB8\fR, \fBGL_RGB10\fR, \fBGL_RGB12\fR, \fBGL_RGB16\fR, \fBGL_RGBA\fR, \fBGL_RGBA2\fR, \fBGL_RGBA4\fR, \fBGL_RGB5_A1\fR, \fBGL_RGBA8\fR, \fBGL_RGB10_A2\fR, \fBGL_RGBA12\fR, \fBGL_RGBA16\fR, \fBGL_SRGB\fR, \fBGL_SRGB8\fR, \fBGL_SRGB_ALPHA\fR, or \fBGL_SRGB8_ALPHA8\fR\&. .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 image\&. .RE .PP \fIheight\fR .RS 4 Specifies the height of the texture image\&. .RE .PP \fIborder\fR .RS 4 Must be 0\&. .RE .SH "DESCRIPTION" .PP \fBglCopyTexImage2D\fR defines a two\-dimensional texture image, or cube\-map texture image with pixels from the current \fBGL_READ_BUFFER\fR\&. .PP The screen\-aligned pixel rectangle with lower left corner at (\fIx\fR, \fIy\fR) and with a width of width and a height of height defines the texture array at the mipmap level specified by \fIlevel\fR\&. \fIinternalformat\fR specifies the internal format of the texture array\&. .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 Pixel ordering is such that lower x and y screen coordinates correspond to lower s and t texture coordinates\&. .PP If any of the pixels within the specified rectangle of the current \fBGL_READ_BUFFER\fR are outside the window associated with the current rendering context, then the values obtained for those pixels are undefined\&. .PP When \fIinternalformat\fR is one of the sRGB types, the GL does not automatically convert the source pixels to the sRGB color space\&. In this case, the \fBglPixelMap\fR function can be used to accomplish the conversion\&. .SH "NOTES" .PP 1, 2, 3, and 4 are not accepted values for \fIinternalformat\fR\&. .PP An image with height or width of 0 indicates a NULL texture\&. .PP \fBGL_STENCIL_INDEX8\fR is accepted for \fIinternalformat\fR only if the GL version is 4\&.4 or higher\&. .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_VALUE\fR is generated if \fIlevel\fR is less than 0\&. .PP \fBGL_INVALID_VALUE\fR may be generated if \fIlevel\fR is greater than log 2 ⁢ max, where max is the returned value of \fBGL_MAX_TEXTURE_SIZE\fR\&. .PP \fBGL_INVALID_VALUE\fR is generated if \fIwidth\fR is less than 0 or greater than \fBGL_MAX_TEXTURE_SIZE\fR\&. .PP \fBGL_INVALID_VALUE\fR is generated if \fIborder\fR is not 0\&. .PP \fBGL_INVALID_VALUE\fR is generated if \fIinternalformat\fR is not an accepted format\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fIinternalformat\fR is \fBGL_DEPTH_COMPONENT\fR, \fBGL_DEPTH_COMPONENT16\fR, \fBGL_DEPTH_COMPONENT24\fR, or \fBGL_DEPTH_COMPONENT32\fR and there is no depth buffer\&. .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. T{ \fBglCopyTexImage2D\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(), \fBglCopyTexSubImage1D\fR(), \fBglCopyTexSubImage2D\fR(), \fBglPixelStore\fR(), \fBglTexImage1D\fR(), \fBglTexImage2D\fR(), \fBglTexSubImage1D\fR(), \fBglTexSubImage2D\fR(), \fBglTexParameter\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 2013-2014 Khronos Group .br