GLCOPYTEXSUBIMAGE1D(3G)
okay so bestie, welcome to GLCOPYTEXSUBIMAGE1D(3G) β the manual page for copying a one-dimensional texture subimage. itβs giving OpenGL copy-paste but make it texels π
β¨
β¨ NAME β¨
glCopyTexSubImage1D, glCopyTextureSubImage1D β copy a one-dimensional texture subimage.
π» C SPECIFICATION π»
void glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset,
GLint x, GLint y, GLsizei width);
void glCopyTextureSubImage1D(GLuint texture, GLint level, GLint xoffset,
GLint x, GLint y, GLsizei width);
π PARAMETERS π
targetβ specifies the target to which the texture object is bound for theglCopyTexSubImage1Dfunction. Must beGL_TEXTURE_1D.textureβ specifies the texture object name for theglCopyTextureSubImage1Dfunction.levelβ specifies the level-of-detail number. Level0is the base image level. Levelnis the nth mipmap reduction image.xoffsetβ specifies the texel offset within the texture array.x,yβ specify the window coordinates of the left corner of the row of pixels to be copied.widthβ specifies the width of the texture subimage.
π¦ DESCRIPTION π¦
so glCopyTexSubImage1D and glCopyTextureSubImage1D replace a portion of a one-dimensional texture image with pixels from the current GL_READ_BUFFER β and yes, bestie, thatβs instead of main memory, unlike what happens with glTexSubImage1D(). For glCopyTexSubImage1D, the texture object bound to target is the one used for the process. For glCopyTextureSubImage1D, texture tells you which texture object should be used for the call.
picture the screen-aligned pixel row whose left corner is at (x, y) and whose length is width; that row replaces the portion of the texture array with x indices xoffset through xoffset + width - 1, inclusive. and the destination in the texture array may not include any texels outside the texture array as it was originally specified. no cap.
the pixels in that row are processed exactly as if glReadPixels() had been called, but the process stops just before final conversion. At that point, all pixel component values are clamped to the range 0 to 1 and then converted to the textureβs internal format for storage in the texel array.
it is not an error to specify a subtexture with zero width, but such a specification has no effect β it just does absolutely nothing, bestie. If any of the pixels within the specified row of the current GL_READ_BUFFER are outside the read window associated with the current rendering context, then the values obtained for those pixels are undefined π.
no change is made to the internalformat or width parameters of the specified texture array or to texel values outside the specified subregion. iconic, no notes.
π NOTES π
the glPixelStore() mode affects texture images. periodt.
π ERRORS π
GL_INVALID_ENUMis generated byglCopyTexSubImage1Diftargetis notGL_TEXTURE_1D.GL_INVALID_FRAMEBUFFER_OPERATIONis generated if the object bound toGL_READ_FRAMEBUFFER_BINDINGis not framebuffer complete.GL_INVALID_OPERATIONis generated byglCopyTextureSubImage1Diftextureis not the name of an existing texture object, or if the effective target oftextureis notGL_TEXTURE_1D.GL_INVALID_OPERATIONis generated if the texture array has not been defined by a previousglTexImage1D(),glCopyTexImage1D(), orglTexStorage1D()operation.GL_INVALID_VALUEis generated iflevelis less than0.GL_INVALID_VALUEmay be generated iflevel > log 2 β‘ max, wheremaxis the returned value ofGL_MAX_TEXTURE_SIZE.GL_INVALID_VALUEis generated ifxoffset < 0, orxoffset + width > w, wherewis theGL_TEXTURE_WIDTHof the texture image being modified.GL_INVALID_OPERATIONis generated if:- the read buffer is
GL_NONE, or - the value of
GL_READ_FRAMEBUFFER_BINDINGis non-zero, and:- the read buffer selects an attachment that has no image attached, or
- the effective value of
GL_SAMPLE_BUFFERSfor the read framebuffer is one.
- the read buffer is
π ASSOCIATED GETS π
glGetTexImage() β thatβs the associated get, bestie.
π VERSION SUPPORT π
the version support table is headed Function / Feature Name across OpenGL Version, with version columns 2.0, 2.1, 3.0, 3.1, 3.2, 3.3, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5. hereβs the tea without the table:
glCopyTexSubImage1Dβ β in every listed version:2.0,2.1,3.0,3.1,3.2,3.3,4.0,4.1,4.2,4.3,4.4,4.5.glCopyTextureSubImage1Dβ β only in4.5; every earlier listed version is-:2.0,2.1,3.0,3.1,3.2,3.3,4.0,4.1,4.2,4.3,4.4.
π SEE ALSO π
glCopyTexImage1D(), glCopyTexImage2D(), glCopyTexSubImage2D(), glCopyTexSubImage3D(), glPixelStore(), glReadBuffer(), glTexImage1D(), glTexImage2D(), glTexImage3D(), glTexParameter(), glTexSubImage1D(), glTexSubImage2D(), glTexSubImage3D()
π COPYRIGHT π
Copyright Β© 1991-2006 Silicon Graphics, Inc. Copyright Β© 2012-2014 Khronos Group. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.
π COPYRIGHT π
Copyright Β© 2014 Khronos Group
okay thatβs the whole page, bestie π«Ά source/version tag says [FIXME: source], and itβs dated 08/09/2021 β mwah πβ¨
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms