@luma.gl/webgl 9.0.0-beta.5 → 9.0.0-beta.7

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.
Files changed (192) hide show
  1. package/dist/adapter/converters/device-parameters.d.ts.map +1 -1
  2. package/dist/adapter/converters/device-parameters.js +128 -71
  3. package/dist/adapter/converters/sampler-parameters.d.ts.map +1 -1
  4. package/dist/adapter/converters/sampler-parameters.js +20 -19
  5. package/dist/adapter/converters/shader-formats.d.ts.map +1 -1
  6. package/dist/adapter/converters/shader-formats.js +40 -20
  7. package/dist/adapter/converters/texture-formats.d.ts +16 -11
  8. package/dist/adapter/converters/texture-formats.d.ts.map +1 -1
  9. package/dist/adapter/converters/texture-formats.js +224 -205
  10. package/dist/adapter/converters/vertex-formats.d.ts.map +1 -1
  11. package/dist/adapter/converters/vertex-formats.js +22 -21
  12. package/dist/adapter/device-helpers/webgl-device-features.d.ts +19 -5
  13. package/dist/adapter/device-helpers/webgl-device-features.d.ts.map +1 -1
  14. package/dist/adapter/device-helpers/webgl-device-features.js +89 -43
  15. package/dist/adapter/device-helpers/webgl-device-info.d.ts +2 -1
  16. package/dist/adapter/device-helpers/webgl-device-info.d.ts.map +1 -1
  17. package/dist/adapter/device-helpers/webgl-device-info.js +22 -19
  18. package/dist/adapter/device-helpers/webgl-device-limits.d.ts +33 -48
  19. package/dist/adapter/device-helpers/webgl-device-limits.d.ts.map +1 -1
  20. package/dist/adapter/device-helpers/webgl-device-limits.js +42 -87
  21. package/dist/adapter/helpers/decode-webgl-types.d.ts.map +1 -1
  22. package/dist/adapter/helpers/decode-webgl-types.js +47 -46
  23. package/dist/adapter/helpers/get-shader-layout.d.ts.map +1 -1
  24. package/dist/adapter/helpers/get-shader-layout.js +35 -34
  25. package/dist/adapter/helpers/parse-shader-compiler-log.d.ts.map +1 -1
  26. package/dist/adapter/helpers/parse-shader-compiler-log.js +3 -2
  27. package/dist/adapter/helpers/set-uniform.d.ts.map +1 -1
  28. package/dist/adapter/helpers/set-uniform.js +42 -41
  29. package/dist/adapter/helpers/webgl-topology-utils.d.ts.map +1 -1
  30. package/dist/adapter/helpers/webgl-topology-utils.js +40 -39
  31. package/dist/adapter/objects/constants-to-keys.d.ts.map +1 -1
  32. package/dist/adapter/objects/constants-to-keys.js +2 -1
  33. package/dist/adapter/objects/webgl-renderbuffer.d.ts +2 -2
  34. package/dist/adapter/objects/webgl-renderbuffer.d.ts.map +1 -1
  35. package/dist/adapter/objects/webgl-renderbuffer.js +30 -17
  36. package/dist/adapter/objects/webgl-resource.d.ts +2 -24
  37. package/dist/adapter/objects/webgl-resource.d.ts.map +1 -1
  38. package/dist/adapter/objects/webgl-resource.js +6 -101
  39. package/dist/adapter/resources/webgl-buffer.d.ts +1 -1
  40. package/dist/adapter/resources/webgl-buffer.d.ts.map +1 -1
  41. package/dist/adapter/resources/webgl-buffer.js +16 -15
  42. package/dist/adapter/resources/webgl-command-buffer.d.ts +1 -1
  43. package/dist/adapter/resources/webgl-command-buffer.d.ts.map +1 -1
  44. package/dist/adapter/resources/webgl-command-buffer.js +32 -31
  45. package/dist/adapter/resources/webgl-command-encoder.d.ts +8 -3
  46. package/dist/adapter/resources/webgl-command-encoder.d.ts.map +1 -1
  47. package/dist/adapter/resources/webgl-command-encoder.js +4 -2
  48. package/dist/adapter/resources/webgl-external-texture.js +6 -5
  49. package/dist/adapter/resources/webgl-framebuffer.d.ts +6 -10
  50. package/dist/adapter/resources/webgl-framebuffer.d.ts.map +1 -1
  51. package/dist/adapter/resources/webgl-framebuffer.js +60 -53
  52. package/dist/adapter/resources/webgl-query-set.d.ts +44 -0
  53. package/dist/adapter/resources/webgl-query-set.d.ts.map +1 -0
  54. package/dist/adapter/resources/webgl-query-set.js +136 -0
  55. package/dist/adapter/resources/webgl-render-pass.d.ts +3 -1
  56. package/dist/adapter/resources/webgl-render-pass.d.ts.map +1 -1
  57. package/dist/adapter/resources/webgl-render-pass.js +20 -12
  58. package/dist/adapter/resources/webgl-render-pipeline.d.ts +4 -5
  59. package/dist/adapter/resources/webgl-render-pipeline.d.ts.map +1 -1
  60. package/dist/adapter/resources/webgl-render-pipeline.js +52 -61
  61. package/dist/adapter/resources/webgl-sampler.d.ts +1 -1
  62. package/dist/adapter/resources/webgl-sampler.d.ts.map +1 -1
  63. package/dist/adapter/resources/webgl-sampler.js +5 -4
  64. package/dist/adapter/resources/webgl-shader.d.ts +3 -2
  65. package/dist/adapter/resources/webgl-shader.d.ts.map +1 -1
  66. package/dist/adapter/resources/webgl-shader.js +15 -9
  67. package/dist/adapter/resources/webgl-texture-view.d.ts +14 -0
  68. package/dist/adapter/resources/webgl-texture-view.d.ts.map +1 -0
  69. package/dist/adapter/resources/webgl-texture-view.js +18 -0
  70. package/dist/adapter/resources/webgl-texture.d.ts +6 -4
  71. package/dist/adapter/resources/webgl-texture.d.ts.map +1 -1
  72. package/dist/adapter/resources/webgl-texture.js +39 -32
  73. package/dist/adapter/resources/webgl-transform-feedback.d.ts +1 -1
  74. package/dist/adapter/resources/webgl-transform-feedback.d.ts.map +1 -1
  75. package/dist/adapter/resources/webgl-transform-feedback.js +10 -10
  76. package/dist/adapter/resources/webgl-vertex-array.d.ts +3 -3
  77. package/dist/adapter/resources/webgl-vertex-array.d.ts.map +1 -1
  78. package/dist/adapter/resources/webgl-vertex-array.js +10 -9
  79. package/dist/adapter/webgl-canvas-context.d.ts +2 -2
  80. package/dist/adapter/webgl-canvas-context.d.ts.map +1 -1
  81. package/dist/adapter/webgl-canvas-context.js +3 -2
  82. package/dist/adapter/webgl-device.d.ts +35 -30
  83. package/dist/adapter/webgl-device.d.ts.map +1 -1
  84. package/dist/adapter/webgl-device.js +110 -109
  85. package/dist/classic/accessor.d.ts.map +1 -1
  86. package/dist/classic/accessor.js +8 -7
  87. package/dist/classic/clear.d.ts.map +1 -1
  88. package/dist/classic/clear.js +5 -4
  89. package/dist/classic/copy-and-blit.d.ts +1 -1
  90. package/dist/classic/copy-and-blit.d.ts.map +1 -1
  91. package/dist/classic/copy-and-blit.js +19 -19
  92. package/dist/classic/format-utils.d.ts.map +1 -1
  93. package/dist/classic/format-utils.js +16 -15
  94. package/dist/classic/typed-array-utils.d.ts.map +1 -1
  95. package/dist/classic/typed-array-utils.js +20 -19
  96. package/dist/context/debug/spector.d.ts.map +1 -1
  97. package/dist/context/debug/spector.js +2 -1
  98. package/dist/context/debug/webgl-developer-tools.d.ts.map +1 -1
  99. package/dist/context/debug/webgl-developer-tools.js +7 -6
  100. package/dist/context/{context → helpers}/create-browser-context.d.ts.map +1 -1
  101. package/dist/context/{context → helpers}/create-browser-context.js +2 -1
  102. package/dist/context/{context/context-data.d.ts → helpers/webgl-context-data.d.ts} +2 -3
  103. package/dist/context/helpers/webgl-context-data.d.ts.map +1 -0
  104. package/dist/context/helpers/webgl-context-data.js +21 -0
  105. package/dist/context/helpers/webgl-extensions.d.ts +4 -0
  106. package/dist/context/helpers/webgl-extensions.d.ts.map +1 -0
  107. package/dist/context/helpers/webgl-extensions.js +10 -0
  108. package/dist/context/parameters/unified-parameter-api.d.ts +3 -4
  109. package/dist/context/parameters/unified-parameter-api.d.ts.map +1 -1
  110. package/dist/context/parameters/unified-parameter-api.js +7 -11
  111. package/dist/context/parameters/webgl-parameter-tables.d.ts +12 -13
  112. package/dist/context/parameters/webgl-parameter-tables.d.ts.map +1 -1
  113. package/dist/context/parameters/webgl-parameter-tables.js +302 -295
  114. package/dist/context/state-tracker/deep-array-equal.d.ts.map +1 -1
  115. package/dist/context/state-tracker/deep-array-equal.js +2 -1
  116. package/dist/context/state-tracker/track-context-state.d.ts.map +1 -1
  117. package/dist/context/state-tracker/track-context-state.js +5 -4
  118. package/dist/context/state-tracker/with-parameters.d.ts +2 -3
  119. package/dist/context/state-tracker/with-parameters.d.ts.map +1 -1
  120. package/dist/context/state-tracker/with-parameters.js +6 -8
  121. package/dist/dist.dev.js +1635 -1387
  122. package/dist/index.cjs +1766 -1534
  123. package/dist/index.cjs.map +4 -4
  124. package/dist/index.d.ts +25 -25
  125. package/dist/index.d.ts.map +1 -1
  126. package/dist/index.js +24 -23
  127. package/dist/types.d.ts.map +1 -1
  128. package/dist/types.js +2 -1
  129. package/dist.min.js +6 -6
  130. package/package.json +4 -4
  131. package/src/adapter/converters/device-parameters.ts +114 -27
  132. package/src/adapter/converters/sampler-parameters.ts +12 -3
  133. package/src/adapter/converters/shader-formats.ts +47 -22
  134. package/src/adapter/converters/texture-formats.ts +138 -114
  135. package/src/adapter/converters/vertex-formats.ts +3 -3
  136. package/src/adapter/device-helpers/webgl-device-features.ts +102 -50
  137. package/src/adapter/device-helpers/webgl-device-info.ts +28 -19
  138. package/src/adapter/device-helpers/webgl-device-limits.ts +46 -150
  139. package/src/adapter/helpers/decode-webgl-types.ts +13 -7
  140. package/src/adapter/helpers/get-shader-layout.ts +4 -3
  141. package/src/adapter/helpers/parse-shader-compiler-log.ts +10 -6
  142. package/src/adapter/helpers/set-uniform.ts +2 -1
  143. package/src/adapter/helpers/webgl-topology-utils.ts +10 -3
  144. package/src/adapter/objects/constants-to-keys.ts +2 -1
  145. package/src/adapter/objects/webgl-renderbuffer.ts +36 -14
  146. package/src/adapter/objects/webgl-resource.ts +7 -125
  147. package/src/adapter/resources/webgl-buffer.ts +4 -3
  148. package/src/adapter/resources/webgl-command-buffer.ts +5 -5
  149. package/src/adapter/resources/webgl-command-encoder.ts +14 -11
  150. package/src/adapter/resources/webgl-external-texture.ts +6 -5
  151. package/src/adapter/resources/webgl-framebuffer.ts +61 -53
  152. package/src/adapter/resources/webgl-query-set.ts +171 -0
  153. package/src/adapter/resources/webgl-render-pass.ts +20 -11
  154. package/src/adapter/resources/webgl-render-pipeline.ts +54 -54
  155. package/src/adapter/resources/webgl-sampler.ts +2 -1
  156. package/src/adapter/resources/webgl-shader.ts +12 -5
  157. package/src/adapter/resources/webgl-texture-view.ts +28 -0
  158. package/src/adapter/resources/webgl-texture.ts +14 -3
  159. package/src/adapter/resources/webgl-transform-feedback.ts +2 -7
  160. package/src/adapter/resources/webgl-vertex-array.ts +4 -3
  161. package/src/adapter/webgl-canvas-context.ts +6 -4
  162. package/src/adapter/webgl-device.ts +116 -107
  163. package/src/classic/accessor.ts +5 -4
  164. package/src/classic/clear.ts +14 -8
  165. package/src/classic/copy-and-blit.ts +11 -4
  166. package/src/classic/format-utils.ts +2 -1
  167. package/src/classic/typed-array-utils.ts +3 -7
  168. package/src/context/debug/spector.ts +9 -6
  169. package/src/context/debug/webgl-developer-tools.ts +27 -14
  170. package/src/context/{context → helpers}/create-browser-context.ts +3 -2
  171. package/src/context/helpers/webgl-context-data.ts +31 -0
  172. package/src/context/helpers/webgl-extensions.ts +17 -0
  173. package/src/context/parameters/unified-parameter-api.ts +6 -17
  174. package/src/context/parameters/webgl-parameter-tables.ts +69 -32
  175. package/src/context/state-tracker/deep-array-equal.ts +2 -1
  176. package/src/context/state-tracker/track-context-state.ts +11 -6
  177. package/src/context/state-tracker/with-parameters.ts +8 -8
  178. package/src/index.ts +7 -6
  179. package/src/types.ts +2 -1
  180. package/dist/adapter/device-helpers/device-features.d.ts +0 -6
  181. package/dist/adapter/device-helpers/device-features.d.ts.map +0 -1
  182. package/dist/adapter/device-helpers/device-features.js +0 -65
  183. package/dist/adapter/device-helpers/device-limits.d.ts +0 -50
  184. package/dist/adapter/device-helpers/device-limits.d.ts.map +0 -1
  185. package/dist/adapter/device-helpers/device-limits.js +0 -92
  186. package/dist/adapter/device-helpers/get-device-info.d.ts +0 -4
  187. package/dist/adapter/device-helpers/get-device-info.d.ts.map +0 -1
  188. package/dist/adapter/device-helpers/get-device-info.js +0 -87
  189. package/dist/context/context/context-data.d.ts.map +0 -1
  190. package/dist/context/context/context-data.js +0 -33
  191. package/src/context/context/context-data.ts +0 -44
  192. /package/dist/context/{context → helpers}/create-browser-context.d.ts +0 -0
