@luma.gl/webgl 9.0.0-beta.1 → 9.0.0-beta.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luma.gl/webgl",
3
- "version": "9.0.0-beta.1",
3
+ "version": "9.0.0-beta.2",
4
4
  "description": "WebGL2 adapter for the luma.gl API",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -44,12 +44,12 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@babel/runtime": "^7.0.0",
47
- "@luma.gl/constants": "9.0.0-beta.1",
48
- "@luma.gl/core": "9.0.0-beta.1",
47
+ "@luma.gl/constants": "9.0.0-beta.2",
48
+ "@luma.gl/core": "9.0.0-beta.2",
49
49
  "@probe.gl/env": "^4.0.2"
50
50
  },
51
51
  "devDependencies": {
52
- "@luma.gl/test-utils": "9.0.0-beta.1"
52
+ "@luma.gl/test-utils": "9.0.0-beta.2"
53
53
  },
54
- "gitHead": "5fb42f651e80825336a372ca5a66de7d55611ddf"
54
+ "gitHead": "d90ddd6231c3d405d88dfb9e8c232c4dfefcc056"
55
55
  }
@@ -28,6 +28,7 @@ import {
28
28
  createHeadlessContext,
29
29
  isHeadlessGLRegistered
30
30
  } from '../context/context/create-headless-context';
31
+
31
32
  import {getDeviceInfo} from './device-helpers/get-device-info';
32
33
  import {getDeviceFeatures} from './device-helpers/device-features';
33
34
  import {getDeviceLimits, getWebGLLimits, WebGLLimits} from './device-helpers/device-limits';
@@ -75,6 +76,9 @@ import {WEBGLVertexArray} from './resources/webgl-vertex-array';
75
76
  import {WEBGLTransformFeedback} from './resources/webgl-transform-feedback';
76
77
 
77
78
  import {readPixelsToArray, readPixelsToBuffer} from '../classic/copy-and-blit';
79
+ import {setGLParameters} from '../context/parameters/unified-parameter-api';
80
+ import {withGLParameters} from '../context/state-tracker/with-parameters';
81
+ import {clear} from '../classic/clear';
78
82
 
79
83
  const LOG_LEVEL = 1;
80
84
 
@@ -422,6 +426,18 @@ ${device.info.vendor}, ${device.info.renderer} for canvas: ${device.canvasContex
422
426
  return readPixelsToBuffer(source, options);
423
427
  }
424
428
 
429
+ override setParametersWebGL(parameters: any): void {
430
+ setGLParameters(this, parameters);
431
+ }
432
+
433
+ override withParametersWebGL(parameters: any, func: any): any {
434
+ withGLParameters(this, parameters, func);
435
+ }
436
+
437
+ override clearWebGL(options?: {framebuffer?: Framebuffer; color?: any; depth?: any; stencil?: any}): void {
438
+ clear(this, options);
439
+ }
440
+
425
441
  //
426
442
  // WebGL-only API (not part of `Device` API)
427
443
  //
package/src/index.ts CHANGED
@@ -36,7 +36,7 @@ export {WEBGLVertexArray} from './adapter/resources/webgl-vertex-array';
36
36
  export type {RenderbufferProps} from './adapter/objects/webgl-renderbuffer';
37
37
  export {WEBGLRenderbuffer} from './adapter/objects/webgl-renderbuffer';
38
38
 
39
- // WebGL adapter classes
39
+ // WebGL adapter classes
40
40
  export {WEBGLTransformFeedback} from './adapter/resources/webgl-transform-feedback';
41
41
 
42
42
  // WebGL adapter classes
@@ -55,15 +55,6 @@ export {
55
55
 
56
56
  export {setDeviceParameters, withDeviceParameters} from './adapter/converters/device-parameters';
57
57
 
58
- export type {GLParameters} from '@luma.gl/constants';
59
- export {
60
- getGLParameters,
61
- setGLParameters,
62
- resetGLParameters
63
- } from './context/parameters/unified-parameter-api';
64
-
65
- export {withGLParameters} from './context/state-tracker/with-parameters';
66
-
67
58
  // HELPERS - EXPERIMENTAL
68
59
  export {getShaderLayout} from './adapter/helpers/get-shader-layout';
69
60
  export {
@@ -74,9 +65,7 @@ export {
74
65
  // TEST EXPORTS
75
66
  export {TEXTURE_FORMATS as _TEXTURE_FORMATS} from './adapter/converters/texture-formats';
76
67
 
77
- // DEPRECATED EXPORTS
78
- export {clear} from './classic/clear';
79
- export {readPixelsToBuffer, readPixelsToArray, copyToTexture} from './classic/copy-and-blit';
68
+ // DEPRECATED TEST EXPORTS
80
69
  // State tracking
81
70
  export {
82
71
  trackContextState,
@@ -86,25 +75,10 @@ export {
86
75
  // Polyfills (supports a subset of WebGL2 APIs on WebGL1 contexts)
87
76
  export {polyfillContext} from './context/polyfill/polyfill-context';
88
77
 
89
- // HELPERS - EXPERIMENTAL
90
- // export {getShaderLayout, getProgramBindings} from './adapter/helpers/get-shader-layout';
91
- // export {convertGLToTextureFormat, _checkFloat32ColorAttachment} from './adapter/converters/texture-formats';
92
- // export {TEXTURE_FORMATS as _TEXTURE_FORMATS} from './adapter/converters/texture-formats';
93
-
94
- // // WebGL Types - Experimental exports
95
- // export type {
96
- // GLDrawMode,
97
- // GLPrimitive,
98
- // GLDataType,
99
- // GLPixelType,
100
- // GLUniformType,
101
- // GLSamplerType,
102
- // GLCompositeType,
103
- // GLFunction,
104
- // GLBlendEquation,
105
- // GLBlendFunction,
106
- // GLStencilOp,
107
- // GLSamplerParameters,
108
- // GLValueParameters,
109
- // GLFunctionParameters
110
- // } from '@luma.gl/constants';
78
+ export {
79
+ resetGLParameters,
80
+ setGLParameters,
81
+ getGLParameters
82
+ } from './context/parameters/unified-parameter-api';
83
+
84
+ export {withGLParameters} from './context/state-tracker/with-parameters';