1 Name 2 3 CHROMIUM_texture_mailbox 4 5 Name Strings 6 7 GL_CHROMIUM_texture_mailbox 8 9 Version 10 11 Last Modifed Date: April 25, 2012 12 13 Dependencies 14 15 OpenGL ES 2.0 is required. 16 17 Overview 18 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. 26 27 New Procedures and Functions 28 29 void glGenMailboxCHROMIUM (GLbyte *mailbox) 30 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. 35 36 <mailbox> returns a GL_MAILBOX_SIZE_CHROMIUM byte sized name 37 38 39 void glProduceTextureCHROMIUM (GLenum target, const GLbyte *mailbox) 40 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. 46 47 If glProduceTextureCHROMIUM generates an error, the mailbox name keeps its 48 current association, if any. 49 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. 54 55 <target> uses the same parameters as TexImage2D. 56 57 <mailbox> identifies a GL_MAILBOX_SIZE_CHROMIUM byte sized name returned by 58 glGenMailboxCHROMIUM. 59 60 INVALID_OPERATION is generated if <target> is not a valid target. 61 62 INVALID_OPERATION is generated if <mailbox> is invalid. 63 64 65 void glConsumeTextureCHROMIUM (GLenum target, const GLbyte *mailbox) 66 67 <target> uses the same parameters as TexImage2D. 68 69 <mailbox> identifies a GL_MAILBOX_SIZE_CHROMIUM byte sized name returned by 70 glGenMailboxCHROMIUM. 71 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. 81 82 If glConsumeTextureCHROMIUM generates an error, the currently bound texture 83 object is preserved. 84 85 INVALID_OPERATION is generated if <target> is not a valid target. 86 87 INVALID_OPERATION is generated if <mailbox> is invalid. 88 89 INVALID_OPERATION is generated if <mailbox> is not associated with a texture 90 object. 91 92 INVALID_OPERATION is generated if the texture object associated with 93 <mailbox> has a different target than <target>. 94 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. 97 98 New Tokens 99 100 The size of a mailbox name in bytes. 101 102 GL_MAILBOX_SIZE_CHROMIUM 64 103 104 Errors 105 106 None. 107 108 New Tokens 109 110 None. 111 112 New State 113 114 None. 115 116 Revision History 117 118 4/25/2011 Documented the extension 119 5/23/2013 Major revision in Produce/Consume semantics, introducing 120 sharing. 121