@luma.gl/webgl 9.0.0-alpha.29 → 9.0.0-alpha.30
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/LICENSE +2 -1
- package/dist/adapter/converters/device-parameters.d.ts +1 -1
- package/dist/adapter/converters/device-parameters.d.ts.map +1 -1
- package/dist/adapter/converters/device-parameters.js +1 -1
- package/dist/adapter/converters/device-parameters.js.map +1 -1
- package/dist/adapter/converters/sampler-parameters.d.ts +1 -1
- package/dist/adapter/converters/sampler-parameters.d.ts.map +1 -1
- package/dist/adapter/converters/sampler-parameters.js.map +1 -1
- package/dist/adapter/converters/texture-formats.d.ts +1 -1
- package/dist/adapter/converters/texture-formats.d.ts.map +1 -1
- package/dist/adapter/converters/texture-formats.js +1 -1
- package/dist/adapter/converters/texture-formats.js.map +1 -1
- package/dist/adapter/converters/vertex-formats.d.ts +1 -1
- package/dist/adapter/converters/vertex-formats.d.ts.map +1 -1
- package/dist/adapter/converters/vertex-formats.js.map +1 -1
- package/dist/adapter/device-helpers/device-features.d.ts +1 -1
- package/dist/adapter/device-helpers/device-features.d.ts.map +1 -1
- package/dist/adapter/device-helpers/device-features.js.map +1 -1
- package/dist/adapter/device-helpers/device-limits.d.ts +1 -1
- package/dist/adapter/device-helpers/device-limits.d.ts.map +1 -1
- package/dist/adapter/device-helpers/device-limits.js.map +1 -1
- package/dist/adapter/device-helpers/get-device-info.d.ts +1 -1
- package/dist/adapter/device-helpers/get-device-info.d.ts.map +1 -1
- package/dist/adapter/device-helpers/get-device-info.js.map +1 -1
- package/dist/adapter/helpers/attribute-utils.d.ts +4 -4
- package/dist/adapter/helpers/attribute-utils.d.ts.map +1 -1
- package/dist/adapter/helpers/attribute-utils.js.map +1 -1
- package/dist/adapter/helpers/get-shader-layout.d.ts +2 -2
- package/dist/adapter/helpers/get-shader-layout.d.ts.map +1 -1
- package/dist/adapter/helpers/get-shader-layout.js +1 -1
- package/dist/adapter/helpers/get-shader-layout.js.map +1 -1
- package/dist/adapter/helpers/parse-shader-compiler-log.d.ts +1 -1
- package/dist/adapter/helpers/parse-shader-compiler-log.d.ts.map +1 -1
- package/dist/adapter/helpers/parse-shader-compiler-log.js.map +1 -1
- package/dist/adapter/helpers/set-uniform.d.ts +1 -1
- package/dist/adapter/helpers/set-uniform.d.ts.map +1 -1
- package/dist/adapter/helpers/set-uniform.js +1 -1
- package/dist/adapter/helpers/set-uniform.js.map +1 -1
- package/dist/adapter/helpers/uniforms.d.ts +1 -1
- package/dist/adapter/helpers/uniforms.d.ts.map +1 -1
- package/dist/adapter/helpers/uniforms.js.map +1 -1
- package/dist/adapter/objects/constants-to-keys.js +1 -1
- package/dist/adapter/objects/constants-to-keys.js.map +1 -1
- package/dist/adapter/objects/webgl-renderbuffer.d.ts +1 -1
- package/dist/adapter/objects/webgl-renderbuffer.d.ts.map +1 -1
- package/dist/adapter/objects/webgl-renderbuffer.js +1 -1
- package/dist/adapter/objects/webgl-renderbuffer.js.map +1 -1
- package/dist/adapter/objects/webgl-resource.d.ts +2 -2
- package/dist/adapter/objects/webgl-resource.d.ts.map +1 -1
- package/dist/adapter/objects/webgl-resource.js +1 -1
- package/dist/adapter/objects/webgl-resource.js.map +1 -1
- package/dist/adapter/objects/webgl-vertex-array-object.d.ts +1 -1
- package/dist/adapter/objects/webgl-vertex-array-object.d.ts.map +1 -1
- package/dist/adapter/objects/webgl-vertex-array-object.js +1 -1
- package/dist/adapter/objects/webgl-vertex-array-object.js.map +1 -1
- package/dist/adapter/resources/webgl-buffer.d.ts +2 -2
- package/dist/adapter/resources/webgl-buffer.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-buffer.js +1 -1
- package/dist/adapter/resources/webgl-buffer.js.map +1 -1
- package/dist/adapter/resources/webgl-command-buffer.d.ts +2 -2
- package/dist/adapter/resources/webgl-command-buffer.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-command-buffer.js +1 -1
- package/dist/adapter/resources/webgl-command-buffer.js.map +1 -1
- package/dist/adapter/resources/webgl-command-encoder.d.ts +2 -2
- package/dist/adapter/resources/webgl-command-encoder.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-command-encoder.js +1 -1
- package/dist/adapter/resources/webgl-command-encoder.js.map +1 -1
- package/dist/adapter/resources/webgl-framebuffer.d.ts +3 -3
- package/dist/adapter/resources/webgl-framebuffer.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-framebuffer.js +1 -1
- package/dist/adapter/resources/webgl-framebuffer.js.map +1 -1
- package/dist/adapter/resources/webgl-render-pass.d.ts +1 -1
- package/dist/adapter/resources/webgl-render-pass.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-render-pass.js +7 -3
- package/dist/adapter/resources/webgl-render-pass.js.map +1 -1
- package/dist/adapter/resources/webgl-render-pipeline.d.ts +2 -2
- package/dist/adapter/resources/webgl-render-pipeline.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-render-pipeline.js +7 -8
- package/dist/adapter/resources/webgl-render-pipeline.js.map +1 -1
- package/dist/adapter/resources/webgl-sampler.d.ts +1 -1
- package/dist/adapter/resources/webgl-sampler.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-sampler.js +1 -1
- package/dist/adapter/resources/webgl-sampler.js.map +1 -1
- package/dist/adapter/resources/webgl-shader.d.ts +1 -1
- package/dist/adapter/resources/webgl-shader.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-shader.js +1 -1
- package/dist/adapter/resources/webgl-shader.js.map +1 -1
- package/dist/adapter/resources/webgl-texture.d.ts +4 -4
- package/dist/adapter/resources/webgl-texture.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-texture.js +2 -2
- package/dist/adapter/resources/webgl-texture.js.map +1 -1
- package/dist/adapter/webgl-canvas-context.d.ts +2 -2
- package/dist/adapter/webgl-canvas-context.d.ts.map +1 -1
- package/dist/adapter/webgl-canvas-context.js +1 -1
- package/dist/adapter/webgl-canvas-context.js.map +1 -1
- package/dist/adapter/webgl-device.d.ts +3 -3
- package/dist/adapter/webgl-device.d.ts.map +1 -1
- package/dist/adapter/webgl-device.js +1 -1
- package/dist/adapter/webgl-device.js.map +1 -1
- package/dist/classic/accessor.d.ts +1 -1
- package/dist/classic/accessor.d.ts.map +1 -1
- package/dist/classic/accessor.js +1 -1
- package/dist/classic/accessor.js.map +1 -1
- package/dist/classic/buffer-with-accessor.d.ts +1 -1
- package/dist/classic/buffer-with-accessor.d.ts.map +1 -1
- package/dist/classic/buffer-with-accessor.js +1 -1
- package/dist/classic/buffer-with-accessor.js.map +1 -1
- package/dist/classic/clear.d.ts +1 -1
- package/dist/classic/clear.d.ts.map +1 -1
- package/dist/classic/clear.js +1 -1
- package/dist/classic/clear.js.map +1 -1
- package/dist/classic/copy-and-blit.d.ts +1 -1
- package/dist/classic/copy-and-blit.d.ts.map +1 -1
- package/dist/classic/copy-and-blit.js +1 -1
- package/dist/classic/copy-and-blit.js.map +1 -1
- package/dist/classic/format-utils.js +1 -1
- package/dist/classic/format-utils.js.map +1 -1
- package/dist/classic/typed-array-utils.d.ts +1 -1
- package/dist/classic/typed-array-utils.d.ts.map +1 -1
- package/dist/classic/typed-array-utils.js.map +1 -1
- package/dist/context/context/webgl-checks.js +1 -1
- package/dist/context/context/webgl-checks.js.map +1 -1
- package/dist/context/debug/spector.js +1 -1
- package/dist/context/debug/spector.js.map +1 -1
- package/dist/context/debug/webgl-developer-tools.js +1 -1
- package/dist/context/debug/webgl-developer-tools.js.map +1 -1
- package/dist/context/parameters/unified-parameter-api.d.ts +1 -1
- package/dist/context/parameters/unified-parameter-api.d.ts.map +1 -1
- package/dist/context/parameters/unified-parameter-api.js.map +1 -1
- package/dist/context/polyfill/polyfill-context.js +1 -1
- package/dist/context/polyfill/polyfill-context.js.map +1 -1
- package/dist/context/polyfill/polyfill-table.js +1 -1
- package/dist/context/polyfill/polyfill-table.js.map +1 -1
- package/dist/context/state-tracker/track-context-state.js +1 -1
- package/dist/context/state-tracker/track-context-state.js.map +1 -1
- package/dist/context/state-tracker/with-parameters.d.ts +1 -1
- package/dist/context/state-tracker/with-parameters.d.ts.map +1 -1
- package/dist/context/state-tracker/with-parameters.js.map +1 -1
- package/dist/dist.dev.js +55 -37
- package/dist/index.cjs +185 -170
- package/dist/index.js.map +1 -1
- package/dist.min.js +4 -4
- package/package.json +5 -5
- package/src/adapter/converters/device-parameters.ts +1 -1
- package/src/adapter/converters/sampler-parameters.ts +1 -1
- package/src/adapter/converters/texture-formats.ts +2 -2
- package/src/adapter/converters/vertex-formats.ts +1 -1
- package/src/adapter/device-helpers/device-features.ts +1 -1
- package/src/adapter/device-helpers/device-limits.ts +1 -1
- package/src/adapter/device-helpers/get-device-info.ts +1 -1
- package/src/adapter/helpers/attribute-utils.ts +4 -4
- package/src/adapter/helpers/get-shader-layout.ts +3 -3
- package/src/adapter/helpers/parse-shader-compiler-log.ts +1 -1
- package/src/adapter/helpers/set-uniform.ts +3 -4
- package/src/adapter/helpers/uniforms.ts +1 -1
- package/src/adapter/objects/constants-to-keys.ts +1 -1
- package/src/adapter/objects/webgl-renderbuffer.ts +1 -1
- package/src/adapter/objects/webgl-resource.ts +2 -2
- package/src/adapter/objects/webgl-vertex-array-object.ts +2 -2
- package/src/adapter/resources/webgl-buffer.ts +2 -2
- package/src/adapter/resources/webgl-command-buffer.ts +2 -2
- package/src/adapter/resources/webgl-command-encoder.ts +2 -2
- package/src/adapter/resources/webgl-framebuffer.ts +2 -2
- package/src/adapter/resources/webgl-render-pass.ts +9 -3
- package/src/adapter/resources/webgl-render-pipeline.ts +13 -8
- package/src/adapter/resources/webgl-sampler.ts +1 -1
- package/src/adapter/resources/webgl-shader.ts +1 -1
- package/src/adapter/resources/webgl-texture.ts +2 -2
- package/src/adapter/webgl-canvas-context.ts +2 -2
- package/src/adapter/webgl-device.ts +3 -3
- package/src/classic/accessor.ts +1 -1
- package/src/classic/buffer-with-accessor.ts +2 -2
- package/src/classic/clear.ts +1 -1
- package/src/classic/copy-and-blit.ts +1 -1
- package/src/classic/format-utils.ts +1 -1
- package/src/classic/typed-array-utils.ts +1 -1
- package/src/context/context/webgl-checks.ts +1 -1
- package/src/context/debug/spector.ts +1 -1
- package/src/context/debug/webgl-developer-tools.ts +1 -1
- package/src/context/parameters/unified-parameter-api.ts +1 -1
- package/src/context/polyfill/polyfill-context.ts +1 -1
- package/src/context/polyfill/polyfill-table.ts +1 -1
- package/src/context/state-tracker/track-context-state.ts +1 -1
- package/src/context/state-tracker/with-parameters.ts +1 -1
- package/src/index.ts +1 -1
- package/dist/adapter/helpers/get-vertex-buffer-layout.d.ts +0 -12
- package/dist/adapter/helpers/get-vertex-buffer-layout.d.ts.map +0 -1
- package/dist/adapter/helpers/get-vertex-buffer-layout.js +0 -84
- package/dist/adapter/helpers/get-vertex-buffer-layout.js.map +0 -1
- package/src/adapter/helpers/get-vertex-buffer-layout.ts +0 -123
|
@@ -10,8 +10,8 @@ import type {
|
|
|
10
10
|
AccessorObject,
|
|
11
11
|
BufferMapping,
|
|
12
12
|
VertexFormat
|
|
13
|
-
} from '@luma.gl/
|
|
14
|
-
import {log} from '@luma.gl/
|
|
13
|
+
} from '@luma.gl/core';
|
|
14
|
+
import {log} from '@luma.gl/core';
|
|
15
15
|
import {GL} from '@luma.gl/constants';
|
|
16
16
|
import {isWebGL2} from '../../context/context/webgl-checks';
|
|
17
17
|
import {Accessor} from '../../classic/accessor'; // TODO - should NOT depend on classic API
|
|
@@ -429,7 +429,7 @@ function parseUniformName(name: string): {name: string; length: number; isArray:
|
|
|
429
429
|
|
|
430
430
|
/**
|
|
431
431
|
* TODO - verify this is a copy of above and delete
|
|
432
|
-
* import type {TextureFormat} from '@luma.gl/
|
|
432
|
+
* import type {TextureFormat} from '@luma.gl/core';
|
|
433
433
|
* Extract info about all "active" uniform blocks
|
|
434
434
|
* ("Active" just means that unused (inactive) blocks may have been optimized away during linking)
|
|
435
435
|
*
|
|
@@ -9,7 +9,7 @@ export function setUniform(
|
|
|
9
9
|
gl: WebGLRenderingContext,
|
|
10
10
|
location: WebGLUniformLocation,
|
|
11
11
|
type: GL,
|
|
12
|
-
value: number | Float32Array | Int32Array | Uint32Array
|
|
12
|
+
value: number | Float32Array | Int32Array | Uint32Array | boolean
|
|
13
13
|
): void {
|
|
14
14
|
const gl2 = gl as WebGL2RenderingContext;
|
|
15
15
|
|
|
@@ -37,13 +37,12 @@ export function setUniform(
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
// @ts-expect-error
|
|
41
40
|
if (value === true) {
|
|
42
41
|
value = 1;
|
|
43
42
|
}
|
|
44
|
-
|
|
43
|
+
|
|
45
44
|
if (value === false) {
|
|
46
|
-
value =
|
|
45
|
+
value = 0;
|
|
47
46
|
}
|
|
48
47
|
const arrayValue = (typeof value === 'number') ? [value] : value;
|
|
49
48
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {assert, ResourceProps, TextureFormat} from '@luma.gl/
|
|
1
|
+
import {assert, ResourceProps, TextureFormat} from '@luma.gl/core';
|
|
2
2
|
import {GL} from '@luma.gl/constants';
|
|
3
3
|
import {WebGLDevice} from '../webgl-device';
|
|
4
4
|
import {WebGLResource} from './webgl-resource';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// luma.gl, MIT license
|
|
2
|
-
import {Resource, assert, uid, stubRemovedMethods} from '@luma.gl/
|
|
3
|
-
import type {Device, ResourceProps} from '@luma.gl/
|
|
2
|
+
import {Resource, assert, uid, stubRemovedMethods} from '@luma.gl/core';
|
|
3
|
+
import type {Device, ResourceProps} from '@luma.gl/core';
|
|
4
4
|
import {GL} from '@luma.gl/constants';
|
|
5
5
|
import {isWebGL2, assertWebGLContext} from '../../context/context/webgl-checks';
|
|
6
6
|
import {WebGLDevice} from '../webgl-device';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {Device, Buffer, ResourceProps, TypedArray, NumericArray} from '@luma.gl/
|
|
2
|
-
import {Resource, assert, getScratchArray, fillArray} from '@luma.gl/
|
|
1
|
+
import type {Device, Buffer, ResourceProps, TypedArray, NumericArray} from '@luma.gl/core';
|
|
2
|
+
import {Resource, assert, getScratchArray, fillArray} from '@luma.gl/core';
|
|
3
3
|
import {GL} from '@luma.gl/constants';
|
|
4
4
|
import {getBrowser} from '@probe.gl/env';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {BufferProps} from '@luma.gl/
|
|
2
|
-
import {Buffer, assert} from '@luma.gl/
|
|
1
|
+
import type {BufferProps} from '@luma.gl/core';
|
|
2
|
+
import {Buffer, assert} from '@luma.gl/core';
|
|
3
3
|
import {GL} from '@luma.gl/constants';
|
|
4
4
|
import {WebGLDevice} from '../webgl-device';
|
|
5
5
|
|
|
@@ -5,13 +5,13 @@ import type {
|
|
|
5
5
|
CopyBufferToTextureOptions,
|
|
6
6
|
CopyTextureToBufferOptions,
|
|
7
7
|
CopyTextureToTextureOptions
|
|
8
|
-
} from '@luma.gl/
|
|
8
|
+
} from '@luma.gl/core';
|
|
9
9
|
import {
|
|
10
10
|
CommandBuffer,
|
|
11
11
|
Texture,
|
|
12
12
|
// Buffer,
|
|
13
13
|
Framebuffer
|
|
14
|
-
} from '@luma.gl/
|
|
14
|
+
} from '@luma.gl/core';
|
|
15
15
|
import {GL} from '@luma.gl/constants';
|
|
16
16
|
|
|
17
17
|
// import {getTypedArrayFromGLType, getGLTypeFromTypedArray} from '../../classic/typed-array-utils';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {CommandEncoder, CommandEncoderProps} from '@luma.gl/
|
|
1
|
+
import {CommandEncoder, CommandEncoderProps} from '@luma.gl/core';
|
|
2
2
|
import type {
|
|
3
3
|
CopyBufferToBufferOptions,
|
|
4
4
|
CopyBufferToTextureOptions,
|
|
5
5
|
CopyTextureToBufferOptions,
|
|
6
6
|
CopyTextureToTextureOptions
|
|
7
|
-
} from '@luma.gl/
|
|
7
|
+
} from '@luma.gl/core';
|
|
8
8
|
|
|
9
9
|
import {WEBGLCommandBuffer} from './webgl-command-buffer';
|
|
10
10
|
import {WebGLDevice} from '../webgl-device';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// luma.gl, MIT license
|
|
2
2
|
|
|
3
|
-
import type {FramebufferProps, TextureFormat} from '@luma.gl/
|
|
4
|
-
import {Framebuffer, Texture, assert} from '@luma.gl/
|
|
3
|
+
import type {FramebufferProps, TextureFormat} from '@luma.gl/core';
|
|
4
|
+
import {Framebuffer, Texture, assert} from '@luma.gl/core';
|
|
5
5
|
import {GL} from '@luma.gl/constants';
|
|
6
6
|
import {WebGLDevice} from '../webgl-device';
|
|
7
7
|
import {WEBGLTexture} from './webgl-texture';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {RenderPass, RenderPassProps, NumericArray, RenderPassParameters} from '@luma.gl/
|
|
1
|
+
import {RenderPass, RenderPassProps, NumericArray, RenderPassParameters} from '@luma.gl/core';
|
|
2
2
|
import {WebGLDevice} from '../webgl-device';
|
|
3
3
|
import {GL, GLParameters} from '@luma.gl/constants';
|
|
4
4
|
import {withParameters} from '../../context/state-tracker/with-parameters';
|
|
@@ -64,8 +64,14 @@ export class WEBGLRenderPass extends RenderPass {
|
|
|
64
64
|
|
|
65
65
|
// Map the four renderpass parameters to WebGL parameters
|
|
66
66
|
if (parameters.viewport) {
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
// WebGPU viewports are 6 coordinates (X, Y, Z)
|
|
68
|
+
if (parameters.viewport.length >= 6) {
|
|
69
|
+
glParameters.viewport = parameters.viewport.slice(0, 4);
|
|
70
|
+
glParameters.depthRange = [parameters.viewport[4], parameters.viewport[5]];
|
|
71
|
+
} else {
|
|
72
|
+
// WebGL viewports are 4 coordinates (X, Y)
|
|
73
|
+
glParameters.viewport = parameters.viewport;
|
|
74
|
+
}
|
|
69
75
|
}
|
|
70
76
|
glParameters.scissorTest = Boolean(parameters.scissorRect);
|
|
71
77
|
if (parameters.scissorRect) {
|
|
@@ -9,8 +9,8 @@ import type {
|
|
|
9
9
|
AttributeLayout,
|
|
10
10
|
TypedArray,
|
|
11
11
|
BufferMapping
|
|
12
|
-
} from '@luma.gl/
|
|
13
|
-
import {RenderPipeline, cast, log, decodeVertexFormat} from '@luma.gl/
|
|
12
|
+
} from '@luma.gl/core';
|
|
13
|
+
import {RenderPipeline, cast, log, decodeVertexFormat} from '@luma.gl/core';
|
|
14
14
|
import {GL} from '@luma.gl/constants';
|
|
15
15
|
|
|
16
16
|
import {getWebGLDataType} from '../converters/texture-formats';
|
|
@@ -120,7 +120,7 @@ export class WEBGLRenderPipeline extends RenderPipeline {
|
|
|
120
120
|
continue; // eslint-disable-line no-continue
|
|
121
121
|
}
|
|
122
122
|
const decoded = decodeVertexFormat(attribute.format);
|
|
123
|
-
const {type: typeString, components: size, byteLength: stride, normalized, integer} = decoded;
|
|
123
|
+
const {type: typeString, components: size, byteLength: stride, normalized /* , integer*/} = decoded;
|
|
124
124
|
const divisor = attribute.stepMode === 'instance' ? 1 : 0;
|
|
125
125
|
const type = getWebGLDataType(typeString);
|
|
126
126
|
this.vertexArrayObject.setBuffer(attribute.location, webglBuffer, {
|
|
@@ -129,7 +129,12 @@ export class WEBGLRenderPipeline extends RenderPipeline {
|
|
|
129
129
|
stride,
|
|
130
130
|
offset: 0,
|
|
131
131
|
normalized,
|
|
132
|
-
|
|
132
|
+
// it is the shader attribute declaration, not the vertex memory format,
|
|
133
|
+
// that determines if the data in the buffer will be treated as integers.
|
|
134
|
+
// /
|
|
135
|
+
// Also note that WebGL supports assigning non-normalized integer data to floating point attributes,
|
|
136
|
+
// but as far as we can tell, WebGPU does not.
|
|
137
|
+
integer: false,
|
|
133
138
|
divisor
|
|
134
139
|
});
|
|
135
140
|
}
|
|
@@ -437,10 +442,10 @@ function getDrawMode(
|
|
|
437
442
|
case 'point-list': return GL.POINTS;
|
|
438
443
|
case 'line-list': return GL.LINES;
|
|
439
444
|
case 'line-strip': return GL.LINE_STRIP;
|
|
440
|
-
case 'line-loop': return GL.LINE_LOOP;
|
|
445
|
+
case 'line-loop-webgl': return GL.LINE_LOOP;
|
|
441
446
|
case 'triangle-list': return GL.TRIANGLES;
|
|
442
447
|
case 'triangle-strip': return GL.TRIANGLE_STRIP;
|
|
443
|
-
case 'triangle-fan': return GL.TRIANGLE_FAN;
|
|
448
|
+
case 'triangle-fan-webgl': return GL.TRIANGLE_FAN;
|
|
444
449
|
default: throw new Error(topology);
|
|
445
450
|
}
|
|
446
451
|
}
|
|
@@ -452,10 +457,10 @@ function getGLPrimitive(topology: PrimitiveTopology): GL.POINTS | GL.LINES | GL.
|
|
|
452
457
|
case 'point-list': return GL.POINTS;
|
|
453
458
|
case 'line-list': return GL.LINES;
|
|
454
459
|
case 'line-strip': return GL.LINES;
|
|
455
|
-
case 'line-loop': return GL.LINES;
|
|
460
|
+
case 'line-loop-webgl': return GL.LINES;
|
|
456
461
|
case 'triangle-list': return GL.TRIANGLES;
|
|
457
462
|
case 'triangle-strip': return GL.TRIANGLES;
|
|
458
|
-
case 'triangle-fan': return GL.TRIANGLES;
|
|
463
|
+
case 'triangle-fan-webgl': return GL.TRIANGLES;
|
|
459
464
|
default: throw new Error(topology);
|
|
460
465
|
}
|
|
461
466
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// luma.gl, MIT license
|
|
2
2
|
|
|
3
|
-
import {Sampler, SamplerProps} from '@luma.gl/
|
|
3
|
+
import {Sampler, SamplerProps} from '@luma.gl/core';
|
|
4
4
|
import {GL, GLSamplerParameters} from '@luma.gl/constants';
|
|
5
5
|
import {convertSamplerParametersToWebGL} from '../converters/sampler-parameters';
|
|
6
6
|
import type {WebGLDevice} from '../webgl-device';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// luma.gl, MIT license
|
|
2
|
-
import {log, uid, Shader, ShaderProps, CompilerMessage, formatCompilerLog} from '@luma.gl/
|
|
2
|
+
import {log, uid, Shader, ShaderProps, CompilerMessage, formatCompilerLog} from '@luma.gl/core';
|
|
3
3
|
import {GL} from '@luma.gl/constants';
|
|
4
4
|
import {getShaderInfo} from '../helpers/get-shader-info';
|
|
5
5
|
import {parseShaderCompilerLog} from '../helpers/parse-shader-compiler-log';
|
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
SamplerParameters,
|
|
13
13
|
TypedArray,
|
|
14
14
|
isObjectEmpty
|
|
15
|
-
} from '@luma.gl/
|
|
16
|
-
import {Texture, cast, log, assert, isPowerOfTwo, loadImage} from '@luma.gl/
|
|
15
|
+
} from '@luma.gl/core';
|
|
16
|
+
import {Texture, cast, log, assert, isPowerOfTwo, loadImage} from '@luma.gl/core';
|
|
17
17
|
import {GL, GLSamplerParameters} from '@luma.gl/constants';
|
|
18
18
|
import {withParameters} from '../../context/state-tracker/with-parameters';
|
|
19
19
|
import {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// luma.gl, MIT license
|
|
2
|
-
import type {CanvasContextProps} from '@luma.gl/
|
|
3
|
-
import {CanvasContext} from '@luma.gl/
|
|
2
|
+
import type {CanvasContextProps} from '@luma.gl/core';
|
|
3
|
+
import {CanvasContext} from '@luma.gl/core';
|
|
4
4
|
import {WebGLDevice} from './webgl-device';
|
|
5
5
|
import {WEBGLFramebuffer} from './resources/webgl-framebuffer';
|
|
6
6
|
|
|
@@ -6,8 +6,8 @@ import type {
|
|
|
6
6
|
DeviceFeature,
|
|
7
7
|
CanvasContextProps,
|
|
8
8
|
TextureFormat
|
|
9
|
-
} from '@luma.gl/
|
|
10
|
-
import {Device, CanvasContext, log, uid} from '@luma.gl/
|
|
9
|
+
} from '@luma.gl/core';
|
|
10
|
+
import {Device, CanvasContext, log, uid} from '@luma.gl/core';
|
|
11
11
|
import {isBrowser} from '@probe.gl/env';
|
|
12
12
|
import {polyfillContext} from '../context/polyfill/polyfill-context';
|
|
13
13
|
import {popContextState, pushContextState, trackContextState} from '../context/state-tracker/track-context-state';
|
|
@@ -48,7 +48,7 @@ import type {
|
|
|
48
48
|
ComputePassProps,
|
|
49
49
|
// CommandEncoder,
|
|
50
50
|
CommandEncoderProps
|
|
51
|
-
} from '@luma.gl/
|
|
51
|
+
} from '@luma.gl/core';
|
|
52
52
|
|
|
53
53
|
import {BufferWithAccessor} from '../classic/buffer-with-accessor';
|
|
54
54
|
import {WEBGLBuffer} from './resources/webgl-buffer';
|
package/src/classic/accessor.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// luma.gl, MIT license
|
|
2
2
|
|
|
3
|
-
import type {Device, BufferProps, TypedArray} from '@luma.gl/
|
|
4
|
-
import {assert, checkProps} from '@luma.gl/
|
|
3
|
+
import type {Device, BufferProps, TypedArray} from '@luma.gl/core';
|
|
4
|
+
import {assert, checkProps} from '@luma.gl/core';
|
|
5
5
|
import {GL} from '@luma.gl/constants';
|
|
6
6
|
import {assertWebGL2Context} from '../context/context/webgl-checks';
|
|
7
7
|
import {AccessorObject} from '../types';
|
package/src/classic/clear.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// luma.gl, MIT license
|
|
2
|
-
import {assert, Texture, Framebuffer, FramebufferProps} from '@luma.gl/
|
|
2
|
+
import {assert, Texture, Framebuffer, FramebufferProps} from '@luma.gl/core';
|
|
3
3
|
import {GL} from '@luma.gl/constants';
|
|
4
4
|
|
|
5
5
|
import {BufferWithAccessor as Buffer} from './buffer-with-accessor';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// luma.gl, MIT license
|
|
2
2
|
|
|
3
|
-
import {TypedArray, TypedArrayConstructor} from '@luma.gl/
|
|
3
|
+
import {TypedArray, TypedArrayConstructor} from '@luma.gl/core';
|
|
4
4
|
import {GL, GLDataType, GLPixelType} from '@luma.gl/constants';
|
|
5
5
|
|
|
6
6
|
const ERR_TYPE_DEDUCTION = 'Failed to deduce GL constant from typed array';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Provides a unified API for getting and setting any WebGL parameter
|
|
2
2
|
// Also knows default values of all parameters, enabling fast cache initialization
|
|
3
3
|
// Provides base functionality for the state caching.
|
|
4
|
-
import {Device} from '@luma.gl/
|
|
4
|
+
import {Device} from '@luma.gl/core';
|
|
5
5
|
import type {GLParameters} from '@luma.gl/constants';
|
|
6
6
|
import {
|
|
7
7
|
GL_PARAMETER_DEFAULTS,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// This is intended to be a stand-alone file with minimal dependencies,
|
|
8
8
|
// easy to reuse or repurpose in other projects.
|
|
9
9
|
|
|
10
|
-
import {assert} from '@luma.gl/
|
|
10
|
+
import {assert} from '@luma.gl/core';
|
|
11
11
|
import {polyfillVertexArrayObject} from './polyfill-vertex-array-object';
|
|
12
12
|
|
|
13
13
|
import {WEBGL2_CONTEXT_POLYFILLS, WEBGL2_CONTEXT_OVERRIDES} from './polyfill-table';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Support for listening to context state changes and intercepting state queries
|
|
2
2
|
// NOTE: this system does not handle buffer bindings
|
|
3
|
-
import {assert} from '@luma.gl/
|
|
3
|
+
import {assert} from '@luma.gl/core';
|
|
4
4
|
import {GL_PARAMETER_DEFAULTS, GL_HOOKED_SETTERS, NON_CACHE_PARAMETERS} from '../parameters/webgl-parameter-tables';
|
|
5
5
|
import {setParameters, getParameters} from '../parameters/unified-parameter-api';
|
|
6
6
|
import {deepArrayEqual} from './deep-array-equal';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {Device} from '@luma.gl/
|
|
1
|
+
import type {Device} from '@luma.gl/core';
|
|
2
2
|
import {WebGLDevice} from '../../adapter/webgl-device';
|
|
3
3
|
import {GLParameters, setParameters} from '../parameters/unified-parameter-api';
|
|
4
4
|
import {pushContextState, popContextState} from './track-context-state';
|
package/src/index.ts
CHANGED
|
@@ -33,7 +33,7 @@ export type {RenderbufferProps} from './adapter/objects/webgl-renderbuffer';
|
|
|
33
33
|
export {WEBGLRenderbuffer} from './adapter/objects/webgl-renderbuffer';
|
|
34
34
|
export {WEBGLVertexArrayObject} from './adapter/objects/webgl-vertex-array-object';
|
|
35
35
|
|
|
36
|
-
// WebGL adapter classes (Legacy
|
|
36
|
+
// WebGL adapter classes (Legacy will likely be removed)
|
|
37
37
|
export {Accessor} from './classic/accessor';
|
|
38
38
|
export type {AccessorObject} from './types';
|
|
39
39
|
export type {BufferWithAccessorProps} from './classic/buffer-with-accessor';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="dist" />
|
|
2
|
-
import type { ShaderLayout, BufferMapping } from '@luma.gl/api';
|
|
3
|
-
/**
|
|
4
|
-
* Build a WebGPU vertex buffer layout intended for use in a GPURenderPassDescriptor.
|
|
5
|
-
* Converts luma.gl attribute definitions to a WebGPU GPUVertexBufferLayout[] array
|
|
6
|
-
* @param layout
|
|
7
|
-
* @param bufferMap The buffer map is optional
|
|
8
|
-
* @returns WebGPU layout intended for a GPURenderPassDescriptor.
|
|
9
|
-
*/
|
|
10
|
-
export declare function getVertexBufferLayout(layout: ShaderLayout, bufferMap: BufferMapping[]): GPUVertexBufferLayout[];
|
|
11
|
-
export declare function getBufferSlots(layout: ShaderLayout, bufferMap: BufferMapping[]): Record<string, number>;
|
|
12
|
-
//# sourceMappingURL=get-vertex-buffer-layout.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-vertex-buffer-layout.d.ts","sourceRoot":"","sources":["../../../src/adapter/helpers/get-vertex-buffer-layout.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAC,YAAY,EAAE,aAAa,EAAkB,MAAM,cAAc,CAAC;AAG/E;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,qBAAqB,EAAE,CAkE/G;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA2BvG"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { decodeVertexFormat } from '@luma.gl/api';
|
|
2
|
-
export function getVertexBufferLayout(layout, bufferMap) {
|
|
3
|
-
const vertexBufferLayouts = [];
|
|
4
|
-
const usedAttributes = new Set();
|
|
5
|
-
for (const mapping of bufferMap) {
|
|
6
|
-
const vertexAttributes = [];
|
|
7
|
-
let stepMode = 'vertex';
|
|
8
|
-
let byteStride = 0;
|
|
9
|
-
const byteOffset = mapping.byteOffset || 0;
|
|
10
|
-
if ('attributes' in mapping) {
|
|
11
|
-
for (const interleaved of mapping.attributes) {
|
|
12
|
-
const attributeLayout = findAttributeLayout(layout, interleaved.name, usedAttributes);
|
|
13
|
-
stepMode = attributeLayout.stepMode || 'vertex';
|
|
14
|
-
vertexAttributes.push({
|
|
15
|
-
format: attributeLayout.format,
|
|
16
|
-
offset: byteOffset + byteStride,
|
|
17
|
-
shaderLocation: attributeLayout.location
|
|
18
|
-
});
|
|
19
|
-
byteStride += decodeVertexFormat(attributeLayout.format).byteLength;
|
|
20
|
-
}
|
|
21
|
-
} else {
|
|
22
|
-
const attributeLayout = findAttributeLayout(layout, mapping.name, usedAttributes);
|
|
23
|
-
byteStride = decodeVertexFormat(attributeLayout.format).byteLength;
|
|
24
|
-
stepMode = attributeLayout.stepMode || 'vertex';
|
|
25
|
-
vertexAttributes.push({
|
|
26
|
-
format: attributeLayout.format,
|
|
27
|
-
offset: byteOffset,
|
|
28
|
-
shaderLocation: attributeLayout.location
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
vertexBufferLayouts.push({
|
|
32
|
-
arrayStride: mapping.byteStride || byteStride,
|
|
33
|
-
stepMode: stepMode || 'vertex',
|
|
34
|
-
attributes: vertexAttributes
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
for (const attribute of layout.attributes) {
|
|
38
|
-
if (!usedAttributes.has(attribute.name)) {
|
|
39
|
-
vertexBufferLayouts.push({
|
|
40
|
-
arrayStride: decodeVertexFormat(attribute.format).byteLength,
|
|
41
|
-
stepMode: attribute.stepMode || 'vertex',
|
|
42
|
-
attributes: [{
|
|
43
|
-
format: attribute.format,
|
|
44
|
-
offset: 0,
|
|
45
|
-
shaderLocation: attribute.location
|
|
46
|
-
}]
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return vertexBufferLayouts;
|
|
51
|
-
}
|
|
52
|
-
export function getBufferSlots(layout, bufferMap) {
|
|
53
|
-
const usedAttributes = new Set();
|
|
54
|
-
let bufferSlot = 0;
|
|
55
|
-
const bufferSlots = {};
|
|
56
|
-
for (const mapping of bufferMap) {
|
|
57
|
-
if ('attributes' in mapping) {
|
|
58
|
-
for (const interleaved of mapping.attributes) {
|
|
59
|
-
usedAttributes.add(interleaved.name);
|
|
60
|
-
}
|
|
61
|
-
} else {
|
|
62
|
-
usedAttributes.add(mapping.name);
|
|
63
|
-
}
|
|
64
|
-
bufferSlots[mapping.name] = bufferSlot++;
|
|
65
|
-
}
|
|
66
|
-
for (const attribute of layout.attributes) {
|
|
67
|
-
if (!usedAttributes.has(attribute.name)) {
|
|
68
|
-
bufferSlots[attribute.name] = bufferSlot++;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return bufferSlots;
|
|
72
|
-
}
|
|
73
|
-
function findAttributeLayout(layout, name, attributeNames) {
|
|
74
|
-
const attribute = layout.attributes.find(attribute => attribute.name === name);
|
|
75
|
-
if (!attribute) {
|
|
76
|
-
throw new Error("Unknown attribute ".concat(name));
|
|
77
|
-
}
|
|
78
|
-
if (attributeNames.has(name)) {
|
|
79
|
-
throw new Error("Duplicate attribute ".concat(name));
|
|
80
|
-
}
|
|
81
|
-
attributeNames.add(name);
|
|
82
|
-
return attribute;
|
|
83
|
-
}
|
|
84
|
-
//# sourceMappingURL=get-vertex-buffer-layout.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-vertex-buffer-layout.js","names":["decodeVertexFormat","getVertexBufferLayout","layout","bufferMap","vertexBufferLayouts","usedAttributes","Set","mapping","vertexAttributes","stepMode","byteStride","byteOffset","interleaved","attributes","attributeLayout","findAttributeLayout","name","push","format","offset","shaderLocation","location","byteLength","arrayStride","attribute","has","getBufferSlots","bufferSlot","bufferSlots","add","attributeNames","find","Error","concat"],"sources":["../../../src/adapter/helpers/get-vertex-buffer-layout.ts"],"sourcesContent":["import type {ShaderLayout, BufferMapping, AttributeLayout} from '@luma.gl/api';\nimport {decodeVertexFormat} from '@luma.gl/api';\n\n/**\n * Build a WebGPU vertex buffer layout intended for use in a GPURenderPassDescriptor.\n * Converts luma.gl attribute definitions to a WebGPU GPUVertexBufferLayout[] array\n * @param layout\n * @param bufferMap The buffer map is optional\n * @returns WebGPU layout intended for a GPURenderPassDescriptor.\n */\nexport function getVertexBufferLayout(layout: ShaderLayout, bufferMap: BufferMapping[]): GPUVertexBufferLayout[] {\n const vertexBufferLayouts: GPUVertexBufferLayout[] = [];\n const usedAttributes = new Set<string>();\n\n // First handle any buffers mentioned in `bufferMapping`\n for (const mapping of bufferMap) {\n // Build vertex attributes for one buffer\n const vertexAttributes: GPUVertexAttribute[] = [];\n\n // TODO verify that all stepModes for one buffer are the same\n let stepMode: 'vertex' | 'instance' = 'vertex';\n let byteStride = 0;\n const byteOffset = mapping.byteOffset || 0;\n\n // interleaved mapping {..., attributes: [{...}, ...]}\n if ('attributes' in mapping) {\n // const arrayStride = mapping.byteStride; TODO \n for (const interleaved of mapping.attributes) {\n const attributeLayout = findAttributeLayout(layout, interleaved.name, usedAttributes);\n\n stepMode = attributeLayout.stepMode || 'vertex';\n vertexAttributes.push({\n format: attributeLayout.format,\n offset: byteOffset + byteStride,\n shaderLocation: attributeLayout.location\n });\n\n byteStride += decodeVertexFormat(attributeLayout.format).byteLength;\n }\n // non-interleaved mapping (just set offset and stride)\n } else {\n const attributeLayout = findAttributeLayout(layout, mapping.name, usedAttributes);\n byteStride = decodeVertexFormat(attributeLayout.format).byteLength;\n\n stepMode = attributeLayout.stepMode || 'vertex';\n vertexAttributes.push({\n format: attributeLayout.format,\n offset: byteOffset,\n shaderLocation: attributeLayout.location\n });\n }\n\n // Store all the attribute bindings for one buffer\n vertexBufferLayouts.push({\n arrayStride: mapping.byteStride || byteStride,\n stepMode: stepMode || 'vertex',\n attributes: vertexAttributes\n });\n }\n\n // Add any non-mapped attributes\n for (const attribute of layout.attributes) {\n if (!usedAttributes.has(attribute.name)) {\n vertexBufferLayouts.push({\n arrayStride: decodeVertexFormat(attribute.format).byteLength,\n stepMode: attribute.stepMode || 'vertex',\n attributes: [{\n format: attribute.format,\n offset: 0,\n shaderLocation: attribute.location\n }]\n });\n }\n }\n\n return vertexBufferLayouts;\n}\n\nexport function getBufferSlots(layout: ShaderLayout, bufferMap: BufferMapping[]): Record<string, number> {\n const usedAttributes = new Set<string>();\n let bufferSlot = 0;\n const bufferSlots: Record<string, number> = {};\n\n // First handle any buffers mentioned in `bufferMapping`\n for (const mapping of bufferMap) {\n // interleaved mapping {..., attributes: [{...}, ...]}\n if ('attributes' in mapping) {\n for (const interleaved of mapping.attributes) {\n usedAttributes.add(interleaved.name);\n }\n // non-interleaved mapping (just set offset and stride)\n } else {\n usedAttributes.add(mapping.name);\n }\n bufferSlots[mapping.name] = bufferSlot++;\n }\n\n // Add any non-mapped attributes\n for (const attribute of layout.attributes) {\n if (!usedAttributes.has(attribute.name)) {\n bufferSlots[attribute.name] = bufferSlot++;\n }\n }\n\n return bufferSlots;\n}\n\n/**\n * Looks up an attribute in the ShaderLayout.\n * @throws if name is not in ShaderLayout\n * @throws if name has already been referenced\n */\nfunction findAttributeLayout(layout: ShaderLayout, name: string, attributeNames: Set<string>): AttributeLayout {\n const attribute = layout.attributes.find(attribute => attribute.name === name);\n if (!attribute) {\n throw new Error(`Unknown attribute ${name}`);\n }\n if (attributeNames.has(name)) {\n throw new Error(`Duplicate attribute ${name}`);\n }\n attributeNames.add(name);\n return attribute;\n}\n"],"mappings":"AACA,SAAQA,kBAAkB,QAAO,cAAc;AAS/C,OAAO,SAASC,qBA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