@luma.gl/constants 9.0.0-alpha.20 → 9.0.0-alpha.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,51 +1,79 @@
1
1
  /* eslint-disable key-spacing, max-len, no-inline-comments, camelcase */
2
2
 
3
3
  /**
4
- * Standard WebGL and WebGL2 constants
5
- * These constants are also defined on the WebGLRenderingContext interface.
4
+ * Standard WebGL, WebGL2 and extension constants (OpenGL constants)
5
+ * @note (Most) of these constants are also defined on the WebGLRenderingContext interface.
6
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants
6
7
  */
7
8
  export enum GL {
8
9
  // Clearing buffers
9
10
  // Constants passed to clear() to clear buffer masks.
10
11
 
12
+ /** Passed to clear to clear the current depth buffer. */
11
13
  DEPTH_BUFFER_BIT = 0x00000100,
14
+ /** Passed to clear to clear the current stencil buffer. */
12
15
  STENCIL_BUFFER_BIT = 0x00000400,
16
+ /** Passed to clear to clear the current color buffer. */
13
17
  COLOR_BUFFER_BIT = 0x00004000,
14
18
 
15
19
  // Rendering primitives
16
20
  // Constants passed to drawElements() or drawArrays() to specify what kind of primitive to render.
17
21
 
22
+ /** Passed to drawElements or drawArrays to draw single points. */
18
23
  POINTS = 0x0000,
24
+ /** Passed to drawElements or drawArrays to draw lines. Each vertex connects to the one after it. */
19
25
  LINES = 0x0001,
26
+ /** Passed to drawElements or drawArrays to draw lines. Each set of two vertices is treated as a separate line segment. */
20
27
  LINE_LOOP = 0x0002,
28
+ /** Passed to drawElements or drawArrays to draw a connected group of line segments from the first vertex to the last. */
21
29
  LINE_STRIP = 0x0003,
30
+ /** Passed to drawElements or drawArrays to draw triangles. Each set of three vertices creates a separate triangle. */
22
31
  TRIANGLES = 0x0004,
32
+ /** Passed to drawElements or drawArrays to draw a connected group of triangles. */
23
33
  TRIANGLE_STRIP = 0x0005,
34
+ /** Passed to drawElements or drawArrays to draw a connected group of triangles. Each vertex connects to the previous and the first vertex in the fan. */
24
35
  TRIANGLE_FAN = 0x0006,
25
36
 
26
37
  // Blending modes
27
38
  // Constants passed to blendFunc() or blendFuncSeparate() to specify the blending mode (for both, RBG and alpha, or separately).
28
-
39
+ /** Passed to blendFunc or blendFuncSeparate to turn off a component. */
29
40
  ZERO = 0,
41
+ /** Passed to blendFunc or blendFuncSeparate to turn on a component. */
30
42
  ONE = 1,
43
+ /** Passed to blendFunc or blendFuncSeparate to multiply a component by the source elements color. */
31
44
  SRC_COLOR = 0x0300,
45
+ /** Passed to blendFunc or blendFuncSeparate to multiply a component by one minus the source elements color. */
32
46
  ONE_MINUS_SRC_COLOR = 0x0301,
47
+ /** Passed to blendFunc or blendFuncSeparate to multiply a component by the source's alpha. */
33
48
  SRC_ALPHA = 0x0302,
49
+ /** Passed to blendFunc or blendFuncSeparate to multiply a component by one minus the source's alpha. */
34
50
  ONE_MINUS_SRC_ALPHA = 0x0303,
51
+ /** Passed to blendFunc or blendFuncSeparate to multiply a component by the destination's alpha. */
35
52
  DST_ALPHA = 0x0304,
53
+ /** Passed to blendFunc or blendFuncSeparate to multiply a component by one minus the destination's alpha. */
36
54
  ONE_MINUS_DST_ALPHA = 0x0305,
55
+ /** Passed to blendFunc or blendFuncSeparate to multiply a component by the destination's color. */
37
56
  DST_COLOR = 0x0306,
57
+ /** Passed to blendFunc or blendFuncSeparate to multiply a component by one minus the destination's color. */
38
58
  ONE_MINUS_DST_COLOR = 0x0307,
59
+ /** Passed to blendFunc or blendFuncSeparate to multiply a component by the minimum of source's alpha or one minus the destination's alpha. */
39
60
  SRC_ALPHA_SATURATE = 0x0308,
61
+ /** Passed to blendFunc or blendFuncSeparate to specify a constant color blend function. */
40
62
  CONSTANT_COLOR = 0x8001,
63
+ /** Passed to blendFunc or blendFuncSeparate to specify one minus a constant color blend function. */
41
64
  ONE_MINUS_CONSTANT_COLOR = 0x8002,
65
+ /** Passed to blendFunc or blendFuncSeparate to specify a constant alpha blend function. */
42
66
  CONSTANT_ALPHA = 0x8003,
67
+ /** Passed to blendFunc or blendFuncSeparate to specify one minus a constant alpha blend function. */
43
68
  ONE_MINUS_CONSTANT_ALPHA = 0x8004,
44
69
 
45
70
  // Blending equations
46
71
  // Constants passed to blendEquation() or blendEquationSeparate() to control
47
72
  // how the blending is calculated (for both, RBG and alpha, or separately).
48
73
 
74
+ /** Passed to blendEquation or blendEquationSeparate to set an addition blend function. */
75
+ /** Passed to blendEquation or blendEquationSeparate to specify a subtraction blend function (source - destination). */
76
+ /** Passed to blendEquation or blendEquationSeparate to specify a reverse subtraction blend function (destination - source). */
49
77
  FUNC_ADD = 0x8006,
50
78
  FUNC_SUBTRACT = 0x800a,
51
79
  FUNC_REVERSE_SUBTRACT = 0x800b,
@@ -53,30 +81,57 @@ export enum GL {
53
81
  // Getting GL parameter information
54
82
  // Constants passed to getParameter() to specify what information to return.
55
83
 
84
+ /** Passed to getParameter to get the current RGB blend function. */
56
85
  BLEND_EQUATION = 0x8009,
86
+ /** Passed to getParameter to get the current RGB blend function. Same as BLEND_EQUATION */
57
87
  BLEND_EQUATION_RGB = 0x8009,
88
+ /** Passed to getParameter to get the current alpha blend function. Same as BLEND_EQUATION */
58
89
  BLEND_EQUATION_ALPHA = 0x883d,
90
+ /** Passed to getParameter to get the current destination RGB blend function. */
59
91
  BLEND_DST_RGB = 0x80c8,
92
+ /** Passed to getParameter to get the current destination RGB blend function. */
60
93
  BLEND_SRC_RGB = 0x80c9,
94
+ /** Passed to getParameter to get the current destination alpha blend function. */
61
95
  BLEND_DST_ALPHA = 0x80ca,
96
+ /** Passed to getParameter to get the current source alpha blend function. */
62
97
  BLEND_SRC_ALPHA = 0x80cb,
98
+
99
+ /** Passed to getParameter to return a the current blend color. */
63
100
  BLEND_COLOR = 0x8005,
101
+ /** Passed to getParameter to get the array buffer binding. */
64
102
  ARRAY_BUFFER_BINDING = 0x8894,
103
+ /** Passed to getParameter to get the current element array buffer. */
65
104
  ELEMENT_ARRAY_BUFFER_BINDING = 0x8895,
105
+ /** Passed to getParameter to get the current lineWidth (set by the lineWidth method). */
66
106
  LINE_WIDTH = 0x0b21,
107
+ /** Passed to getParameter to get the current size of a point drawn with gl.POINTS */
67
108
  ALIASED_POINT_SIZE_RANGE = 0x846d,
109
+ /** Passed to getParameter to get the range of available widths for a line. Returns a length-2 array with the lo value at 0, and hight at 1. */
68
110
  ALIASED_LINE_WIDTH_RANGE = 0x846e,
111
+ /** Passed to getParameter to get the current value of cullFace. Should return FRONT, BACK, or FRONT_AND_BACK */
69
112
  CULL_FACE_MODE = 0x0b45,
113
+ /** Passed to getParameter to determine the current value of frontFace. Should return CW or CCW. */
70
114
  FRONT_FACE = 0x0b46,
115
+ /** Passed to getParameter to return a length-2 array of floats giving the current depth range. */
71
116
  DEPTH_RANGE = 0x0b70,
117
+ /** Passed to getParameter to determine if the depth write mask is enabled. */
118
+
72
119
  DEPTH_WRITEMASK = 0x0b72,
120
+ /** Passed to getParameter to determine the current depth clear value. */
73
121
  DEPTH_CLEAR_VALUE = 0x0b73,
122
+ /** Passed to getParameter to get the current depth function. Returns NEVER, ALWAYS, LESS, EQUAL, LEQUAL, GREATER, GEQUAL, or NOTEQUAL. */
74
123
  DEPTH_FUNC = 0x0b74,
124
+ /** Passed to getParameter to get the value the stencil will be cleared to. */
75
125
  STENCIL_CLEAR_VALUE = 0x0b91,
126
+ /** Passed to getParameter to get the current stencil function. Returns NEVER, ALWAYS, LESS, EQUAL, LEQUAL, GREATER, GEQUAL, or NOTEQUAL. */
76
127
  STENCIL_FUNC = 0x0b92,
128
+ /** Passed to getParameter to get the current stencil fail function. Should return KEEP, REPLACE, INCR, DECR, INVERT, INCR_WRAP, or DECR_WRAP. */
77
129
  STENCIL_FAIL = 0x0b94,
130
+ /** Passed to getParameter to get the current stencil fail function should the depth buffer test fail. Should return KEEP, REPLACE, INCR, DECR, INVERT, INCR_WRAP, or DECR_WRAP. */
78
131
  STENCIL_PASS_DEPTH_FAIL = 0x0b95,
132
+ /** Passed to getParameter to get the current stencil fail function should the depth buffer test pass. Should return KEEP, REPLACE, INCR, DECR, INVERT, INCR_WRAP, or DECR_WRAP. */
79
133
  STENCIL_PASS_DEPTH_PASS = 0x0b96,
134
+ /** Passed to getParameter to get the reference value used for stencil tests. */
80
135
  STENCIL_REF = 0x0b97,
81
136
  STENCIL_VALUE_MASK = 0x0b93,
82
137
  STENCIL_WRITEMASK = 0x0b98,
@@ -87,7 +142,10 @@ export enum GL {
87
142
  STENCIL_BACK_REF = 0x8ca3,
88
143
  STENCIL_BACK_VALUE_MASK = 0x8ca4,
89
144
  STENCIL_BACK_WRITEMASK = 0x8ca5,
145
+
146
+ /** An Int32Array with four elements for the current viewport dimensions. */
90
147
  VIEWPORT = 0x0ba2,
148
+ /** An Int32Array with four elements for the current scissor box dimensions. */
91
149
  SCISSOR_BOX = 0x0c10,
92
150
  COLOR_CLEAR_VALUE = 0x0c22,
93
151
  COLOR_WRITEMASK = 0x0c23,
@@ -121,17 +179,25 @@ export enum GL {
121
179
  // Constants passed to bufferData(), bufferSubData(), bindBuffer(), or
122
180
  // getBufferParameter().
123
181
 
182
+ /** Passed to bufferData as a hint about whether the contents of the buffer are likely to be used often and not change often. */
124
183
  STATIC_DRAW = 0x88e4,
184
+ /** Passed to bufferData as a hint about whether the contents of the buffer are likely to not be used often. */
125
185
  STREAM_DRAW = 0x88e0,
186
+ /** Passed to bufferData as a hint about whether the contents of the buffer are likely to be used often and change often. */
126
187
  DYNAMIC_DRAW = 0x88e8,
188
+ /** Passed to bindBuffer or bufferData to specify the type of buffer being used. */
127
189
  ARRAY_BUFFER = 0x8892,
190
+ /** Passed to bindBuffer or bufferData to specify the type of buffer being used. */
128
191
  ELEMENT_ARRAY_BUFFER = 0x8893,
192
+ /** Passed to getBufferParameter to get a buffer's size. */
129
193
  BUFFER_SIZE = 0x8764,
194
+ /** Passed to getBufferParameter to get the hint for the buffer passed in when it was created. */
130
195
  BUFFER_USAGE = 0x8765,
131
196
 
132
197
  // Vertex attributes
133
198
  // Constants passed to getVertexAttrib().
134
199
 
200
+ /** Passed to getVertexAttrib to read back the current vertex attribute. */
135
201
  CURRENT_VERTEX_ATTRIB = 0x8626,
136
202
  VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622,
137
203
  VERTEX_ATTRIB_ARRAY_SIZE = 0x8623,
@@ -144,45 +210,69 @@ export enum GL {
144
210
  // Culling
145
211
  // Constants passed to cullFace().
146
212
 
213
+ /** Passed to enable/disable to turn on/off culling. Can also be used with getParameter to find the current culling method. */
147
214
  CULL_FACE = 0x0b44,
215
+ /** Passed to cullFace to specify that only front faces should be culled. */
148
216
  FRONT = 0x0404,
217
+ /** Passed to cullFace to specify that only back faces should be culled. */
149
218
  BACK = 0x0405,
219
+ /** Passed to cullFace to specify that front and back faces should be culled. */
150
220
  FRONT_AND_BACK = 0x0408,
151
221
 
152
222
  // Enabling and disabling
153
223
  // Constants passed to enable() or disable().
154
224
 
225
+ /** Passed to enable/disable to turn on/off blending. Can also be used with getParameter to find the current blending method. */
155
226
  BLEND = 0x0be2,
227
+ /** Passed to enable/disable to turn on/off the depth test. Can also be used with getParameter to query the depth test. */
156
228
  DEPTH_TEST = 0x0b71,
229
+ /** Passed to enable/disable to turn on/off dithering. Can also be used with getParameter to find the current dithering method. */
157
230
  DITHER = 0x0bd0,
231
+ /** Passed to enable/disable to turn on/off the polygon offset. Useful for rendering hidden-line images, decals, and or solids with highlighted edges. Can also be used with getParameter to query the scissor test. */
158
232
  POLYGON_OFFSET_FILL = 0x8037,
233
+ /** Passed to enable/disable to turn on/off the alpha to coverage. Used in multi-sampling alpha channels. */
159
234
  SAMPLE_ALPHA_TO_COVERAGE = 0x809e,
235
+ /** Passed to enable/disable to turn on/off the sample coverage. Used in multi-sampling. */
160
236
  SAMPLE_COVERAGE = 0x80a0,
237
+ /** Passed to enable/disable to turn on/off the scissor test. Can also be used with getParameter to query the scissor test. */
161
238
  SCISSOR_TEST = 0x0c11,
239
+ /** Passed to enable/disable to turn on/off the stencil test. Can also be used with getParameter to query the stencil test. */
162
240
  STENCIL_TEST = 0x0b90,
163
241
 
164
242
  // Errors
165
243
  // Constants returned from getError().
166
244
 
245
+ /** Returned from getError(). */
167
246
  NO_ERROR = 0,
247
+ /** Returned from getError(). */
168
248
  INVALID_ENUM = 0x0500,
249
+ /** Returned from getError(). */
169
250
  INVALID_VALUE = 0x0501,
251
+ /** Returned from getError(). */
170
252
  INVALID_OPERATION = 0x0502,
253
+ /** Returned from getError(). */
171
254
  OUT_OF_MEMORY = 0x0505,
255
+ /** Returned from getError(). */
172
256
  CONTEXT_LOST_WEBGL = 0x9242,
173
257
 
174
258
  // Front face directions
175
259
  // Constants passed to frontFace().
176
260
 
261
+ /** Passed to frontFace to specify the front face of a polygon is drawn in the clockwise direction */
177
262
  CW = 0x0900,
263
+ /** Passed to frontFace to specify the front face of a polygon is drawn in the counter clockwise direction */
178
264
  CCW = 0x0901,
179
265
 
180
266
  // Hints
181
267
  // Constants passed to hint()
182
268
 
269
+ /** There is no preference for this behavior. */
183
270
  DONT_CARE = 0x1100,
271
+ /** The most efficient behavior should be used. */
184
272
  FASTEST = 0x1101,
273
+ /** The most correct or the highest quality option should be used. */
185
274
  NICEST = 0x1102,
275
+ /** Hint for the quality of filtering when generating mipmap images with WebGLRenderingContext.generateMipmap(). */
186
276
  GENERATE_MIPMAP_HINT = 0x8192,
187
277
 
188
278
  // Data types
@@ -215,20 +305,31 @@ export enum GL {
215
305
  // Shaders
216
306
  // Constants passed to createShader() or getShaderParameter()
217
307
 
308
+ /** Passed to createShader to define a fragment shader. */
218
309
  FRAGMENT_SHADER = 0x8b30,
310
+ /** Passed to createShader to define a vertex shader */
219
311
  VERTEX_SHADER = 0x8b31,
312
+ /** Passed to getShaderParameter to get the status of the compilation. Returns false if the shader was not compiled. You can then query getShaderInfoLog to find the exact error */
220
313
  COMPILE_STATUS = 0x8b81,
314
+ /** Passed to getShaderParameter to determine if a shader was deleted via deleteShader. Returns true if it was, false otherwise. */
221
315
  DELETE_STATUS = 0x8b80,
316
+ /** Passed to getProgramParameter after calling linkProgram to determine if a program was linked correctly. Returns false if there were errors. Use getProgramInfoLog to find the exact error. */
222
317
  LINK_STATUS = 0x8b82,
318
+ /** Passed to getProgramParameter after calling validateProgram to determine if it is valid. Returns false if errors were found. */
223
319
  VALIDATE_STATUS = 0x8b83,
320
+ /** Passed to getProgramParameter after calling attachShader to determine if the shader was attached correctly. Returns false if errors occurred. */
224
321
  ATTACHED_SHADERS = 0x8b85,
322
+ /** Passed to getProgramParameter to get the number of attributes active in a program. */
225
323
  ACTIVE_ATTRIBUTES = 0x8b89,
324
+ /** Passed to getProgramParameter to get the number of uniforms active in a program. */
226
325
  ACTIVE_UNIFORMS = 0x8b86,
326
+ /** The maximum number of entries possible in the vertex attribute list. */
227
327
  MAX_VERTEX_ATTRIBS = 0x8869,
228
328
  MAX_VERTEX_UNIFORM_VECTORS = 0x8dfb,
229
329
  MAX_VARYING_VECTORS = 0x8dfc,
230
330
  MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8b4d,
231
331
  MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8b4c,
332
+ /** Implementation dependent number of maximum texture units. At least 8. */
232
333
  MAX_TEXTURE_IMAGE_UNITS = 0x8872,
233
334
  MAX_FRAGMENT_UNIFORM_VECTORS = 0x8dfd,
234
335
  SHADER_TYPE = 0x8b4f,
@@ -238,14 +339,22 @@ export enum GL {
238
339
  // Depth or stencil tests
239
340
  // Constants passed to depthFunc() or stencilFunc().
240
341
 
342
+ /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will never pass, i.e., nothing will be drawn. */
241
343
  NEVER = 0x0200,
242
- ALWAYS = 0x0207,
344
+ /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than the stored value. */
243
345
  LESS = 0x0201,
346
+ /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is equals to the stored value. */
244
347
  EQUAL = 0x0202,
348
+ /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value. */
245
349
  LEQUAL = 0x0203,
350
+ /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than the stored value. */
246
351
  GREATER = 0x0204,
247
- GEQUAL = 0x0206,
352
+ /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is not equal to the stored value. */
248
353
  NOTEQUAL = 0x0205,
354
+ /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than or equal to the stored value. */
355
+ GEQUAL = 0x0206,
356
+ /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass, i.e., pixels will be drawn in the order they are drawn. */
357
+ ALWAYS = 0x0207,
249
358
 
250
359
  // Stencil actions
251
360
  // Constants passed to stencilOp().
@@ -268,9 +377,13 @@ export enum GL {
268
377
  LINEAR_MIPMAP_NEAREST = 0x2701,
269
378
  NEAREST_MIPMAP_LINEAR = 0x2702,
270
379
  LINEAR_MIPMAP_LINEAR = 0x2703,
380
+ /** The texture magnification function is used when the pixel being textured maps to an area less than or equal to one texture element. It sets the texture magnification function to either GL_NEAREST or GL_LINEAR (see below). GL_NEAREST is generally faster than GL_LINEAR, but it can produce textured images with sharper edges because the transition between texture elements is not as smooth. Default: GL_LINEAR. */
271
381
  TEXTURE_MAG_FILTER = 0x2800,
382
+ /** The texture minifying function is used whenever the pixel being textured maps to an area greater than one texture element. There are six defined minifying functions. Two of them use the nearest one or nearest four texture elements to compute the texture value. The other four use mipmaps. Default: GL_NEAREST_MIPMAP_LINEAR */
272
383
  TEXTURE_MIN_FILTER = 0x2801,
384
+ /** Sets the wrap parameter for texture coordinate to either GL_CLAMP_TO_EDGE, GL_MIRRORED_REPEAT, or GL_REPEAT. G */
273
385
  TEXTURE_WRAP_S = 0x2802,
386
+ /** Sets the wrap parameter for texture coordinate to either GL_CLAMP_TO_EDGE, GL_MIRRORED_REPEAT, or GL_REPEAT. G */
274
387
  TEXTURE_WRAP_T = 0x2803,
275
388
  TEXTURE_2D = 0x0de1,
276
389
  TEXTURE = 0x1702,
@@ -414,6 +527,7 @@ export enum GL {
414
527
  RGBA8 = 0x8058,
415
528
  RGB10_A2 = 0x8059,
416
529
  TEXTURE_3D = 0x806f,
530
+ /** Sets the wrap parameter for texture coordinate to either GL_CLAMP_TO_EDGE, GL_MIRRORED_REPEAT, or GL_REPEAT. G */
417
531
  TEXTURE_WRAP_R = 0x8072,
418
532
  TEXTURE_MIN_LOD = 0x813a,
419
533
  TEXTURE_MAX_LOD = 0x813b,
@@ -699,23 +813,32 @@ export enum GL {
699
813
 
700
814
  // ANGLE_instanced_arrays
701
815
 
816
+ /** Describes the frequency divisor used for instanced rendering. */
702
817
  VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88fe,
703
818
 
704
819
  // WEBGL_debug_renderer_info
705
820
 
821
+ /** Passed to getParameter to get the vendor string of the graphics driver. */
706
822
  UNMASKED_VENDOR_WEBGL = 0x9245,
823
+ /** Passed to getParameter to get the renderer string of the graphics driver. */
707
824
  UNMASKED_RENDERER_WEBGL = 0x9246,
708
825
 
709
826
  // EXT_texture_filter_anisotropic
710
827
 
828
+ /** Returns the maximum available anisotropy. */
711
829
  MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84ff,
830
+ /** Passed to texParameter to set the desired maximum anisotropy for a texture. */
712
831
  TEXTURE_MAX_ANISOTROPY_EXT = 0x84fe,
713
832
 
714
833
  // EXT_sRGB
715
834
 
835
+ /** Unsized sRGB format that leaves the precision up to the driver. */
716
836
  SRGB_EXT = 0x8c40,
837
+ /** Unsized sRGB format with unsized alpha component. */
717
838
  SRGB_ALPHA_EXT = 0x8c42,
839
+ /** Sized (8-bit) sRGB and alpha formats. */
718
840
  SRGB8_ALPHA8_EXT = 0x8c43,
841
+ /** Returns the framebuffer color encoding. */
719
842
  FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT = 0x8210,
720
843
 
721
844
  // EXT_texture_norm16 - https://khronos.org/registry/webgl/extensions/EXT_texture_norm16/
@@ -731,9 +854,13 @@ export enum GL {
731
854
 
732
855
  // WEBGL_compressed_texture_s3tc (BC1, BC2, BC3)
733
856
 
857
+ /** A DXT1-compressed image in an RGB image format. */
734
858
  COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83f0,
859
+ /** A DXT1-compressed image in an RGB image format with a simple on/off alpha value. */
735
860
  COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83f1,
861
+ /** A DXT3-compressed image in an RGBA image format. Compared to a 32-bit RGBA texture, it offers 4:1 compression. */
736
862
  COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83f2,
863
+ /** A DXT5-compressed image in an RGBA image format. It also provides a 4:1 compression, but differs to the DXT3 compression in how the alpha compression is done. */
737
864
  COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83f3,
738
865
 
739
866
  // WEBGL_compressed_texture_s3tc_srgb (BC1, BC2, BC3 - SRGB)
@@ -759,26 +886,41 @@ export enum GL {
759
886
 
760
887
  // WEBGL_compressed_texture_es3
761
888
 
889
+ /** One-channel (red) unsigned format compression. */
762
890
  COMPRESSED_R11_EAC = 0x9270,
891
+ /** One-channel (red) signed format compression. */
763
892
  COMPRESSED_SIGNED_R11_EAC = 0x9271,
893
+ /** Two-channel (red and green) unsigned format compression. */
764
894
  COMPRESSED_RG11_EAC = 0x9272,
895
+ /** Two-channel (red and green) signed format compression. */
765
896
  COMPRESSED_SIGNED_RG11_EAC = 0x9273,
897
+ /** Compresses RGB8 data with no alpha channel. */
766
898
  COMPRESSED_RGB8_ETC2 = 0x9274,
899
+ /** Compresses RGBA8 data. The RGB part is encoded the same as RGB_ETC2, but the alpha part is encoded separately. */
767
900
  COMPRESSED_RGBA8_ETC2_EAC = 0x9275,
901
+ /** Compresses sRGB8 data with no alpha channel. */
768
902
  COMPRESSED_SRGB8_ETC2 = 0x9276,
903
+ /** Compresses sRGBA8 data. The sRGB part is encoded the same as SRGB_ETC2, but the alpha part is encoded separately. */
769
904
  COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9277,
905
+ /** Similar to RGB8_ETC, but with ability to punch through the alpha channel, which means to make it completely opaque or transparent. */
770
906
  COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9278,
907
+ /** Similar to SRGB8_ETC, but with ability to punch through the alpha channel, which means to make it completely opaque or transparent. */
771
908
  COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9279,
772
909
 
773
910
  // WEBGL_compressed_texture_pvrtc
774
911
 
912
+ /** RGB compression in 4-bit mode. One block for each 4×4 pixels. */
775
913
  COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 0x8c00,
914
+ /** RGBA compression in 4-bit mode. One block for each 4×4 pixels. */
776
915
  COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8c02,
916
+ /** RGB compression in 2-bit mode. One block for each 8×4 pixels. */
777
917
  COMPRESSED_RGB_PVRTC_2BPPV1_IMG = 0x8c01,
918
+ /** RGBA compression in 2-bit mode. One block for each 8×4 pixels. */
778
919
  COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 0x8c03,
779
920
 
780
921
  // WEBGL_compressed_texture_etc1
781
922
 
923
+ /** Compresses 24-bit RGB data with no alpha channel. */
782
924
  COMPRESSED_RGB_ETC1_WEBGL = 0x8d64,
783
925
 
784
926
  // WEBGL_compressed_texture_atc
@@ -820,26 +962,33 @@ export enum GL {
820
962
 
821
963
  // WEBGL_depth_texture
822
964
 
965
+ /** Unsigned integer type for 24-bit depth texture data. */
823
966
  UNSIGNED_INT_24_8_WEBGL = 0x84fa,
824
967
 
825
968
  // OES_texture_half_float
826
969
 
970
+ /** Half floating-point type (16-bit). */
827
971
  HALF_FLOAT_OES = 0x8d61,
828
972
 
829
973
  // WEBGL_color_buffer_float
830
974
 
975
+ /** RGBA 32-bit floating-point color-renderable format. */
831
976
  RGBA32F_EXT = 0x8814,
977
+ /** RGB 32-bit floating-point color-renderable format. */
832
978
  RGB32F_EXT = 0x8815,
833
979
  FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211,
834
980
  UNSIGNED_NORMALIZED_EXT = 0x8c17,
835
981
 
836
982
  // EXT_blend_minmax
837
983
 
984
+ /** Produces the minimum color components of the source and destination colors. */
838
985
  MIN_EXT = 0x8007,
986
+ /** Produces the maximum color components of the source and destination colors. */
839
987
  MAX_EXT = 0x8008,
840
988
 
841
989
  // OES_standard_derivatives
842
990
 
991
+ /** Indicates the accuracy of the derivative calculation for the GLSL built-in functions: dFdx, dFdy, and fwidth */
843
992
  FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8b8b,
844
993
 
845
994
  // WEBGL_draw_buffers
@@ -876,20 +1025,30 @@ export enum GL {
876
1025
  DRAW_BUFFER13_WEBGL = 0x8832,
877
1026
  DRAW_BUFFER14_WEBGL = 0x8833,
878
1027
  DRAW_BUFFER15_WEBGL = 0x8834,
1028
+ /** Maximum number of framebuffer color attachment points */
879
1029
  MAX_COLOR_ATTACHMENTS_WEBGL = 0x8cdf,
1030
+ /** Maximum number of draw buffers */
880
1031
  MAX_DRAW_BUFFERS_WEBGL = 0x8824,
881
1032
 
882
1033
  // OES_vertex_array_object
883
1034
 
1035
+ /** The bound vertex array object (VAO). */
884
1036
  VERTEX_ARRAY_BINDING_OES = 0x85b5,
885
1037
 
886
1038
  // EXT_disjoint_timer_query
887
1039
 
1040
+ /** The number of bits used to hold the query result for the given target. */
888
1041
  QUERY_COUNTER_BITS_EXT = 0x8864,
1042
+ /** The currently active query. */
889
1043
  CURRENT_QUERY_EXT = 0x8865,
1044
+ /** The query result. */
890
1045
  QUERY_RESULT_EXT = 0x8866,
1046
+ /** A Boolean indicating whether or not a query result is available. */
891
1047
  QUERY_RESULT_AVAILABLE_EXT = 0x8867,
1048
+ /** Elapsed time (in nanoseconds). */
892
1049
  TIME_ELAPSED_EXT = 0x88bf,
1050
+ /** The current time. */
893
1051
  TIMESTAMP_EXT = 0x8e28,
1052
+ /** A Boolean indicating whether or not the GPU performed any disjoint operation. */
894
1053
  GPU_DISJOINT_EXT = 0x8fbb // A Boolean indicating whether or not the GPU performed any disjoint operation.
895
1054
  }
package/src/index.ts CHANGED
@@ -1,2 +1,21 @@
1
1
  // WebGL constants
2
- export {GL as default} from './constants-enum';
2
+ export {GL, GL as default} from './constants-enum';
3
+
4
+ // WebGL types
5
+ export type {
6
+ GLDrawMode,
7
+ GLPrimitive,
8
+ GLDataType,
9
+ GLPixelType,
10
+ GLUniformType,
11
+ GLSamplerType,
12
+ GLCompositeType,
13
+ GLFunction,
14
+ GLBlendEquation,
15
+ GLBlendFunction,
16
+ GLStencilOp,
17
+ GLSamplerParameters,
18
+ GLValueParameters,
19
+ GLFunctionParameters,
20
+ GLParameters
21
+ } from './webgl-types';