@luma.gl/constants 9.0.0-beta.5 → 9.0.0-beta.6

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.
@@ -4,7 +4,7 @@
4
4
 
5
5
  /* eslint-disable key-spacing, max-len, no-inline-comments, camelcase */
6
6
 
7
- /**
7
+ /**
8
8
  * Standard WebGL, WebGL2 and extension constants (OpenGL constants)
9
9
  * @note (Most) of these constants are also defined on the WebGLRenderingContext interface.
10
10
  * @see https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants
@@ -77,9 +77,9 @@ enum GLEnum {
77
77
  // Constants passed to blendEquation() or blendEquationSeparate() to control
78
78
  // how the blending is calculated (for both, RBG and alpha, or separately).
79
79
 
80
- /** Passed to blendEquation or blendEquationSeparate to set an addition blend function. */
81
- /** Passed to blendEquation or blendEquationSeparate to specify a subtraction blend function (source - destination). */
82
- /** Passed to blendEquation or blendEquationSeparate to specify a reverse subtraction blend function (destination - source). */
80
+ /** Passed to blendEquation or blendEquationSeparate to set an addition blend function. */
81
+ /** Passed to blendEquation or blendEquationSeparate to specify a subtraction blend function (source - destination). */
82
+ /** Passed to blendEquation or blendEquationSeparate to specify a reverse subtraction blend function (destination - source). */
83
83
  FUNC_ADD = 0x8006,
84
84
  FUNC_SUBTRACT = 0x800a,
85
85
  FUNC_REVERSE_SUBTRACT = 0x800b,
