Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/angle
Path: blob/main_old/extensions/CHROMIUM_copy_texture.txt
1693 views
1
Name
2
3
CHROMIUM_copy_texture
4
5
Name Strings
6
7
GL_CHROMIUM_copy_texture
8
9
Version
10
11
Last Modifed Date: March 24, 2017
12
13
Dependencies
14
15
OpenGL ES 2.0 or OpenGL ES 3.0 is required.
16
17
EXT_texture_format_BGRA8888 affects the definition of this extension.
18
ARB_texture_rg affects the definition of this extension.
19
CHROMIUM_ycbcr_422_image affects the definition of this extension.
20
21
Overview
22
23
This extension expands on the functionality provided by the
24
glCopyTexImage2D command. A new function is exported,
25
glCopyTextureCHROMIUM, that performs the same copy operation as
26
glCopyTexImage2D.
27
28
The extension also supports copying BGRA textures and copying
29
EXTERNAL_OES texture to BGRA texture, which is not explicitly
30
granted by EXT_texture_format_BGRA8888.
31
32
New Procedures and Functions
33
34
void CopyTextureCHROMIUM(uint sourceId,
35
int sourceLevel,
36
enum destTarget,
37
uint destId,
38
int destLevel,
39
int internalFormat,
40
enum destType,
41
boolean unpackFlipY,
42
boolean unpackPremultiplyAlpha,
43
boolean unpackUnmultiplyAlpha)
44
45
46
void CopySubTextureCHROMIUM(uint sourceId,
47
int sourceLevel,
48
enum destTarget,
49
uint destId,
50
int destLevel,
51
int xoffset,
52
int yoffset,
53
int x,
54
int y,
55
sizei width,
56
sizei height,
57
boolean unpackFlipY,
58
boolean unpackPremultiplyAlpha,
59
boolean unpackUnmultiplyAlpha)
60
61
Additions to the OpenGL ES 2.0 Specification
62
63
The command
64
65
CopyTextureCHROMIUM
66
67
Copies the contents of <sourceLevel> level of <sourceId> texture to
68
<destLevel> level and <destTarget> target of <destId> texture.
69
70
<destTarget> must be TEXTURE_2D,
71
TEXTURE_CUBE_MAP_POSITIVE_X, TEXTURE_CUBE_MAP_NEGATIVE_X,
72
TEXTURE_CUBE_MAP_POSITIVE_Y, TEXTURE_CUBE_MAP_NEGATIVE_Y,
73
TEXTURE_CUBE_MAP_POSITIVE_Z, TEXTURE_CUBE_MAP_NEGATIVE_Z,
74
TEXTURE_RECTANGLE_ARB.
75
76
The internal format of the destination texture is converted to that
77
specified by <internalFormat>.
78
79
When source texture doens't contain a superset of the component
80
required by <internalFormat>, fill the components by following rules.
81
82
source format color components
83
----------------------------------------
84
ALPHA (0, 0, 0, A)
85
RED (R, 0, 0, 1)
86
LUMINANCE (L, L, L, 1)
87
LUMINANCE_ALPHA (L, L, L, A)
88
RGB (R, G, B, 1)
89
RGB8 (R, G, B, 1)
90
RGBA (R, G, B, A)
91
RGBA8 (R, G, B, A)
92
BGRA_EXT (R, G, B, A)
93
BGRA8_EXT (R, G, B, A)
94
RGB_YCBCR_420V_CHROMIUM (R, G, B, 1)
95
RGB_YCBCR_422_CHROMIUM (R, G, B, 1)
96
97
The format type of the destination texture is converted to that specified
98
by <destType>.
99
100
If <flipY> is true, vertically flip texture image data.
101
102
If <unpackPremultiplyAlpha> and <unpackUnmultiplyAlpha> are true,
103
no alpha processing occurs. This is the equivalent of having neither flag
104
set.
105
106
When <sourceId> refers to a stream texture, the texture matrix will be
107
applied as part of the copy operation.
108
109
INVALID_OPERATION is generated if <internalFormat> is not one of the
110
formats in Table 1.0.
111
112
INVALID_OPERATION is generated if the internal format of <sourceId> is not
113
one of formats in Table 1.1.
114
115
INVALID_VALUE is generated if <sourceId> or <destId> are not valid texture
116
objects.
117
118
INVALID_ENUM is generated if <destTarget> is not one of the valid targets
119
described above.
120
121
INVALID_OPERATION is generated if the bound target of destination texture
122
does not match <target>.
123
124
INVALID_VALUE is generated if textures corresponding to <destId> have not
125
been bound as TEXTURE_2D, TEXTURE_CUBE_MAP, or
126
TEXTURE_RECTANGLE_ARB objects.
127
128
INVALID_VALUE is generated if textures corresponding to <sourceId> have not
129
been bound as TEXTURE_2D, TEXTURE_RECTANGLE_ARB or
130
TEXTURE_EXTERNAL_OES objects.
131
132
INVALID_VALUE is generated if <sourceLevel> is not 0 for ES 2.0, or if
133
<sourceLevel> or <destLevel> is less than 0 for ES 3.0.
134
135
INVALID_VALUE is generated if <sourceLevel> of the source texture is not
136
defined.
137
138
The command
139
140
CopySubTextureCHROMIUM
141
142
Copies the sub contents of texture referred to by <sourceId> to <destId>
143
texture without redefining <destId> texture.
144
145
See CopyTextureCHROMIUM for the interpretation of the <destTarget>,
146
<sourceLevel>, <destLevel>, <flipY>, <premultiplyAlpha>, and
147
<unmultiplyAlpha> arguments.
148
149
<xoffset> and <yoffset> specify a texel offset in the x and y direction
150
respectively within the destination texture.
151
152
<x> and <y> specify specify a texel offset in the x and y direction
153
respectively within the source texture.
154
155
<width> specifies the width of the texture subimage.
156
157
<height> specifies the width of the texture subimage.
158
159
INVALID_VALUE is generated if either <sourceId> texture or <destId>
160
texture is not defined.
161
162
INVALID_OPERATION is generated if the internal format of <sourceId> or
163
<destId> is not one of formats in Table 1.1.
164
165
INVALID_OPERATION is generated if the destination texture array has not
166
been defined.
167
168
INVALID_VALUE is generated if <destId> texture is not bound as
169
TEXTURE_2D or TEXTURE_RECTANGLE_ARB.
170
171
INVALID_VALUE is generated if level 0 of the source texture or
172
the destination texture is not defined.
173
174
INVALID_VALUE is generated if (<xoffset> + <width>) > destWidth,
175
or (<yoffset> + <height>) > destHeight.
176
177
Table 1.0 Valid internal formats for CopyTextureCHROMIUM:
178
179
<internalFormat>
180
---------------
181
RGB
182
RGBA
183
RGB8
184
RGBA8
185
BGRA_EXT
186
BGRA8_EXT
187
SRGB_EXT
188
SRGB_ALPHA_EXT
189
R8
190
R8UI
191
RG8
192
RG8UI
193
SRGB8
194
RGB565
195
RGB8UI
196
SRGB8_ALPHA8
197
RGB5_A1
198
RGBA4
199
RGBA8UI
200
RGB9_E5
201
R16F
202
R32F
203
RG16F
204
RG32F
205
RGB16F
206
RGB32F
207
RGBA16F
208
RGBA32F
209
R11F_G11F_B10F
210
211
Table 1.1 Valid source texture internal formats for CopyTextureCHROMIUM and
212
source and destination formats for CopySubTextureCHROMIUM:
213
214
internal format
215
---------------
216
RED
217
ALPHA
218
LUMINANCE
219
LUMINANCE_ALPHA
220
RGB
221
RGBA
222
RGB8
223
RGBA8
224
BGRA_EXT
225
BGRA8_EXT
226
RGB_YCBCR_420V_CHROMIUM
227
RGB_YCBCR_422_CHROMIUM
228
229
Dependencies on ARB_texture_rg
230
231
If ARB_texture_rg is not supported:
232
* delete any reference to the R8 format.
233
234
Dependencies on CHROMIUM_ycbcr_422_image
235
236
If CHROMIUM_ycbcr_422_image is not supported:
237
* delete any reference to the RGB_YCBCR_422_CHROMIUM format.
238
239
Errors
240
241
None.
242
243
New Tokens
244
245
None.
246
247
New State
248
249
None.
250
251
Revision History
252
253
8/1/2011 Documented the extension
254
7/4/2013 Add a new parameter dest_type to glCopyTextureCHROMIUM()
255
16/7/2014 Add TEXTURE_RECTANGLE_ARB as valid source_id target
256
19/6/2015 Add arguments unpack_flip_y, unpack_premultiply_alpha, and
257
unpack_unmultiply_alpha to both commands.
258
4/1/2016 Removed the argument target.
259
4/1/2016 Added TEXTURE_RECTANGLE_ARB as valid dest_id target.
260
19/12/2016 Supported more ES 3.0 formats.
261
18/1/2017 Supported source_level and dest_level.
262
19/1/2017 Added TEXTURE_CUBE_MAP as valid dest_id target.
263
24/3/2017 Clean up naming and move formats into tables.
264
265