@luma.gl/webgl 9.1.0-alpha.15 → 9.1.0-alpha.17

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 (69) hide show
  1. package/dist/adapter/converters/device-parameters.d.ts +3 -3
  2. package/dist/adapter/converters/device-parameters.d.ts.map +1 -1
  3. package/dist/adapter/converters/sampler-parameters.js +6 -4
  4. package/dist/adapter/converters/texture-formats.d.ts +49 -11
  5. package/dist/adapter/converters/texture-formats.d.ts.map +1 -1
  6. package/dist/adapter/converters/texture-formats.js +150 -160
  7. package/dist/adapter/helpers/format-utils.d.ts.map +1 -1
  8. package/dist/adapter/helpers/format-utils.js +6 -0
  9. package/dist/adapter/helpers/webgl-texture-utils.d.ts +34 -30
  10. package/dist/adapter/helpers/webgl-texture-utils.d.ts.map +1 -1
  11. package/dist/adapter/helpers/webgl-texture-utils.js +52 -256
  12. package/dist/adapter/resources/webgl-command-buffer.d.ts +59 -2
  13. package/dist/adapter/resources/webgl-command-buffer.d.ts.map +1 -1
  14. package/dist/adapter/resources/webgl-command-buffer.js +87 -31
  15. package/dist/adapter/resources/webgl-command-encoder.d.ts.map +1 -1
  16. package/dist/adapter/resources/webgl-command-encoder.js +3 -0
  17. package/dist/adapter/resources/webgl-external-texture.js +14 -0
  18. package/dist/adapter/resources/webgl-framebuffer.d.ts.map +1 -1
  19. package/dist/adapter/resources/webgl-framebuffer.js +1 -2
  20. package/dist/adapter/resources/webgl-render-pass.d.ts.map +1 -1
  21. package/dist/adapter/resources/webgl-render-pass.js +38 -20
  22. package/dist/adapter/resources/webgl-render-pipeline.d.ts +1 -1
  23. package/dist/adapter/resources/webgl-render-pipeline.d.ts.map +1 -1
  24. package/dist/adapter/resources/webgl-render-pipeline.js +30 -16
  25. package/dist/adapter/resources/webgl-shader.d.ts +1 -0
  26. package/dist/adapter/resources/webgl-shader.d.ts.map +1 -1
  27. package/dist/adapter/resources/webgl-shader.js +7 -5
  28. package/dist/adapter/resources/webgl-texture.d.ts +8 -14
  29. package/dist/adapter/resources/webgl-texture.d.ts.map +1 -1
  30. package/dist/adapter/resources/webgl-texture.js +119 -208
  31. package/dist/adapter/webgl-adapter.d.ts.map +1 -1
  32. package/dist/adapter/webgl-adapter.js +4 -10
  33. package/dist/adapter/webgl-device.d.ts +8 -3
  34. package/dist/adapter/webgl-device.d.ts.map +1 -1
  35. package/dist/adapter/webgl-device.js +53 -22
  36. package/dist/context/debug/spector-types.js +1 -1
  37. package/dist/context/debug/spector.d.ts +5 -5
  38. package/dist/context/debug/spector.d.ts.map +1 -1
  39. package/dist/context/debug/spector.js +6 -6
  40. package/dist/context/debug/webgl-developer-tools.d.ts +2 -3
  41. package/dist/context/debug/webgl-developer-tools.d.ts.map +1 -1
  42. package/dist/context/debug/webgl-developer-tools.js +6 -19
  43. package/dist/context/helpers/create-browser-context.d.ts +6 -22
  44. package/dist/context/helpers/create-browser-context.d.ts.map +1 -1
  45. package/dist/context/helpers/create-browser-context.js +40 -32
  46. package/dist/dist.dev.js +366 -400
  47. package/dist/dist.min.js +2 -2
  48. package/dist/index.cjs +341 -384
  49. package/dist/index.cjs.map +3 -3
  50. package/package.json +4 -4
  51. package/src/adapter/converters/device-parameters.ts +3 -3
  52. package/src/adapter/converters/sampler-parameters.ts +6 -4
  53. package/src/adapter/converters/texture-formats.ts +171 -177
  54. package/src/adapter/helpers/format-utils.ts +6 -0
  55. package/src/adapter/helpers/webgl-texture-utils.ts +99 -75
  56. package/src/adapter/resources/webgl-command-buffer.ts +124 -40
  57. package/src/adapter/resources/webgl-command-encoder.ts +6 -0
  58. package/src/adapter/resources/webgl-external-texture.ts +14 -0
  59. package/src/adapter/resources/webgl-framebuffer.ts +1 -2
  60. package/src/adapter/resources/webgl-render-pass.ts +44 -23
  61. package/src/adapter/resources/webgl-render-pipeline.ts +32 -16
  62. package/src/adapter/resources/webgl-shader.ts +8 -6
  63. package/src/adapter/resources/webgl-texture.ts +126 -235
  64. package/src/adapter/webgl-adapter.ts +4 -12
  65. package/src/adapter/webgl-device.ts +88 -48
  66. package/src/context/debug/spector-types.ts +1 -1
  67. package/src/context/debug/spector.ts +11 -11
  68. package/src/context/debug/webgl-developer-tools.ts +8 -31
  69. package/src/context/helpers/create-browser-context.ts +53 -63
