| OLD | NEW |
| 1 Name | 1 Name |
| 2 | 2 |
| 3 CHROMIUM_copy_texture | 3 CHROMIUM_copy_texture |
| 4 | 4 |
| 5 Name Strings | 5 Name Strings |
| 6 | 6 |
| 7 GL_CHROMIUM_copy_texture | 7 GL_CHROMIUM_copy_texture |
| 8 | 8 |
| 9 Version | 9 Version |
| 10 | 10 |
| 11 Last Modifed Date: July 16, 2014 | 11 Last Modifed Date: March 24, 2017 |
| 12 | 12 |
| 13 Dependencies | 13 Dependencies |
| 14 | 14 |
| 15 OpenGL ES 2.0 or OpenGL ES 3.0 is required. | 15 OpenGL ES 2.0 or OpenGL ES 3.0 is required. |
| 16 | 16 |
| 17 EXT_texture_format_BGRA8888 affects the definition of this extension. | 17 EXT_texture_format_BGRA8888 affects the definition of this extension. |
| 18 ARB_texture_rg affects the definition of this extension. | 18 ARB_texture_rg affects the definition of this extension. |
| 19 CHROMIUM_ycbcr_422_image affects the definition of this extension. | 19 CHROMIUM_ycbcr_422_image affects the definition of this extension. |
| 20 | 20 |
| 21 Overview | 21 Overview |
| 22 | 22 |
| 23 This extension expands on the functionality provided by the | 23 This extension expands on the functionality provided by the |
| 24 glCopyTexImage2D command. A new function is exported, | 24 glCopyTexImage2D command. A new function is exported, |
| 25 glCopyTextureCHROMIUM, that performs the same copy operation as | 25 glCopyTextureCHROMIUM, that performs the same copy operation as |
| 26 glCopyTexImage2D. | 26 glCopyTexImage2D. |
| 27 | 27 |
| 28 The extension also supports copying BGRA textures and copying | 28 The extension also supports copying BGRA textures and copying |
| 29 EXTERNAL_OES texture to BGRA texture, which is not explicitly | 29 EXTERNAL_OES texture to BGRA texture, which is not explicitly |
| 30 granted by EXT_texture_format_BGRA8888. | 30 granted by EXT_texture_format_BGRA8888. |
| 31 | 31 |
| 32 New Procedures and Functions | 32 New Procedures and Functions |
| 33 | 33 |
| 34 void CopyTextureCHROMIUM(uint sourceId, |
| 35 int sourceLevel, |
| 36 enum destTarget, |
| 37 uint destId, |
| 38 int destLevel, |
| 39 int internalFormat, |
| 40 enum destType, |
| 41 boolean unpackFlipY, |
| 42 boolean unpackPremultiplyAlpha, |
| 43 boolean unpackUnmultiplyAlpha) |
| 44 |
| 45 |
| 46 void CopySubTextureCHROMIUM(uint sourceId, |
| 47 int sourceLevel, |
| 48 enum destTarget, |
| 49 uint destId, |
| 50 int destLevel, |
| 51 int xoffset, |
| 52 int yoffset, |
| 53 int x, |
| 54 int y, |
| 55 sizei width, |
| 56 sizei height, |
| 57 boolean unpackFlipY, |
| 58 boolean unpackPremultiplyAlpha, |
| 59 boolean unpackUnmultiplyAlpha) |
| 60 |
| 61 Additions to the OpenGL ES 2.0 Specification |
| 62 |
| 34 The command | 63 The command |
| 35 | 64 |
| 36 void glCopyTextureCHROMIUM (GLenum source_id, | 65 CopyTextureCHROMIUM |
| 37 GLint source_level, | |
| 38 GLenum dest_target, | |
| 39 GLenum dest_id, | |
| 40 GLint dest_level, | |
| 41 GLint internal_format, GLenum dest_type, | |
| 42 GLboolean unpack_flip_y, | |
| 43 GLboolean unpack_premultiply_alpha, | |
| 44 GLboolean unpack_unmultiply_alpha) | |
| 45 | 66 |
| 46 Copies the contents of <source_id> texture to <dest_id> texture. | 67 Copies the contents of <sourceLevel> level of <sourceId> texture to |
| 68 <destLevel> level and <destTarget> target of <destId> texture. |
| 47 | 69 |
| 48 <source_level> specifies the level of the source texture which is copied | 70 <destTarget> must be TEXTURE_2D, |
| 49 from. | 71 TEXTURE_CUBE_MAP_POSITIVE_X, TEXTURE_CUBE_MAP_NEGATIVE_X, |
| 50 <dest_level> specifies the level of the destination texture which is copied | 72 TEXTURE_CUBE_MAP_POSITIVE_Y, TEXTURE_CUBE_MAP_NEGATIVE_Y, |
| 51 to. | 73 TEXTURE_CUBE_MAP_POSITIVE_Z, TEXTURE_CUBE_MAP_NEGATIVE_Z, |
| 52 | 74 TEXTURE_RECTANGLE_ARB. |
| 53 <dest_target> specifies the target of destination texture. Must be | |
| 54 GL_TEXTURE_2D, | |
| 55 GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X, | |
| 56 GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, | |
| 57 GL_TEXTURE_CUBE_MAP_POSITIVE_Z, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, | |
| 58 GL_TEXTURE_RECTANGLE_ARB. | |
| 59 | 75 |
| 60 The internal format of the destination texture is converted to that | 76 The internal format of the destination texture is converted to that |
| 61 specified by <internal_format>. Must be one of the following symbolic | 77 specified by <internalFormat>. |
| 62 constants: GL_RGB, GL_RGBA, GL_RGB8, GL_RGBA8, GL_BGRA_EXT, GL_BGRA8_EXT, | 78 |
| 63 GL_SRGB_EXT, GL_SRGB_ALPHA_EXT, GL_R8, GL_R8UI, GL_RG8, GL_RG8UI, GL_SRGB8, | |
| 64 GL_RGB565, GL_RGB8UI, GL_SRGB8_ALPHA8, GL_RGB5_A1, GL_RGBA4, GL_RGBA4, | |
| 65 GL_RGBA8UI, GL_RGB9_E5, GL_R16F, GL_R32F, GL_RG16F, GL_RG32F, GL_RGB16F, | |
| 66 GL_RGB32F, GL_RGBA16F, GL_RGBA32F, GL_R11F_G11F_B10F. | |
| 67 The internal format of source texture must be one of the following | |
| 68 symbolic constants: GL_RED, GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA, | |
| 69 GL_RGB, GL_RGBA, GL_RGB8, GL_RGBA8, GL_BGRA_EXT, GL_BGRA8_EXT, | |
| 70 GL_RGB_YCBCR_420V_CHROMIUM, GL_RGB_YCBCR_422_CHROMIUM. | |
| 71 When source texture doens't contain a superset of the component | 79 When source texture doens't contain a superset of the component |
| 72 required by <internal_format>, fill the components by following rules. | 80 required by <internalFormat>, fill the components by following rules. |
| 73 | 81 |
| 74 source format color components | 82 source format color components |
| 75 ===================================================== | 83 ---------------------------------------- |
| 76 GL_ALPHA (0, 0, 0, A) | 84 ALPHA (0, 0, 0, A) |
| 77 GL_RED (R, 0, 0, 1) | 85 RED (R, 0, 0, 1) |
| 78 GL_LUMINANCE (L, L, L, 1) | 86 LUMINANCE (L, L, L, 1) |
| 79 GL_LUMINANCE_ALPHA (L, L, L, A) | 87 LUMINANCE_ALPHA (L, L, L, A) |
| 80 GL_RGB (R, G, B, 1) | 88 RGB (R, G, B, 1) |
| 81 GL_RGB8 (R, G, B, 1) | 89 RGB8 (R, G, B, 1) |
| 82 GL_RGBA (R, G, B, A) | 90 RGBA (R, G, B, A) |
| 83 GL_RGBA8 (R, G, B, A) | 91 RGBA8 (R, G, B, A) |
| 84 GL_BGRA_EXT (R, G, B, A) | 92 BGRA_EXT (R, G, B, A) |
| 85 GL_BGRA8_EXT (R, G, B, A) | 93 BGRA8_EXT (R, G, B, A) |
| 86 GL_RGB_YCBCR_420V_CHROMIUM (R, G, B, 1) | 94 RGB_YCBCR_420V_CHROMIUM (R, G, B, 1) |
| 87 GL_RGB_YCBCR_422_CHROMIUM (R, G, B, 1) | 95 RGB_YCBCR_422_CHROMIUM (R, G, B, 1) |
| 88 | 96 |
| 89 The format type of the destination texture is converted to that specified | 97 The format type of the destination texture is converted to that specified |
| 90 by <dest_type>. | 98 by <destType>. |
| 91 | 99 |
| 92 If <flip_y> is true, vertically flip texture image data. | 100 If <flipY> is true, vertically flip texture image data. |
| 93 | 101 |
| 94 If <unpack_premultiply_alpha> and <unpack_unmultiply_alpha> are true, | 102 If <unpackPremultiplyAlpha> and <unpackUnmultiplyAlpha> are true, |
| 95 no alpha processing occurs. This is the equivalent of having neither flag | 103 no alpha processing occurs. This is the equivalent of having neither flag |
| 96 set. | 104 set. |
| 97 | 105 |
| 98 When <source_id> refers to a stream texture, the texture matrix will be | 106 When <sourceId> refers to a stream texture, the texture matrix will be |
| 99 applied as part of the copy operation. | 107 applied as part of the copy operation. |
| 100 | 108 |
| 101 INVALID_OPERATION is generated if <internal_format> is not one of the valid | 109 INVALID_OPERATION is generated if <internalFormat> is not one of the |
| 102 formats described above. | 110 formats in Table 1.0. |
| 103 | 111 |
| 104 INVALID_OPERATION is generated if the internal format of <source_id> is not | 112 INVALID_OPERATION is generated if the internal format of <sourceId> is not |
| 105 one of formats from the table above. | 113 one of formats in Table 1.1. |
| 106 | 114 |
| 107 INVALID_VALUE is generated if <source_id> or <dest_id> are not valid texture | 115 INVALID_VALUE is generated if <sourceId> or <destId> are not valid texture |
| 108 objects. | 116 objects. |
| 109 | 117 |
| 110 INVALID_ENUM is generated if <dest_target> is not one of the valid targets | 118 INVALID_ENUM is generated if <destTarget> is not one of the valid targets |
| 111 described above. | 119 described above. |
| 112 | 120 |
| 113 INVALID_OPERATION is generated if the bound target of destination texture | 121 INVALID_OPERATION is generated if the bound target of destination texture |
| 114 does not match <target>. | 122 does not match <target>. |
| 115 | 123 |
| 116 INVALID_VALUE is generated if textures corresponding to <dest_id> have not | 124 INVALID_VALUE is generated if textures corresponding to <destId> have not |
| 117 been bound as GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP, or | 125 been bound as TEXTURE_2D, TEXTURE_CUBE_MAP, or |
| 118 GL_TEXTURE_RECTANGLE_ARB objects. | 126 TEXTURE_RECTANGLE_ARB objects. |
| 119 | 127 |
| 120 INVALID_VALUE is generated if textures corresponding to <source_id> have not | 128 INVALID_VALUE is generated if textures corresponding to <sourceId> have not |
| 121 been bound as GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE_ARB or | 129 been bound as TEXTURE_2D, TEXTURE_RECTANGLE_ARB or |
| 122 GL_TEXTURE_EXTERNAL_OES objects. | 130 TEXTURE_EXTERNAL_OES objects. |
| 123 | 131 |
| 124 INVALID_VALUE is generated if <source_level> is not 0 for ES 2.0, or if | 132 INVALID_VALUE is generated if <sourceLevel> is not 0 for ES 2.0, or if |
| 125 <source_level> or <dest_level> is less than 0 for ES 3.0. | 133 <sourceLevel> or <destLevel> is less than 0 for ES 3.0. |
| 126 | 134 |
| 127 INVALID_VALUE is generated if <source_level> of the source texture is not | 135 INVALID_VALUE is generated if <sourceLevel> of the source texture is not |
| 128 defined. | 136 defined. |
| 129 | 137 |
| 130 The command | 138 The command |
| 131 | 139 |
| 132 void glCopySubTextureCHROMIUM (GLenum source_id, | 140 CopySubTextureCHROMIUM |
| 133 GLint source_level, | |
| 134 GLenum dest_target, | |
| 135 GLenum dest_id, | |
| 136 GLint dest_level, | |
| 137 GLint xoffset, GLint yoffset, | |
| 138 GLint x, GLint y, | |
| 139 GLsizei width, GLsizei height, | |
| 140 GLboolean unpack_flip_y, | |
| 141 GLboolean unpack_premultiply_alpha, | |
| 142 GLboolean unpack_unmultiply_alpha) | |
| 143 | 141 |
| 144 Copies the sub contents of texture referred to by <source_id> to <dest_id> | 142 Copies the sub contents of texture referred to by <sourceId> to <destId> |
| 145 texture without redefining <dest_id> texture. | 143 texture without redefining <destId> texture. |
| 146 | 144 |
| 147 See CopyTextureCHROMIUM for the interpretation of the <dest_target>, | 145 See CopyTextureCHROMIUM for the interpretation of the <destTarget>, |
| 148 <source_level>, <dest_level>, <flip_y>, <premultiply_alpha>, and | 146 <sourceLevel>, <destLevel>, <flipY>, <premultiplyAlpha>, and |
| 149 <unmultiply_alpha> arguments. | 147 <unmultiplyAlpha> arguments. |
| 150 | 148 |
| 151 <xoffset> and <yoffset> specify a texel offset in the x and y direction | 149 <xoffset> and <yoffset> specify a texel offset in the x and y direction |
| 152 respectively within the destination texture. | 150 respectively within the destination texture. |
| 153 | 151 |
| 154 <x> and <y> specify specify a texel offset in the x and y direction | 152 <x> and <y> specify specify a texel offset in the x and y direction |
| 155 respectively within the source texture. | 153 respectively within the source texture. |
| 156 | 154 |
| 157 <width> specifies the width of the texture subimage. | 155 <width> specifies the width of the texture subimage. |
| 158 | 156 |
| 159 <height> specifies the width of the texture subimage. | 157 <height> specifies the width of the texture subimage. |
| 160 | 158 |
| 161 INVALID_VALUE is generated if either <source_id> texture or <dest_id> | 159 INVALID_VALUE is generated if either <sourceId> texture or <destId> |
| 162 texture is not defined. | 160 texture is not defined. |
| 163 | 161 |
| 164 INVALID_OPERATION is generated if source internal_format and destination | 162 INVALID_OPERATION is generated if the internal format of <sourceId> or |
| 165 internal_format are not one of the valid formats described above. | 163 <destId> is not one of formats in Table 1.1. |
| 166 | 164 |
| 167 INVALID_OPERATION is generated if the destination texture array has not | 165 INVALID_OPERATION is generated if the destination texture array has not |
| 168 been defined. | 166 been defined. |
| 169 | 167 |
| 170 INVALID_VALUE is generated if <dest_id> texture is not bound as | 168 INVALID_VALUE is generated if <destId> texture is not bound as |
| 171 GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE_ARB. | 169 TEXTURE_2D or TEXTURE_RECTANGLE_ARB. |
| 172 | 170 |
| 173 INVALID_VALUE is generated if level 0 of the source texture or | 171 INVALID_VALUE is generated if level 0 of the source texture or |
| 174 the destination texture is not defined. | 172 the destination texture is not defined. |
| 175 | 173 |
| 176 INVALID_VALUE is generated if <xoffset> < 0 , or <yoffset> < 0. | 174 INVALID_VALUE is generated if (<xoffset> + <width>) > destWidth, |
| 175 or (<yoffset> + <height>) > destHeight. |
| 177 | 176 |
| 178 INVALID_VALUE is generated if (<xoffset> + <width>) > dest_width, | 177 Table 1.0 Valid internal formats for CopyTextureCHROMIUM: |
| 179 or (<yoffset> + <height>) > dest_height. | 178 |
| 179 <internalFormat> |
| 180 --------------- |
| 181 RGB |
| 182 RGBA |
| 183 RGB8 |
| 184 RGBA8 |
| 185 BGRA_EXT |
| 186 BGRA8_EXT, |
| 187 SRGB_EXT |
| 188 SRGB_ALPHA_EXT |
| 189 R8 |
| 190 R8UI |
| 191 RG8 |
| 192 RG8UI |
| 193 SRGB8 |
| 194 RGB565 |
| 195 RGB8UI |
| 196 SRGB8_ALPHA8 |
| 197 RGB5_A1 |
| 198 RGBA4 |
| 199 RGBA4 |
| 200 RGBA8UI |
| 201 RGB9_E5 |
| 202 R16F |
| 203 R32F |
| 204 RG16F |
| 205 RG32F |
| 206 RGB16F |
| 207 RGB32F |
| 208 RGBA16F |
| 209 RGBA32F |
| 210 R11F_G11F_B10F |
| 211 |
| 212 Table 1.1 Valid source texture internal formats for CopyTextureCHROMIUM and |
| 213 source and destination formats for CopySubTextureCHROMIUM: |
| 214 |
| 215 internal format |
| 216 --------------- |
| 217 RED |
| 218 ALPHA |
| 219 LUMINANCE |
| 220 LUMINANCE_ALPHA |
| 221 RGB |
| 222 RGBA |
| 223 RGB8 |
| 224 RGBA8 |
| 225 BGRA_EXT |
| 226 BGRA8_EXT |
| 227 RGB_YCBCR_420V_CHROMIUM |
| 228 RGB_YCBCR_422_CHROMIUM. |
| 180 | 229 |
| 181 Dependencies on ARB_texture_rg | 230 Dependencies on ARB_texture_rg |
| 182 | 231 |
| 183 If ARB_texture_rg is not supported: | 232 If ARB_texture_rg is not supported: |
| 184 * delete any reference to the R8 format. | 233 * delete any reference to the R8 format. |
| 185 | 234 |
| 186 Dependencies on CHROMIUM_ycbcr_422_image | 235 Dependencies on CHROMIUM_ycbcr_422_image |
| 187 | 236 |
| 188 If CHROMIUM_ycbcr_422_image is not supported: | 237 If CHROMIUM_ycbcr_422_image is not supported: |
| 189 * delete any reference to the RGB_YCBCR_422_CHROMIUM format. | 238 * delete any reference to the RGB_YCBCR_422_CHROMIUM format. |
| 190 | 239 |
| 191 Errors | 240 Errors |
| 192 | 241 |
| 193 None. | 242 None. |
| 194 | 243 |
| 195 New Tokens | 244 New Tokens |
| 196 | 245 |
| 197 None. | 246 None. |
| 198 | 247 |
| 199 New State | 248 New State |
| 200 | 249 |
| 201 None. | 250 None. |
| 202 | 251 |
| 203 Revision History | 252 Revision History |
| 204 | 253 |
| 205 8/1/2011 Documented the extension | 254 8/1/2011 Documented the extension |
| 206 7/4/2013 Add a new parameter dest_type to glCopyTextureCHROMIUM() | 255 7/4/2013 Add a new parameter dest_type to glCopyTextureCHROMIUM() |
| 207 16/7/2014 Add GL_TEXTURE_RECTANGLE_ARB as valid source_id target | 256 16/7/2014 Add TEXTURE_RECTANGLE_ARB as valid source_id target |
| 208 19/6/2015 Add arguments unpack_flip_y, unpack_premultiply_alpha, and | 257 19/6/2015 Add arguments unpack_flip_y, unpack_premultiply_alpha, and |
| 209 unpack_unmultiply_alpha to both commands. | 258 unpack_unmultiply_alpha to both commands. |
| 210 4/1/2016 Removed the argument target. | 259 4/1/2016 Removed the argument target. |
| 211 4/1/2016 Added GL_TEXTURE_RECTANGLE_ARB as valid dest_id target. | 260 4/1/2016 Added TEXTURE_RECTANGLE_ARB as valid dest_id target. |
| 212 19/12/2016 Supported more ES 3.0 formats. | 261 19/12/2016 Supported more ES 3.0 formats. |
| 213 18/1/2017 Supported source_level and dest_level. | 262 18/1/2017 Supported source_level and dest_level. |
| 214 19/1/2017 Added GL_TEXTURE_CUBE_MAP as valid dest_id target. | 263 19/1/2017 Added TEXTURE_CUBE_MAP as valid dest_id target. |
| 264 24/3/2017 Clean up naming and move formats into tables. |
| OLD | NEW |