Home | History | Annotate | Download | only in CHROMIUM
      1 Name
      2 
      3     CHROMIUM_copy_texture
      4 
      5 Name Strings
      6 
      7     GL_CHROMIUM_copy_texture
      8 
      9 Version
     10 
     11     Last Modifed Date: July 16, 2014
     12 
     13 Dependencies
     14 
     15     OpenGL ES 2.0 is required.
     16 
     17     CHROMIUM_flipy affects the definition of this extension.
     18     EXT_texture_format_BGRA8888 affects the definition of this extension.
     19 
     20 Overview
     21 
     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.
     28 
     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.
     32 
     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.
     36 
     37 New Procedures and Functions
     38 
     39     void glCopyTextureCHROMIUM (GLenum target, GLenum source_id,
     40                                 GLenum dest_id, GLint level,
     41                                 GLint internal_format, GLenum dest_type)
     42 
     43     Copies the contents of texture referred to by <source_id> to texture
     44     <dest_id>.
     45 
     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.
     48 
     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,
     54     GL_RGBA, GL_BGRA_EXT
     55     When <source_id> texture doens't contain a superset of the component
     56     required by <internal_format>, fill the components by following rules.
     57 
     58                    source format          color components
     59              =================================================
     60                    GL_ALPHA               (0, 0, 0, A)
     61                    GL_LUMINANCE           (L, L, L, 1)
     62                    GL_LUMINANCE_ALPHA     (L, L, L, A)
     63                    GL_RGB                 (R, G, B, 1)
     64                    GL_RGBA                (R, G, B, A)
     65                    GL_BGRA_EXT            (R, G, B, A)
     66 
     67     The format type of the destination texture is converted to that specified
     68     by <dest_type>.
     69 
     70     <target> uses the same parameters as TexImage2D.
     71 
     72     INVALID_OPERATION is generated if <internal_format> is not one of the valid formats
     73     described above.
     74 
     75     INVALID_OPERATION is generated if the internal format of <source_id> is not one of
     76     formats from the table above.
     77 
     78     INVALID_VALUE is generated if <target> is not GL_TEXTURE_2D.
     79 
     80     INVALID_VALUE is generated if <source_id> or <dest_id> are not valid texture
     81     objects.
     82 
     83     INVALID_VALUE is generated if textures corresponding to <dest_id> have not
     84     been bound as GL_TEXTURE_2D object.
     85 
     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.
     89 
     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.
     92 
     93 Errors
     94 
     95     None.
     96 
     97 New Tokens
     98 
     99     None.
    100 
    101 New State
    102 
    103     None.
    104 
    105 Revision History
    106 
    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.
    110