@@ -1,12 +1,14 @@
1
- // luma.gl, MIT license
1
+ // luma.gl
2
+ // SPDX-License-Identifier: MIT
2
3
  // Copyright (c) vis.gl contributors
3
4
  import { Texture, log, assert, loadImage, isObjectEmpty } from '@luma.gl/core';
4
5
  import { GL } from '@luma.gl/constants';
5
- import { withGLParameters } from '../../context/state-tracker/with-parameters';
6
- import { convertTextureFormatToGL, getWebGLTextureParameters, getTextureFormatBytesPerPixel } from '../converters/texture-formats';
7
- import { convertSamplerParametersToWebGL } from '../converters/sampler-parameters';
8
- import { WEBGLBuffer } from './webgl-buffer';
9
- import { WEBGLSampler } from './webgl-sampler';
6
+ import { withGLParameters } from "../../context/state-tracker/with-parameters.js";
7
+ import { convertTextureFormatToGL, getWebGLTextureParameters, getTextureFormatBytesPerPixel } from "../converters/texture-formats.js";
8
+ import { convertSamplerParametersToWebGL } from "../converters/sampler-parameters.js";
9
+ import { WEBGLBuffer } from "./webgl-buffer.js";
10
+ import { WEBGLSampler } from "./webgl-sampler.js";
11
+ import { WEBGLTextureView } from "./webgl-texture-view.js";
10
12
  export const DEFAULT_WEBGL_TEXTURE_PROPS = {
11
13
  // deprecated
12
14
  parameters: {},
@@ -21,19 +23,20 @@ export const DEFAULT_WEBGL_TEXTURE_PROPS = {
21
23
  export class WEBGLTexture extends Texture {
22
24
  // TODO - remove?
23
25
  static FACES = [
24
- GL.TEXTURE_CUBE_MAP_POSITIVE_X,
25
- GL.TEXTURE_CUBE_MAP_NEGATIVE_X,
26
- GL.TEXTURE_CUBE_MAP_POSITIVE_Y,
27
- GL.TEXTURE_CUBE_MAP_NEGATIVE_Y,
28
- GL.TEXTURE_CUBE_MAP_POSITIVE_Z,
29
- GL.TEXTURE_CUBE_MAP_NEGATIVE_Z
26
+ 34069,
27
+ 34070,
28
+ 34071,
29
+ 34072,
30
+ 34073,
31
+ 34074
30
32
  ];
31
33
  MAX_ATTRIBUTES;
32
34
  device;
33
35
  gl;
34
36
  handle;
35
- /** Sampler object (currently unused) */
37
+ // (TODO - currently unused in WebGL, but WebGL 2 does support sampler objects) */
36
38
  sampler = undefined;
39
+ view = undefined;
37
40
  // data;
38
41
  glFormat = undefined;
39
42
  type = undefined;
@@ -63,7 +66,7 @@ export class WEBGLTexture extends Texture {
63
66
  this.gl = this.device.gl;
64
67
  this.handle = this.props.handle || this.gl.createTexture();
65
68
  this.device.setSpectorMetadata(this.handle, { ...this.props, data: typeof this.props.data }); // {name: this.props.id};
66
- this.glFormat = GL.RGBA;
69
+ this.glFormat = 6408;
67
70
  this.target = getWebGLTextureTarget(this.props);
68
71
  // Program.draw() checks the loaded flag of all textures
69
72
  this.loaded = false;
@@ -86,6 +89,9 @@ export class WEBGLTexture extends Texture {
86
89
  toString() {
87
90
  return `Texture(${this.id},${this.width}x${this.height})`;
88
91
  }
92
+ createView(props) {
93
+ return new WEBGLTextureView(this.device, { ...props, texture: this });
94
+ }
89
95
  // eslint-disable-next-line max-statements
90
96
  initialize(props = {}) {
91
97
  // Cube textures
@@ -139,7 +145,7 @@ export class WEBGLTexture extends Texture {
139
145
  this.dataFormat = dataFormat;
140
146
  this.textureUnit = textureUnit;
141
147
  if (Number.isFinite(this.textureUnit)) {
142
- this.gl.activeTexture(GL.TEXTURE0 + this.textureUnit);
148
+ this.gl.activeTexture(33984 + this.textureUnit);
143
149
  this.gl.bindTexture(this.target, this.handle);
144
150
  }
145
151
  this.mipmaps = mipmaps;
@@ -158,7 +164,8 @@ export class WEBGLTexture extends Texture {
158
164
  // Set texture sampler parameters
159
165
  this.setSampler(props.sampler);
160
166
  this._setSamplerParameters(parameters);
161
- if (mipmaps) {
167
+ this.view = this.createView({ ...this.props, mipLevelCount: 1, arrayLayerCount: 1 });
168
+ if (mipmaps && this.device.isTextureFormatFilterable(props.format)) {
162
169
  this.generateMipmap();
163
170
  }
164
171
  if (isVideo) {
@@ -304,9 +311,9 @@ export class WEBGLTexture extends Texture {
304
311
  break;
305
312
  case 'buffer':
306
313
  // WebGL2 enables creating textures directly from a WebGL buffer
307
- this.device.gl.bindBuffer(GL.PIXEL_UNPACK_BUFFER, data.handle || data);
314
+ this.device.gl.bindBuffer(35052, data.handle || data);
308
315
  this.device.gl.texImage2D(target, level, glFormat, width, height, 0 /* border*/, dataFormat, type, offset);
309
- this.device.gl.bindBuffer(GL.PIXEL_UNPACK_BUFFER, null);
316
+ this.device.gl.bindBuffer(35052, null);
310
317
  break;
311
318
  case 'browser-object':
312
319
  gl.texImage2D(target, level, glFormat, width, height, 0 /* border*/, dataFormat, type, data);
@@ -376,9 +383,9 @@ export class WEBGLTexture extends Texture {
376
383
  else if (typeof WebGLBuffer !== 'undefined' && data instanceof WebGLBuffer) {
377
384
  // WebGL2 allows us to create texture directly from a WebGL buffer
378
385
  // This texImage2D signature uses currently bound GL.PIXEL_UNPACK_BUFFER
379
- this.device.gl.bindBuffer(GL.PIXEL_UNPACK_BUFFER, data);
386
+ this.device.gl.bindBuffer(35052, data);
380
387
  this.device.gl.texSubImage2D(target, level, x, y, width, height, dataFormat, type, offset);
381
- this.device.gl.bindBuffer(GL.PIXEL_UNPACK_BUFFER, null);
388
+ this.device.gl.bindBuffer(35052, null);
382
389
  }
383
390
  else {
384
391
  // Assume data is a browser supported object (ImageData, Canvas, ...)
@@ -400,13 +407,13 @@ export class WEBGLTexture extends Texture {
400
407
  return null;
401
408
  }
402
409
  getActiveUnit() {
403
- return this.gl.getParameter(GL.ACTIVE_TEXTURE) - GL.TEXTURE0;
410
+ return this.gl.getParameter(34016) - 33984;
404
411
  }
405
412
  bind(textureUnit = this.textureUnit) {
406
413
  const { gl } = this;
407
414
  if (textureUnit !== undefined) {
408
415
  this.textureUnit = textureUnit;
409
- gl.activeTexture(gl.TEXTURE0 + textureUnit);
416
+ gl.activeTexture(33984 + textureUnit);
410
417
  }
411
418
  gl.bindTexture(this.target, this.handle);
412
419
  return textureUnit;
@@ -415,7 +422,7 @@ export class WEBGLTexture extends Texture {
415
422
  const { gl } = this;
416
423
  if (textureUnit !== undefined) {
417
424
  this.textureUnit = textureUnit;
418
- gl.activeTexture(gl.TEXTURE0 + textureUnit);
425
+ gl.activeTexture(33984 + textureUnit);
419
426
  }
420
427
  gl.bindTexture(this.target, null);
421
428
  return textureUnit;
@@ -486,7 +493,7 @@ export class WEBGLTexture extends Texture {
486
493
  /* eslint-disable max-statements, max-len */
487
494
  async setCubeMapImageData(options) {
488
495
  const { gl } = this;
489
- const { width, height, pixels, data, format = GL.RGBA, type = GL.UNSIGNED_BYTE } = options;
496
+ const { width, height, pixels, data, format = 6408, type = 5121 } = options;
490
497
  const imageDataMap = pixels || data;
491
498
  // pixel data (imageDataMap) is an Object from Face to Image or Promise.
492
499
  // For example:
@@ -525,7 +532,7 @@ export class WEBGLTexture extends Texture {
525
532
  }
526
533
  /** @todo update this method to accept LODs */
527
534
  setImageDataForFace(options) {
528
- const { face, width, height, pixels, data, format = GL.RGBA, type = GL.UNSIGNED_BYTE
535
+ const { face, width, height, pixels, data, format = 6408, type = 5121
529
536
  // generateMipmap = false // TODO
530
537
  } = options;
531
538
  const { gl } = this;
@@ -559,7 +566,7 @@ export class WEBGLTexture extends Texture {
559
566
  data);
560
567
  }
561
568
  if (data instanceof WEBGLBuffer) {
562
- this.gl.bindBuffer(GL.PIXEL_UNPACK_BUFFER, data.handle);
569
+ this.gl.bindBuffer(35052, data.handle);
563
570
  this.gl.texImage3D(this.target, level, dataFormat, width, height, depth, 0 /* border, must be 0 */, format, type, offset);
564
571
  }
565
572
  });
@@ -590,8 +597,8 @@ export class WEBGLTexture extends Texture {
590
597
  // Apparently there are integer/float conversion issues requires two parameter setting functions in JavaScript.
591
598
  // For now, pick the float version for parameters specified as GLfloat.
592
599
  switch (param) {
593
- case GL.TEXTURE_MIN_LOD:
594
- case GL.TEXTURE_MAX_LOD:
600
+ case 33082:
601
+ case 33083:
595
602
  this.gl.texParameterf(this.target, param, value);
596
603
  break;
597
604
  default:
@@ -608,14 +615,14 @@ function getWebGLTextureTarget(props) {
608
615
  switch (props.dimension) {
609
616
  // supported in WebGL
610
617
  case '2d':
611
- return GL.TEXTURE_2D;
618
+ return 3553;
612
619
  case 'cube':
613
- return GL.TEXTURE_CUBE_MAP;
620
+ return 34067;
614
621
  // supported in WebGL2
615
622
  case '2d-array':
616
- return GL.TEXTURE_2D_ARRAY;
623
+ return 35866;
617
624
  case '3d':
618
- return GL.TEXTURE_3D;
625
+ return 32879;
619
626
  // not supported in any WebGL version
620
627
  case '1d':
621
628
  case 'cube-array':
@@ -1,6 +1,6 @@
1
1
  import type { PrimitiveTopology, ShaderLayout, TransformFeedbackProps } from '@luma.gl/core';
2
2
  import { TransformFeedback, Buffer, BufferRange } from '@luma.gl/core';
3
- import { WebGLDevice } from '../webgl-device';
3
+ import { WebGLDevice } from "../webgl-device.js";
4
4
  export declare class WEBGLTransformFeedback extends TransformFeedback {
5
5
  readonly device: WebGLDevice;
6
6
  readonly gl: WebGL2RenderingContext;
@@ -1 +1 @@
1
- {"version":3,"file":"webgl-transform-feedback.d.ts","sourceRoot":"","sources":["../../../src/adapter/resources/webgl-transform-feedback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAE,YAAY,EAAE,sBAAsB,EAAC,MAAM,eAAe,CAAC;AAC3F,OAAO,EAAM,iBAAiB,EAAE,MAAM,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;AAE1E,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAI5C,qBAAa,sBAAuB,SAAQ,iBAAiB;IAC3D,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,EAAE,EAAE,sBAAsB,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAC;IAExC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAM;IAC1C,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM;IAC3C;;;;OAIG;IACH,SAAS,UAAQ;IACjB,OAAO,CAAC,MAAM,CAAkB;gBAEpB,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,sB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,IAAI;IAO9B,SAAS,CAAC,cAAc,IAAI,IAAI;IAMhC,SAAS,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,SAAI,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI;CAQhG"}
@@ -1,7 +1,7 @@
1
1
  import { log, TransformFeedback } from '@luma.gl/core';
2
2
  import { GL } from '@luma.gl/constants';
3
- import { WEBGLBuffer } from '../..';
4
- import { getGLPrimitive } from '../helpers/webgl-topology-utils';
3
+ import { WEBGLBuffer } from "../../index.js";
4
+ import { getGLPrimitive } from "../helpers/webgl-topology-utils.js";
5
5
  export class WEBGLTransformFeedback extends TransformFeedback {
6
6
  device;
7
7
  gl;
@@ -37,7 +37,7 @@ export class WEBGLTransformFeedback extends TransformFeedback {
37
37
  super.destroy();
38
38
  }
39
39
  begin(topology = 'point-list') {
40
- this.gl.bindTransformFeedback(GL.TRANSFORM_FEEDBACK, this.handle);
40
+ this.gl.bindTransformFeedback(36386, this.handle);
41
41
  if (this.bindOnUse) {
42
42
  this._bindBuffers();
43
43
  }
@@ -48,7 +48,7 @@ export class WEBGLTransformFeedback extends TransformFeedback {
48
48
  if (!this.bindOnUse) {
49
49
  this._unbindBuffers();
50
50
  }
51
- this.gl.bindTransformFeedback(GL.TRANSFORM_FEEDBACK, null);
51
+ this.gl.bindTransformFeedback(36386, null);
52
52
  }
53
53
  // SUBCLASS
54
54
  setBuffers(buffers) {
@@ -84,16 +84,16 @@ export class WEBGLTransformFeedback extends TransformFeedback {
84
84
  }
85
85
  bind(funcOrHandle = this.handle) {
86
86
  if (typeof funcOrHandle !== 'function') {
87
- this.gl.bindTransformFeedback(GL.TRANSFORM_FEEDBACK, funcOrHandle);
87
+ this.gl.bindTransformFeedback(36386, funcOrHandle);
88
88
  return this;
89
89
  }
90
90
  let value;
91
91
  if (!this._bound) {
92
- this.gl.bindTransformFeedback(GL.TRANSFORM_FEEDBACK, this.handle);
92
+ this.gl.bindTransformFeedback(36386, this.handle);
93
93
  this._bound = true;
94
94
  value = funcOrHandle();
95
95
  this._bound = false;
96
- this.gl.bindTransformFeedback(GL.TRANSFORM_FEEDBACK, null);
96
+ this.gl.bindTransformFeedback(36386, null);
97
97
  }
98
98
  else {
99
99
  value = funcOrHandle();
@@ -137,16 +137,16 @@ export class WEBGLTransformFeedback extends TransformFeedback {
137
137
  }
138
138
  _unbindBuffers() {
139
139
  for (const bufferIndex in this.buffers) {
140
- this.gl.bindBufferBase(GL.TRANSFORM_FEEDBACK_BUFFER, Number(bufferIndex), null);
140
+ this.gl.bindBufferBase(35982, Number(bufferIndex), null);
141
141
  }
142
142
  }
143
143
  _bindBuffer(index, buffer, byteOffset = 0, byteLength) {
144
144
  const handle = buffer && buffer.handle;
145
145
  if (!handle || byteLength === undefined) {
146
- this.gl.bindBufferBase(GL.TRANSFORM_FEEDBACK_BUFFER, index, handle);
146
+ this.gl.bindBufferBase(35982, index, handle);
147
147
  }
148
148
  else {
149
- this.gl.bindBufferRange(GL.TRANSFORM_FEEDBACK_BUFFER, index, handle, byteOffset, byteLength);
149
+ this.gl.bindBufferRange(35982, index, handle, byteOffset, byteLength);
150
150
  }
151
151
  }
152
152
  }
@@ -1,7 +1,7 @@
1
1
  import type { Device, Buffer, VertexArrayProps, TypedArray } from '@luma.gl/core';
2
2
  import { VertexArray } from '@luma.gl/core';
3
3
  import { GL } from '@luma.gl/constants';
4
- import { WebGLDevice } from '../webgl-device';
4
+ import { WebGLDevice } from "../webgl-device.js";
5
5
  /** VertexArrayObject wrapper */
6
6
  export declare class WEBGLVertexArray extends VertexArray {
7
7
  get [Symbol.toStringTag](): string;
@@ -24,7 +24,7 @@ export declare class WEBGLVertexArray extends VertexArray {
24
24
  /** Set a location in vertex attributes array to a buffer, enables the location, sets divisor */
25
25
  setBuffer(location: number, attributeBuffer: Buffer): void;
26
26
  /** Set a location in vertex attributes array to a constant value, disables the location */
27
- setConstant(location: number, value: TypedArray): void;
27
+ setConstantWebGL(location: number, value: TypedArray): void;
28
28
  init: boolean;
29
29
  bindBeforeRender(): void;
30
30
  unbindAfterRender(): void;
@@ -41,7 +41,7 @@ export declare class WEBGLVertexArray extends VertexArray {
41
41
  */
42
42
  /** Get an accessor from the */
43
43
  protected _getAccessor(location: number): {
44
- size: 1 | 2 | 4 | 3;
44
+ size: 4 | 1 | 2 | 3;
45
45
  type: GL.BYTE | GL.UNSIGNED_BYTE | GL.SHORT | GL.UNSIGNED_SHORT | GL.INT | GL.UNSIGNED_INT | GL.FLOAT | GL.HALF_FLOAT;
46
46
  stride: number;
47
47
  offset: number;
@@ -1 +1 @@
1
- {"version":3,"file":"webgl-vertex-array.d.ts","sourceRoot":"","sources":["../../../src/adapter/resources/webgl-vertex-array.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,UAAU,EAAc,MAAM,eAAe,CAAC;AAC7F,OAAO,EAAC,WAAW,EAA6B,MAAM,eAAe,CAAC;AACtE,OAAO,EAAC,EAAE,EAAC,MAAM,oBAAoB,CAAC;AAGtC,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAO5C,gCAAgC;AAChC,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,IAAa,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,MAAM,CAE1C;IAED,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAC;IAExC,kCAAkC;IAClC,OAAO,CAAC,MAAM,CAA4B;IAC1C,OAAO,CAAC,WAAW,CAAQ;IAE3B,6EAA6E;IAC7E,MAAM,CAAC,gCAAgC,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;gBAKpD,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,EAAE,gBAAgB;IAMhD,OAAO,IAAI,IAAI;IAexB;;;;;OAKG;IACH,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG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3B,6EAA6E;IAC7E,MAAM,CAAC,gCAAgC,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;gBAKpD,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,EAAE,gBAAgB;IAMhD,OAAO,IAAI,IAAI;IAexB;;;;;OAKG;IACH,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAgBhD,gGAAgG;IAChG,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,IAAI;IA6B1D,2FAA2F;IAClF,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI;IAKpE,IAAI,UAAS;IAEJ,gBAAgB,IAAI,IAAI;IAYxB,iBAAiB,IAAI,IAAI;IAUlC;;;;;OAKG;IACH,SAAS,CAAC,wBAAwB,IAAI,IAAI;IAU1C;;;OAGG;IAcH,gCAAgC;IAChC,SAAS,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM;;;;;;;;;IAsBvC;;;;;OAKG;IACH,SAAS,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,UAAO,GAAG,IAAI;IAiBxD;;;;;OAKG;IACH,iBAAiB,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM;CA8BnE"}
@@ -1,9 +1,10 @@
1
- // luma.gl, MIT license
1
+ // luma.gl
2
+ // SPDX-License-Identifier: MIT
2
3
  // Copyright (c) vis.gl contributors
3
4
  import { VertexArray, getScratchArray, fillArray } from '@luma.gl/core';
4
5
  import { GL } from '@luma.gl/constants';
5
6
  import { getBrowser } from '@probe.gl/env';
6
- import { getGLFromVertexType } from '../converters/vertex-formats';
7
+ import { getGLFromVertexType } from "../converters/vertex-formats.js";
7
8
  // import {AccessorObject} from '../..';
8
9
  // import {getGLFromVertexType} from '../converters/vertex-formats';
9
10
  /** VertexArrayObject wrapper */
@@ -48,13 +49,13 @@ export class WEBGLVertexArray extends VertexArray {
48
49
  setIndexBuffer(indexBuffer) {
49
50
  const buffer = indexBuffer;
50
51
  // Explicitly allow `null` to support clearing the index buffer
51
- if (buffer && buffer.glTarget !== GL.ELEMENT_ARRAY_BUFFER) {
52
+ if (buffer && buffer.glTarget !== 34963) {
52
53
  throw new Error('Use .setBuffer()');
53
54
  }
54
55
  // In WebGL The GL.ELEMENT_ARRAY_BUFFER_BINDING is stored on the VertexArrayObject
55
56
  this.device.gl.bindVertexArray(this.handle);
56
57
  // TODO - this initial binding does not seem to take effect? see bindBeforeRender()
57
- this.device.gl.bindBuffer(GL.ELEMENT_ARRAY_BUFFER, buffer ? buffer.handle : null);
58
+ this.device.gl.bindBuffer(34963, buffer ? buffer.handle : null);
58
59
  // log.log(1, 'VertexArray.setIndexBuffer', indexBuffer)();
59
60
  // log.log(1, `Binding vertex array ${this.id}`, buffer?.id)();
60
61
  this.indexBuffer = buffer;
@@ -63,13 +64,13 @@ export class WEBGLVertexArray extends VertexArray {
63
64
  setBuffer(location, attributeBuffer) {
64
65
  const buffer = attributeBuffer;
65
66
  // Sanity check target
66
- if (buffer.glTarget === GL.ELEMENT_ARRAY_BUFFER) {
67
+ if (buffer.glTarget === 34963) {
67
68
  throw new Error('Use .setIndexBuffer()');
68
69
  }
69
70
  const { size, type, stride, offset, normalized, integer, divisor } = this._getAccessor(location);
70
71
  this.device.gl.bindVertexArray(this.handle);
71
72
  // A non-zero buffer object must be bound to the GL_ARRAY_BUFFER target
72
- this.device.gl.bindBuffer(GL.ARRAY_BUFFER, buffer.handle);
73
+ this.device.gl.bindBuffer(34962, buffer.handle);
73
74
  // WebGL2 supports *integer* data formats, i.e. GPU will see integer values
74
75
  if (integer) {
75
76
  this.device.gl.vertexAttribIPointer(location, size, type, stride, offset);
@@ -85,7 +86,7 @@ export class WEBGLVertexArray extends VertexArray {
85
86
  this.attributes[location] = buffer;
86
87
  }
87
88
  /** Set a location in vertex attributes array to a constant value, disables the location */
88
- setConstant(location, value) {
89
+ setConstantWebGL(location, value) {
89
90
  this._enable(location, false);
90
91
  this.attributes[location] = value;
91
92
  }
@@ -96,7 +97,7 @@ export class WEBGLVertexArray extends VertexArray {
96
97
  if (!this.init) {
97
98
  // log.log(1, `Binding vertex array ${this.id}`, this.indexBuffer?.id)();
98
99
  const webglBuffer = this.indexBuffer;
99
- this.device.gl.bindBuffer(GL.ELEMENT_ARRAY_BUFFER, webglBuffer?.handle || null);
100
+ this.device.gl.bindBuffer(34963, webglBuffer?.handle || null);
100
101
  this.init = true;
101
102
  }
102
103
  this._applyConstantAttributes();
@@ -120,7 +121,7 @@ export class WEBGLVertexArray extends VertexArray {
120
121
  const constant = this.attributes[location];
121
122
  // A typed array means this is a constant
122
123
  if (ArrayBuffer.isView(constant)) {
123
- this.device.setConstantAttribute(location, constant);
124
+ this.device.setConstantAttributeWebGL(location, constant);
124
125
  }
125
126
  }
126
127
  }
@@ -1,7 +1,7 @@
1
1
  import type { CanvasContextProps } from '@luma.gl/core';
2
2
  import { CanvasContext } from '@luma.gl/core';
3
- import { WebGLDevice } from './webgl-device';
4
- import { WEBGLFramebuffer } from './resources/webgl-framebuffer';
3
+ import { WebGLDevice } from "./webgl-device.js";
4
+ import { WEBGLFramebuffer } from "./resources/webgl-framebuffer.js";
5
5
  /**
6
6
  * A WebGL Canvas Context which manages the canvas and handles drawing buffer resizing etc
7
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"webgl-canvas-context.d.ts","sourceRoot":"","sources":["../../src/adapter/webgl-canvas-context.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AACtD,OAAO,EAAC,aAAa,EAAC,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAC,gBAAgB,EAAC,MAAM,+BAA+B,CAAC;AAE/D;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,aAAa;IACnD,QAAQ,CAA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@ -1,7 +1,8 @@
1
- // luma.gl, MIT license
1
+ // luma.gl
2
+ // SPDX-License-Identifier: MIT
2
3
  // Copyright (c) vis.gl contributors
3
4
  import { CanvasContext } from '@luma.gl/core';
4
- import { WEBGLFramebuffer } from './resources/webgl-framebuffer';
5
+ import { WEBGLFramebuffer } from "./resources/webgl-framebuffer.js";
5
6
  /**
6
7
  * A WebGL Canvas Context which manages the canvas and handles drawing buffer resizing etc
7
8
  */
@@ -1,33 +1,39 @@
1
- import type { DeviceProps, DeviceInfo, DeviceLimits, DeviceFeature, CanvasContextProps, TextureFormat, VertexArray, VertexArrayProps, Framebuffer, Buffer, Texture, TypedArray } from '@luma.gl/core';
1
+ import type { DeviceProps, DeviceInfo, CanvasContextProps, TextureFormat, VertexArray, VertexArrayProps, Framebuffer, Buffer, Texture, TypedArray } from '@luma.gl/core';
2
2
  import { Device, CanvasContext } from '@luma.gl/core';
3
- import { WebGLLimits } from './device-helpers/webgl-device-limits';
4
- import { WebGLCanvasContext } from './webgl-canvas-context';
5
- import type { BufferProps, ShaderProps, SamplerProps, TextureProps, ExternalTexture, ExternalTextureProps, FramebufferProps, RenderPipelineProps, ComputePipeline, ComputePipelineProps, RenderPassProps, ComputePass, ComputePassProps, CommandEncoderProps, TransformFeedbackProps } from '@luma.gl/core';
6
- import { WEBGLBuffer } from './resources/webgl-buffer';
7
- import { WEBGLShader } from './resources/webgl-shader';
8
- import { WEBGLSampler } from './resources/webgl-sampler';
9
- import { WEBGLTexture } from './resources/webgl-texture';
10
- import { WEBGLFramebuffer } from './resources/webgl-framebuffer';
11
- import { WEBGLRenderPass } from './resources/webgl-render-pass';
12
- import { WEBGLRenderPipeline } from './resources/webgl-render-pipeline';
13
- import { WEBGLCommandEncoder } from './resources/webgl-command-encoder';
14
- import { WEBGLTransformFeedback } from './resources/webgl-transform-feedback';
3
+ import type { GLExtensions } from '@luma.gl/constants';
4
+ import { WebGLDeviceFeatures } from "./device-helpers/webgl-device-features.js";
5
+ import { WebGLDeviceLimits } from "./device-helpers/webgl-device-limits.js";
6
+ import { WebGLCanvasContext } from "./webgl-canvas-context.js";
7
+ import type { BufferProps, ShaderProps, SamplerProps, TextureProps, ExternalTexture, ExternalTextureProps, FramebufferProps, RenderPipelineProps, ComputePipeline, ComputePipelineProps, RenderPassProps, ComputePass, ComputePassProps, CommandEncoderProps, TransformFeedbackProps, QuerySetProps } from '@luma.gl/core';
8
+ import { WEBGLBuffer } from "./resources/webgl-buffer.js";
9
+ import { WEBGLShader } from "./resources/webgl-shader.js";
10
+ import { WEBGLSampler } from "./resources/webgl-sampler.js";
11
+ import { WEBGLTexture } from "./resources/webgl-texture.js";
12
+ import { WEBGLFramebuffer } from "./resources/webgl-framebuffer.js";
13
+ import { WEBGLRenderPass } from "./resources/webgl-render-pass.js";
14
+ import { WEBGLRenderPipeline } from "./resources/webgl-render-pipeline.js";
15
+ import { WEBGLCommandEncoder } from "./resources/webgl-command-encoder.js";
16
+ import { WEBGLTransformFeedback } from "./resources/webgl-transform-feedback.js";
17
+ import { WEBGLQuerySet } from "./resources/webgl-query-set.js";
15
18
  /** WebGPU style Device API for a WebGL context */
16
19
  export declare class WebGLDevice extends Device {
17
- static type: string;
18
- static isSupported(): boolean;
20
+ /** type of this device */
21
+ static readonly type: string;
22
+ /** type of this device */
23
+ readonly type = "webgl";
24
+ /** The underlying WebGL context */
25
+ readonly handle: WebGL2RenderingContext;
26
+ features: WebGLDeviceFeatures;
27
+ limits: WebGLDeviceLimits;
19
28
  readonly info: DeviceInfo;
20
29
  readonly canvasContext: WebGLCanvasContext;
21
- readonly handle: WebGL2RenderingContext;
22
- get features(): Set<DeviceFeature>;
23
- get limits(): DeviceLimits;
24
30
  readonly lost: Promise<{
25
31
  reason: 'destroyed';
26
32
  message: string;
27
33
  }>;
28
34
  private _resolveContextLost?;
29
- private _features?;
30
- private _limits?;
35
+ /** Check if WebGL 2 is available */
36
+ static isSupported(): boolean;
31
37
  /**
32
38
  * Get a device instance from a GL context
33
39
  * Creates and instruments the device if not already created
@@ -39,7 +45,7 @@ export declare class WebGLDevice extends Device {
39
45
  constructor(props: DeviceProps);
40
46
  /**
41
47
  * Destroys the context
42
- * @note Has no effect for browser contexts, there is no browser API for destroying contexts
48
+ * @note Has no effect for WebGL browser contexts, there is no browser API for destroying contexts
43
49
  */
44
50
  destroy(): void;
45
51
  get isLost(): boolean;
@@ -54,14 +60,14 @@ export declare class WebGLDevice extends Device {
54
60
  createSampler(props: SamplerProps): WEBGLSampler;
55
61
  createShader(props: ShaderProps): WEBGLShader;
56
62
  createFramebuffer(props: FramebufferProps): WEBGLFramebuffer;
57
- createRenderPipeline(props: RenderPipelineProps): WEBGLRenderPipeline;
58
63
  createVertexArray(props: VertexArrayProps): VertexArray;
64
+ createTransformFeedback(props: TransformFeedbackProps): WEBGLTransformFeedback;
65
+ createQuerySet(props: QuerySetProps): WEBGLQuerySet;
66
+ createRenderPipeline(props: RenderPipelineProps): WEBGLRenderPipeline;
59
67
  beginRenderPass(props: RenderPassProps): WEBGLRenderPass;
60
68
  createComputePipeline(props?: ComputePipelineProps): ComputePipeline;
61
69
  beginComputePass(props: ComputePassProps): ComputePass;
62
- createTransformFeedback(props: TransformFeedbackProps): WEBGLTransformFeedback;
63
70
  private renderPass;
64
- getDefaultRenderPass(): WEBGLRenderPass;
65
71
  createCommandEncoder(props?: CommandEncoderProps): WEBGLCommandEncoder;
66
72
  /**
67
73
  * Offscreen Canvas Support: Commit the frame
@@ -110,13 +116,10 @@ export declare class WebGLDevice extends Device {
110
116
  devicePixelRatio: number;
111
117
  };
112
118
  /** State used by luma.gl classes - TODO - not used? */
113
- readonly _extensions: Record<string, any>;
119
+ readonly _extensions: GLExtensions;
114
120
  _polyfilled: boolean;
115
121
  /** Instance of Spector.js (if initialized) */
116
- spector: any;
117
- private _webglLimits?;
118
- /** Return WebGL specific limits */
119
- get webglLimits(): WebGLLimits;
122
+ spectorJS: unknown;
120
123
  /**
121
124
  * Triggers device (or WebGL context) loss.
122
125
  * @note primarily intended for testing how application reacts to device loss
@@ -145,6 +148,8 @@ export declare class WebGLDevice extends Device {
145
148
  * so they need to be updated before every render
146
149
  * @todo - remember/cache values to avoid setting them unnecessarily?
147
150
  */
148
- setConstantAttribute(location: number, constant: TypedArray): void;
151
+ setConstantAttributeWebGL(location: number, constant: TypedArray): void;
152
+ /** Ensure extensions are only requested once */
153
+ getExtension(name: keyof GLExtensions): GLExtensions;
149
154
  }
150
155
  //# sourceMappingURL=webgl-device.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"webgl-device.d.ts","sourceRoot":"","sources":["../../src/adapter/webgl-device.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,MAAM,EACN,OAAO,EACP,UAAU,EACX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,MAAM,EAAE,aAAa,EAAmB,MAAM,eAAe,CAAC;AAUtE,OAAO,EAAkC,WAAW,EAAC,MAAM,sCAAsC,CAAC;AAClG,OAAO,EAAC,kBAAkB,EAAC,MAAM,wBAAwB,CAAC;AAU1D,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EAEX,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAEhB,mBAAmB,EACnB,eAAe,EACf,oBAAoB,EAEpB,eAAe,EACf,WAAW,EACX,gBAAgB,EAEhB,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAC,WAAW,EAAC,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAC,WAAW,EAAC,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAC,YAAY,EAAC,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAC,YAAY,EAAC,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAC,gBAAgB,EAAC,MAAM,+BAA+B,C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