Name CHROMIUM_shared_image Name Strings GL_CHROMIUM_shared_image Version Last Modified Date: Oct 15, 2018 Dependencies OpenGL ES 2.0 is required. CHROMIUM_texture_mailbox is required. Overview This extensions defines a way of importing into GL texture image data produced externally to GL via Chromium's SharedImage system. New Procedures and Functions The command GLuint glTexImage2DSharedImageCHROMIUM (GLunit texture, const GLbyte *mailbox) takes two arguments: texture - A client-side texture. mailbox - the mailbox referring to the SharedImage to assign to the first level of the texture. This function maps `texture` to the texture object of the SharedImage represented by the mailbox and ensures that if `texture` is bound to a target, the service-side texture gets bound to that target. On success, this function extends the lifetime of the SharedImage referenced by mailbox by taking a ref. The texture object is deleted and the ref released once the calling context deletes the texture name associated with the texture object, and detaches it from all framebuffer objects as well as texture unit bindings. INVALID_OPERATION is generated if is not associated with a texture object. In this case `texture` becomes unbound. It is treated in the same way as a new texture name returned by GenTextures. The command GLuint glCreateAndTexStorage2DSharedImageCHROMIUM (const GLbyte *mailbox) takes one argument: mailbox - the mailbox referring to the SharedImage to assign to the first level of the mailbox. Logically, this function does three things: 1) Creates a texture name and returns it to the caller. 2) Creates a texture object for the name. 3) Assigns the SharedImage represented by mailbox to the first level of the texture object. Note that the texture created by this function is immutable. On success, this function extends the lifetime of the SharedImage referenced by mailbox by taking a ref. The texture object is deleted and the ref released once the calling context delete the texture name associated with the texture object, and detaches it from all framebuffer objects as well as texture unit bindings. Does not alter the texture bindings or alter the currently bound texture in any way. INVALID_OPERATION is generated if is not associated with a texture object. In this case the new texture name remains unbound. It is treated in the same way as a new texture name returned by GenTextures. The command void glBeginSharedImageAccessDirectCHROMIUM (GLuint texture, GLenum mode) takes two arguments: texture - the texture id for which to begin a shared image access scope. mode - the access mode with which to begin access. This function indicates that the calling context will access the SharedImage bound to until glEndSharedImageAccessDirectCHROMIUM is called, or the calling context deletes . INVALID_OPERATION is generated if the texture id indicated is not backed by a shared image. INVALID_OPERATION is generated if we are requesting a READWRITE scope and another consumer of the shared image is currently within a READ or READWRITE scope. INVALID_OPERATION is generated if we are requesting a READ scope and another comsumer of the shared image is currently within a READWRITE scope. INVALID_ENUM is generated if is not one of SHARED_IMAGE_ACCESS_MODE_READ_CHROMIUM, SHARED_IMAGE_ACCESS_MODE_READWRITE_CHROMIUM. The command void glEndSharedImageAccessDirectCHROMIUM (GLuint texture) takes one argument: texture - the texture id for which to end a shared image access scope. INVALID_OPERATION is generated if this function is called without a preceding call to glBeginSharedImageAccessCHROMIUM. New Tokens Accepted by the parameter of BeginSharedImageAccessCHROMIUM: SHARED_IMAGE_ACCESS_MODE_READ_CHROMIUM 0x8AF6 SHARED_IMAGE_ACCESS_MODE_READWRITE_CHROMIUM 0x8AF7 Errors None. New State None. Revision History 2018-10-15 Created. 2018-10-31 Added Begin/End calls. 2020-06-21 Added mode SHARED_IMAGE_ACCESS_MODE_OVERLAY_CHROMIUM. 2023-01-18 Removed mode SHARED_IMAGE_ACCESS_MODE_OVERLAY_CHROMIUM. 2023-09-28 Added glTexImage2DSharedImageCHROMIUM().