@@ -149,7 +149,7 @@ enum GLEnum {
149
149
  STENCIL_BACK_VALUE_MASK = 0x8ca4,
150
150
  STENCIL_BACK_WRITEMASK = 0x8ca5,
151
151
 
152
- /** An Int32Array with four elements for the current viewport dimensions. */
152
+ /** An Int32Array with four elements for the current viewport dimensions. */
153
153
  VIEWPORT = 0x0ba2,
154
154
  /** An Int32Array with four elements for the current scissor box dimensions. */
155
155
  SCISSOR_BOX = 0x0c10,
@@ -272,13 +272,13 @@ enum GLEnum {
272
272
  // Hints
273
273
  // Constants passed to hint()
274
274
 
275
- /** There is no preference for this behavior. */
275
+ /** There is no preference for this behavior. */
276
276
  DONT_CARE = 0x1100,
277
- /** The most efficient behavior should be used. */
277
+ /** The most efficient behavior should be used. */
278
278
  FASTEST = 0x1101,
279
- /** The most correct or the highest quality option should be used. */
279
+ /** The most correct or the highest quality option should be used. */
280
280
  NICEST = 0x1102,
281
- /** Hint for the quality of filtering when generating mipmap images with WebGLRenderingContext.generateMipmap(). */
281
+ /** Hint for the quality of filtering when generating mipmap images with WebGLRenderingContext.generateMipmap(). */
282
282
  GENERATE_MIPMAP_HINT = 0x8192,
283
283
 
284
284
  // Data types
@@ -335,7 +335,7 @@ enum GLEnum {
335
335
  MAX_VARYING_VECTORS = 0x8dfc,
336
336
  MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8b4d,
337
337
  MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8b4c,
338
- /** Implementation dependent number of maximum texture units. At least 8. */
338
+ /** Implementation dependent number of maximum texture units. At least 8. */
339
339
  MAX_TEXTURE_IMAGE_UNITS = 0x8872,
340
340
  MAX_FRAGMENT_UNIFORM_VECTORS = 0x8dfd,
341
341
  SHADER_TYPE = 0x8b4f,
@@ -622,9 +622,13 @@ enum GLEnum {
622
622
  // Queries
623
623
 
624
624
  CURRENT_QUERY = 0x8865,
625
+ /** Returns a GLuint containing the query result. */
625
626
  QUERY_RESULT = 0x8866,
627
+ /** Whether query result is available. */
626
628
  QUERY_RESULT_AVAILABLE = 0x8867,
629
+ /** Occlusion query (if drawing passed depth test) */
627
630
  ANY_SAMPLES_PASSED = 0x8c2f,
631
+ /** Occlusion query less accurate/faster version */
628
632
  ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8d6a,
629
633
 
630
634
  // Draw buffers
@@ -817,11 +821,6 @@ enum GLEnum {
817
821
 
818
822
  // Constants defined in WebGL extensions
819
823
 
820
- // ANGLE_instanced_arrays
821
-
822
- /** Describes the frequency divisor used for instanced rendering. */
823
- VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88fe,
824
-
825
824
  // WEBGL_debug_renderer_info
826
825
 
827
826
  /** Passed to getParameter to get the vendor string of the graphics driver. */
@@ -836,27 +835,16 @@ enum GLEnum {
836
835
  /** Passed to texParameter to set the desired maximum anisotropy for a texture. */
837
836
  TEXTURE_MAX_ANISOTROPY_EXT = 0x84fe,
838
837
 
839
- // EXT_sRGB
840
-
841
- /** Unsized sRGB format that leaves the precision up to the driver. */
842
- SRGB_EXT = 0x8c40,
843
- /** Unsized sRGB format with unsized alpha component. */
844
- SRGB_ALPHA_EXT = 0x8c42,
845
- /** Sized (8-bit) sRGB and alpha formats. */
846
- SRGB8_ALPHA8_EXT = 0x8c43,
847
- /** Returns the framebuffer color encoding. */
848
- FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT = 0x8210,
849
-
850
838
  // EXT_texture_norm16 - https://khronos.org/registry/webgl/extensions/EXT_texture_norm16/
851
839
 
852
- R16_EXT = 0x822A,
853
- RG16_EXT = 0x822C,
840
+ R16_EXT = 0x822a,
841
+ RG16_EXT = 0x822c,
854
842
  RGB16_EXT = 0x8054,
855
- RGBA16_EXT = 0x805B,
856
- R16_SNORM_EXT = 0x8F98,
857
- RG16_SNORM_EXT = 0x8F99,
858
- RGB16_SNORM_EXT = 0x8F9A,
859
- RGBA16_SNORM_EXT = 0x8F9B,
843
+ RGBA16_EXT = 0x805b,
844
+ R16_SNORM_EXT = 0x8f98,
845
+ RG16_SNORM_EXT = 0x8f99,
846
+ RGB16_SNORM_EXT = 0x8f9a,
847
+ RGBA16_SNORM_EXT = 0x8f9b,
860
848
 
861
849
  // WEBGL_compressed_texture_s3tc (BC1, BC2, BC3)
862
850
 
@@ -966,81 +954,6 @@ enum GLEnum {
966
954
  COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR = 0x93dc,
967
955
  COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR = 0x93dd,
968
956
 
969
- // WEBGL_depth_texture
970
-
971
- /** Unsigned integer type for 24-bit depth texture data. */
972
- UNSIGNED_INT_24_8_WEBGL = 0x84fa,
973
-
974
- // OES_texture_half_float
975
-
976
- /** Half floating-point type (16-bit). */
977
- HALF_FLOAT_OES = 0x8d61,
978
-
979
- // WEBGL_color_buffer_float
980
-
981
- /** RGBA 32-bit floating-point color-renderable format. */
982
- RGBA32F_EXT = 0x8814,
983
- /** RGB 32-bit floating-point color-renderable format. */
984
- RGB32F_EXT = 0x8815,
985
- FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211,
986
- UNSIGNED_NORMALIZED_EXT = 0x8c17,
987
-
988
- // EXT_blend_minmax
989
-
990
- /** Produces the minimum color components of the source and destination colors. */
991
- MIN_EXT = 0x8007,
992
- /** Produces the maximum color components of the source and destination colors. */
993
- MAX_EXT = 0x8008,
994
-
995
- // OES_standard_derivatives
996
-
997
- /** Indicates the accuracy of the derivative calculation for the GLSL built-in functions: dFdx, dFdy, and fwidth */
998
- FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8b8b,
999
-
1000
- // WEBGL_draw_buffers
1001
-
1002
- COLOR_ATTACHMENT0_WEBGL = 0x8ce0,
1003
- COLOR_ATTACHMENT1_WEBGL = 0x8ce1,
1004
- COLOR_ATTACHMENT2_WEBGL = 0x8ce2,
1005
- COLOR_ATTACHMENT3_WEBGL = 0x8ce3,
1006
- COLOR_ATTACHMENT4_WEBGL = 0x8ce4,
1007
- COLOR_ATTACHMENT5_WEBGL = 0x8ce5,
1008
- COLOR_ATTACHMENT6_WEBGL = 0x8ce6,
1009
- COLOR_ATTACHMENT7_WEBGL = 0x8ce7,
1010
- COLOR_ATTACHMENT8_WEBGL = 0x8ce8,
1011
- COLOR_ATTACHMENT9_WEBGL = 0x8ce9,
1012
- COLOR_ATTACHMENT10_WEBGL = 0x8cea,
1013
- COLOR_ATTACHMENT11_WEBGL = 0x8ceb,
1014
- COLOR_ATTACHMENT12_WEBGL = 0x8cec,
1015
- COLOR_ATTACHMENT13_WEBGL = 0x8ced,
1016
- COLOR_ATTACHMENT14_WEBGL = 0x8cee,
1017
- COLOR_ATTACHMENT15_WEBGL = 0x8cef,
1018
- DRAW_BUFFER0_WEBGL = 0x8825,
1019
- DRAW_BUFFER1_WEBGL = 0x8826,
1020
- DRAW_BUFFER2_WEBGL = 0x8827,
1021
- DRAW_BUFFER3_WEBGL = 0x8828,
1022
- DRAW_BUFFER4_WEBGL = 0x8829,
1023
- DRAW_BUFFER5_WEBGL = 0x882a,
1024
- DRAW_BUFFER6_WEBGL = 0x882b,
1025
- DRAW_BUFFER7_WEBGL = 0x882c,
1026
- DRAW_BUFFER8_WEBGL = 0x882d,
1027
- DRAW_BUFFER9_WEBGL = 0x882e,
1028
- DRAW_BUFFER10_WEBGL = 0x882f,
1029
- DRAW_BUFFER11_WEBGL = 0x8830,
1030
- DRAW_BUFFER12_WEBGL = 0x8831,
1031
- DRAW_BUFFER13_WEBGL = 0x8832,
1032
- DRAW_BUFFER14_WEBGL = 0x8833,
1033
- DRAW_BUFFER15_WEBGL = 0x8834,
1034
- /** Maximum number of framebuffer color attachment points */
1035
- MAX_COLOR_ATTACHMENTS_WEBGL = 0x8cdf,
1036
- /** Maximum number of draw buffers */
1037
- MAX_DRAW_BUFFERS_WEBGL = 0x8824,
1038
-
1039
- // OES_vertex_array_object
1040
-
1041
- /** The bound vertex array object (VAO). */
1042
- VERTEX_ARRAY_BINDING_OES = 0x85b5,
1043
-
1044
957
  // EXT_disjoint_timer_query
1045
958
 
1046
959
  /** The number of bits used to hold the query result for the given target. */
@@ -1055,13 +968,83 @@ enum GLEnum {
1055
968
  TIME_ELAPSED_EXT = 0x88bf,
1056
969
  /** The current time. */
1057
970
  TIMESTAMP_EXT = 0x8e28,
1058
- /** A Boolean indicating whether or not the GPU performed any disjoint operation. */
971
+ /** A Boolean indicating whether or not the GPU performed any disjoint operation (lost context) */
1059
972
  GPU_DISJOINT_EXT = 0x8fbb,
1060
973
 
1061
- // https://registry.khronos.org/webgl/extensions/KHR_parallel_shader_compile
1062
-
974
+ // KHR_parallel_shader_compile https://registry.khronos.org/webgl/extensions/KHR_parallel_shader_compile
975
+
1063
976
  /** a non-blocking poll operation, so that compile/link status availability can be queried without potentially incurring stalls */
1064
- COMPLETION_STATUS = 0x91B1
977
+ COMPLETION_STATUS_KHR = 0x91b1,
978
+
979
+ // EXT_depth_clamp https://registry.khronos.org/webgl/extensions/EXT_depth_clamp/
980
+
981
+ /** Disables depth clipping */
982
+ DEPTH_CLAMP_EXT = 0x864f,
983
+
984
+ // WEBGL_provoking_vertex https://registry.khronos.org/webgl/extensions/WEBGL_provoking_vertex/
985
+
986
+ /** Values of first vertex in primitive are used for flat shading */
987
+ FIRST_VERTEX_CONVENTION_WEBGL = 0x8e4d,
988
+ /** Values of first vertex in primitive are used for flat shading */
989
+ LAST_VERTEX_CONVENTION_WEBGL = 0x8e4e, // default
990
+ /** Controls which vertex in primitive is used for flat shading */
991
+ PROVOKING_VERTEX_WEBL = 0x8e4f,
992
+
993
+ // WEBGL_polygon_mode https://registry.khronos.org/webgl/extensions/WEBGL_polygon_mode/
994
+
995
+ POLYGON_MODE_WEBGL = 0x0b40,
996
+ POLYGON_OFFSET_LINE_WEBGL = 0x2a02,
997
+ LINE_WEBGL = 0x1b01,
998
+ FILL_WEBGL = 0x1b02,
999
+
1000
+ // WEBGL_clip_cull_distance https://registry.khronos.org/webgl/extensions/WEBGL_clip_cull_distance/
1001
+
1002
+ /** Max clip distances */
1003
+ MAX_CLIP_DISTANCES_WEBGL = 0x0d32,
1004
+ /** Max cull distances */
1005
+ MAX_CULL_DISTANCES_WEBGL = 0x82f9,
1006
+ /** Max clip and cull distances */
1007
+ MAX_COMBINED_CLIP_AND_CULL_DISTANCES_WEBGL = 0x82fa,
1008
+
1009
+ /** Enable gl_ClipDistance[0] and gl_CullDistance[0] */
1010
+ CLIP_DISTANCE0_WEBGL = 0x3000,
1011
+ /** Enable gl_ClipDistance[1] and gl_CullDistance[1] */
1012
+ CLIP_DISTANCE1_WEBGL = 0x3001,
1013
+ /** Enable gl_ClipDistance[2] and gl_CullDistance[2] */
1014
+ CLIP_DISTANCE2_WEBGL = 0x3002,
1015
+ /** Enable gl_ClipDistance[3] and gl_CullDistance[3] */
1016
+ CLIP_DISTANCE3_WEBGL = 0x3003,
1017
+ /** Enable gl_ClipDistance[4] and gl_CullDistance[4] */
1018
+ CLIP_DISTANCE4_WEBGL = 0x3004,
1019
+ /** Enable gl_ClipDistance[5] and gl_CullDistance[5] */
1020
+ CLIP_DISTANCE5_WEBGL = 0x3005,
1021
+ /** Enable gl_ClipDistance[6] and gl_CullDistance[6] */
1022
+ CLIP_DISTANCE6_WEBGL = 0x3006,
1023
+ /** Enable gl_ClipDistance[7] and gl_CullDistance[7] */
1024
+ CLIP_DISTANCE7_WEBGL = 0x3007,
1025
+
1026
+ /** EXT_polygon_offset_clamp https://registry.khronos.org/webgl/extensions/EXT_polygon_offset_clamp/ */
1027
+ POLYGON_OFFSET_CLAMP_EXT = 0x8e1b,
1028
+
1029
+ /** EXT_clip_control https://registry.khronos.org/webgl/extensions/EXT_clip_control/ */
1030
+ LOWER_LEFT_EXT = 0x8ca1,
1031
+ UPPER_LEFT_EXT = 0x8ca2,
1032
+
1033
+ NEGATIVE_ONE_TO_ONE_EXT = 0x935e,
1034
+ ZERO_TO_ONE_EXT = 0x935f,
1035
+
1036
+ CLIP_ORIGIN_EXT = 0x935c,
1037
+ CLIP_DEPTH_MODE_EXT = 0x935d,
1038
+
1039
+ /** WEBGL_blend_func_extended https://registry.khronos.org/webgl/extensions/WEBGL_blend_func_extended/ */
1040
+ SRC1_COLOR_WEBGL = 0x88f9,
1041
+ SRC1_ALPHA_WEBGL = 0x8589,
1042
+ ONE_MINUS_SRC1_COLOR_WEBGL = 0x88fa,
1043
+ ONE_MINUS_SRC1_ALPHA_WEBGL = 0x88fb,
1044
+ MAX_DUAL_SOURCE_DRAW_BUFFERS_WEBGL = 0x88fc,
1045
+
1046
+ /** EXT_texture_mirror_clamp_to_edge https://registry.khronos.org/webgl/extensions/EXT_texture_mirror_clamp_to_edge/ */
1047
+ MIRROR_CLAMP_TO_EDGE_EXT = 0x8743
1065
1048
  }
1066
1049
 
1067
1050
  export {GLEnum as GL};