forked from google/angle
-
Notifications
You must be signed in to change notification settings - Fork 4
/
ANGLE_get_tex_level_parameter.txt
174 lines (127 loc) · 7.52 KB
/
ANGLE_get_tex_level_parameter.txt
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
Name
ANGLE_get_tex_level_parameter
Name Strings
GL_ANGLE_get_tex_level_parameter
Contributors
Geoff Lang, Google
Contact
Geoff Lang (geofflang 'at' google.com)
Status
Incomplete
Version
Last Modified Date: Oct 12, 2020
Author Revision: 1
Number
OpenGL ES Extension XX
Dependencies
OpenGL ES 2.0 is required.
This extension is written against the OpenGL ES 3.0.5 specification.
Overview
This extension allows the user to query information about specific texture
levels exposed later in OpenGL ES 3.1.
IP Status
No known IP claims.
New Procedures and Functions
void GetTexLevelParameter{if}vANGLE(enum target, int level,
enum pname, T *params );
New Tokens
Accepted by the <pname> parameter of GetTexLevelParameter{if}vANGLE:
TEXTURE_WIDTH 0x1000
TEXTURE_HEIGHT 0x1001
TEXTURE_DEPTH 0x8071
TEXTURE_INTERNAL_FORMAT 0x1003
TEXTURE_RED_SIZE 0x805C
TEXTURE_GREEN_SIZE 0x805D
TEXTURE_BLUE_SIZE 0x805E
TEXTURE_ALPHA_SIZE 0x805F
TEXTURE_DEPTH_SIZE 0x884A
TEXTURE_STENCIL_SIZE 0x88F1
TEXTURE_SHARED_SIZE 0x8C3F
TEXTURE_RED_TYPE 0x8C10
TEXTURE_GREEN_TYPE 0x8C11
TEXTURE_BLUE_TYPE 0x8C12
TEXTURE_ALPHA_TYPE 0x8C13
TEXTURE_DEPTH_TYPE 0x8C16
TEXTURE_COMPRESSED 0x86A1
Additions to Chapter 6 of the OpenGL ES 3.0.5 Specification (State and State
Requests)
Modify Section 6.1.4 "Texture Queries":
(Add the following text to the end of the section)
The commands
void GetTexLevelParameter{if}vANGLE(enum target, int level,
enum pname, T *params );
place information about texture image parameter <pname> for level-of-detail
<level> of the specified target into <params>. <pname> must be one of the
symbolic values in table 6.11.
<target> may be one of TEXTURE_2D or one of the cube map face targets from
table 3.18, indicating the two-dimensional texture or one of the six distinct
2D images making up the cube map texture object. Otherwise an INVALID_ENUM is
generated.
<level> determines which level-of-detail's state is returned. If <level>
is negative or larger than the maximum allowable level-of-detail, then an
INVALID_VALUE error is generated.
Note that TEXTURE_CUBE_MAP is not a valid <target> parameter for
GetTexLevelParameter{if}vANGLE, because it does not specify a particular
cube map face.
For texture images with uncompressed internal formats, queries of
<pname> TEXTURE_RED_TYPE, TEXTURE_GREEN_TYPE, TEXTURE_BLUE_TYPE,
TEXTURE_ALPHA_TYPE, and TEXTURE_DEPTH_TYPE return the data type used
to store the component. Types NONE, SIGNED_NORMALIZED, UNSIGNED_-
NORMALIZED, FLOAT, INT, and UNSIGNED_INT respectively indicate missing,
signed normalized fixed-point, unsigned normalized fixed-point,
floating-point, signed unnormalized integer, and unsigned unnormalized
integer components. Queries of <pname> TEXTURE_RED_SIZE, TEXTURE_GREEN_SIZE,
TEXTURE_BLUE_SIZE, TEXTURE_ALPHA_SIZE, TEXTURE_DEPTH_SIZE,
TEXTURE_STENCIL_SIZE, and TEXTURE_SHARED_SIZE return the actual resolutions
of the stored image components, not the resolutions specified when the image
was defined. Invalid <pname> generate an INVALID_ENUM error.
For texture images with compressed internal formats, the types returned
specify how components are interpreted after decompression, while the
resolutions returned specify the component resolution of an uncompressed
internal format that produces an image of roughly the same quality as the
compressed image in question. Since the quality of the implementation's
compression algorithm is likely data-dependent, the returned component sizes
should be treated only as rough approximations.
Queries of <pname> TEXTURE_INTERNAL_FORMAT, TEXTURE_WIDTH, TEXTURE_HEIGHT,
and TEXTURE_DEPTH return the internal format, width, height, and depth,
respectively, as specified when the image array was created.
Errors
The error INVALID_ENUM is generated by GetTexLevelParameter{if}vANGLE
if <target> is not one of TEXTURE_2D, TEXTURE_3D, TEXTURE_2D_ARRAY, one of
the cube map face targets from table 3.18, or TEXTURE_2D_MULTISAMPLE_ANGLE.
The error INVALID_VALUE is generated by GetTexLevelParameter{if}vANGLE
if <level> is negative or larger than the maximum allowable level-of-detail.
The error INVALID_ENUM is generated by GetTexLevelParameter{if}vANGLE
if <value> is not one of TEXTURE_RED_TYPE, TEXTURE_GREEN_TYPE,
TEXTURE_BLUE_TYPE, TEXTURE_ALPHA_TYPE, TEXTURE_DEPTH_TYPE,
TEXTURE_DEPTH_SIZE, TEXTURE_STENCIL_SIZE, TEXTURE_SHARED_SIZE,
TEXTURE_WIDTH, TEXTURE_HEIGHT, TEXTURE_DEPTH, TEXTURE_INTERNAL_FORMAT,
TEXTURE_RED_SIZE, TEXTURE_GREEN_SIZE, TEXTURE_BLUE_SIZE, TEXTURE_ALPHA_SIZE,
or TEXTURE_COMPRESSED.
New State
(add new table 6.10, Textures (state per texture image), renumber subsequent tables)
Initial
Get Value Type Get Command Value Description Sec.
---------------------- ---- ------------------- ------ --------------------------- ------
TEXTURE_WIDTH Z+ GetTexLevelParameterANGLE 0 Specified width 3.8
TEXTURE_HEIGHT Z+ GetTexLevelParameterANGLE 0 Specified height (2D/3D) 3.8
TEXTURE_DEPTH Z+ GetTexLevelParameterANGLE 0 Specified depth (3D) 3.8
TEXTURE_INTERNAL_FORMAT E GetTexLevelParameterANGLE RGBA Internal format 3.8
or R8 (see section 3.8.14)
TEXTURE_x_SIZE 6xZ+ GetTexLevelParameterANGLE 0 Component resolution (x is 3.8
RED, GREEN, BLUE, ALPHA,
DEPTH, or STENCIL)
TEXTURE_SHARED_SIZE Z+ GetTexLevelParameterANGLE 0 Shared exponent field 3.8
resolution
TEXTURE_x_TYPE E GetTexLevelParameterANGLE NONE Component type (x is RED, 6.1.4
GREEN, BLUE, ALPHA, or
DEPTH)
TEXTURE_COMPRESSED B GetTexLevelParameterANGLE FALSE True if image has a 3.8.6
compressed internal format
Issues
None
Revision History
Rev. Date Author Changes
---- -------- ---------- --------------------------------------------
1 14/10/20 Geoff Lang First revision. Adapted from OpenGL ES
specification 3.1.