Path: blob/main_old/extensions/ANGLE_texture_compression_dxt.txt
1693 views
Name12ANGLE_texture_compression_dxt34Name Strings56GL_ANGLE_texture_compression_dxt17GL_ANGLE_texture_compression_dxt38GL_ANGLE_texture_compression_dxt5910Contributors1112Gregg Tavares, Google Inc.13Daniel Koch, TransGaming Inc.14Al Patrick, Google Inc.1516Contacts1718Gregg Tavares, Google Inc. (gman 'at' google 'dot' com)1920Status2122Implemented in ANGLE ES22324Version2526Last Modified Date: Sept 22, 201227Author Revision: 22829Number3031OpenGL ES Extension #1113233Dependencies3435Requires OpenGL ES 1.0.3637The extension is written against the OpenGL ES 2.0 specification.3839Overview4041These extensions are exactly the same as EXT_texture_compression_dxt142except they additionally expose the COMPRESSED_RGBA_S3TC_DXT3_ANGLE and43COMPRESSED_RGBA_S3TC_DXT5_ANGLE formats and have a size restrictions44such that the size must be a multiple of four (except for mip levels45where the dimensions are either 2 or 1).4647See EXT_texture_compression_dxt1 for the full list of changes. Also48see EXT_texture_compression_s3tc for a description of the formats.4950IP Status5152A license to the S3TC Intellectual Property may be necessary for53implementation of this extension. You should consult with your54Attorney to determine the need for a license.5556New Procedures and Functions5758None.5960New Types6162None.6364New Tokens6566Accepted by the <internalformat> parameter of CompressedTexImage2D67and the <format> parameter of CompressedTexSubImage2D:6869COMPRESSED_RGB_S3TC_DXT1_ANGLE 0x83F070COMPRESSED_RGBA_S3TC_DXT1_ANGLE 0x83F171COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F272COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F37374Additions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization)7576Add the following to Section 3.7.3 (Compressed Texture Images)77(at the end of the description of the CompressedTexImage2D command):7879Compressed Internal Format Base Internal Format80========================== ====================81COMPRESSED_RGB_S3TC_DXT1_ANGLE RGB82COMPRESSED_RGBA_S3TC_DXT1_ANGLE RGBA83COMPRESSED_RGBA_S3TC_DXT3_ANGLE RGBA84COMPRESSED_RGBA_S3TC_DXT5_ANGLE RGBA8586Table 3.x: Specific Compressed Internal Formats8788If <internalformat> is one of the S3TC formats listed in Table 3.x,89the compressed texture is stored in the appropriate S3TC compressed90texture format (see Appendix). The GL and the S3TC texture compression91algorithm support only 2D images without borders.9293CompressedTexImage2D will produce the INVALID_OPERATION error when94<internalformat> is one of the values from Table 3.x under the following95conditions:9697* <border> is non-zero.98* <width> is not one, two, or a multiple of four.99* <height> is not one, two, or a multiple of four.100101Add the following to Section 3.7.3 (Compressed Texture Images)102(at the end of the description of the CompressedTexSubImage2D command):103104If the internal format of the texture image being modified is listed105in Table 3.x, the texture is stored in the appropriate S3TC compressed106texture format (see Appendix). Since DXT/S3TC images are easily edited107along 4x4 texel boundaries, the limitations of CompressedTexSubImage2D108are relaxed. CompressedTexSubImage2D will result in an INVALID_OPERATION109error only if one of the following conditions occurs:110111* <width> is not a multiple of four or equal to TEXTURE_WIDTH.112* <height> is not a multipls of four or equal to TEXTURE_HEIGHT.113* <xoffset> or <yoffset> is not a multiple of four.114* <format> does not match the internal format of the texture image115being modified.116117The following restrictions at the end of section 3.7.3 do not apply118to S3TC DXT texture formats, since subimage modification is straightforward119as long as the subimage is properly aligned.120121Errors122123INVALID_OPERATION is generated by CompressedTexImage2D if <internalformat>124is one of the compressed internal formats from Table 3.x and any of the125following apply:126- <border> is not equal to zero.127- <width> is not one, two, or a multiple of four.128- <height> is not one, two, or a multiple of four.129130INVALID_OPERATION is generated by TexImage2D and CopyTexImage2D if131<internalformat> is one of the compressed internal formats from132Table 3.x.133134INVALID_OPERATION is generated by TexSubImage2D and CopyTexSubImage2D135if the internal format of the texture currently bound to <target> is136one of the compressed internal formats from Table 3.x.137138INVALID_OPERATION is generated by CompressedTexSubImage2D if <format>139is one of the compressed interal formats from Table 3.x and any of the140following apply:141- <width> is not a multiple of four or equal to TEXTURE_WIDTH;142- <height> is not a multiple of four or equal to TEXTURE_HEIGHT;143- <xoffset> or <yoffset> is not a multiple of four;144- <format> does not match the internal format of the texture image145being modified.146147New State148149None.150151Appendix:152153The format for the S3TC Compressed Texture Images Formats is documented154in the appendix of EXT_texture_compression_s3tc.155156Revision History157158Revision 1, 2010/08/06 - gman159- Initial revision160Revision 2, 2012/09/22 - dgkoch161- Added DXT1 formats and documented multiple of 4 restriction.162163164165