3 CHROMIUM_copy_compressed_texture
7 GL_CHROMIUM_copy_compressed_texture
11 Last Modifed Date: August 5, 2015
15 OpenGL ES 2.0 is required.
17 GL_AMD_compressed_ATC_texture, GL_ATI_texture_compression_atitc,
18 GL_EXT_texture_compression_dxt1, GL_ANGLE_texture_compression_dxt5,
19 GL_EXT_texture_compression_s3tc and GL_OES_compressed_ETC1_RGB8_texture
20 affects the definition of this extension.
24 This extension provides functionality for copying compressed textures. It
25 adds a new function glCompressedCopyTextureCHROMIUM that works similarily
26 to glCopyTextureCHROMIUM, but for compressed textures.
28 Which compressed texture formats that this extension supports depends on
29 the supported texture compression formats of the host GPU.
33 glCompressedCopyTextureCHROMIUM will first try to copy into a compressed
34 texture of the same format as the source texture. If unsucessful, the
35 destination texture format will be changed to GL_RGBA and the texture will
36 be stored uncompressed.
38 New Procedures and Functions
42 void glCompressedCopyTextureCHROMIUM (GLenum target, GLenum source_id,
45 Copies the contents of a compressed texture referred to by <source_id> to
48 Texture level 0 is copied from the source image to level 0 of the
51 The internal format of the source texture must be one of the following
52 symbolic constants: GL_ATC_RGB_AMD, GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD,
53 GL_COMPRESSED_RGB_S3TC_DXT1_EXT, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT,
56 The destination texture will be created or replaced with the same internal
57 format as the source texture.
59 <target> uses the same parameters as TexImage2D.
61 INVALID_OPERATION is generated if internal format of source texture is not
62 one of the valid formats described above.
64 INVALID_OPERATION is generated if destination texture is immutable.
66 INVALID_VALUE is generated if <source_id> or <dest_id> are not valid texture
69 INVALID_VALUE is generated if textures corresponding to <dest_id> have not
70 been bound as GL_TEXTURE_2D object.
72 INVALID_VALUE is generated if level 0 of the source texture is not defined.
76 void glCompressedCopySubTextureCHROMIUM (GLenum target,
79 GLint xoffset, GLint yoffset,
81 GLsizei width, GLsizei height)
83 Copies the sub contents of texture referred to by <source_id> to <dest_id>
84 texture without redefining <dest_id> texture.
86 <target> uses the same parameters as TexImage2D.
88 <xoffset> and <yoffset> specify a texel offset in the x and y direction
89 respectively within the destination texture.
91 <x> and <y> specify a texel offset in the x and y direction respectively
92 within the source texture.
94 <width> specifies the width of the texture subimage.
96 <height> specifies the width of the texture subimage.
98 INVALID_OPERATION is generated if internal format of source texture is not
99 one of the following: GL_ATC_RGB_AMD, GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD,
100 GL_COMPRESSED_RGB_S3TC_DXT1_EXT, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT,
103 INVALID_VALUE is generated if <target> is not GL_TEXTURE_2D.
105 INVALID_OPERATION is generated if the destination texture has not been
108 INVALID_VALUE is generated if level 0 of the source texture or
109 the destination texture is not defined.
111 INVALID_VALUE is generated if <xoffset> < 0 , or <yoffset> < 0.
113 INVALID_VALUE is generated if (<xoffset> + <width>) > dest_width,
114 or (<yoffset> + <height>) > dest_height.
130 15/6/2015 Documented the extension.
131 5/8/2015 Added glCompressedCopySubTextureCHROMIUM.