blob: c1c4794bedebbcc377e5b9b28f9b101c50c94106 [file] [log] [blame]
Name
CHROMIUM_texture_mailbox
Name Strings
GL_CHROMIUM_texture_mailbox
Version
Last Modifed Date: June 11, 2018
Dependencies
OpenGL ES 2.0 is required.
Overview
This extension defines a way of sharing texture image data between texture
objects in different contexts where the contexts would not normally share
texture resources. Two new functions are exported.
glProduceTextureDirectCHROMIUM generates a name that can be used to identify
texture image data outside the scope of a context group and associates a
texture object with that global mailbox name.
glCreateAndConsumeTextureCHROMIUM associates the texture object referenced
by a mailbox name to a texture name.
New Procedures and Functions
void glProduceTextureDirectCHROMIUM (GLuint texture, GLbyte *mailbox)
Generates a unique name identifying a mailbox, and associates the specified
texture object with the mailbox name. The name is generated using a
cryptographic random number generator and is intended to be difficult to
guess. The scope of the name is implementation specific, for example it
might not span multiple displays.
A given texture object can be associated with several mailbox names.
This operation does not change the texture bindings or alter the bound
texture in any way.
<texture> Specifies the name of a texture.
<mailbox> returns a GL_MAILBOX_SIZE_CHROMIUM byte sized name.
INVALID_OPERATION is generated if <texture> is not a valid texture.
GLuint glCreateAndConsumeTextureCHROMIUM (const GLbyte *mailbox)
Returns a new texture name pointing to the texture object associated with
the mailbox name. Does not alter the texture bindings or alter the currently
bound texture in any way. All the contexts that have consumed the texture
object, as well as produced it share the texture object, as if the contexts
were part of the share group. The texture object is deleted once all
contexts have deleted the texture name associated with the texture object,
and detached it from all framebuffer objects as well as texture unit
bindings. See Appendix C of the OpenGL ES 2.0 specification for details
relative to visibility in one context of changes to the shared texture
object in another context.
If glCreateAndConsumeTextureCHROMIUM generates an error, the new texture
name remains unbound. It is treated in the same way as a new texture name
returned by GenTextures.
INVALID_OPERATION is generated if <mailbox> is not associated with a texture
object.
New Tokens
The size of a mailbox name in bytes.
GL_MAILBOX_SIZE_CHROMIUM 16
Errors
None.
New Tokens
None.
New State
None.
Revision History
2011-04-25 Documented the extension
2013-05-23 Major revision in Produce/Consume semantics, introducing
sharing.
2014-06-02 Added glProduceTextureDirectCHROMIUM and
glCreateAndConsumeTextureCHROMIUM definitions.
2016-08-03 Allow unbinding mailbox using glProduceTextureDirectCHROMIUM.
2017-10-20 Remove glConsumeTextureCHROMIUM and update
glCreateAndConsumeTextureCHROMIUM definition.
2017-11-20 Remove glProduceTextureCHROMIUM. Removed <target> arguments
from glProduceTextureDirectCHROMIUM and
glCreateAndConsumeTextureCHROMIUM, and updated definition.
2018-06-11 Merge glGenMailboxCHROMIUM into glProduceTextureDirectCHROMIUM.
Update documentation to reflect reality.