Name

    CHROMIUM_unpremultiply_and_dither_copy

Name Strings

    GL_CHROMIUM_unpremultiply_and_dither_copy

Version

    Last Modifed Date: Feb 01, 2018

Dependencies

    OpenGL ES 2.0 or OpenGL ES 3.0 is required.

    EXT_texture_format_BGRA8888 affects the definition of this extension.

Overview

    This extension performs a copy from one texture to a second texture,
    unpremultiplying and dithering the texture in the process. Additionally,
    it allows a subrect to be specified for the copy.

    Both textures:
      - Must be the same size
      - Have the same subrect

    The source texture:
      - Must be RGBA. If EXT_texture_format_BGRA8888 or GLES3 is available,
        the texture may be BGRA
      - Will have data copied from level 0

    The dest texture:
      - Must be RGBA
      - Must have type GL_UNSIGNED_SHORT_4_4_4_4
      - Will have data copied to level 0

    In addition to the above, this extension inherits all source/dest
    limitations from CHROMIUM_copy_texture.

New Procedures and Functions

    void UnpremultiplyAndDitherCopyCHROMIUM(uint sourceId,
                                            uint destId,
                                            int x,
                                            int y,
                                            sizei width,
                                            sizei height)

Additions to the OpenGL ES 2.0 Specification

    The command

        UnpremultiplyAndDitherCopyCHROMIUM

    Copies the contents of level 0 of <sourceId> texture to level 0 and of
    <destId> texture, performing an unpremultiply and dither during the copy.

    <destId> must be initialized and have:
    - a target of TEXTURE_2D, TEXTURE_RECTANGLE_ARB.
    - a format of GL_RGBA, or GL_BGRA if EXT_texture_format_BGRA8888
      or GLES3 is available.
    - a data type of GL_UNSIGNED_SHORT_4_4_4_4.

    <sourceId> must be initialized and have:
    - a target of TEXTURE_2D, TEXTURE_RECTANGLE_ARB, TEXTURE_EXTERNAL_OES.
    - a format of GL_RGBA, or GL_BGRA if EXT_texture_format_BGRA8888
      or GLES3 is available.

    INVALID_OPERATION is generated if any of the above requirements is not met,
    or if the source / dest combination violates any requirements of
    CHROMIUM_copy_texture.

Errors

    None.

New Tokens

    None.

New State

    None.

Revision History

    02/01/2018    Documented the extension
