blob: 7159e645a22001e22bd076f7db82a67417ac5c0f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
Name
CHROMIUM_texture_mailbox
Name Strings
GL_CHROMIUM_texture_mailbox
Version
Last Modifed Date: April 25, 2012
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. Three new functions are exported. glGenMailboxCHROMIUM
generates a name that can be used to identify texture image data outside
the scope of a context group. glProduceMailboxCHROMIUM moves texture image
data out of a texture object and into a mailbox. glConsumeMailboxCHROMIUM
moves texture image data out of a mailbox and into a texture object.
New Procedures and Functions
void glGenMailboxCHROMIUM (GLbyte *mailbox)
Generates a unique name identifying a mailbox. 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.
<mailbox> returns a GL_MAILBOX_SIZE_CHROMIUM byte sized name
void glProduceTextureCHROMIUM (GLenum target, const GLbyte *mailbox)
Moves the image data and parameters of the currently bound texture object
into the mailbox. The texture object is redefined as though all its levels
had been resized to zero by zero and the texture object is therefore
incomplete. If the mailbox previously contained image data, the old image
data is deleted. The state of the bound texture object is not saved in the
mailbox, only the image data, as well as the immutable state. The texture
object is no longer immutable.
If glProduceTextureCHROMIUM generates an error, the associated image data
is preserved in the texture object.
The mailbox is emptied and the texture image data deleted if the context
is destroyed before being consumed. See glConsumeTextureCHROMIUM.
<target> uses the same parameters as TexImage2D.
<mailbox> identifies a GL_MAILBOX_SIZE_CHROMIUM byte sized name returned by
glGenMailboxCHROMIUM.
INVALID_OPERATION is generated if <target> is not a valid target.
INVALID_OPERATION is generated if the texture is attached to a framebuffer.
INVALID_OPERATION is generated if the texture is immutable.
INVALID_OPERATION is generated if <mailbox> is invalid.
void glConsumeTextureCHROMIUM (GLenum target, const GLbyte *mailbox)
<target> uses the same parameters as TexImage2D.
<mailbox> identifies a GL_MAILBOX_SIZE_CHROMIUM byte sized name returned by
glGenMailboxCHROMIUM.
Redefines the image data and parameters of the currently bound texture
object with the image data and parameters in the mailbox and empties the
mailbox. All levels are redefined, and the immutable state is set according
to the contents of the mailbox.
If glConsumeTextureCHROMIUM generates an error, the associated image data
is preserved in the texture object.
INVALID_OPERATION is generated if <target> is not a valid target.
INVALID_OPERATION is generated if <mailbox> is empty.
INVALID_OPERATION is generated if <mailbox> is not in the scope of the
context.
INVALID_OPERATION is generated if <mailbox> is invalid.
INVALID_OPERATION is generated if the texture is attached to a framebuffer.
INVALID_OPERATION is generated if the texture is immutable.
INVALID_OPERATION is generated if the image data is invalid in the current
context.
New Tokens
The size of a mailbox name in bytes.
GL_MAILBOX_SIZE_CHROMIUM 64
Errors
None.
New Tokens
None.
New State
None.
Revision History
4/25/2011 Documented the extension
|