@luma.gl/webgl 9.0.0-beta.3 → 9.0.0-beta.5
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/dist/adapter/converters/device-parameters.js +240 -158
- package/dist/adapter/converters/sampler-parameters.d.ts +0 -4
- package/dist/adapter/converters/sampler-parameters.d.ts.map +1 -1
- package/dist/adapter/converters/sampler-parameters.js +73 -68
- package/dist/adapter/converters/shader-formats.js +33 -46
- package/dist/adapter/converters/texture-formats.d.ts +9 -18
- package/dist/adapter/converters/texture-formats.d.ts.map +1 -1
- package/dist/adapter/converters/texture-formats.js +454 -871
- package/dist/adapter/converters/vertex-formats.js +52 -61
- package/dist/adapter/device-helpers/device-features.d.ts +2 -5
- package/dist/adapter/device-helpers/device-features.d.ts.map +1 -1
- package/dist/adapter/device-helpers/device-features.js +56 -87
- package/dist/adapter/device-helpers/device-limits.d.ts +2 -4
- package/dist/adapter/device-helpers/device-limits.d.ts.map +1 -1
- package/dist/adapter/device-helpers/device-limits.js +88 -83
- 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 +79 -63
- package/dist/adapter/device-helpers/webgl-device-features.d.ts +6 -0
- package/dist/adapter/device-helpers/webgl-device-features.d.ts.map +1 -0
- package/dist/adapter/device-helpers/webgl-device-features.js +52 -0
- package/dist/adapter/device-helpers/webgl-device-info.d.ts +4 -0
- package/dist/adapter/device-helpers/webgl-device-info.d.ts.map +1 -0
- package/dist/adapter/device-helpers/webgl-device-info.js +87 -0
- package/dist/adapter/device-helpers/webgl-device-limits.d.ts +50 -0
- package/dist/adapter/device-helpers/webgl-device-limits.d.ts.map +1 -0
- package/dist/adapter/device-helpers/webgl-device-limits.js +92 -0
- package/dist/adapter/helpers/decode-webgl-types.js +87 -76
- package/dist/adapter/helpers/get-shader-layout.d.ts +1 -1
- package/dist/adapter/helpers/get-shader-layout.d.ts.map +1 -1
- package/dist/adapter/helpers/get-shader-layout.js +261 -226
- package/dist/adapter/helpers/parse-shader-compiler-log.js +46 -37
- 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 +67 -82
- package/dist/adapter/helpers/webgl-topology-utils.js +77 -93
- package/dist/adapter/objects/constants-to-keys.d.ts +1 -1
- package/dist/adapter/objects/constants-to-keys.d.ts.map +1 -1
- package/dist/adapter/objects/constants-to-keys.js +18 -12
- package/dist/adapter/objects/webgl-renderbuffer.js +76 -80
- package/dist/adapter/objects/webgl-resource.d.ts +1 -1
- package/dist/adapter/objects/webgl-resource.d.ts.map +1 -1
- package/dist/adapter/objects/webgl-resource.js +204 -154
- package/dist/adapter/resources/webgl-buffer.d.ts +2 -3
- package/dist/adapter/resources/webgl-buffer.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-buffer.js +160 -119
- package/dist/adapter/resources/webgl-command-buffer.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-command-buffer.js +268 -171
- package/dist/adapter/resources/webgl-command-encoder.js +32 -40
- package/dist/adapter/resources/webgl-external-texture.js +92 -1
- package/dist/adapter/resources/webgl-framebuffer.d.ts +2 -2
- package/dist/adapter/resources/webgl-framebuffer.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-framebuffer.js +167 -139
- package/dist/adapter/resources/webgl-render-pass.js +121 -95
- package/dist/adapter/resources/webgl-render-pipeline.d.ts +11 -1
- package/dist/adapter/resources/webgl-render-pipeline.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-render-pipeline.js +378 -228
- package/dist/adapter/resources/webgl-sampler.d.ts +0 -2
- package/dist/adapter/resources/webgl-sampler.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-sampler.js +43 -34
- package/dist/adapter/resources/webgl-shader.d.ts +10 -1
- package/dist/adapter/resources/webgl-shader.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-shader.js +106 -45
- package/dist/adapter/resources/webgl-texture.d.ts +2 -6
- package/dist/adapter/resources/webgl-texture.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-texture.js +614 -699
- package/dist/adapter/resources/webgl-transform-feedback.d.ts +1 -1
- package/dist/adapter/resources/webgl-transform-feedback.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-transform-feedback.js +143 -145
- package/dist/adapter/resources/webgl-vertex-array.d.ts +1 -1
- package/dist/adapter/resources/webgl-vertex-array.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-vertex-array.js +229 -158
- package/dist/adapter/webgl-canvas-context.d.ts.map +1 -1
- package/dist/adapter/webgl-canvas-context.js +58 -37
- package/dist/adapter/webgl-device.d.ts +7 -15
- package/dist/adapter/webgl-device.d.ts.map +1 -1
- package/dist/adapter/webgl-device.js +440 -381
- package/dist/classic/accessor.js +132 -102
- package/dist/classic/clear.d.ts +2 -2
- package/dist/classic/clear.d.ts.map +1 -1
- package/dist/classic/clear.js +73 -73
- package/dist/classic/copy-and-blit.d.ts.map +1 -1
- package/dist/classic/copy-and-blit.js +176 -177
- package/dist/classic/format-utils.d.ts +2 -2
- package/dist/classic/format-utils.js +38 -32
- package/dist/classic/typed-array-utils.js +95 -81
- package/dist/context/{polyfill → context}/context-data.d.ts +2 -1
- package/dist/context/context/context-data.d.ts.map +1 -0
- package/dist/context/context/context-data.js +33 -0
- package/dist/context/context/create-browser-context.d.ts +1 -6
- package/dist/context/context/create-browser-context.d.ts.map +1 -1
- package/dist/context/context/create-browser-context.js +62 -49
- package/dist/context/debug/spector.js +54 -50
- package/dist/context/debug/webgl-developer-tools.d.ts +1 -2
- package/dist/context/debug/webgl-developer-tools.d.ts.map +1 -1
- package/dist/context/debug/webgl-developer-tools.js +102 -76
- package/dist/context/parameters/unified-parameter-api.d.ts +3 -3
- package/dist/context/parameters/unified-parameter-api.d.ts.map +1 -1
- package/dist/context/parameters/unified-parameter-api.js +95 -46
- package/dist/context/parameters/webgl-parameter-tables.d.ts +110 -99
- package/dist/context/parameters/webgl-parameter-tables.d.ts.map +1 -1
- package/dist/context/parameters/webgl-parameter-tables.js +456 -404
- package/dist/context/state-tracker/deep-array-equal.js +18 -14
- package/dist/context/state-tracker/track-context-state.d.ts +4 -4
- package/dist/context/state-tracker/track-context-state.d.ts.map +1 -1
- package/dist/context/state-tracker/track-context-state.js +190 -126
- 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 +45 -29
- package/dist/dist.dev.js +2568 -3786
- package/dist/index.cjs +1346 -2464
- package/dist/index.cjs.map +7 -0
- package/dist/index.d.ts +2 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +36 -26
- package/dist/types.js +2 -1
- package/dist.min.js +9 -42
- package/package.json +11 -15
- package/src/adapter/converters/device-parameters.ts +0 -1
- package/src/adapter/converters/sampler-parameters.ts +0 -17
- package/src/adapter/converters/texture-formats.ts +86 -154
- package/src/adapter/device-helpers/webgl-device-features.ts +69 -0
- package/src/adapter/device-helpers/{get-device-info.ts → webgl-device-info.ts} +3 -4
- package/src/adapter/device-helpers/{device-limits.ts → webgl-device-limits.ts} +25 -23
- package/src/adapter/helpers/get-shader-layout.ts +17 -28
- package/src/adapter/helpers/set-uniform.ts +1 -3
- package/src/adapter/objects/constants-to-keys.ts +1 -1
- package/src/adapter/objects/webgl-renderbuffer.ts +4 -4
- package/src/adapter/objects/webgl-resource.ts +3 -18
- package/src/adapter/resources/webgl-buffer.ts +6 -11
- package/src/adapter/resources/webgl-command-buffer.ts +20 -30
- package/src/adapter/resources/webgl-external-texture.ts +2 -3
- package/src/adapter/resources/webgl-framebuffer.ts +4 -5
- package/src/adapter/resources/webgl-render-pass.ts +7 -7
- package/src/adapter/resources/webgl-render-pipeline.ts +106 -31
- package/src/adapter/resources/webgl-sampler.ts +5 -9
- package/src/adapter/resources/webgl-shader.ts +57 -10
- package/src/adapter/resources/webgl-texture.ts +29 -103
- package/src/adapter/resources/webgl-transform-feedback.ts +14 -15
- package/src/adapter/resources/webgl-vertex-array.ts +16 -18
- package/src/adapter/webgl-canvas-context.ts +1 -7
- package/src/adapter/webgl-device.ts +18 -67
- package/src/classic/clear.ts +13 -14
- package/src/classic/copy-and-blit.ts +1 -2
- package/src/context/context/context-data.ts +44 -0
- package/src/context/context/create-browser-context.ts +7 -32
- package/src/context/debug/webgl-developer-tools.ts +6 -8
- package/src/context/parameters/unified-parameter-api.ts +3 -3
- package/src/context/parameters/webgl-parameter-tables.ts +66 -75
- package/src/context/state-tracker/track-context-state.ts +18 -17
- package/src/context/state-tracker/with-parameters.ts +1 -1
- package/src/index.ts +2 -17
- package/dist/adapter/converters/device-parameters.js.map +0 -1
- package/dist/adapter/converters/sampler-parameters.js.map +0 -1
- package/dist/adapter/converters/shader-formats.js.map +0 -1
- package/dist/adapter/converters/texture-formats.js.map +0 -1
- package/dist/adapter/converters/vertex-formats.js.map +0 -1
- package/dist/adapter/device-helpers/device-features.js.map +0 -1
- package/dist/adapter/device-helpers/device-limits.js.map +0 -1
- package/dist/adapter/device-helpers/get-device-info.js.map +0 -1
- package/dist/adapter/device-helpers/is-old-ie.d.ts +0 -2
- package/dist/adapter/device-helpers/is-old-ie.d.ts.map +0 -1
- package/dist/adapter/device-helpers/is-old-ie.js +0 -9
- package/dist/adapter/device-helpers/is-old-ie.js.map +0 -1
- package/dist/adapter/helpers/decode-webgl-types.js.map +0 -1
- package/dist/adapter/helpers/get-shader-layout.js.map +0 -1
- package/dist/adapter/helpers/parse-shader-compiler-log.js.map +0 -1
- package/dist/adapter/helpers/set-uniform.js.map +0 -1
- package/dist/adapter/helpers/webgl-topology-utils.js.map +0 -1
- package/dist/adapter/objects/constants-to-keys.js.map +0 -1
- package/dist/adapter/objects/webgl-renderbuffer.js.map +0 -1
- package/dist/adapter/objects/webgl-resource.js.map +0 -1
- package/dist/adapter/resources/webgl-buffer.js.map +0 -1
- package/dist/adapter/resources/webgl-command-buffer.js.map +0 -1
- package/dist/adapter/resources/webgl-command-encoder.js.map +0 -1
- package/dist/adapter/resources/webgl-external-texture.js.map +0 -1
- package/dist/adapter/resources/webgl-framebuffer.js.map +0 -1
- package/dist/adapter/resources/webgl-render-pass.js.map +0 -1
- package/dist/adapter/resources/webgl-render-pipeline.js.map +0 -1
- package/dist/adapter/resources/webgl-sampler.js.map +0 -1
- package/dist/adapter/resources/webgl-shader.js.map +0 -1
- package/dist/adapter/resources/webgl-texture.js.map +0 -1
- package/dist/adapter/resources/webgl-transform-feedback.js.map +0 -1
- package/dist/adapter/resources/webgl-vertex-array.js.map +0 -1
- package/dist/adapter/webgl-canvas-context.js.map +0 -1
- package/dist/adapter/webgl-device.js.map +0 -1
- package/dist/classic/accessor.js.map +0 -1
- package/dist/classic/clear.js.map +0 -1
- package/dist/classic/copy-and-blit.js.map +0 -1
- package/dist/classic/format-utils.js.map +0 -1
- package/dist/classic/typed-array-utils.js.map +0 -1
- package/dist/context/context/create-browser-context.js.map +0 -1
- package/dist/context/context/create-headless-context.d.ts +0 -9
- package/dist/context/context/create-headless-context.d.ts.map +0 -1
- package/dist/context/context/create-headless-context.js +0 -42
- package/dist/context/context/create-headless-context.js.map +0 -1
- package/dist/context/context/webgl-checks.d.ts +0 -13
- package/dist/context/context/webgl-checks.d.ts.map +0 -1
- package/dist/context/context/webgl-checks.js +0 -31
- package/dist/context/context/webgl-checks.js.map +0 -1
- package/dist/context/debug/spector.js.map +0 -1
- package/dist/context/debug/webgl-developer-tools.js.map +0 -1
- package/dist/context/parameters/unified-parameter-api.js.map +0 -1
- package/dist/context/parameters/webgl-parameter-tables.js.map +0 -1
- package/dist/context/polyfill/context-data.d.ts.map +0 -1
- package/dist/context/polyfill/context-data.js +0 -12
- package/dist/context/polyfill/context-data.js.map +0 -1
- package/dist/context/polyfill/get-parameter-polyfill.d.ts +0 -2
- package/dist/context/polyfill/get-parameter-polyfill.d.ts.map +0 -1
- package/dist/context/polyfill/get-parameter-polyfill.js +0 -85
- package/dist/context/polyfill/get-parameter-polyfill.js.map +0 -1
- package/dist/context/polyfill/polyfill-context.d.ts +0 -5
- package/dist/context/polyfill/polyfill-context.d.ts.map +0 -1
- package/dist/context/polyfill/polyfill-context.js +0 -87
- package/dist/context/polyfill/polyfill-context.js.map +0 -1
- package/dist/context/polyfill/polyfill-table.d.ts +0 -48
- package/dist/context/polyfill/polyfill-table.d.ts.map +0 -1
- package/dist/context/polyfill/polyfill-table.js +0 -137
- package/dist/context/polyfill/polyfill-table.js.map +0 -1
- package/dist/context/polyfill/polyfill-vertex-array-object.d.ts +0 -2
- package/dist/context/polyfill/polyfill-vertex-array-object.d.ts.map +0 -1
- package/dist/context/polyfill/polyfill-vertex-array-object.js +0 -265
- package/dist/context/polyfill/polyfill-vertex-array-object.js.map +0 -1
- package/dist/context/state-tracker/deep-array-equal.js.map +0 -1
- package/dist/context/state-tracker/track-context-state.js.map +0 -1
- package/dist/context/state-tracker/with-parameters.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/types.js.map +0 -1
- package/src/adapter/device-helpers/device-features.ts +0 -161
- package/src/adapter/device-helpers/is-old-ie.ts +0 -14
- package/src/context/context/create-headless-context.ts +0 -51
- package/src/context/context/webgl-checks.ts +0 -51
- package/src/context/polyfill/context-data.ts +0 -30
- package/src/context/polyfill/get-parameter-polyfill.ts +0 -122
- package/src/context/polyfill/polyfill-context.ts +0 -104
- package/src/context/polyfill/polyfill-table.ts +0 -167
- package/src/context/polyfill/polyfill-vertex-array-object.ts +0 -365
|
@@ -1,192 +1,289 @@
|
|
|
1
|
+
// luma.gl, MIT license
|
|
2
|
+
// Copyright (c) vis.gl contributors
|
|
1
3
|
import { CommandBuffer, Texture } from '@luma.gl/core';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
+
import { GL } from '@luma.gl/constants';
|
|
5
|
+
import { WEBGLTexture } from './webgl-texture';
|
|
6
|
+
import { getWebGLTextureParameters } from '../converters/texture-formats';
|
|
4
7
|
function cast(value) {
|
|
5
|
-
|
|
8
|
+
return value;
|
|
6
9
|
}
|
|
7
10
|
export class WEBGLCommandBuffer extends CommandBuffer {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
11
|
+
device;
|
|
12
|
+
commands = [];
|
|
13
|
+
constructor(device) {
|
|
14
|
+
super(device, {});
|
|
15
|
+
this.device = device;
|
|
16
|
+
}
|
|
17
|
+
submitCommands(commands = this.commands) {
|
|
18
|
+
for (const command of commands) {
|
|
19
|
+
switch (command.name) {
|
|
20
|
+
case 'copy-buffer-to-buffer':
|
|
21
|
+
_copyBufferToBuffer(this.device, command.options);
|
|
22
|
+
break;
|
|
23
|
+
case 'copy-buffer-to-texture':
|
|
24
|
+
_copyBufferToTexture(this.device, command.options);
|
|
25
|
+
break;
|
|
26
|
+
case 'copy-texture-to-buffer':
|
|
27
|
+
_copyTextureToBuffer(this.device, command.options);
|
|
28
|
+
break;
|
|
29
|
+
case 'copy-texture-to-texture':
|
|
30
|
+
_copyTextureToTexture(this.device, command.options);
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
31
34
|
}
|
|
32
|
-
}
|
|
33
35
|
}
|
|
34
36
|
function _copyBufferToBuffer(device, options) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
gl2.bindBuffer(36663, null);
|
|
45
|
-
} else {
|
|
46
|
-
throw new Error('copyBufferToBuffer not implemented in WebGL1');
|
|
47
|
-
}
|
|
37
|
+
const source = cast(options.source);
|
|
38
|
+
const destination = cast(options.destination);
|
|
39
|
+
// {In WebGL2 we can p}erform the copy on the GPU
|
|
40
|
+
// Use GL.COPY_READ_BUFFER+GL.COPY_WRITE_BUFFER avoid disturbing other targets and locking type
|
|
41
|
+
device.gl.bindBuffer(GL.COPY_READ_BUFFER, source.handle);
|
|
42
|
+
device.gl.bindBuffer(GL.COPY_WRITE_BUFFER, destination.handle);
|
|
43
|
+
device.gl.copyBufferSubData(GL.COPY_READ_BUFFER, GL.COPY_WRITE_BUFFER, options.sourceOffset ?? 0, options.destinationOffset ?? 0, options.size);
|
|
44
|
+
device.gl.bindBuffer(GL.COPY_READ_BUFFER, null);
|
|
45
|
+
device.gl.bindBuffer(GL.COPY_WRITE_BUFFER, null);
|
|
48
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Copies data from a Buffer object into a Texture object
|
|
49
|
+
* NOTE: doesn't wait for copy to be complete
|
|
50
|
+
*/
|
|
49
51
|
function _copyBufferToTexture(device, options) {
|
|
50
|
-
|
|
52
|
+
throw new Error('Not implemented');
|
|
51
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Copies data from a Texture object into a Buffer object.
|
|
56
|
+
* NOTE: doesn't wait for copy to be complete
|
|
57
|
+
*/
|
|
52
58
|
function _copyTextureToBuffer(device, options) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
59
|
+
const {
|
|
60
|
+
/** Texture to copy to/from. */
|
|
61
|
+
source,
|
|
62
|
+
/** Mip-map level of the texture to copy to/from. (Default 0) */
|
|
63
|
+
mipLevel = 0,
|
|
64
|
+
/** Defines which aspects of the texture to copy to/from. */
|
|
65
|
+
aspect = 'all',
|
|
66
|
+
/** Width to copy */
|
|
67
|
+
width = options.source.width,
|
|
68
|
+
/** Height to copy */
|
|
69
|
+
height = options.source.height, depthOrArrayLayers = 0,
|
|
70
|
+
/** Defines the origin of the copy - the minimum corner of the texture sub-region to copy to/from. */
|
|
71
|
+
origin = [0, 0],
|
|
72
|
+
/** Destination buffer */
|
|
73
|
+
destination,
|
|
74
|
+
/** Offset, in bytes, from the beginning of the buffer to the start of the image data (default 0) */
|
|
75
|
+
byteOffset = 0,
|
|
76
|
+
/**
|
|
77
|
+
* The stride, in bytes, between the beginning of each block row and the subsequent block row.
|
|
78
|
+
* Required if there are multiple block rows (i.e. the copy height or depth is more than one block).
|
|
79
|
+
*/
|
|
80
|
+
bytesPerRow,
|
|
81
|
+
/**
|
|
82
|
+
* Number of block rows per single image of the texture.
|
|
83
|
+
* rowsPerImage × bytesPerRow is the stride, in bytes, between the beginning of each image of data and the subsequent image.
|
|
84
|
+
* Required if there are multiple images (i.e. the copy depth is more than one).
|
|
85
|
+
*/
|
|
86
|
+
rowsPerImage } = options;
|
|
87
|
+
// TODO - Not possible to read just stencil or depth part in WebGL?
|
|
88
|
+
if (aspect !== 'all') {
|
|
89
|
+
throw new Error('not supported');
|
|
90
|
+
}
|
|
91
|
+
// TODO - mipLevels are set when attaching texture to framebuffer
|
|
92
|
+
if (mipLevel !== 0 || depthOrArrayLayers !== 0 || bytesPerRow || rowsPerImage) {
|
|
93
|
+
throw new Error('not implemented');
|
|
94
|
+
}
|
|
95
|
+
// Asynchronous read (PIXEL_PACK_BUFFER) is WebGL2 only feature
|
|
96
|
+
const { framebuffer, destroyFramebuffer } = getFramebuffer(source);
|
|
97
|
+
try {
|
|
98
|
+
const webglBuffer = destination;
|
|
99
|
+
const sourceWidth = width || framebuffer.width;
|
|
100
|
+
const sourceHeight = height || framebuffer.height;
|
|
101
|
+
const sourceParams = getWebGLTextureParameters(framebuffer.texture.format);
|
|
102
|
+
const sourceFormat = sourceParams.dataFormat;
|
|
103
|
+
const sourceType = sourceParams.type;
|
|
104
|
+
// if (!target) {
|
|
105
|
+
// // Create new buffer with enough size
|
|
106
|
+
// const components = glFormatToComponents(sourceFormat);
|
|
107
|
+
// const byteCount = glTypeToBytes(sourceType);
|
|
108
|
+
// const byteLength = byteOffset + sourceWidth * sourceHeight * components * byteCount;
|
|
109
|
+
// target = device.createBuffer({byteLength});
|
|
110
|
+
// }
|
|
111
|
+
device.gl.bindBuffer(GL.PIXEL_PACK_BUFFER, webglBuffer.handle);
|
|
112
|
+
device.gl.bindFramebuffer(GL.FRAMEBUFFER, framebuffer.handle);
|
|
113
|
+
device.gl.readPixels(origin[0], origin[1], sourceWidth, sourceHeight, sourceFormat, sourceType, byteOffset);
|
|
114
|
+
}
|
|
115
|
+
finally {
|
|
116
|
+
device.gl.bindBuffer(GL.PIXEL_PACK_BUFFER, null);
|
|
117
|
+
device.gl.bindFramebuffer(GL.FRAMEBUFFER, null);
|
|
118
|
+
if (destroyFramebuffer) {
|
|
119
|
+
framebuffer.destroy();
|
|
120
|
+
}
|
|
92
121
|
}
|
|
93
|
-
}
|
|
94
122
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
} = getFramebuffer(source);
|
|
111
|
-
const [sourceX, sourceY] = origin;
|
|
112
|
-
const isSubCopy = false;
|
|
113
|
-
device.gl.bindFramebuffer(36160, framebuffer.handle);
|
|
114
|
-
let texture = null;
|
|
115
|
-
let textureTarget;
|
|
116
|
-
if (destination instanceof WEBGLTexture) {
|
|
117
|
-
texture = destination;
|
|
118
|
-
width = Number.isFinite(width) ? width : texture.width;
|
|
119
|
-
height = Number.isFinite(height) ? height : texture.height;
|
|
120
|
-
texture.bind(0);
|
|
121
|
-
textureTarget = texture.destination;
|
|
122
|
-
} else {
|
|
123
|
-
throw new Error('whoops');
|
|
124
|
-
}
|
|
125
|
-
if (!isSubCopy) {
|
|
126
|
-
device.gl.copyTexImage2D(textureTarget, destinationMipmaplevel, destinationInternalFormat, sourceX, sourceY, width, height, 0);
|
|
127
|
-
} else {}
|
|
128
|
-
if (texture) {
|
|
129
|
-
texture.unbind();
|
|
130
|
-
}
|
|
131
|
-
if (destroyFramebuffer) {
|
|
132
|
-
framebuffer.destroy();
|
|
123
|
+
/**
|
|
124
|
+
* Copies data from a Framebuffer or a Texture object into a Buffer object.
|
|
125
|
+
* NOTE: doesn't wait for copy to be complete, it programs GPU to perform a DMA transfer.
|
|
126
|
+
export function readPixelsToBuffer(
|
|
127
|
+
source: Framebuffer | Texture,
|
|
128
|
+
options?: {
|
|
129
|
+
sourceX?: number;
|
|
130
|
+
sourceY?: number;
|
|
131
|
+
sourceFormat?: number;
|
|
132
|
+
target?: Buffer; // A new Buffer object is created when not provided.
|
|
133
|
+
targetByteOffset?: number; // byte offset in buffer object
|
|
134
|
+
// following parameters are auto deduced if not provided
|
|
135
|
+
sourceWidth?: number;
|
|
136
|
+
sourceHeight?: number;
|
|
137
|
+
sourceType?: number;
|
|
133
138
|
}
|
|
134
|
-
|
|
139
|
+
): Buffer
|
|
140
|
+
*/
|
|
141
|
+
/**
|
|
142
|
+
* Copy a rectangle from a Framebuffer or Texture object into a texture (at an offset)
|
|
143
|
+
*/
|
|
144
|
+
// eslint-disable-next-line complexity, max-statements
|
|
145
|
+
function _copyTextureToTexture(device, options) {
|
|
146
|
+
const {
|
|
147
|
+
/** Texture to copy to/from. */
|
|
148
|
+
source,
|
|
149
|
+
/** Mip-map level of the texture to copy to/from. (Default 0) */
|
|
150
|
+
// mipLevel = 0,
|
|
151
|
+
/** Defines which aspects of the texture to copy to/from. */
|
|
152
|
+
// aspect = 'all',
|
|
153
|
+
/** Defines the origin of the copy - the minimum corner of the texture sub-region to copy to/from. */
|
|
154
|
+
origin = [0, 0],
|
|
155
|
+
/** Texture to copy to/from. */
|
|
156
|
+
destination,
|
|
157
|
+
/** Mip-map level of the texture to copy to/from. (Default 0) */
|
|
158
|
+
// destinationMipLevel = options.mipLevel,
|
|
159
|
+
/** Defines the origin of the copy - the minimum corner of the texture sub-region to copy to/from. */
|
|
160
|
+
// destinationOrigin = [0, 0],
|
|
161
|
+
/** Defines which aspects of the texture to copy to/from. */
|
|
162
|
+
// destinationAspect = options.aspect,
|
|
163
|
+
} = options;
|
|
164
|
+
let { width = options.destination.width, height = options.destination.width,
|
|
165
|
+
// depthOrArrayLayers = 0
|
|
166
|
+
} = options;
|
|
167
|
+
const destinationMipmaplevel = 0;
|
|
168
|
+
const destinationInternalFormat = GL.RGBA;
|
|
169
|
+
const { framebuffer, destroyFramebuffer } = getFramebuffer(source);
|
|
170
|
+
const [sourceX, sourceY] = origin;
|
|
171
|
+
const isSubCopy = false;
|
|
172
|
+
// typeof destinationX !== 'undefined' ||
|
|
173
|
+
// typeof destinationY !== 'undefined' ||
|
|
174
|
+
// typeof destinationZ !== 'undefined';
|
|
175
|
+
// destinationX = destinationX || 0;
|
|
176
|
+
// destinationY = destinationY || 0;
|
|
177
|
+
// destinationZ = destinationZ || 0;
|
|
178
|
+
device.gl.bindFramebuffer(GL.FRAMEBUFFER, framebuffer.handle);
|
|
179
|
+
// TODO - support gl.readBuffer (WebGL2 only)
|
|
180
|
+
// const prevBuffer = gl.readBuffer(attachment);
|
|
181
|
+
let texture = null;
|
|
182
|
+
let textureTarget;
|
|
183
|
+
if (destination instanceof WEBGLTexture) {
|
|
184
|
+
texture = destination;
|
|
185
|
+
width = Number.isFinite(width) ? width : texture.width;
|
|
186
|
+
height = Number.isFinite(height) ? height : texture.height;
|
|
187
|
+
texture.bind(0);
|
|
188
|
+
textureTarget = texture.destination;
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
throw new Error('whoops');
|
|
192
|
+
// textureTarget = destination;
|
|
193
|
+
}
|
|
194
|
+
if (!isSubCopy) {
|
|
195
|
+
device.gl.copyTexImage2D(textureTarget, destinationMipmaplevel, destinationInternalFormat, sourceX, sourceY, width, height, 0 /* border must be 0 */);
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
// switch (textureTarget) {
|
|
199
|
+
// case GL.TEXTURE_2D:
|
|
200
|
+
// case GL.TEXTURE_CUBE_MAP:
|
|
201
|
+
// device.gl.copyTexSubImage2D(
|
|
202
|
+
// textureTarget,
|
|
203
|
+
// destinationMipmaplevel,
|
|
204
|
+
// destinationX,
|
|
205
|
+
// destinationY,
|
|
206
|
+
// sourceX,
|
|
207
|
+
// sourceY,
|
|
208
|
+
// width,
|
|
209
|
+
// height
|
|
210
|
+
// );
|
|
211
|
+
// break;
|
|
212
|
+
// case GL.TEXTURE_2D_ARRAY:
|
|
213
|
+
// case GL.TEXTURE_3D:
|
|
214
|
+
// device.gl.copyTexSubImage3D(
|
|
215
|
+
// textureTarget,
|
|
216
|
+
// destinationMipmaplevel,
|
|
217
|
+
// destinationX,
|
|
218
|
+
// destinationY,
|
|
219
|
+
// destinationZ,
|
|
220
|
+
// sourceX,
|
|
221
|
+
// sourceY,
|
|
222
|
+
// width,
|
|
223
|
+
// height
|
|
224
|
+
// );
|
|
225
|
+
// break;
|
|
226
|
+
// default:
|
|
227
|
+
// }
|
|
228
|
+
}
|
|
229
|
+
if (texture) {
|
|
230
|
+
texture.unbind();
|
|
231
|
+
}
|
|
232
|
+
// ts-expect-error
|
|
233
|
+
// device.gl.bindFramebuffer(GL.FRAMEBUFFER, prevHandle || null);
|
|
234
|
+
if (destroyFramebuffer) {
|
|
235
|
+
framebuffer.destroy();
|
|
236
|
+
}
|
|
237
|
+
return texture;
|
|
135
238
|
}
|
|
239
|
+
// Returns number of components in a specific readPixels WebGL format
|
|
136
240
|
export function glFormatToComponents(format) {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
241
|
+
switch (format) {
|
|
242
|
+
case GL.ALPHA:
|
|
243
|
+
case GL.R32F:
|
|
244
|
+
case GL.RED:
|
|
245
|
+
return 1;
|
|
246
|
+
case GL.RG32F:
|
|
247
|
+
case GL.RG:
|
|
248
|
+
return 2;
|
|
249
|
+
case GL.RGB:
|
|
250
|
+
case GL.RGB32F:
|
|
251
|
+
return 3;
|
|
252
|
+
case GL.RGBA:
|
|
253
|
+
case GL.RGBA32F:
|
|
254
|
+
return 4;
|
|
255
|
+
// TODO: Add support for additional WebGL2 formats
|
|
256
|
+
default:
|
|
257
|
+
throw new Error('GLFormat');
|
|
258
|
+
}
|
|
154
259
|
}
|
|
260
|
+
// Return byte count for given readPixels WebGL type
|
|
155
261
|
export function glTypeToBytes(type) {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
262
|
+
switch (type) {
|
|
263
|
+
case GL.UNSIGNED_BYTE:
|
|
264
|
+
return 1;
|
|
265
|
+
case GL.UNSIGNED_SHORT_5_6_5:
|
|
266
|
+
case GL.UNSIGNED_SHORT_4_4_4_4:
|
|
267
|
+
case GL.UNSIGNED_SHORT_5_5_5_1:
|
|
268
|
+
return 2;
|
|
269
|
+
case GL.FLOAT:
|
|
270
|
+
return 4;
|
|
271
|
+
// TODO: Add support for additional WebGL2 types
|
|
272
|
+
default:
|
|
273
|
+
throw new Error('GLType');
|
|
274
|
+
}
|
|
168
275
|
}
|
|
276
|
+
// Helper methods
|
|
169
277
|
function getFramebuffer(source) {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
});
|
|
182
|
-
return {
|
|
183
|
-
framebuffer,
|
|
184
|
-
destroyFramebuffer: true
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
return {
|
|
188
|
-
framebuffer: source,
|
|
189
|
-
destroyFramebuffer: false
|
|
190
|
-
};
|
|
278
|
+
if (source instanceof Texture) {
|
|
279
|
+
const { width, height, id } = source;
|
|
280
|
+
const framebuffer = source.device.createFramebuffer({
|
|
281
|
+
id: `framebuffer-for-${id}`,
|
|
282
|
+
width,
|
|
283
|
+
height,
|
|
284
|
+
colorAttachments: [source]
|
|
285
|
+
});
|
|
286
|
+
return { framebuffer, destroyFramebuffer: true };
|
|
287
|
+
}
|
|
288
|
+
return { framebuffer: source, destroyFramebuffer: false };
|
|
191
289
|
}
|
|
192
|
-
//# sourceMappingURL=webgl-command-buffer.js.map
|
|
@@ -1,43 +1,35 @@
|
|
|
1
|
+
// luma.gl, MIT license
|
|
2
|
+
// Copyright (c) vis.gl contributors
|
|
1
3
|
import { CommandEncoder } from '@luma.gl/core';
|
|
2
|
-
import { WEBGLCommandBuffer } from
|
|
4
|
+
import { WEBGLCommandBuffer } from './webgl-command-buffer';
|
|
3
5
|
export class WEBGLCommandEncoder extends CommandEncoder {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
copyTextureToTexture(options) {
|
|
34
|
-
this.commandBuffer.commands.push({
|
|
35
|
-
name: 'copy-texture-to-texture',
|
|
36
|
-
options
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
pushDebugGroup(groupLabel) {}
|
|
40
|
-
popDebugGroup() {}
|
|
41
|
-
insertDebugMarker(markerLabel) {}
|
|
6
|
+
device;
|
|
7
|
+
commandBuffer;
|
|
8
|
+
constructor(device, props) {
|
|
9
|
+
super(device, props);
|
|
10
|
+
this.device = device;
|
|
11
|
+
this.commandBuffer = new WEBGLCommandBuffer(device);
|
|
12
|
+
}
|
|
13
|
+
destroy() { }
|
|
14
|
+
finish() {
|
|
15
|
+
this.commandBuffer.submitCommands();
|
|
16
|
+
}
|
|
17
|
+
// beginRenderPass(GPURenderPassDescriptor descriptor): GPURenderPassEncoder;
|
|
18
|
+
// beginComputePass(optional GPUComputePassDescriptor descriptor = {}): GPUComputePassEncoder;
|
|
19
|
+
// finish(options?: {id?: string}): GPUCommandBuffer;
|
|
20
|
+
copyBufferToBuffer(options) {
|
|
21
|
+
this.commandBuffer.commands.push({ name: 'copy-buffer-to-buffer', options });
|
|
22
|
+
}
|
|
23
|
+
copyBufferToTexture(options) {
|
|
24
|
+
this.commandBuffer.commands.push({ name: 'copy-buffer-to-texture', options });
|
|
25
|
+
}
|
|
26
|
+
copyTextureToBuffer(options) {
|
|
27
|
+
this.commandBuffer.commands.push({ name: 'copy-texture-to-buffer', options });
|
|
28
|
+
}
|
|
29
|
+
copyTextureToTexture(options) {
|
|
30
|
+
this.commandBuffer.commands.push({ name: 'copy-texture-to-texture', options });
|
|
31
|
+
}
|
|
32
|
+
pushDebugGroup(groupLabel) { }
|
|
33
|
+
popDebugGroup() { }
|
|
34
|
+
insertDebugMarker(markerLabel) { }
|
|
42
35
|
}
|
|
43
|
-
//# sourceMappingURL=webgl-command-encoder.js.map
|
|
@@ -1,2 +1,93 @@
|
|
|
1
|
+
// luma.gl, MIT license
|
|
2
|
+
// Copyright (c) vis.gl contributors
|
|
3
|
+
/*
|
|
4
|
+
export class WEBGLExternalTexture extends WEBGLTexture {
|
|
5
|
+
readonly device: WebGLDevice;
|
|
6
|
+
readonly gl: WebGL2RenderingContext;
|
|
7
|
+
readonly handle: WebGLTexture;
|
|
1
8
|
|
|
2
|
-
|
|
9
|
+
data;
|
|
10
|
+
|
|
11
|
+
width: number = undefined;
|
|
12
|
+
height: number = undefined;
|
|
13
|
+
depth: number = undefined;
|
|
14
|
+
|
|
15
|
+
format = undefined;
|
|
16
|
+
type = undefined;
|
|
17
|
+
dataFormat = undefined;
|
|
18
|
+
border = undefined;
|
|
19
|
+
mipmaps: boolean = undefined;
|
|
20
|
+
|
|
21
|
+
textureUnit: number = undefined;
|
|
22
|
+
|
|
23
|
+
sampler: WEBGLSampler;
|
|
24
|
+
|
|
25
|
+
// Program.draw() checks the loaded flag of all textures to avoid
|
|
26
|
+
// Textures that are still loading from promises
|
|
27
|
+
// Set to true as soon as texture has been initialized with valid data
|
|
28
|
+
loaded = false;
|
|
29
|
+
_video;
|
|
30
|
+
|
|
31
|
+
readonly target: GL;
|
|
32
|
+
// target cannot be modified by bind:
|
|
33
|
+
// textures are special because when you first bind them to a target,
|
|
34
|
+
// they get special information. When you first bind a texture as a
|
|
35
|
+
// GL_TEXTURE_2D, you are actually setting special state in the texture.
|
|
36
|
+
// You are saying that this texture is a 2D texture.
|
|
37
|
+
// And it will always be a 2D texture; this state cannot be changed ever.
|
|
38
|
+
// If you have a texture that was first bound as a GL_TEXTURE_2D,
|
|
39
|
+
// you must always bind it as a GL_TEXTURE_2D;
|
|
40
|
+
// attempting to bind it as GL_TEXTURE_3D will give rise to an error
|
|
41
|
+
// (while run-time).
|
|
42
|
+
|
|
43
|
+
static isSupported(device: WebGLDevice, options?: TextureSupportOptions): boolean {
|
|
44
|
+
const {format, linearFiltering} = options;
|
|
45
|
+
let supported = true;
|
|
46
|
+
if (format) {
|
|
47
|
+
supported = supported && isFormatSupported(device.gl, format);
|
|
48
|
+
supported = supported && (!linearFiltering || isTextureFormatFilterable(device.gl, format));
|
|
49
|
+
}
|
|
50
|
+
return supported;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// eslint-disable-next-line max-statements
|
|
54
|
+
constructor(device: Device | WebGL2RenderingContext, props: TextureProps) {
|
|
55
|
+
super(WebGLDevice.attach(device), {id: uid('texture'), ...props});
|
|
56
|
+
|
|
57
|
+
this.glTarget = getWebGLTextureTarget(props);
|
|
58
|
+
|
|
59
|
+
this.device = WebGLDevice.attach(device);
|
|
60
|
+
this.gl = this.device.gl;
|
|
61
|
+
this.gl2 = this.device.gl2;
|
|
62
|
+
this.handle = this.props.handle || this.gl.createTexture();
|
|
63
|
+
|
|
64
|
+
let data = props.data;
|
|
65
|
+
|
|
66
|
+
const isVideo = typeof HTMLVideoElement !== 'undefined' && data instanceof HTMLVideoElement;
|
|
67
|
+
// @ts-expect-error
|
|
68
|
+
if (isVideo && data.readyState < HTMLVideoElement.HAVE_METADATA) {
|
|
69
|
+
this._video = null; // Declare member before the object is sealed
|
|
70
|
+
data.addEventListener('loadeddata', () => this.initialize(props));
|
|
71
|
+
return this;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
update(): this {
|
|
75
|
+
if (this._video) {
|
|
76
|
+
const {video, parameters, lastTime} = this._video;
|
|
77
|
+
// @ts-expect-error
|
|
78
|
+
if (lastTime === video.currentTime || video.readyState < HTMLVideoElement.HAVE_CURRENT_DATA) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
this.setSubImageData({
|
|
82
|
+
data: video,
|
|
83
|
+
parameters
|
|
84
|
+
});
|
|
85
|
+
if (this.mipmaps) {
|
|
86
|
+
this.generateMipmap();
|
|
87
|
+
}
|
|
88
|
+
this._video.lastTime = video.currentTime;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
*/
|
|
@@ -9,7 +9,7 @@ export type Attachment = WEBGLTexture | WEBGLRenderbuffer | TextureAttachment;
|
|
|
9
9
|
/** luma.gl Framebuffer, WebGL implementation */
|
|
10
10
|
export declare class WEBGLFramebuffer extends Framebuffer {
|
|
11
11
|
device: WebGLDevice;
|
|
12
|
-
gl:
|
|
12
|
+
gl: WebGL2RenderingContext;
|
|
13
13
|
handle: WebGLFramebuffer;
|
|
14
14
|
get texture(): Texture<import("@luma.gl/core").TextureProps>;
|
|
15
15
|
constructor(device: WebGLDevice, props: FramebufferProps);
|
|
@@ -30,7 +30,7 @@ export declare class WEBGLFramebuffer extends Framebuffer {
|
|
|
30
30
|
* @param attachment
|
|
31
31
|
* @param texture
|
|
32
32
|
* @param layer = 0 - index into WEBGLTextureArray and Texture3D or face for `TextureCubeMap`
|
|
33
|
-
* @param level
|
|
33
|
+
* @param level = 0 - mipmapLevel
|
|
34
34
|
*/
|
|
35
35
|
protected _attachTexture(attachment: GL, texture: WEBGLTexture, layer: number, level: number): void;
|
|
36
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgl-framebuffer.d.ts","sourceRoot":"","sources":["../../../src/adapter/resources/webgl-framebuffer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,gBAAgB,EAAE,aAAa,EAAC,MAAM,eAAe,CAAC;AACnE,OAAO,EAAC,WAAW,EAAE,OAAO,EAAS,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAC,EAAE,EAAC,MAAM,oBAAoB,CAAC;AACtC,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAC,iBAAiB,EAAC,MAAM,+BAA+B,CAAC;AAGhE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AAC5D,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;AAE9E,iDAAiD;AACjD,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,MAAM,EAAE,WAAW,CAAC;IACpB,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"webgl-framebuffer.d.ts","sourceRoot":"","sources":["../../../src/adapter/resources/webgl-framebuffer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,gBAAgB,EAAE,aAAa,EAAC,MAAM,eAAe,CAAC;AACnE,OAAO,EAAC,WAAW,EAAE,OAAO,EAAS,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAC,EAAE,EAAC,MAAM,oBAAoB,CAAC;AACtC,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAC,iBAAiB,EAAC,MAAM,+BAA+B,CAAC;AAGhE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AAC5D,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;AAE9E,iDAAiD;AACjD,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,MAAM,EAAE,WAAW,CAAC;IACpB,EAAE,EAAE,sBAAsB,CAAC;IAC3B,MAAM,EAAE,gBAAgB,CAAC;IAEzB,IAAI,OAAO,kDAEV;gBAEW,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,gBAAgB;IA8CxD,+CAA+C;IACtC,OAAO,IAAI,IAAI;IAUxB,uBAAuB;IACvB,SAAS,CAAC,YAAY,IAAI,IAAI;IAW9B,mGAAmG;cAChF,yBAAyB,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO;IAW5E;;OAEG;cACgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IA2BzE,4BAA4B;IAC5B,SAAS,CAAC,UAAU,CAClB,eAAe,EAAE,EAAE,EACnB,UAAU,EAAE,UAAU,GACrB,YAAY,GAAG,iBAAiB;IAenC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,EAAE,EAAE,YAAY,EAAE,iBAAiB,GAAG,IAAI;IASzF;;;;;OAKG;IACH,SAAS,CAAC,cAAc,CACtB,UAAU,EAAE,EAAE,EACd,OAAO,EAAE,YAAY,EACrB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,GACZ,IAAI;CA0BR"}
|