michael@0: Name michael@0: michael@0: ANGLE_texture_compression_dxt michael@0: michael@0: Name Strings michael@0: michael@0: GL_ANGLE_texture_compression_dxt1 michael@0: GL_ANGLE_texture_compression_dxt3 michael@0: GL_ANGLE_texture_compression_dxt5 michael@0: michael@0: Contributors michael@0: michael@0: Gregg Tavares, Google Inc. michael@0: Daniel Koch, TransGaming Inc. michael@0: Al Patrick, Google Inc. michael@0: michael@0: Contacts michael@0: michael@0: Gregg Tavares, Google Inc. (gman 'at' google 'dot' com) michael@0: michael@0: Status michael@0: michael@0: Implemented in ANGLE ES2 michael@0: michael@0: Version michael@0: michael@0: Last Modified Date: Sept 22, 2012 michael@0: Author Revision: 2 michael@0: michael@0: Number michael@0: michael@0: OpenGL ES Extension #111 michael@0: michael@0: Dependencies michael@0: michael@0: Requires OpenGL ES 1.0. michael@0: michael@0: The extension is written against the OpenGL ES 2.0 specification. michael@0: michael@0: Overview michael@0: michael@0: These extensions are exactly the same as EXT_texture_compression_dxt1 michael@0: except they additionally expose the COMPRESSED_RGBA_S3TC_DXT3_ANGLE and michael@0: COMPRESSED_RGBA_S3TC_DXT5_ANGLE formats and have a size restrictions michael@0: such that the size must be a multiple of four (except for mip levels michael@0: where the dimensions are either 2 or 1). michael@0: michael@0: See EXT_texture_compression_dxt1 for the full list of changes. Also michael@0: see EXT_texture_compression_s3tc for a description of the formats. michael@0: michael@0: IP Status michael@0: michael@0: A license to the S3TC Intellectual Property may be necessary for michael@0: implementation of this extension. You should consult with your michael@0: Attorney to determine the need for a license. michael@0: michael@0: New Procedures and Functions michael@0: michael@0: None. michael@0: michael@0: New Types michael@0: michael@0: None. michael@0: michael@0: New Tokens michael@0: michael@0: Accepted by the parameter of CompressedTexImage2D michael@0: and the parameter of CompressedTexSubImage2D: michael@0: michael@0: COMPRESSED_RGB_S3TC_DXT1_ANGLE 0x83F0 michael@0: COMPRESSED_RGBA_S3TC_DXT1_ANGLE 0x83F1 michael@0: COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2 michael@0: COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3 michael@0: michael@0: Additions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization) michael@0: michael@0: Add the following to Section 3.7.3 (Compressed Texture Images) michael@0: (at the end of the description of the CompressedTexImage2D command): michael@0: michael@0: Compressed Internal Format Base Internal Format michael@0: ========================== ==================== michael@0: COMPRESSED_RGB_S3TC_DXT1_ANGLE RGB michael@0: COMPRESSED_RGBA_S3TC_DXT1_ANGLE RGBA michael@0: COMPRESSED_RGBA_S3TC_DXT3_ANGLE RGBA michael@0: COMPRESSED_RGBA_S3TC_DXT5_ANGLE RGBA michael@0: michael@0: Table 3.x: Specific Compressed Internal Formats michael@0: michael@0: If is one of the S3TC formats listed in Table 3.x, michael@0: the compressed texture is stored in the appropriate S3TC compressed michael@0: texture format (see Appendix). The GL and the S3TC texture compression michael@0: algorithm support only 2D images without borders. michael@0: michael@0: CompressedTexImage2D will produce the INVALID_OPERATION error when michael@0: is one of the values from Table 3.x under the following michael@0: conditions: michael@0: michael@0: * is non-zero. michael@0: * is not one, two, or a multiple of four. michael@0: * is not one, two, or a multiple of four. michael@0: michael@0: Add the following to Section 3.7.3 (Compressed Texture Images) michael@0: (at the end of the description of the CompressedTexSubImage2D command): michael@0: michael@0: If the internal format of the texture image being modified is listed michael@0: in Table 3.x, the texture is stored in the appropriate S3TC compressed michael@0: texture format (see Appendix). Since DXT/S3TC images are easily edited michael@0: along 4x4 texel boundaries, the limitations of CompressedTexSubImage2D michael@0: are relaxed. CompressedTexSubImage2D will result in an INVALID_OPERATION michael@0: error only if one of the following conditions occurs: michael@0: michael@0: * is not a multiple of four or equal to TEXTURE_WIDTH. michael@0: * is not a multipls of four or equal to TEXTURE_HEIGHT. michael@0: * or is not a multiple of four. michael@0: * does not match the internal format of the texture image michael@0: being modified. michael@0: michael@0: The following restrictions at the end of section 3.7.3 do not apply michael@0: to S3TC DXT texture formats, since subimage modification is straightforward michael@0: as long as the subimage is properly aligned. michael@0: michael@0: Errors michael@0: michael@0: INVALID_OPERATION is generated by CompressedTexImage2D if michael@0: is one of the compressed internal formats from Table 3.x and any of the michael@0: following apply: michael@0: - is not equal to zero. michael@0: - is not one, two, or a multiple of four. michael@0: - is not one, two, or a multiple of four. michael@0: michael@0: INVALID_OPERATION is generated by TexImage2D and CopyTexImage2D if michael@0: is one of the compressed internal formats from michael@0: Table 3.x. michael@0: michael@0: INVALID_OPERATION is generated by TexSubImage2D and CopyTexSubImage2D michael@0: if the internal format of the texture currently bound to is michael@0: one of the compressed internal formats from Table 3.x. michael@0: michael@0: INVALID_OPERATION is generated by CompressedTexSubImage2D if michael@0: is one of the compressed interal formats from Table 3.x and any of the michael@0: following apply: michael@0: - is not a multiple of four or equal to TEXTURE_WIDTH; michael@0: - is not a multiple of four or equal to TEXTURE_HEIGHT; michael@0: - or is not a multiple of four; michael@0: - does not match the internal format of the texture image michael@0: being modified. michael@0: michael@0: New State michael@0: michael@0: None. michael@0: michael@0: Appendix: michael@0: michael@0: The format for the S3TC Compressed Texture Images Formats is documented michael@0: in the appendix of EXT_texture_compression_s3tc. michael@0: michael@0: Revision History michael@0: michael@0: Revision 1, 2010/08/06 - gman michael@0: - Initial revision michael@0: Revision 2, 2012/09/22 - dgkoch michael@0: - Added DXT1 formats and documented multiple of 4 restriction. michael@0: