Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/angle
Path: blob/main_old/extensions/ANGLE_get_tex_level_parameter.txt
1693 views
1
Name
2
3
ANGLE_get_tex_level_parameter
4
5
Name Strings
6
7
GL_ANGLE_get_tex_level_parameter
8
9
Contributors
10
11
Geoff Lang, Google
12
13
Contact
14
15
Geoff Lang (geofflang 'at' google.com)
16
17
Status
18
19
Incomplete
20
21
Version
22
23
Last Modified Date: Oct 12, 2020
24
Author Revision: 1
25
26
Number
27
28
OpenGL ES Extension XX
29
30
Dependencies
31
32
OpenGL ES 2.0 is required.
33
34
This extension is written against the OpenGL ES 3.0.5 specification.
35
36
Overview
37
38
This extension allows the user to query information about specific texture
39
levels exposed later in OpenGL ES 3.1.
40
41
IP Status
42
43
No known IP claims.
44
45
New Procedures and Functions
46
47
void GetTexLevelParameter{if}vANGLE(enum target, int level,
48
enum pname, T *params );
49
50
New Tokens
51
52
Accepted by the <pname> parameter of GetTexLevelParameter{if}vANGLE:
53
54
TEXTURE_WIDTH 0x1000
55
TEXTURE_HEIGHT 0x1001
56
TEXTURE_DEPTH 0x8071
57
TEXTURE_INTERNAL_FORMAT 0x1003
58
TEXTURE_RED_SIZE 0x805C
59
TEXTURE_GREEN_SIZE 0x805D
60
TEXTURE_BLUE_SIZE 0x805E
61
TEXTURE_ALPHA_SIZE 0x805F
62
TEXTURE_DEPTH_SIZE 0x884A
63
TEXTURE_STENCIL_SIZE 0x88F1
64
TEXTURE_SHARED_SIZE 0x8C3F
65
TEXTURE_RED_TYPE 0x8C10
66
TEXTURE_GREEN_TYPE 0x8C11
67
TEXTURE_BLUE_TYPE 0x8C12
68
TEXTURE_ALPHA_TYPE 0x8C13
69
TEXTURE_DEPTH_TYPE 0x8C16
70
TEXTURE_COMPRESSED 0x86A1
71
72
Additions to Chapter 6 of the OpenGL ES 3.0.5 Specification (State and State
73
Requests)
74
75
Modify Section 6.1.4 "Texture Queries":
76
77
(Add the following text to the end of the section)
78
79
The commands
80
81
void GetTexLevelParameter{if}vANGLE(enum target, int level,
82
enum pname, T *params );
83
84
place information about texture image parameter <pname> for level-of-detail
85
<level> of the specified target into <params>. <pname> must be one of the
86
symbolic values in table 6.11.
87
88
<target> may be one of TEXTURE_2D or one of the cube map face targets from
89
table 3.18, indicating the two-dimensional texture or one of the six distinct
90
2D images making up the cube map texture object. Otherwise an INVALID_ENUM is
91
generated.
92
93
<level> determines which level-of-detail's state is returned. If <level>
94
is negative or larger than the maximum allowable level-of-detail, then an
95
INVALID_VALUE error is generated.
96
97
Note that TEXTURE_CUBE_MAP is not a valid <target> parameter for
98
GetTexLevelParameter{if}vANGLE, because it does not specify a particular
99
cube map face.
100
101
For texture images with uncompressed internal formats, queries of
102
<pname> TEXTURE_RED_TYPE, TEXTURE_GREEN_TYPE, TEXTURE_BLUE_TYPE,
103
TEXTURE_ALPHA_TYPE, and TEXTURE_DEPTH_TYPE return the data type used
104
to store the component. Types NONE, SIGNED_NORMALIZED, UNSIGNED_-
105
NORMALIZED, FLOAT, INT, and UNSIGNED_INT respectively indicate missing,
106
signed normalized fixed-point, unsigned normalized fixed-point,
107
floating-point, signed unnormalized integer, and unsigned unnormalized
108
integer components. Queries of <pname> TEXTURE_RED_SIZE, TEXTURE_GREEN_SIZE,
109
TEXTURE_BLUE_SIZE, TEXTURE_ALPHA_SIZE, TEXTURE_DEPTH_SIZE,
110
TEXTURE_STENCIL_SIZE, and TEXTURE_SHARED_SIZE return the actual resolutions
111
of the stored image components, not the resolutions specified when the image
112
was defined. Invalid <pname> generate an INVALID_ENUM error.
113
114
For texture images with compressed internal formats, the types returned
115
specify how components are interpreted after decompression, while the
116
resolutions returned specify the component resolution of an uncompressed
117
internal format that produces an image of roughly the same quality as the
118
compressed image in question. Since the quality of the implementation's
119
compression algorithm is likely data-dependent, the returned component sizes
120
should be treated only as rough approximations.
121
122
Queries of <pname> TEXTURE_INTERNAL_FORMAT, TEXTURE_WIDTH, TEXTURE_HEIGHT,
123
and TEXTURE_DEPTH return the internal format, width, height, and depth,
124
respectively, as specified when the image array was created.
125
126
Errors
127
128
The error INVALID_ENUM is generated by GetTexLevelParameter{if}vANGLE
129
if <target> is not one of TEXTURE_2D, TEXTURE_3D, TEXTURE_2D_ARRAY, one of
130
the cube map face targets from table 3.18, or TEXTURE_2D_MULTISAMPLE_ANGLE.
131
132
The error INVALID_VALUE is generated by GetTexLevelParameter{if}vANGLE
133
if <level> is negative or larger than the maximum allowable level-of-detail.
134
135
The error INVALID_ENUM is generated by GetTexLevelParameter{if}vANGLE
136
if <value> is not one of TEXTURE_RED_TYPE, TEXTURE_GREEN_TYPE,
137
TEXTURE_BLUE_TYPE, TEXTURE_ALPHA_TYPE, TEXTURE_DEPTH_TYPE,
138
TEXTURE_DEPTH_SIZE, TEXTURE_STENCIL_SIZE, TEXTURE_SHARED_SIZE,
139
TEXTURE_WIDTH, TEXTURE_HEIGHT, TEXTURE_DEPTH, TEXTURE_INTERNAL_FORMAT,
140
TEXTURE_RED_SIZE, TEXTURE_GREEN_SIZE, TEXTURE_BLUE_SIZE, TEXTURE_ALPHA_SIZE,
141
or TEXTURE_COMPRESSED.
142
143
New State
144
145
(add new table 6.10, Textures (state per texture image), renumber subsequent tables)
146
147
Initial
148
Get Value Type Get Command Value Description Sec.
149
---------------------- ---- ------------------- ------ --------------------------- ------
150
TEXTURE_WIDTH Z+ GetTexLevelParameterANGLE 0 Specified width 3.8
151
TEXTURE_HEIGHT Z+ GetTexLevelParameterANGLE 0 Specified height (2D/3D) 3.8
152
TEXTURE_DEPTH Z+ GetTexLevelParameterANGLE 0 Specified depth (3D) 3.8
153
TEXTURE_INTERNAL_FORMAT E GetTexLevelParameterANGLE RGBA Internal format 3.8
154
or R8 (see section 3.8.14)
155
TEXTURE_x_SIZE 6xZ+ GetTexLevelParameterANGLE 0 Component resolution (x is 3.8
156
RED, GREEN, BLUE, ALPHA,
157
DEPTH, or STENCIL)
158
TEXTURE_SHARED_SIZE Z+ GetTexLevelParameterANGLE 0 Shared exponent field 3.8
159
resolution
160
TEXTURE_x_TYPE E GetTexLevelParameterANGLE NONE Component type (x is RED, 6.1.4
161
GREEN, BLUE, ALPHA, or
162
DEPTH)
163
TEXTURE_COMPRESSED B GetTexLevelParameterANGLE FALSE True if image has a 3.8.6
164
compressed internal format
165
166
Issues
167
None
168
169
Revision History
170
171
Rev. Date Author Changes
172
---- -------- ---------- --------------------------------------------
173
1 14/10/20 Geoff Lang First revision. Adapted from OpenGL ES
174
specification 3.1.
175
176