gman@chromium.org | 055e76e | 2011-08-10 05:19:44 +0000 | [diff] [blame] | 1 | Name |
| 2 | |
| 3 | ANGLE_texture_compression_dxt |
| 4 | |
| 5 | Name Strings |
| 6 | |
daniel@transgaming.com | 962b26f | 2013-02-01 06:36:07 +0000 | [diff] [blame] | 7 | GL_ANGLE_texture_compression_dxt1 |
gman@chromium.org | 055e76e | 2011-08-10 05:19:44 +0000 | [diff] [blame] | 8 | GL_ANGLE_texture_compression_dxt3 |
| 9 | GL_ANGLE_texture_compression_dxt5 |
| 10 | |
| 11 | Contributors |
| 12 | |
| 13 | Gregg Tavares, Google Inc. |
| 14 | Daniel Koch, TransGaming Inc. |
| 15 | Al Patrick, Google Inc. |
| 16 | |
| 17 | Contacts |
| 18 | |
| 19 | Gregg Tavares, Google Inc. (gman 'at' google 'dot' com) |
| 20 | |
| 21 | Status |
| 22 | |
| 23 | Implemented in ANGLE ES2 |
| 24 | |
| 25 | Version |
| 26 | |
daniel@transgaming.com | 962b26f | 2013-02-01 06:36:07 +0000 | [diff] [blame] | 27 | Last Modified Date: Sept 22, 2012 |
| 28 | Author Revision: 2 |
gman@chromium.org | 055e76e | 2011-08-10 05:19:44 +0000 | [diff] [blame] | 29 | |
| 30 | Number |
| 31 | |
daniel@transgaming.com | 962b26f | 2013-02-01 06:36:07 +0000 | [diff] [blame] | 32 | OpenGL ES Extension #111 |
gman@chromium.org | 055e76e | 2011-08-10 05:19:44 +0000 | [diff] [blame] | 33 | |
| 34 | Dependencies |
| 35 | |
daniel@transgaming.com | 962b26f | 2013-02-01 06:36:07 +0000 | [diff] [blame] | 36 | Requires OpenGL ES 1.0. |
gman@chromium.org | 055e76e | 2011-08-10 05:19:44 +0000 | [diff] [blame] | 37 | |
| 38 | The extension is written against the OpenGL ES 2.0 specification. |
| 39 | |
| 40 | Overview |
| 41 | |
| 42 | These extensions are exactly the same as EXT_texture_compression_dxt1 |
daniel@transgaming.com | 962b26f | 2013-02-01 06:36:07 +0000 | [diff] [blame] | 43 | except they additionally expose the COMPRESSED_RGBA_S3TC_DXT3_ANGLE and |
| 44 | COMPRESSED_RGBA_S3TC_DXT5_ANGLE formats and have a size restrictions |
| 45 | such that the size must be a multiple of four (except for mip levels |
| 46 | where the dimensions are either 2 or 1). |
gman@chromium.org | 055e76e | 2011-08-10 05:19:44 +0000 | [diff] [blame] | 47 | |
| 48 | See EXT_texture_compression_dxt1 for the full list of changes. Also |
| 49 | see EXT_texture_compression_s3tc for a description of the formats. |
| 50 | |
daniel@transgaming.com | 962b26f | 2013-02-01 06:36:07 +0000 | [diff] [blame] | 51 | IP Status |
| 52 | |
| 53 | A license to the S3TC Intellectual Property may be necessary for |
| 54 | implementation of this extension. You should consult with your |
| 55 | Attorney to determine the need for a license. |
| 56 | |
gman@chromium.org | 055e76e | 2011-08-10 05:19:44 +0000 | [diff] [blame] | 57 | New Procedures and Functions |
| 58 | |
| 59 | None. |
| 60 | |
| 61 | New Types |
| 62 | |
| 63 | None. |
| 64 | |
| 65 | New Tokens |
| 66 | |
| 67 | Accepted by the <internalformat> parameter of CompressedTexImage2D |
| 68 | and the <format> parameter of CompressedTexSubImage2D: |
| 69 | |
daniel@transgaming.com | 962b26f | 2013-02-01 06:36:07 +0000 | [diff] [blame] | 70 | COMPRESSED_RGB_S3TC_DXT1_ANGLE 0x83F0 |
| 71 | COMPRESSED_RGBA_S3TC_DXT1_ANGLE 0x83F1 |
gman@chromium.org | 055e76e | 2011-08-10 05:19:44 +0000 | [diff] [blame] | 72 | COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2 |
| 73 | COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3 |
| 74 | |
daniel@transgaming.com | 962b26f | 2013-02-01 06:36:07 +0000 | [diff] [blame] | 75 | Additions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization) |
| 76 | |
| 77 | Add the following to Section 3.7.3 (Compressed Texture Images) |
| 78 | (at the end of the description of the CompressedTexImage2D command): |
| 79 | |
| 80 | Compressed Internal Format Base Internal Format |
| 81 | ========================== ==================== |
| 82 | COMPRESSED_RGB_S3TC_DXT1_ANGLE RGB |
| 83 | COMPRESSED_RGBA_S3TC_DXT1_ANGLE RGBA |
| 84 | COMPRESSED_RGBA_S3TC_DXT3_ANGLE RGBA |
| 85 | COMPRESSED_RGBA_S3TC_DXT5_ANGLE RGBA |
| 86 | |
| 87 | Table 3.x: Specific Compressed Internal Formats |
| 88 | |
| 89 | If <internalformat> is one of the S3TC formats listed in Table 3.x, |
| 90 | the compressed texture is stored in the appropriate S3TC compressed |
| 91 | texture format (see Appendix). The GL and the S3TC texture compression |
| 92 | algorithm support only 2D images without borders. |
| 93 | |
| 94 | CompressedTexImage2D will produce the INVALID_OPERATION error when |
| 95 | <internalformat> is one of the values from Table 3.x under the following |
| 96 | conditions: |
| 97 | |
| 98 | * <border> is non-zero. |
| 99 | * <width> is not one, two, or a multiple of four. |
| 100 | * <height> is not one, two, or a multiple of four. |
| 101 | |
| 102 | Add the following to Section 3.7.3 (Compressed Texture Images) |
| 103 | (at the end of the description of the CompressedTexSubImage2D command): |
| 104 | |
| 105 | If the internal format of the texture image being modified is listed |
| 106 | in Table 3.x, the texture is stored in the appropriate S3TC compressed |
| 107 | texture format (see Appendix). Since DXT/S3TC images are easily edited |
| 108 | along 4x4 texel boundaries, the limitations of CompressedTexSubImage2D |
| 109 | are relaxed. CompressedTexSubImage2D will result in an INVALID_OPERATION |
| 110 | error only if one of the following conditions occurs: |
| 111 | |
| 112 | * <width> is not a multiple of four or equal to TEXTURE_WIDTH. |
| 113 | * <height> is not a multipls of four or equal to TEXTURE_HEIGHT. |
| 114 | * <xoffset> or <yoffset> is not a multiple of four. |
| 115 | * <format> does not match the internal format of the texture image |
| 116 | being modified. |
| 117 | |
| 118 | The following restrictions at the end of section 3.7.3 do not apply |
| 119 | to S3TC DXT texture formats, since subimage modification is straightforward |
| 120 | as long as the subimage is properly aligned. |
| 121 | |
gman@chromium.org | 055e76e | 2011-08-10 05:19:44 +0000 | [diff] [blame] | 122 | Errors |
| 123 | |
daniel@transgaming.com | 962b26f | 2013-02-01 06:36:07 +0000 | [diff] [blame] | 124 | INVALID_OPERATION is generated by CompressedTexImage2D if <internalformat> |
| 125 | is one of the compressed internal formats from Table 3.x and any of the |
| 126 | following apply: |
| 127 | - <border> is not equal to zero. |
| 128 | - <width> is not one, two, or a multiple of four. |
| 129 | - <height> is not one, two, or a multiple of four. |
| 130 | |
| 131 | INVALID_OPERATION is generated by TexImage2D and CopyTexImage2D if |
| 132 | <internalformat> is one of the compressed internal formats from |
| 133 | Table 3.x. |
| 134 | |
| 135 | INVALID_OPERATION is generated by TexSubImage2D and CopyTexSubImage2D |
| 136 | if the internal format of the texture currently bound to <target> is |
| 137 | one of the compressed internal formats from Table 3.x. |
| 138 | |
| 139 | INVALID_OPERATION is generated by CompressedTexSubImage2D if <format> |
| 140 | is one of the compressed interal formats from Table 3.x and any of the |
| 141 | following apply: |
| 142 | - <width> is not a multiple of four or equal to TEXTURE_WIDTH; |
| 143 | - <height> is not a multiple of four or equal to TEXTURE_HEIGHT; |
| 144 | - <xoffset> or <yoffset> is not a multiple of four; |
| 145 | - <format> does not match the internal format of the texture image |
| 146 | being modified. |
gman@chromium.org | 055e76e | 2011-08-10 05:19:44 +0000 | [diff] [blame] | 147 | |
| 148 | New State |
| 149 | |
| 150 | None. |
| 151 | |
daniel@transgaming.com | 962b26f | 2013-02-01 06:36:07 +0000 | [diff] [blame] | 152 | Appendix: |
| 153 | |
| 154 | The format for the S3TC Compressed Texture Images Formats is documented |
| 155 | in the appendix of EXT_texture_compression_s3tc. |
| 156 | |
gman@chromium.org | 055e76e | 2011-08-10 05:19:44 +0000 | [diff] [blame] | 157 | Revision History |
| 158 | |
daniel@transgaming.com | 962b26f | 2013-02-01 06:36:07 +0000 | [diff] [blame] | 159 | Revision 1, 2010/08/06 - gman |
| 160 | - Initial revision |
| 161 | Revision 2, 2012/09/22 - dgkoch |
| 162 | - Added DXT1 formats and documented multiple of 4 restriction. |
gman@chromium.org | 055e76e | 2011-08-10 05:19:44 +0000 | [diff] [blame] | 163 | |