_glTexSubImage1D: specify a one-dimensional texture subimage
SUB _glTexSubImage1D (BYVAL target AS _UNSIGNED LONG, BYVAL level AS LONG, BYVAL xoffset AS LONG, BYVAL width AS LONG, BYVAL format AS _UNSIGNED LONG, BYVAL type AS _UNSIGNED LONG, pixels AS _OFFSET) void _glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * data);
- Specifies the target texture. Must be _GL_TEXTURE_1D.
- Specifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image.
- Specifies a texel offset in the x direction within the texture array.
- Specifies the width of the texture subimage.
Texturing maps a portion of a specified texture image onto each graphical primitive for which texturing is enabled. To enable or disable one-dimensional texturing, call _glEnable and _glDisable with argument _GL_TEXTURE_1D.
_glTexSubImage1D redefines a contiguous subregion of an existing one-dimensional texture image. The texels referenced by data replace the portion of the existing texture array with x indices xoffset and xoffset + width - 1, inclusive. This region may not include any texels outside the range of the texture array as it was originally specified. It is not an error to specify a subtexture with width of 0, but such a specification has no effect.
If a non-zero named buffer object is bound to the _GL_PIXEL_UNPACK_BUFFER target (see _glBindBuffer) while a texture image is specified, data is treated as a byte offset into the buffer object's data store.
_glPixelStore modes affect texture images.
_glTexSubImage1D specifies a one-dimensional subtexture for the current texture unit, specified with _glActiveTexture.
_GL_INVALID_ENUM is generated if target is not one of the allowable values.
_GL_INVALID_ENUM is generated if format is not an accepted format constant.
_GL_INVALID_ENUM is generated if type is not a type constant.
_GL_INVALID_VALUE is generated if level is less than 0.
_GL_INVALID_VALUE is generated if width is less than 0.
_GL_INVALID_OPERATION is generated if type is one of _GL_UNSIGNED_SHORT_4_4_4_4, _GL_UNSIGNED_SHORT_4_4_4_4_REV, _GL_UNSIGNED_SHORT_5_5_5_1, _GL_UNSIGNED_SHORT_1_5_5_5_REV, _GL_UNSIGNED_INT_8_8_8_8, _GL_UNSIGNED_INT_8_8_8_8_REV, _GL_UNSIGNED_INT_10_10_10_2, or _GL_UNSIGNED_INT_2_10_10_10_REV and format is neither _GL_RGBA nor _GL_BGRA.
_GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to the _GL_PIXEL_UNPACK_BUFFER target and the data would be unpacked from the buffer object such that the memory reads required would exceed the data store size.
_GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to the _GL_PIXEL_UNPACK_BUFFER target and data is not evenly divisible into the number of bytes needed to store in memory a datum indicated by type.
Copyright 1991-2006 Silicon Graphics, Inc. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.