GLCOPYTEXSUBIMAGE1D(3G)
okay so bestie, welcome to the GLCOPYTEXSUBIMAGE1D(3G) manual page β aka the whole vibe guide for glCopyTexSubImage1D, the function that copies a one-dimensional texture subimage. π
β¨
π NAME
glCopyTexSubImage1D β copy a one-dimensional texture subimage, periodt. π
β¨ C SPECIFICATION β¨
void glCopyTexSubImage1D( GLenum target,
GLint level,
GLint xoffset,
GLint x,
GLint y,
GLsizei width )
πΈ PARAMETERS πΈ
targetβ specifies the target texture. It must beGL_TEXTURE_1D, no cap. π―levelβ specifies the level-of-detail number. Level0is the base image level. Levelnis thenth 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 replaces a portion of a one-dimensional texture image with pixels from the current GL_READ_BUFFER β not from main memory, which is the whole plot twist versus glTexSubImage1D. π₯
The screen-aligned pixel row with left corner at (x, y), and with length width, replaces the portion of the texture array with x indices xoffset through xoffset+widthβ1, inclusive. And bestie, the destination in the texture array may not include any texels outside the texture array as it was originally specified. π«
The pixels in the row are processed exactly as if glCopyPixels 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. π§
It is not an error to specify a subtexture with zero width, but such a specification has no effect. Literally zero effect, 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, width, or border parameters of the specified texture array or to texel values outside the specified subregion. π«Ά
π¦ NOTES π¦
glCopyTexSubImage1D is available only if the GL version is 1.1 or greater. β
Texturing has no effect in color index mode. π¨
glPixelStore and glPixelTransfer modes affect texture images in exactly the way they affect glDrawPixels. π§
When the GL_ARB_imaging extension is supported, the RGBA components copied from the framebuffer may be processed by the imaging pipeline. See glTexImage1D for specific details. π
π ERRORS π
GL_INVALID_ENUMis generated iftargetis notGL_TEXTURE_1D. π¨GL_INVALID_OPERATIONis generated if the texture array has not been defined by a previousglTexImage1DorglCopyTexImage1Doperation. πGL_INVALID_VALUEis generated iflevelis less than0. β οΈGL_INVALID_VALUEmay be generated iflevel>log2 max, wheremaxis the returned value ofGL_MAX_TEXTURE_SIZE. πGL_INVALID_VALUEis generated ify<βbor ifwidth<βb, wherebis the border width of the texture array. π§±GL_INVALID_VALUEis generated ifxoffset<βb, or(xoffset+width)>(wβb), wherewis theGL_TEXTURE_WIDTH, andbis theGL_TEXTURE_BORDERof the texture image being modified. Note thatwincludes twice the border width. π
π ASSOCIATED GETS
glGetTexImageglIsEnabledwith argumentGL_TEXTURE_1D
π SEE ALSO π
glCopyPixels(3G)glCopyTexImage1D(3G)glCopyTexImage2D(3G)glCopyTexSubImage2D(3G)glCopyTexSubImage3D(3G)glPixelStore(3G)glPixelTransfer(3G)glReadBuffer(3G)glTexEnv(3G)glTexGen(3G)glTexImage1D(3G)glTexImage2D(3G)glTexImage3D(3G)glTexParameter(3G)glTexSubImage1D(3G)glTexSubImage2D(3G)glTexSubImage3D(3G)
mwah π β signing off from the GLCOPYTEXSUBIMAGE1D(3G) footer, the 3G manual tag, with literally no extra date line here, just the tag and the vibes. π«Άπ
π¦ where this page comes from
- opensuse-leap 16.0: Mesa-libGL-devel 24.1.7-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms