OLD | NEW |
---|---|
1 Name | 1 Name |
2 | 2 |
3 CHROMIUM_texture_mailbox | 3 CHROMIUM_texture_mailbox |
4 | 4 |
5 Name Strings | 5 Name Strings |
6 | 6 |
7 GL_CHROMIUM_texture_mailbox | 7 GL_CHROMIUM_texture_mailbox |
8 | 8 |
9 Version | 9 Version |
10 | 10 |
11 Last Modifed Date: April 25, 2012 | 11 Last Modifed Date: April 25, 2012 |
12 | 12 |
13 Dependencies | 13 Dependencies |
14 | 14 |
15 OpenGL ES 2.0 is required. | 15 OpenGL ES 2.0 is required. |
16 | 16 |
17 Overview | 17 Overview |
18 | 18 |
19 This extension defines a way of sharing texture image data between texture | 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 | 20 objects in different contexts where the contexts would not normally share |
21 texture resources. Three new functions are exported. glGenMailboxCHROMIUM | 21 texture resources. Three new functions are exported. glGenMailboxCHROMIUM |
22 generates a name that can be used to identify texture image data outside | 22 generates a name that can be used to identify texture image data outside |
23 the scope of a context group. glProduceMailboxCHROMIUM moves texture image | 23 the scope of a context group. glProduceMailboxCHROMIUM associates a texture |
24 data out of a texture object and into a mailbox. glConsumeMailboxCHROMIUM | 24 object with a global mailbox name. glConsumeMailboxCHROMIUM associates the |
25 moves texture image data out of a mailbox and into a texture object. | 25 texture object referenced by a mailbox name to a texture name. |
26 | 26 |
27 New Procedures and Functions | 27 New Procedures and Functions |
28 | 28 |
29 void glGenMailboxCHROMIUM (GLbyte *mailbox) | 29 void glGenMailboxCHROMIUM (GLbyte *mailbox) |
30 | 30 |
31 Generates a unique name identifying a mailbox. The name is generated using | 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 | 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 | 33 guess. The scope of the name is implementation specific, for example it |
34 might not span multiple displays. | 34 might not span multiple displays. |
35 | 35 |
36 <mailbox> returns a GL_MAILBOX_SIZE_CHROMIUM byte sized name | 36 <mailbox> returns a GL_MAILBOX_SIZE_CHROMIUM byte sized name |
37 | 37 |
38 | 38 |
39 void glProduceTextureCHROMIUM (GLenum target, const GLbyte *mailbox) | 39 void glProduceTextureCHROMIUM (GLenum target, const GLbyte *mailbox) |
40 | 40 |
41 Moves the image data and parameters of the currently bound texture object | 41 Associates the currently bound texture object with the mailbox name. A |
42 into the mailbox. The texture object is redefined as though all its levels | 42 given texture object can be associated with several mailbox names. If a |
43 had been resized to zero by zero and the texture object is therefore | 43 mailbox name was previously associated with a texture object, that |
44 incomplete. The texture object parameters are undefined. The texture | 44 previous association is broken. The currently bound texture object is not |
45 object is no longer immutable. If the mailbox previously contained image | 45 modified by the operation. |
46 data, the old image data is deleted. | |
47 | 46 |
48 If glProduceTextureCHROMIUM generates an error, the associated image data | 47 If glProduceTextureCHROMIUM generates an error, the mailbox name keeps its |
49 and state is preserved in the texture object. | 48 current association, if any. |
50 | 49 |
51 The mailbox is emptied and the texture image data deleted if the context | 50 The mailbox does not keep a reference to the texture object. When the |
52 is destroyed before being consumed. See glConsumeTextureCHROMIUM. | 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. | |
53 | 54 |
54 <target> uses the same parameters as TexImage2D. | 55 <target> uses the same parameters as TexImage2D. |
55 | 56 |
56 <mailbox> identifies a GL_MAILBOX_SIZE_CHROMIUM byte sized name returned by | 57 <mailbox> identifies a GL_MAILBOX_SIZE_CHROMIUM byte sized name returned by |
57 glGenMailboxCHROMIUM. | 58 glGenMailboxCHROMIUM. |
58 | 59 |
59 INVALID_OPERATION is generated if <target> is not a valid target. | 60 INVALID_OPERATION is generated if <target> is not a valid target. |
60 | 61 |
61 INVALID_OPERATION is generated if the texture is attached to a framebuffer. | |
62 | |
63 INVALID_OPERATION is generated if the texture is immutable. | |
64 | |
65 INVALID_OPERATION is generated if <mailbox> is invalid. | 62 INVALID_OPERATION is generated if <mailbox> is invalid. |
66 | 63 |
67 | 64 |
68 void glConsumeTextureCHROMIUM (GLenum target, const GLbyte *mailbox) | 65 void glConsumeTextureCHROMIUM (GLenum target, const GLbyte *mailbox) |
69 | 66 |
70 <target> uses the same parameters as TexImage2D. | 67 <target> uses the same parameters as TexImage2D. |
71 | 68 |
72 <mailbox> identifies a GL_MAILBOX_SIZE_CHROMIUM byte sized name returned by | 69 <mailbox> identifies a GL_MAILBOX_SIZE_CHROMIUM byte sized name returned by |
73 glGenMailboxCHROMIUM. | 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 deleted the texture name | |
apatrick_chromium
2013/05/24 20:51:58
deleted -> have deleted
piman
2013/05/24 23:03:27
Done.
| |
77 associated with the texture object, and detached from all framebuffer | |
apatrick_chromium
2013/05/24 20:51:58
detached -> detached it
piman
2013/05/24 23:03:27
Done.
| |
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. | |
74 | 81 |
75 Redefines the image data and parameters of the currently bound texture | 82 If glConsumeTextureCHROMIUM generates an error, the currently bound texture |
76 object with the image data and parameters in the mailbox and empties the | 83 object is preserved. |
77 mailbox. All levels are redefined, and the immutable state is set according | |
78 to the contents of the mailbox. | |
79 | |
80 If glConsumeTextureCHROMIUM generates an error, the associated image data | |
81 is preserved in the texture object. | |
82 | 84 |
83 INVALID_OPERATION is generated if <target> is not a valid target. | 85 INVALID_OPERATION is generated if <target> is not a valid target. |
84 | 86 |
85 INVALID_OPERATION is generated if <mailbox> is empty. | |
86 | |
87 INVALID_OPERATION is generated if <mailbox> is not in the scope of the | |
88 context. | |
89 | |
90 INVALID_OPERATION is generated if <mailbox> is invalid. | 87 INVALID_OPERATION is generated if <mailbox> is invalid. |
91 | 88 |
92 INVALID_OPERATION is generated if the texture is attached to a framebuffer. | 89 INVALID_OPERATION is generated if <mailbox> is not associated with a texture |
90 object. | |
93 | 91 |
94 INVALID_OPERATION is generated if the texture is immutable. | 92 INVALID_OPERATION is generated if the texture object associated with |
93 <mailbox> has a different target than <target>. | |
95 | 94 |
96 INVALID_OPERATION is generated if the image data is invalid in the current | 95 INVALID_OPERATION is generated if the currently bound texture is attached to |
97 context. | 96 a framebuffer. |
97 | |
98 INVALID_OPERATION is generated if the currently bound texture was previously | |
99 deleted (for example in another context), hence doesn't have a name. | |
98 | 100 |
99 New Tokens | 101 New Tokens |
100 | 102 |
101 The size of a mailbox name in bytes. | 103 The size of a mailbox name in bytes. |
102 | 104 |
103 GL_MAILBOX_SIZE_CHROMIUM 64 | 105 GL_MAILBOX_SIZE_CHROMIUM 64 |
104 | 106 |
105 Errors | 107 Errors |
106 | 108 |
107 None. | 109 None. |
108 | 110 |
109 New Tokens | 111 New Tokens |
110 | 112 |
111 None. | 113 None. |
112 | 114 |
113 New State | 115 New State |
114 | 116 |
115 None. | 117 None. |
116 | 118 |
117 Revision History | 119 Revision History |
118 | 120 |
119 4/25/2011 Documented the extension | 121 4/25/2011 Documented the extension |
122 5/23/2013 Major revision in Produce/Consume semantics, introducing | |
123 sharing. | |
OLD | NEW |