@@ -19,46 +19,22 @@ import { initializeTextureStorage,
19
19
  copyExternalImageToMipLevel, copyCPUDataToMipLevel,
20
20
  // copyGPUBufferToMipLevel,
21
21
  getWebGLTextureTarget } from "../helpers/webgl-texture-utils.js";
22
- // PORTABLE HELPERS (Move to methods on Texture?)
23
- /**
24
- * Normalize TextureData to an array of TextureLevelData / ExternalImages
25
- * @param data
26
- * @param options
27
- * @returns array of TextureLevelData / ExternalImages
28
- */
29
- function normalizeTextureData(data, options) {
30
- let lodArray;
31
- if (ArrayBuffer.isView(data)) {
32
- lodArray = [
33
- {
34
- // ts-expect-error does data really need to be Uint8ClampedArray?
35
- data,
36
- width: options.width,
37
- height: options.height
38
- // depth: options.depth
39
- }
40
- ];
41
- }
42
- else if (!Array.isArray(data)) {
43
- lodArray = [data];
44
- }
45
- else {
46
- lodArray = data;
47
- }
48
- return lodArray;
49
- }
50
22
  /**
51
23
  * WebGL... the texture API from hell... hopefully made simpler
52
24
  */
53
25
  export class WEBGLTexture extends Texture {
54
- MAX_ATTRIBUTES;
26
+ // readonly MAX_ATTRIBUTES: number;
55
27
  device;
56
28
  gl;
57
29
  handle;
58
30
  sampler = undefined; // TODO - currently unused in WebGL. Create dummy sampler?
59
31
  view = undefined; // TODO - currently unused in WebGL. Create dummy view?
60
- mipmaps = false;
32
+ mipmaps;
33
+ // Texture type
34
+ /** Whether the internal format is compressed */
35
+ compressed;
61
36
  /**
37
+ * The WebGL target corresponding to the texture type
62
38
  * @note `target` cannot be modified by bind:
63
39
  * textures are special because when you first bind them to a target,
64
40
  * When you first bind a texture as a GL_TEXTURE_2D, you are saying that this texture is a 2D texture.
@@ -67,143 +43,86 @@ export class WEBGLTexture extends Texture {
67
43
  * attempting to bind it as GL_TEXTURE_3D will give rise to a run-time error
68
44
  */
69
45
  glTarget;
70
- // Texture type
71
46
  /** The WebGL format - essentially channel structure */
72
47
  glFormat;
73
48
  /** The WebGL data format - the type of each channel */
74
49
  glType;
75
50
  /** The WebGL constant corresponding to the WebGPU style constant in format */
76
51
  glInternalFormat;
77
- /** Whether the internal format is compressed */
78
- compressed;
79
- // data;
80
- // inherited props
81
- // dimension: ...
82
- // format: GLTextureTarget;
83
- // width: number = undefined;
84
- // height: number = undefined;
85
- // depth: number = undefined;
86
52
  // state
87
- /** Texture binding slot */
53
+ /** Texture binding slot - TODO - move to texture view? */
88
54
  textureUnit = 0;
89
- /** For automatically updating video */
90
- _video = null;
91
55
  constructor(device, props) {
92
- props = Texture._fixProps(props);
93
- // Note: Clear out `props.data` so that we don't hold a reference to any big memory chunks
94
- super(device, { ...Texture.defaultProps, ...props, data: undefined });
56
+ super(device, props);
57
+ // Texture base class strips out the data prop, so we need to add it back in
58
+ const propsWithData = { ...this.props };
59
+ propsWithData.data = props.data;
95
60
  this.device = device;
96
61
  this.gl = this.device.gl;
97
62
  // Note: In WebGL the texture target defines the type of texture on first bind.
98
63
  this.glTarget = getWebGLTextureTarget(this.props.dimension);
99
64
  // The target format of this texture
100
- const format = getTextureFormatWebGL(this.props.format);
101
- this.glInternalFormat = format.internalFormat;
102
- this.glFormat = format.format;
103
- this.glType = format.type;
104
- this.compressed = format.compressed;
105
- if (typeof HTMLVideoElement !== 'undefined' &&
106
- props.data instanceof HTMLVideoElement &&
107
- // @ts-expect-error
108
- props.data.readyState < HTMLVideoElement.HAVE_METADATA) {
109
- const video = props.data;
110
- this._video = null; // Declare member before the object is sealed
111
- video.addEventListener('loadeddata', () => this.initialize(props));
112
- }
113
- // We removed data, we need to add it again.
114
- // @ts-expect-error
115
- this.initialize({ ...this.props, data: props.data });
65
+ const formatInfo = getTextureFormatWebGL(this.props.format);
66
+ this.glInternalFormat = formatInfo.internalFormat;
67
+ this.glFormat = formatInfo.format;
68
+ this.glType = formatInfo.type;
69
+ this.compressed = formatInfo.compressed;
70
+ this.mipmaps = Boolean(this.props.mipmaps);
71
+ this._initialize(propsWithData);
116
72
  Object.seal(this);
117
73
  }
118
74
  /**
119
75
  * Initialize texture with supplied props
120
76
  */
121
77
  // eslint-disable-next-line max-statements
122
- initialize(props = {}) {
78
+ _initialize(propsWithData) {
123
79
  this.handle = this.props.handle || this.gl.createTexture();
124
- this.device.setSpectorMetadata(this.handle, { ...this.props, data: typeof this.props.data });
125
- const data = props.data;
126
- // const {parameters = {} as Record<GL, any>} = props;
127
- let { width, height } = props;
80
+ this.device.setSpectorMetadata(this.handle, { ...this.props, data: propsWithData.data });
81
+ let { width, height } = propsWithData;
128
82
  if (!width || !height) {
129
- const textureSize = Texture.getTextureDataSize(data);
83
+ const textureSize = Texture.getTextureDataSize(propsWithData.data);
130
84
  width = textureSize?.width || 1;
131
85
  height = textureSize?.height || 1;
132
86
  }
133
87
  // Store opts for accessors
134
88
  this.width = width;
135
89
  this.height = height;
136
- this.depth = props.depth;
90
+ this.depth = propsWithData.depth;
137
91
  // Set texture sampler parameters
138
- this.setSampler(props.sampler);
139
- // @ts-ignore
92
+ this.setSampler(propsWithData.sampler);
93
+ // @ts-ignore TODO - fix types
140
94
  this.view = new WEBGLTextureView(this.device, { ...this.props, texture: this });
141
95
  this.bind();
142
- if (!this.props.data) {
143
- initializeTextureStorage(this.gl, this.mipLevels, this);
144
- }
145
- if (props.data) {
96
+ initializeTextureStorage(this.gl, this.mipLevels, this);
97
+ if (propsWithData.data) {
146
98
  // prettier-ignore
147
- switch (props.dimension) {
99
+ switch (propsWithData.dimension) {
148
100
  case '1d':
149
- this.setTexture1DData(props.data);
101
+ this.setTexture1DData(propsWithData.data);
150
102
  break;
151
103
  case '2d':
152
- this.setTexture2DData(props.data);
104
+ this.setTexture2DData(propsWithData.data);
153
105
  break;
154
106
  case '3d':
155
- this.setTexture3DData(props.data);
107
+ this.setTexture3DData(propsWithData.data);
156
108
  break;
157
109
  case 'cube':
158
- this.setTextureCubeData(props.data);
110
+ this.setTextureCubeData(propsWithData.data);
159
111
  break;
160
112
  case '2d-array':
161
- this.setTextureArrayData(props.data);
113
+ this.setTextureArrayData(propsWithData.data);
162
114
  break;
163
115
  case 'cube-array':
164
- this.setTextureCubeArrayData(props.data);
116
+ this.setTextureCubeArrayData(propsWithData.data);
165
117
  break;
166
118
  // @ts-expect-error
167
- default: throw new Error(props.dimension);
119
+ default: throw new Error(propsWithData.dimension);
168
120
  }
169
121
  }
170
- this.mipmaps = Boolean(props.mipmaps);
171
122
  if (this.mipmaps) {
172
123
  this.generateMipmap();
173
124
  }
174
- // if (isVideo) {
175
- // this._video = {
176
- // video: data,
177
- // // TODO - should we be using the sampler parameters here?
178
- // parameters: {},
179
- // // @ts-expect-error HTMLVideoElement.HAVE_CURRENT_DATA is not declared
180
- // lastTime: data.readyState >= HTMLVideoElement.HAVE_CURRENT_DATA ? data.currentTime : -1
181
- // };
182
- // }
183
125
  }
184
- /*
185
- initializeCube(props?: TextureProps): void {
186
- const {mipmaps = true} = props; // , parameters = {} as Record<GL, any>} = props;
187
-
188
- // Store props for accessors
189
- // this.props = props;
190
-
191
- // @ts-expect-error
192
- this.setCubeMapData(props).then(() => {
193
- // TODO - should genMipmap() be called on the cubemap or on the faces?
194
- // TODO - without generateMipmap() cube textures do not work at all!!! Why?
195
- if (mipmaps) {
196
- this.generateMipmap(props);
197
- }
198
-
199
- this.setSampler(props.sampler);
200
-
201
- // v8 compatibility?
202
- // const {parameters = {} as Record<GL, any>} = props;
203
- // this._setSamplerParameters(parameters);
204
- });
205
- }
206
- */
207
126
  destroy() {
208
127
  if (this.handle) {
209
128
  this.gl.deleteTexture(this.handle);
@@ -213,9 +132,6 @@ export class WEBGLTexture extends Texture {
213
132
  this.destroyed = true;
214
133
  }
215
134
  }
216
- toString() {
217
- return `Texture(${this.id},${this.width}x${this.height})`;
218
- }
219
135
  createView(props) {
220
136
  return new WEBGLTextureView(this.device, { ...props, texture: this });
221
137
  }
@@ -232,50 +148,38 @@ export class WEBGLTexture extends Texture {
232
148
  const parameters = convertSamplerParametersToWebGL(samplerProps);
233
149
  this._setSamplerParameters(parameters);
234
150
  }
235
- /** Update external texture (video frame or canvas) */
236
- update() {
237
- log.warn('Texture.update() not implemented');
238
- // if (this._video) {
239
- // const {video, parameters, lastTime} = this._video;
240
- // // @ts-expect-error
241
- // if (lastTime === video.currentTime || video.readyState < HTMLVideoElement.HAVE_CURRENT_DATA) {
242
- // return;
243
- // }
244
- // this.setSubImageData({
245
- // data: video,
246
- // parameters
247
- // });
248
- // if (this.mipmaps) {
249
- // this.generateMipmap();
250
- // }
251
- // this._video.lastTime = video.currentTime;
252
- // }
253
- }
254
151
  // Call to regenerate mipmaps after modifying texture(s)
255
152
  generateMipmap(params = {}) {
256
- if (!this.props.data) {
257
- return;
153
+ if (!this.device.isTextureFormatRenderable(this.props.format) ||
154
+ !this.device.isTextureFormatFilterable(this.props.format)) {
155
+ log.warn(`${this} is not renderable or filterable, may not be able to generate mipmaps`)();
156
+ }
157
+ try {
158
+ this.gl.bindTexture(this.glTarget, this.handle);
159
+ withGLParameters(this.gl, params, () => {
160
+ this.gl.generateMipmap(this.glTarget);
161
+ });
162
+ }
163
+ catch (error) {
164
+ log.warn(`Error generating mipmap for ${this}: ${error.message}`)();
165
+ }
166
+ finally {
167
+ this.gl.bindTexture(this.glTarget, null);
258
168
  }
259
- this.mipmaps = true;
260
- this.gl.bindTexture(this.glTarget, this.handle);
261
- withGLParameters(this.gl, params, () => {
262
- this.gl.generateMipmap(this.glTarget);
263
- });
264
- this.gl.bindTexture(this.glTarget, null);
265
169
  }
266
170
  // Image Data Setters
267
171
  copyExternalImage(options) {
268
172
  const size = Texture.getExternalImageSize(options.image);
269
173
  const opts = { ...Texture.defaultCopyExternalImageOptions, ...size, ...options };
270
- const { image, depth, mipLevel, x, y, z } = opts;
174
+ const { image, depth, mipLevel, x, y, z, flipY } = opts;
271
175
  let { width, height } = opts;
272
176
  const { dimension, glTarget, glFormat, glInternalFormat, glType } = this;
273
177
  // WebGL will error if we try to copy outside the bounds of the texture
274
178
  width = Math.min(width, size.width - x);
275
179
  height = Math.min(height, size.height - y);
276
- // WebGL does not yet support sourceX/sourceY in copyExternalImage; requires copyTexSubImage2D from a framebuffer'
277
180
  if (options.sourceX || options.sourceY) {
278
- throw new Error('WebGL does not yet support sourceX/sourceY in copyExternalImage; requires copyTexSubImage2D from a framebuffer');
181
+ // requires copyTexSubImage2D from a framebuffer'
182
+ throw new Error('WebGL does not support sourceX/sourceY)');
279
183
  }
280
184
  copyExternalImageToMipLevel(this.device.gl, this.handle, image, {
281
185
  dimension,
@@ -289,7 +193,8 @@ export class WEBGLTexture extends Texture {
289
193
  glFormat,
290
194
  glInternalFormat,
291
195
  glType,
292
- glTarget
196
+ glTarget,
197
+ flipY
293
198
  });
294
199
  return { width: opts.width, height: opts.height };
295
200
  }
@@ -299,7 +204,7 @@ export class WEBGLTexture extends Texture {
299
204
  /** Set a simple texture */
300
205
  setTexture2DData(lodData, depth = 0) {
301
206
  this.bind();
302
- const lodArray = normalizeTextureData(lodData, this);
207
+ const lodArray = Texture.normalizeTextureData(lodData, this);
303
208
  // If the user provides multiple LODs, then automatic mipmap
304
209
  // generation generateMipmap() should be disabled to avoid overwriting them.
305
210
  if (lodArray.length > 1 && this.props.mipmaps !== false) {
@@ -366,6 +271,11 @@ export class WEBGLTexture extends Texture {
366
271
  const faceDepth = Texture.CubeFaces.indexOf(face);
367
272
  this.setTexture2DData(lodData, faceDepth);
368
273
  }
274
+ // DEPRECATED METHODS
275
+ /** Update external texture (video frame or canvas) @deprecated Use ExternalTexture */
276
+ update() {
277
+ throw new Error('Texture.update() not implemented. Use ExternalTexture');
278
+ }
369
279
  // INTERNAL METHODS
370
280
  /** @todo update this method to accept LODs */
371
281
  setImageDataForFace(options) {
@@ -404,7 +314,7 @@ export class WEBGLTexture extends Texture {
404
314
  * Sets sampler parameters on texture
405
315
  */
406
316
  _setSamplerParameters(parameters) {
407
- log.log(1, 'texture sampler parameters', parameters)();
317
+ log.log(1, `${this.id} sampler parameters`, this.device.getGLKeys(parameters))();
408
318
  this.gl.bindTexture(this.glTarget, this.handle);
409
319
  for (const [pname, pvalue] of Object.entries(parameters)) {
410
320
  const param = Number(pname);
@@ -436,61 +346,6 @@ export class WEBGLTexture extends Texture {
436
346
  }
437
347
  this.gl.bindTexture(this.glTarget, null);
438
348
  }
439
- // CLASSIC
440
- /*
441
- setCubeMapData(options: {
442
- width: number;
443
- height: number;
444
- data: Record<GL, Texture2DData> | Record<TextureCubeFace, Texture2DData>;
445
- format?: any;
446
- type?: any;
447
- /** @deprecated Use .data *
448
- pixels: any;
449
- }): void {
450
- const {gl} = this;
451
-
452
- const {width, height, pixels, data, format = GL.RGBA, type = GL.UNSIGNED_BYTE} = options;
453
-
454
- // pixel data (imageDataMap) is an Object from Face to Image or Promise.
455
- // For example:
456
- // {
457
- // GL.TEXTURE_CUBE_MAP_POSITIVE_X : Image-or-Promise,
458
- // GL.TEXTURE_CUBE_MAP_NEGATIVE_X : Image-or-Promise,
459
- // ... }
460
- // To provide multiple level-of-details (LODs) this can be Face to Array
461
- // of Image or Promise, like this
462
- // {
463
- // GL.TEXTURE_CUBE_MAP_POSITIVE_X : [Image-or-Promise-LOD-0, Image-or-Promise-LOD-1],
464
- // GL.TEXTURE_CUBE_MAP_NEGATIVE_X : [Image-or-Promise-LOD-0, Image-or-Promise-LOD-1],
465
- // ... }
466
-
467
- const imageDataMap = this._getImageDataMap(pixels || data);
468
-
469
- const resolvedFaces = WEBGLTexture.FACES.map(face => {
470
- const facePixels = imageDataMap[face];
471
- return Array.isArray(facePixels) ? facePixels : [facePixels];
472
- });
473
- this.bind();
474
-
475
- WEBGLTexture.FACES.forEach((face, index) => {
476
- if (resolvedFaces[index].length > 1 && this.props.mipmaps !== false) {
477
- // If the user provides multiple LODs, then automatic mipmap
478
- // generation generateMipmap() should be disabled to avoid overwritting them.
479
- log.warn(`${this.id} has mipmap and multiple LODs.`)();
480
- }
481
- resolvedFaces[index].forEach((image, lodLevel) => {
482
- // TODO: adjust width & height for LOD!
483
- if (width && height) {
484
- gl.texImage2D(face, lodLevel, format, width, height, 0 /* border*, format, type, image);
485
- } else {
486
- gl.texImage2D(face, lodLevel, format, format, type, image);
487
- }
488
- });
489
- });
490
-
491
- this.unbind();
492
- }
493
- */
494
349
  // INTERNAL SETTERS
495
350
  /**
496
351
  * Copy a region of data from a CPU memory buffer into this texture.
@@ -506,7 +361,8 @@ export class WEBGLTexture extends Texture {
506
361
  ...this,
507
362
  depth,
508
363
  mipLevel,
509
- glTarget
364
+ glTarget,
365
+ flipY: this.props.flipY
510
366
  });
511
367
  return;
512
368
  }
@@ -545,3 +401,58 @@ export class WEBGLTexture extends Texture {
545
401
  return textureUnit;
546
402
  }
547
403
  }
404
+ // TODO - Remove when texture refactor is complete
405
+ /*
406
+ setCubeMapData(options: {
407
+ width: number;
408
+ height: number;
409
+ data: Record<GL, Texture2DData> | Record<TextureCubeFace, Texture2DData>;
410
+ format?: any;
411
+ type?: any;
412
+ /** @deprecated Use .data *
413
+ pixels: any;
414
+ }): void {
415
+ const {gl} = this;
416
+
417
+ const {width, height, pixels, data, format = GL.RGBA, type = GL.UNSIGNED_BYTE} = options;
418
+
419
+ // pixel data (imageDataMap) is an Object from Face to Image or Promise.
420
+ // For example:
421
+ // {
422
+ // GL.TEXTURE_CUBE_MAP_POSITIVE_X : Image-or-Promise,
423
+ // GL.TEXTURE_CUBE_MAP_NEGATIVE_X : Image-or-Promise,
424
+ // ... }
425
+ // To provide multiple level-of-details (LODs) this can be Face to Array
426
+ // of Image or Promise, like this
427
+ // {
428
+ // GL.TEXTURE_CUBE_MAP_POSITIVE_X : [Image-or-Promise-LOD-0, Image-or-Promise-LOD-1],
429
+ // GL.TEXTURE_CUBE_MAP_NEGATIVE_X : [Image-or-Promise-LOD-0, Image-or-Promise-LOD-1],
430
+ // ... }
431
+
432
+ const imageDataMap = this._getImageDataMap(pixels || data);
433
+
434
+ const resolvedFaces = WEBGLTexture.FACES.map(face => {
435
+ const facePixels = imageDataMap[face];
436
+ return Array.isArray(facePixels) ? facePixels : [facePixels];
437
+ });
438
+ this.bind();
439
+
440
+ WEBGLTexture.FACES.forEach((face, index) => {
441
+ if (resolvedFaces[index].length > 1 && this.props.mipmaps !== false) {
442
+ // If the user provides multiple LODs, then automatic mipmap
443
+ // generation generateMipmap() should be disabled to avoid overwritting them.
444
+ log.warn(`${this.id} has mipmap and multiple LODs.`)();
445
+ }
446
+ resolvedFaces[index].forEach((image, lodLevel) => {
447
+ // TODO: adjust width & height for LOD!
448
+ if (width && height) {
449
+ gl.texImage2D(face, lodLevel, format, width, height, 0 /* border*, format, type, image);
450
+ } else {
451
+ gl.texImage2D(face, lodLevel, format, format, type, image);
452
+ }
453
+ });
454
+ });
455
+
456
+ this.unbind();
457
+ }
458
+ */
@@ -1 +1 @@
1
- {"version":3,"file":"webgl-adapter.d.ts","sourceRoot":"","sources":["../../src/adapter/webgl-adapter.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAqB,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAC,WAAW,EAAC,0BAAuB;AAO3C,qBAAa,YAAa,SAAQ,OAAO;IACvC,+CAA+C;IAC/C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAW;;IAYxC,oCAAoC;IACpC,WAAW,IAAI,OAAO;IAItB,gGAAgG;IAChG,aAAa,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;IAIpC;;;;;OAKG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,sBAAsB,GAAG,OAAO,CAAC,WAAW,CAAC;IAejE,MAAM,CAAC,KAAK,GAAE,WAAgB,GAAG,OAAO,CAAC,WAAW,CAAC;CA4C5D;AAWD,eAAO,MAAM,aAAa,cAAqB,CAAC"}
1
+ {"version":3,"file":"webgl-adapter.d.ts","sourceRoot":"","sources":["../../src/adapter/webgl-adapter.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAM,MAAM,eAAe,CAAC;AAChE,OAAO,EAAC,WAAW,EAAC,0BAAuB;AAO3C,qBAAa,YAAa,SAAQ,OAAO;IACvC,+CAA+C;IAC/C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAW;;IAYxC,oCAAoC;IACpC,WAAW,IAAI,OAAO;IAItB,gGAAgG;IAChG,aAAa,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;IAIpC;;;;;OAKG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,sBAAsB,GAAG,OAAO,CAAC,WAAW,CAAC;IAejE,MAAM,CAAC,KAAK,GAAE,WAAgB,GAAG,OAAO,CAAC,WAAW,CAAC;CAoC5D;AAWD,eAAO,MAAM,aAAa,cAAqB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  // luma.gl
2
2
  // SPDX-License-Identifier: MIT
3
3
  // Copyright (c) vis.gl contributors
4
- import { Adapter, Device, CanvasContext, log } from '@luma.gl/core';
4
+ import { Adapter, Device, log } from '@luma.gl/core';
5
5
  import { WebGLDevice } from "./webgl-device.js";
6
6
  import { enforceWebGL2 } from "../context/polyfills/polyfill-webgl1-extensions.js";
7
7
  import { loadSpectorJS, DEFAULT_SPECTOR_PROPS } from "../context/debug/spector.js";
@@ -43,23 +43,18 @@ export class WebGLAdapter extends Adapter {
43
43
  if (!isWebGL(gl)) {
44
44
  throw new Error('Invalid WebGL2RenderingContext');
45
45
  }
46
- return new WebGLDevice({ gl: gl });
46
+ return new WebGLDevice({ _handle: gl });
47
47
  }
48
48
  async create(props = {}) {
49
49
  log.groupCollapsed(LOG_LEVEL, 'WebGLDevice created')();
50
50
  const promises = [];
51
51
  // Load webgl and spector debug scripts from CDN if requested
52
- if (props.debug) {
52
+ if (props.debugWebGL || props.debug) {
53
53
  promises.push(loadWebGLDeveloperTools());
54
54
  }
55
- if (props.debugWithSpectorJS) {
55
+ if (props.debugSpectorJS) {
56
56
  promises.push(loadSpectorJS(props));
57
57
  }
58
- // Wait for page to load: if canvas is a string we need to query the DOM for the canvas element.
59
- // We only wait when props.canvas is string to avoids setting the global page onload callback unless necessary.
60
- if (typeof props.canvas === 'string') {
61
- promises.push(CanvasContext.pageLoaded);
62
- }
63
58
  // Wait for all the loads to settle before creating the context.
64
59
  // The Device.create() functions are async, so in contrast to the constructor, we can `await` here.
65
60
  const results = await Promise.allSettled(promises);
@@ -68,7 +63,6 @@ export class WebGLAdapter extends Adapter {
68
63
  log.error(`Failed to initialize debug libraries ${result.reason}`)();
69
64
  }
70
65
  }
71
- log.probe(LOG_LEVEL + 1, 'DOM is loaded')();
72
66
  const device = new WebGLDevice(props);
73
67
  // Log some debug info about the newly created context
74
68
  const message = `\
@@ -1,12 +1,11 @@
1
1
  import type { TypedArray } from '@math.gl/types';
2
- import type { DeviceProps, DeviceInfo, CanvasContextProps, TextureFormat, Buffer, Texture, Framebuffer, VertexArray, VertexArrayProps } from '@luma.gl/core';
2
+ import type { DeviceProps, DeviceInfo, CanvasContextProps, TextureFormat, Buffer, Texture, Framebuffer, VertexArray, VertexArrayProps, BufferProps, ShaderProps, SamplerProps, TextureProps, ExternalTexture, ExternalTextureProps, FramebufferProps, RenderPipelineProps, ComputePipeline, ComputePipelineProps, RenderPassProps, ComputePass, ComputePassProps, CommandEncoderProps, TransformFeedbackProps, QuerySetProps } from '@luma.gl/core';
3
3
  import { Device, CanvasContext } from '@luma.gl/core';
4
4
  import type { GLExtensions } from '@luma.gl/constants';
5
5
  import { WebGLDeviceFeatures } from "./device-helpers/webgl-device-features.js";
6
6
  import { WebGLDeviceLimits } from "./device-helpers/webgl-device-limits.js";
7
7
  import { WebGLCanvasContext } from "./webgl-canvas-context.js";
8
8
  import type { Spector } from "../context/debug/spector-types.js";
9
- import type { BufferProps, ShaderProps, SamplerProps, TextureProps, ExternalTexture, ExternalTextureProps, FramebufferProps, RenderPipelineProps, ComputePipeline, ComputePipelineProps, RenderPassProps, ComputePass, ComputePassProps, CommandEncoderProps, TransformFeedbackProps, QuerySetProps } from '@luma.gl/core';
10
9
  import { WEBGLBuffer } from "./resources/webgl-buffer.js";
11
10
  import { WEBGLShader } from "./resources/webgl-shader.js";
12
11
  import { WEBGLSampler } from "./resources/webgl-sampler.js";
@@ -129,7 +128,13 @@ export declare class WebGLDevice extends Device {
129
128
  * Be aware that there are some duplicates especially for constants that are 0,
130
129
  * so this isn't guaranteed to return the right key in all cases.
131
130
  */
132
- getGLKey(value: unknown, gl?: WebGL2RenderingContext): string;
131
+ getGLKey(value: unknown, options?: {
132
+ emptyIfUnknown?: boolean;
133
+ }): string;
134
+ /**
135
+ * Returns a map with any GL.<KEY> constants mapped to strings, both for keys and values
136
+ */
137
+ getGLKeys(glParameters: Record<number, unknown>): Record<string, string>;
133
138
  /** Store constants */
134
139
  _constants: (TypedArray | null)[];
135
140
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"webgl-device.d.ts","sourceRoot":"","sources":["../../src/adapter/webgl-device.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,aAAa,EACb,MAAM,EACN,OAAO,EACP,WAAW,EACX,WAAW,EACX,gBAAgB,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,MAAM,EAAE,aAAa,EAAM,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAIrD,OAAO,EAAC,mBAAmB,EAAC,kDAA+C;AAC3E,OAAO,EAAC,iBAAiB,EAAC,gDAA6C;AACvE,OAAO,EAAC,kBAAkB,EAAC,kCAA+B;AAC1D,OAAO,KAAK,EAAC,OAAO,EAAC,0CAAuC;AAW5D,OAAO,KAAK,EACV,WAAW,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