7 GL_CHROMIUM_copy_texture
11 Last Modifed Date: July 16, 2014
15 OpenGL ES 2.0 is required.
17 CHROMIUM_flipy affects the definition of this extension.
18 EXT_texture_format_BGRA8888 affects the definition of this extension.
22 This extension expands on the functionality provided by the
23 glCopyTexImage2D command. A new function is exported,
24 glCopyTextureCHROMIUM, that performs the same copy operation as
25 glCopyTexImage2D, while respecting the pixel-storage modifiers
26 UNPACK_FLIP_Y_CHROMIUM, GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM and
27 GL_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM.
29 If GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM and
30 GL_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM are enabled. Then no alpha
31 processing occurs. This is the equivalent of having neither flag set.
33 The extension also supports copying BGRA textures and copying
34 EXTERNAL_OES texture to BGRA texture, which is not explicitly
35 granted by EXT_texture_format_BGRA8888.
37 New Procedures and Functions
41 void glCopyTextureCHROMIUM (GLenum target, GLenum source_id,
43 GLint internal_format, GLenum dest_type)
45 Copies the contents of texture referred to by <source_id> to <dest_id>
46 texture. If <source_id> texture is not defined or has different dimension
47 to <dest_id> texture, define <source_id> texture same to <dest_id> texture.
49 Texture level 0 is copied from the source image to level 0 of the
52 The internal format of the destination texture is converted to that
53 specified by <internal_format>. Must be one of the following symbolic
54 constants: GL_RGB, GL_RGBA
55 The internal format of <source_id> texture must be one of the following
56 symbolic constants: GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_RGB,
58 When <source_id> texture doens't contain a superset of the component
59 required by <internal_format>, fill the components by following rules.
61 source format color components
62 =================================================
64 GL_LUMINANCE (L, L, L, 1)
65 GL_LUMINANCE_ALPHA (L, L, L, A)
68 GL_BGRA_EXT (R, G, B, A)
70 The format type of the destination texture is converted to that specified
73 <target> uses the same parameters as TexImage2D.
75 INVALID_OPERATION is generated if <internal_format> is not one of the valid formats
78 INVALID_OPERATION is generated if the internal format of <source_id> is not one of
79 formats from the table above.
81 INVALID_VALUE is generated if <target> is not GL_TEXTURE_2D.
83 INVALID_VALUE is generated if <source_id> or <dest_id> are not valid texture
86 INVALID_VALUE is generated if textures corresponding to <dest_id> have not
87 been bound as GL_TEXTURE_2D object.
89 INVALID_VALUE is generated if textures corresponding to <source_id> have not
90 been bound as GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE_ARB or
91 GL_TEXTURE_EXTERNAL_OES objects.
93 INVALID_VALUE is generated if level 0 of the source texture is not defined.
97 void glCopySubTextureCHROMIUM (GLenum target, GLenum source_id,
99 GLint xoffset, GLint yoffset)
101 Copies the sub contents of texture referred to by <source_id> to <dest_id>
102 texture without redefining <dest_id> texture.
104 See CopyTextureCHROMIUM for the interpretation of the <target> arguments.
106 <xoffset> and <yoffset> specify a texel offset in the x and y direction
107 respectively within the destination texture.
109 INVALID_OPERATION is generated if source internal_format and destination
110 internal_format are not one of the valid formats described above.
112 INVALID_VALUE is generated if <target> is not GL_TEXTURE_2D.
114 INVALID_OPERATION is generated if the destination texture has not been
117 INVALID_VALUE is generated if level 0 of the source texture or
118 the destination texture is not defined.
120 INVALID_VALUE is generated if <xoffset> < 0 , or <yoffset> < 0.
122 INVALID_VALUE is generated if (<xoffset> + source_width) > dest_width,
123 or (<yoffset> + source_height) > dest_height.
139 8/1/2011 Documented the extension
140 7/4/2013 Add a new parameter dest_type to glCopyTextureCHROMIUM()
141 16/7/2014 Add GL_TEXTURE_RECTANGLE_ARB as valid source_id target.