3 CHROMIUM_texture_mailbox
7 GL_CHROMIUM_texture_mailbox
11 Last Modifed Date: April 25, 2012
15 OpenGL ES 2.0 is required.
19 This extension defines a way of sharing texture image data between texture
20 objects in different contexts where the contexts would not normally share
21 texture resources. Three new functions are exported. glGenMailboxCHROMIUM
22 generates a name that can be used to identify texture image data outside
23 the scope of a context group. glProduceMailboxCHROMIUM associates a texture
24 object with a global mailbox name. glConsumeMailboxCHROMIUM associates the
25 texture object referenced by a mailbox name to a texture name.
27 New Procedures and Functions
29 void glGenMailboxCHROMIUM (GLbyte *mailbox)
31 Generates a unique name identifying a mailbox. The name is generated using
32 a cryptographic random number generator and is intended to be difficult to
33 guess. The scope of the name is implementation specific, for example it
34 might not span multiple displays.
36 <mailbox> returns a GL_MAILBOX_SIZE_CHROMIUM byte sized name
39 void glProduceTextureCHROMIUM (GLenum target, const GLbyte *mailbox)
41 Associates the currently bound texture object with the mailbox name. A
42 given texture object can be associated with several mailbox names. If a
43 mailbox name was previously associated with a texture object, that
44 previous association is broken. The currently bound texture object is not
45 modified by the operation.
47 If glProduceTextureCHROMIUM generates an error, the mailbox name keeps its
48 current association, if any.
50 The mailbox does not keep a reference to the texture object. When the
51 texture object is destroyed (deleted from all context groups, and unbound
52 from all texture units and framebuffer attachments), the mailbox is
53 disassociated from the texture object.
55 <target> uses the same parameters as TexImage2D.
57 <mailbox> identifies a GL_MAILBOX_SIZE_CHROMIUM byte sized name returned by
60 INVALID_OPERATION is generated if <target> is not a valid target.
62 INVALID_OPERATION is generated if <mailbox> is invalid.
65 void glConsumeTextureCHROMIUM (GLenum target, const GLbyte *mailbox)
67 <target> uses the same parameters as TexImage2D.
69 <mailbox> identifies a GL_MAILBOX_SIZE_CHROMIUM byte sized name returned by
72 Deletes the currently bound texture object, and redefines its texture name
73 to point to the texture object associated with the mailbox name. All the
74 contexts that have consumed the texture object, as well as produced it share
75 the texture object, as if the contexts were part of the share group. The
76 texture object is deleted once all contexts have deleted the texture name
77 associated with the texture object, and detached it from all framebuffer
78 objects as well as texture unit bindings. See Appendix C of the OpenGL ES
79 2.0 specification for details relative to visibility in one context of
80 changes to the shared texture object in another context.
82 If glConsumeTextureCHROMIUM generates an error, the currently bound texture
85 INVALID_OPERATION is generated if <target> is not a valid target.
87 INVALID_OPERATION is generated if <mailbox> is invalid.
89 INVALID_OPERATION is generated if <mailbox> is not associated with a texture
92 INVALID_OPERATION is generated if the texture object associated with
93 <mailbox> has a different target than <target>.
95 INVALID_OPERATION is generated if the currently bound texture was previously
96 deleted (for example in another context), hence doesn't have a name.
100 The size of a mailbox name in bytes.
102 GL_MAILBOX_SIZE_CHROMIUM 64
118 4/25/2011 Documented the extension
119 5/23/2013 Major revision in Produce/Consume semantics, introducing