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
39 void glCopyTextureCHROMIUM (GLenum target, GLenum source_id,
40 GLenum dest_id, GLint level,
41 GLint internal_format, GLenum dest_type)
43 Copies the contents of texture referred to by <source_id> to texture
46 Texture level 0 is copied from the source image to level <level> of the
47 destination texture. The level parameter must be 0 at present.
49 The internal format of the destination texture is converted to that
50 specified by <internal_format>. Must be one of the following symbolic
51 constants: GL_RGB, GL_RGBA
52 The internal format of <source_id> texture must be one of the following
53 symbolic constants: GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_RGB,
55 When <source_id> texture doens't contain a superset of the component
56 required by <internal_format>, fill the components by following rules.
58 source format color components
59 =================================================
61 GL_LUMINANCE (L, L, L, 1)
62 GL_LUMINANCE_ALPHA (L, L, L, A)
65 GL_BGRA_EXT (R, G, B, A)
67 The format type of the destination texture is converted to that specified
70 <target> uses the same parameters as TexImage2D.
72 INVALID_OPERATION is generated if <internal_format> is not one of the valid formats
75 INVALID_OPERATION is generated if the internal format of <source_id> is not one of
76 formats from the table above.
78 INVALID_VALUE is generated if <target> is not GL_TEXTURE_2D.
80 INVALID_VALUE is generated if <source_id> or <dest_id> are not valid texture
83 INVALID_VALUE is generated if textures corresponding to <dest_id> have not
84 been bound as GL_TEXTURE_2D object.
86 INVALID_VALUE is generated if textures corresponding to <source_id> have not
87 been bound as GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE_ARB or
88 GL_TEXTURE_EXTERNAL_OES objects.
90 INVALID_VALUE is generated if <level> is not a valid level of the
91 destination texture, or if level 0 of the source texture is not defined.
107 8/1/2011 Documented the extension
108 7/4/2013 Add a new parameter dest_type to glCopyTextureCHROMIUM()
109 16/7/2014 Add GL_TEXTURE_RECTANGLE_ARB as valid source_id target.