Extends glTexImage2D to accept S3TC compressed texture format.
glTexImage2DThe general form of glTexImage2D is:
glTexImage2D( Glenum target,
Glint level,
Glint internalformat,
Glsizei width,
Glsizei height,
Glint border,
Glenum format,
Glenum type,
Const Glvoid *pixels )
format ParameterGL_RGB_S3TC (0x83A0)
GL_RGB4_S3TC (0x83A1)
GL_RGBA_S3TC (0x83A2) (currently not used)
GL_RGBA4_S3TC (0x83A3) (currently not used)
internalformat ParameterGL_RGB_S3TC (0x83A0)
GL_RGB4_S3TC (0x83A1)
GL_RGBA_S3TC (0x83A2) (currently not used)
GL_RGBA4_S3TC (0x83A3) (currently not used)
GL_RGB_S3TC and GL_RGBA_S3TC let the driver pick the type -- for now just GL_RGB4_S3TC and GL_RGBA4_S3TC respectively.
level ParameterLevel takes negative numbers for GL_RGB_S3TC and GL_RGBA_S3TC formats only. Any other formats will generate an error.
The negative number indicates the pixels contain 0 to abs(level) mipmaps.
For GL_RGB_S3TC, GL_RGB4_S3TC, GL_RGBA_S3TC, and GL_RGBA4_S3TC formats, pixels must be linear, and contain the untiled compressed image.
glGetStringGL_S3_s3tc is included in the string returned by GL_EXTENSIONS argument.
glTexSubImage2DglTexSubImage2D will be supported (though not in this version), but requires the starting position (x, y) of an input image be at a 16 texel boundary, i.e.
x = 4 * n,
y = 4 * m
where m and n are some positive integer.
The width and height of a sub-image needs to be following:
Width = 4 * i,
Height = 4 * j
Where i > = 1 and j > = 1.
The driver currently handle the formats and internalformats GL_RGB_S3TC and GL_RGB4_S3TC. The formats GL_RGB, GL_RGBA, GL_BGR_EXT, and GL_BGRA_EXT and the internalformats GL_RGB_S3TC and GL_RGB4_S3TC are supported as well. Any mixing of other formats is not handled.
glCopyTexImage2DglCopyTexImage2D() is not supported.
GL_RGB_S3TC, GL_RGB4_S3TC, GL_RGBA_S3TC, and GL_RGBA4_S3TC are useful only for texture functions.
Copyright 1998, 1999 S3 Incorporated. All rights reserved.