@luma.gl/webgl 9.1.0-alpha.2 → 9.1.0-beta.1
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.d.ts +3 -3
- package/dist/adapter/converters/device-parameters.d.ts.map +1 -1
- package/dist/adapter/converters/device-parameters.js +19 -11
- package/dist/adapter/converters/device-parameters.js.map +1 -0
- package/dist/adapter/converters/sampler-parameters.js +7 -4
- package/dist/adapter/converters/sampler-parameters.js.map +1 -0
- package/dist/adapter/converters/shader-formats.js +1 -0
- package/dist/adapter/converters/shader-formats.js.map +1 -0
- package/dist/adapter/converters/vertex-formats.js +1 -0
- package/dist/adapter/converters/vertex-formats.js.map +1 -0
- package/dist/adapter/converters/webgl-texture-table.d.ts +40 -0
- package/dist/adapter/converters/webgl-texture-table.d.ts.map +1 -0
- package/dist/adapter/converters/webgl-texture-table.js +304 -0
- package/dist/adapter/converters/webgl-texture-table.js.map +1 -0
- package/dist/adapter/device-helpers/webgl-device-features.d.ts.map +1 -1
- package/dist/adapter/device-helpers/webgl-device-features.js +2 -3
- package/dist/adapter/device-helpers/webgl-device-features.js.map +1 -0
- package/dist/adapter/device-helpers/webgl-device-info.js +1 -0
- package/dist/adapter/device-helpers/webgl-device-info.js.map +1 -0
- package/dist/adapter/device-helpers/webgl-device-limits.js +1 -0
- package/dist/adapter/device-helpers/webgl-device-limits.js.map +1 -0
- package/dist/adapter/helpers/decode-webgl-types.js +1 -0
- package/dist/adapter/helpers/decode-webgl-types.js.map +1 -0
- package/dist/adapter/helpers/format-utils.d.ts.map +1 -0
- package/dist/{classic → adapter/helpers}/format-utils.js +7 -0
- package/dist/adapter/helpers/format-utils.js.map +1 -0
- 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 +5 -4
- package/dist/adapter/helpers/get-shader-layout.js.map +1 -0
- package/dist/adapter/helpers/parse-shader-compiler-log.js +1 -0
- package/dist/adapter/helpers/parse-shader-compiler-log.js.map +1 -0
- package/dist/adapter/helpers/set-uniform.js +1 -0
- package/dist/adapter/helpers/set-uniform.js.map +1 -0
- package/dist/adapter/helpers/typed-array-utils.d.ts.map +1 -0
- package/dist/{classic → adapter/helpers}/typed-array-utils.js +1 -0
- package/dist/adapter/helpers/typed-array-utils.js.map +1 -0
- package/dist/adapter/helpers/webgl-texture-utils.d.ts +100 -29
- package/dist/adapter/helpers/webgl-texture-utils.d.ts.map +1 -1
- package/dist/adapter/helpers/webgl-texture-utils.js +231 -240
- package/dist/adapter/helpers/webgl-texture-utils.js.map +1 -0
- package/dist/adapter/helpers/webgl-topology-utils.js +1 -0
- package/dist/adapter/helpers/webgl-topology-utils.js.map +1 -0
- package/dist/adapter/resources/webgl-buffer.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-buffer.js +4 -1
- package/dist/adapter/resources/webgl-buffer.js.map +1 -0
- package/dist/adapter/resources/webgl-command-buffer.d.ts +59 -2
- package/dist/adapter/resources/webgl-command-buffer.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-command-buffer.js +89 -32
- package/dist/adapter/resources/webgl-command-buffer.js.map +1 -0
- package/dist/adapter/resources/webgl-command-encoder.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-command-encoder.js +4 -0
- package/dist/adapter/resources/webgl-command-encoder.js.map +1 -0
- package/dist/adapter/resources/webgl-external-texture.js +15 -0
- package/dist/adapter/resources/webgl-external-texture.js.map +1 -0
- package/dist/adapter/resources/webgl-framebuffer.d.ts +33 -35
- package/dist/adapter/resources/webgl-framebuffer.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-framebuffer.js +71 -76
- package/dist/adapter/resources/webgl-framebuffer.js.map +1 -0
- package/dist/adapter/resources/webgl-query-set.js +1 -0
- package/dist/adapter/resources/webgl-query-set.js.map +1 -0
- package/dist/adapter/resources/webgl-render-pass.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-render-pass.js +49 -21
- package/dist/adapter/resources/webgl-render-pass.js.map +1 -0
- package/dist/adapter/resources/webgl-render-pipeline.d.ts +3 -4
- package/dist/adapter/resources/webgl-render-pipeline.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-render-pipeline.js +45 -23
- package/dist/adapter/resources/webgl-render-pipeline.js.map +1 -0
- package/dist/adapter/resources/webgl-sampler.js +1 -0
- package/dist/adapter/resources/webgl-sampler.js.map +1 -0
- package/dist/adapter/resources/webgl-shader.d.ts +1 -0
- package/dist/adapter/resources/webgl-shader.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-shader.js +13 -6
- package/dist/adapter/resources/webgl-shader.js.map +1 -0
- package/dist/adapter/resources/webgl-texture-view.js +1 -0
- package/dist/adapter/resources/webgl-texture-view.js.map +1 -0
- package/dist/adapter/resources/webgl-texture.d.ts +33 -21
- package/dist/adapter/resources/webgl-texture.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-texture.js +172 -242
- package/dist/adapter/resources/webgl-texture.js.map +1 -0
- package/dist/adapter/resources/webgl-transform-feedback.js +1 -0
- package/dist/adapter/resources/webgl-transform-feedback.js.map +1 -0
- package/dist/adapter/resources/webgl-vertex-array.js +1 -0
- package/dist/adapter/resources/webgl-vertex-array.js.map +1 -0
- package/dist/adapter/webgl-adapter.d.ts +21 -0
- package/dist/adapter/webgl-adapter.d.ts.map +1 -0
- package/dist/adapter/webgl-adapter.js +86 -0
- package/dist/adapter/webgl-adapter.js.map +1 -0
- package/dist/adapter/webgl-canvas-context.d.ts +4 -6
- package/dist/adapter/webgl-canvas-context.d.ts.map +1 -1
- package/dist/adapter/webgl-canvas-context.js +13 -17
- package/dist/adapter/webgl-canvas-context.js.map +1 -0
- package/dist/adapter/webgl-device.d.ts +35 -46
- package/dist/adapter/webgl-device.d.ts.map +1 -1
- package/dist/adapter/webgl-device.js +100 -156
- package/dist/adapter/webgl-device.js.map +1 -0
- package/dist/context/debug/spector-types.d.ts +1108 -0
- package/dist/context/debug/spector-types.d.ts.map +1 -0
- package/dist/context/debug/spector-types.js +698 -0
- package/dist/context/debug/spector-types.js.map +1 -0
- package/dist/context/debug/spector.d.ts +12 -8
- package/dist/context/debug/spector.d.ts.map +1 -1
- package/dist/context/debug/spector.js +24 -17
- package/dist/context/debug/spector.js.map +1 -0
- package/dist/context/debug/webgl-developer-tools.d.ts +2 -3
- package/dist/context/debug/webgl-developer-tools.d.ts.map +1 -1
- package/dist/context/debug/webgl-developer-tools.js +7 -19
- package/dist/context/debug/webgl-developer-tools.js.map +1 -0
- package/dist/context/helpers/create-browser-context.d.ts +6 -22
- package/dist/context/helpers/create-browser-context.d.ts.map +1 -1
- package/dist/context/helpers/create-browser-context.js +41 -32
- package/dist/context/helpers/create-browser-context.js.map +1 -0
- package/dist/context/helpers/webgl-context-data.js +1 -0
- package/dist/context/helpers/webgl-context-data.js.map +1 -0
- package/dist/context/helpers/webgl-extensions.js +1 -0
- package/dist/context/helpers/webgl-extensions.js.map +1 -0
- package/dist/context/parameters/unified-parameter-api.js +1 -0
- package/dist/context/parameters/unified-parameter-api.js.map +1 -0
- package/dist/context/parameters/webgl-parameter-tables.d.ts +1 -1
- package/dist/context/parameters/webgl-parameter-tables.d.ts.map +1 -1
- package/dist/context/parameters/webgl-parameter-tables.js +3 -2
- package/dist/context/parameters/webgl-parameter-tables.js.map +1 -0
- package/dist/context/polyfills/polyfill-webgl1-extensions.d.ts +9 -0
- package/dist/context/polyfills/polyfill-webgl1-extensions.d.ts.map +1 -0
- package/dist/context/polyfills/polyfill-webgl1-extensions.js +182 -0
- package/dist/context/polyfills/polyfill-webgl1-extensions.js.map +1 -0
- package/dist/context/state-tracker/deep-array-equal.js +1 -0
- package/dist/context/state-tracker/deep-array-equal.js.map +1 -0
- package/dist/context/state-tracker/webgl-state-tracker.d.ts +43 -0
- package/dist/context/state-tracker/webgl-state-tracker.d.ts.map +1 -0
- package/dist/context/state-tracker/{track-context-state.js → webgl-state-tracker.js} +45 -74
- package/dist/context/state-tracker/webgl-state-tracker.js.map +1 -0
- package/dist/context/state-tracker/with-parameters.d.ts.map +1 -1
- package/dist/context/state-tracker/with-parameters.js +6 -4
- package/dist/context/state-tracker/with-parameters.js.map +1 -0
- package/dist/deprecated/accessor.d.ts.map +1 -0
- package/dist/{classic → deprecated}/accessor.js +37 -1
- package/dist/deprecated/accessor.js.map +1 -0
- package/dist/dist.dev.js +2397 -2430
- package/dist/dist.min.js +2 -2
- package/dist/index.cjs +2273 -2298
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -0
- package/dist/types.js +1 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/fill-array.d.ts +4 -4
- package/dist/utils/fill-array.d.ts.map +1 -1
- package/dist/utils/fill-array.js +1 -0
- package/dist/utils/fill-array.js.map +1 -0
- package/dist/utils/load-script.js +1 -0
- package/dist/utils/load-script.js.map +1 -0
- package/dist/utils/split-uniforms-and-bindings.d.ts +1 -1
- package/dist/utils/split-uniforms-and-bindings.d.ts.map +1 -1
- package/dist/utils/split-uniforms-and-bindings.js +1 -0
- package/dist/utils/split-uniforms-and-bindings.js.map +1 -0
- package/dist/utils/uid.d.ts +7 -0
- package/dist/utils/uid.d.ts.map +1 -0
- package/dist/utils/uid.js +15 -0
- package/dist/utils/uid.js.map +1 -0
- package/package.json +5 -5
- package/src/adapter/converters/device-parameters.ts +21 -15
- package/src/adapter/converters/sampler-parameters.ts +6 -4
- package/src/adapter/converters/webgl-texture-table.ts +404 -0
- package/src/adapter/device-helpers/webgl-device-features.ts +5 -3
- package/src/{classic → adapter/helpers}/format-utils.ts +6 -0
- package/src/adapter/helpers/get-shader-layout.ts +7 -4
- package/src/adapter/helpers/webgl-texture-utils.ts +410 -64
- package/src/adapter/resources/webgl-buffer.ts +3 -1
- package/src/adapter/resources/webgl-command-buffer.ts +125 -41
- package/src/adapter/resources/webgl-command-encoder.ts +6 -0
- package/src/adapter/resources/webgl-external-texture.ts +14 -0
- package/src/adapter/resources/webgl-framebuffer.ts +80 -86
- package/src/adapter/resources/webgl-render-pass.ts +72 -45
- package/src/adapter/resources/webgl-render-pipeline.ts +58 -27
- package/src/adapter/resources/webgl-shader.ts +15 -7
- package/src/adapter/resources/webgl-texture.ts +202 -274
- package/src/adapter/webgl-adapter.ts +105 -0
- package/src/adapter/webgl-canvas-context.ts +16 -19
- package/src/adapter/webgl-device.ts +144 -210
- package/src/context/debug/spector-types.ts +1154 -0
- package/src/context/debug/spector.ts +38 -29
- package/src/context/debug/webgl-developer-tools.ts +8 -31
- package/src/context/helpers/create-browser-context.ts +53 -63
- package/src/context/parameters/webgl-parameter-tables.ts +2 -2
- package/src/context/polyfills/polyfill-webgl1-extensions.ts +202 -0
- package/src/context/state-tracker/{track-context-state.ts → webgl-state-tracker.ts} +55 -94
- package/src/context/state-tracker/with-parameters.ts +5 -4
- package/src/{classic → deprecated}/accessor.ts +44 -3
- package/src/index.ts +7 -12
- package/src/utils/fill-array.ts +4 -4
- package/src/utils/split-uniforms-and-bindings.ts +3 -3
- package/src/utils/uid.ts +16 -0
- package/dist/adapter/converters/texture-formats.d.ts +0 -83
- package/dist/adapter/converters/texture-formats.d.ts.map +0 -1
- package/dist/adapter/converters/texture-formats.js +0 -518
- package/dist/classic/accessor.d.ts.map +0 -1
- package/dist/classic/clear.d.ts +0 -22
- package/dist/classic/clear.d.ts.map +0 -1
- package/dist/classic/clear.js +0 -86
- package/dist/classic/copy-and-blit.d.ts +0 -63
- package/dist/classic/copy-and-blit.d.ts.map +0 -1
- package/dist/classic/copy-and-blit.js +0 -193
- package/dist/classic/format-utils.d.ts.map +0 -1
- package/dist/classic/typed-array-utils.d.ts.map +0 -1
- package/dist/context/state-tracker/track-context-state.d.ts +0 -22
- package/dist/context/state-tracker/track-context-state.d.ts.map +0 -1
- package/src/adapter/converters/texture-formats.ts +0 -665
- package/src/classic/clear.ts +0 -115
- package/src/classic/copy-and-blit.ts +0 -318
- /package/dist/{classic → adapter/helpers}/format-utils.d.ts +0 -0
- /package/dist/{classic → adapter/helpers}/typed-array-utils.d.ts +0 -0
- /package/dist/{classic → deprecated}/accessor.d.ts +0 -0
- /package/src/{classic → adapter/helpers}/typed-array-utils.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webgl-buffer.js","sourceRoot":"","sources":["../../../src/adapter/resources/webgl-buffer.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAGpC,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AACrC,OAAO,EAAC,EAAE,EAAC,MAAM,oBAAoB,CAAC;AAGtC,6BAA6B;AAC7B,MAAM,OAAO,WAAY,SAAQ,MAAM;IAC5B,MAAM,CAAc;IACpB,EAAE,CAAyB;IAC3B,MAAM,CAAc;IAE7B,kDAAkD;IACzC,QAAQ,CAAgE;IACjF,mEAAmE;IAC1D,OAAO,CAAmC;IACnD,yEAAyE;IAChE,WAAW,QAA0D;IAE9E,2DAA2D;IAC3D,UAAU,CAAS;IACnB,2BAA2B;IAC3B,SAAS,CAAS;IAElB,YAAY,MAAmB,EAAE,QAAqB,EAAE;QACtD,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAErB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QAEzB,MAAM,MAAM,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;QACpE,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,IAAI,CAAC,EAAE,CAAC,YAAY,EAAE,CAAC;QAC/C,MAAM,CAAC,sBAAsB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE;YAC/C,OAAO,EAAE,EAAC,GAAG,IAAI,C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l/core';
|
|
2
2
|
import { CommandBuffer } from '@luma.gl/core';
|
|
3
|
-
import { GL } from '@luma.gl/constants';
|
|
3
|
+
import { GL, GLTextureTarget, GLTextureCubeMapTarget } from '@luma.gl/constants';
|
|
4
4
|
import { WebGLDevice } from "../webgl-device.js";
|
|
5
5
|
type CopyBufferToBufferCommand = {
|
|
6
6
|
name: 'copy-buffer-to-buffer';
|
|
@@ -18,14 +18,71 @@ type CopyTextureToTextureCommand = {
|
|
|
18
18
|
name: 'copy-texture-to-texture';
|
|
19
19
|
options: CopyTextureToTextureOptions;
|
|
20
20
|
};
|
|
21
|
-
type
|
|
21
|
+
type ClearTextureCommand = {
|
|
22
|
+
name: 'clear-texture';
|
|
23
|
+
options: {};
|
|
24
|
+
};
|
|
25
|
+
type ReadTextureCommand = {
|
|
26
|
+
name: 'read-texture';
|
|
27
|
+
options: {};
|
|
28
|
+
};
|
|
29
|
+
type Command = CopyBufferToBufferCommand | CopyBufferToTextureCommand | CopyTextureToBufferCommand | CopyTextureToTextureCommand | ClearTextureCommand | ReadTextureCommand;
|
|
22
30
|
export declare class WEBGLCommandBuffer extends CommandBuffer {
|
|
23
31
|
device: WebGLDevice;
|
|
24
32
|
commands: Command[];
|
|
25
33
|
constructor(device: WebGLDevice);
|
|
26
34
|
submitCommands(commands?: Command[]): void;
|
|
27
35
|
}
|
|
36
|
+
/** Clear one mip level of a texture *
|
|
37
|
+
function _clearTexture(device: WebGLDevice, options: ClearTextureOptions) {
|
|
38
|
+
const BORDER = 0;
|
|
39
|
+
const {dimension, width, height, depth = 0, mipLevel = 0} = options;
|
|
40
|
+
const {glInternalFormat, glFormat, glType, compressed} = options;
|
|
41
|
+
const glTarget = getWebGLCubeFaceTarget(options.glTarget, dimension, depth);
|
|
42
|
+
|
|
43
|
+
switch (dimension) {
|
|
44
|
+
case '2d-array':
|
|
45
|
+
case '3d':
|
|
46
|
+
if (compressed) {
|
|
47
|
+
// prettier-ignore
|
|
48
|
+
device.gl.compressedTexImage3D(glTarget, mipLevel, glInternalFormat, width, height, depth, BORDER, null);
|
|
49
|
+
} else {
|
|
50
|
+
// prettier-ignore
|
|
51
|
+
device.gl.texImage3D( glTarget, mipLevel, glInternalFormat, width, height, depth, BORDER, glFormat, glType, null);
|
|
52
|
+
}
|
|
53
|
+
break;
|
|
54
|
+
|
|
55
|
+
case '2d':
|
|
56
|
+
case 'cube':
|
|
57
|
+
if (compressed) {
|
|
58
|
+
// prettier-ignore
|
|
59
|
+
device.gl.compressedTexImage2D(glTarget, mipLevel, glInternalFormat, width, height, BORDER, null);
|
|
60
|
+
} else {
|
|
61
|
+
// prettier-ignore
|
|
62
|
+
device.gl.texImage2D(glTarget, mipLevel, glInternalFormat, width, height, BORDER, glFormat, glType, null);
|
|
63
|
+
}
|
|
64
|
+
break;
|
|
65
|
+
|
|
66
|
+
default:
|
|
67
|
+
throw new Error(dimension);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
*/
|
|
71
|
+
/**
|
|
72
|
+
* In WebGL, cube maps specify faces by overriding target instead of using the depth parameter.
|
|
73
|
+
* @note We still bind the texture using GL.TEXTURE_CUBE_MAP, but we need to use the face-specific target when setting mip levels.
|
|
74
|
+
* @returns glTarget unchanged, if dimension !== 'cube'.
|
|
75
|
+
*/
|
|
76
|
+
export declare function getWebGLCubeFaceTarget(glTarget: GLTextureTarget, dimension: '1d' | '2d' | '2d-array' | 'cube' | 'cube-array' | '3d', level: number): GLTextureTarget | GLTextureCubeMapTarget;
|
|
77
|
+
/**
|
|
78
|
+
* Returns number of components in a specific readPixels WebGL format
|
|
79
|
+
* @todo use shadertypes utils instead?
|
|
80
|
+
*/
|
|
28
81
|
export declare function glFormatToComponents(format: any): 1 | 2 | 3 | 4;
|
|
82
|
+
/**
|
|
83
|
+
* Return byte count for given readPixels WebGL type
|
|
84
|
+
* @todo use shadertypes utils instead?
|
|
85
|
+
*/
|
|
29
86
|
export declare function glTypeToBytes(type: GL): 1 | 2 | 4;
|
|
30
87
|
export {};
|
|
31
88
|
//# sourceMappingURL=webgl-command-buffer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgl-command-buffer.d.ts","sourceRoot":"","sources":["../../../src/adapter/resources/webgl-command-buffer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,2BAA2B,
|
|
1
|
+
{"version":3,"file":"webgl-command-buffer.d.ts","sourceRoot":"","sources":["../../../src/adapter/resources/webgl-command-buffer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,2BAA2B,EAG5B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,aAAa,EAAuB,MAAM,eAAe,CAAC;AAClE,OAAO,EACL,EAAE,EACF,eAAe,EACf,sBAAsB,EAIvB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAC,WAAW,EAAC,2BAAwB;AAM5C,KAAK,yBAAyB,GAAG;IAC/B,IAAI,EAAE,uBAAuB,CAAC;IAC9B,OAAO,EAAE,yBAAyB,CAAC;CACpC,CAAC;AAEF,KAAK,0BAA0B,GAAG;IAChC,IAAI,EAAE,wBAAwB,CAAC;IAC/B,OAAO,EAAE,0BAA0B,CAAC;CACrC,CAAC;AAEF,KAAK,0BAA0B,GAAG;IAChC,IAAI,EAAE,wBAAwB,CAAC;IAC/B,OAAO,EAAE,0BAA0B,CAAC;CACrC,CAAC;AAEF,KAAK,2BAA2B,GAAG;IACjC,IAAI,EAAE,yBAAyB,CAAC;IAChC,OAAO,EAAE,2BAA2B,CAAC;CACtC,CAAC;AAEF,KAAK,mBAAmB,GAAG;IACzB,IAAI,EAAE,eAAe,CAAC;IACtB,OAAO,EAAE,EAAE,CAAC;CACb,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,EAAE,EAAE,CAAC;CACb,CAAC;AAEF,KAAK,OAAO,GACR,yBAAyB,GACzB,0BAA0B,GAC1B,0BAA0B,GAC1B,2BAA2B,GAC3B,mBAAmB,GACnB,kBAAkB,CAAC;AAEvB,qBAAa,kBAAmB,SAAQ,aAAa;IACnD,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,OAAO,EAAE,CAAM;gBAEb,MAAM,EAAE,WAAW;IAK/B,cAAc,CAAC,QAAQ,GAAE,OAAO,EAAkB;CAuBnD;AAiPD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkCI;AAMJ;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,SAAS,EAAE,IAAI,GAAG,IAAI,GAAG,UAAU,GAAG,MAAM,GAAG,YAAY,GAAG,IAAI,EAClE,KAAK,EAAE,MAAM,GACZ,eAAe,GAAG,sBAAsB,CAE1C;AAqBD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,KAAA,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAmB1D;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAcjD"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { CommandBuffer, Texture } from '@luma.gl/core';
|
|
5
5
|
import { GL } from '@luma.gl/constants';
|
|
6
6
|
import { WEBGLTexture } from "./webgl-texture.js";
|
|
7
|
-
import { getTextureFormatWebGL } from "../converters/texture-
|
|
7
|
+
import { getTextureFormatWebGL } from "../converters/webgl-texture-table.js";
|
|
8
8
|
export class WEBGLCommandBuffer extends CommandBuffer {
|
|
9
9
|
device;
|
|
10
10
|
commands = [];
|
|
@@ -27,13 +27,18 @@ export class WEBGLCommandBuffer extends CommandBuffer {
|
|
|
27
27
|
case 'copy-texture-to-texture':
|
|
28
28
|
_copyTextureToTexture(this.device, command.options);
|
|
29
29
|
break;
|
|
30
|
+
// case 'clear-texture':
|
|
31
|
+
// _clearTexture(this.device, command.options);
|
|
32
|
+
// break;
|
|
33
|
+
default:
|
|
34
|
+
throw new Error(command.name);
|
|
30
35
|
}
|
|
31
36
|
}
|
|
32
37
|
}
|
|
33
38
|
}
|
|
34
39
|
function _copyBufferToBuffer(device, options) {
|
|
35
|
-
const source = options.
|
|
36
|
-
const destination = options.
|
|
40
|
+
const source = options.sourceBuffer;
|
|
41
|
+
const destination = options.destinationBuffer;
|
|
37
42
|
// {In WebGL2 we can p}erform the copy on the GPU
|
|
38
43
|
// Use GL.COPY_READ_BUFFER+GL.COPY_WRITE_BUFFER avoid disturbing other targets and locking type
|
|
39
44
|
device.gl.bindBuffer(36662, source.handle);
|
|
@@ -56,19 +61,19 @@ function _copyBufferToTexture(device, options) {
|
|
|
56
61
|
function _copyTextureToBuffer(device, options) {
|
|
57
62
|
const {
|
|
58
63
|
/** Texture to copy to/from. */
|
|
59
|
-
|
|
64
|
+
sourceTexture,
|
|
60
65
|
/** Mip-map level of the texture to copy to/from. (Default 0) */
|
|
61
66
|
mipLevel = 0,
|
|
62
67
|
/** Defines which aspects of the texture to copy to/from. */
|
|
63
68
|
aspect = 'all',
|
|
64
69
|
/** Width to copy */
|
|
65
|
-
width = options.
|
|
70
|
+
width = options.sourceTexture.width,
|
|
66
71
|
/** Height to copy */
|
|
67
|
-
height = options.
|
|
72
|
+
height = options.sourceTexture.height, depthOrArrayLayers = 0,
|
|
68
73
|
/** Defines the origin of the copy - the minimum corner of the texture sub-region to copy to/from. */
|
|
69
74
|
origin = [0, 0],
|
|
70
75
|
/** Destination buffer */
|
|
71
|
-
|
|
76
|
+
destinationBuffer,
|
|
72
77
|
/** Offset, in bytes, from the beginning of the buffer to the start of the image data (default 0) */
|
|
73
78
|
byteOffset = 0,
|
|
74
79
|
/**
|
|
@@ -84,17 +89,17 @@ function _copyTextureToBuffer(device, options) {
|
|
|
84
89
|
rowsPerImage } = options;
|
|
85
90
|
// TODO - Not possible to read just stencil or depth part in WebGL?
|
|
86
91
|
if (aspect !== 'all') {
|
|
87
|
-
throw new Error('not supported');
|
|
92
|
+
throw new Error('aspect not supported in WebGL');
|
|
88
93
|
}
|
|
89
94
|
// TODO - mipLevels are set when attaching texture to framebuffer
|
|
90
95
|
if (mipLevel !== 0 || depthOrArrayLayers !== 0 || bytesPerRow || rowsPerImage) {
|
|
91
96
|
throw new Error('not implemented');
|
|
92
97
|
}
|
|
93
98
|
// Asynchronous read (PIXEL_PACK_BUFFER) is WebGL2 only feature
|
|
94
|
-
const { framebuffer, destroyFramebuffer } = getFramebuffer(
|
|
99
|
+
const { framebuffer, destroyFramebuffer } = getFramebuffer(sourceTexture);
|
|
95
100
|
let prevHandle;
|
|
96
101
|
try {
|
|
97
|
-
const webglBuffer =
|
|
102
|
+
const webglBuffer = destinationBuffer;
|
|
98
103
|
const sourceWidth = width || framebuffer.width;
|
|
99
104
|
const sourceHeight = height || framebuffer.height;
|
|
100
105
|
const sourceParams = getTextureFormatWebGL(framebuffer.colorAttachments[0].texture.props.format);
|
|
@@ -148,7 +153,7 @@ export function readPixelsToBuffer(
|
|
|
148
153
|
function _copyTextureToTexture(device, options) {
|
|
149
154
|
const {
|
|
150
155
|
/** Texture to copy to/from. */
|
|
151
|
-
|
|
156
|
+
sourceTexture,
|
|
152
157
|
/** Mip-map level of the texture to copy to (Default 0) */
|
|
153
158
|
destinationMipLevel = 0,
|
|
154
159
|
/** Defines which aspects of the texture to copy to/from. */
|
|
@@ -158,7 +163,7 @@ function _copyTextureToTexture(device, options) {
|
|
|
158
163
|
/** Defines the origin of the copy - the minimum corner of the texture sub-region to copy to. */
|
|
159
164
|
destinationOrigin = [0, 0],
|
|
160
165
|
/** Texture to copy to/from. */
|
|
161
|
-
|
|
166
|
+
destinationTexture
|
|
162
167
|
/** Mip-map level of the texture to copy to/from. (Default 0) */
|
|
163
168
|
// destinationMipLevel = options.mipLevel,
|
|
164
169
|
/** Defines the origin of the copy - the minimum corner of the texture sub-region to copy to/from. */
|
|
@@ -166,10 +171,10 @@ function _copyTextureToTexture(device, options) {
|
|
|
166
171
|
/** Defines which aspects of the texture to copy to/from. */
|
|
167
172
|
// destinationAspect = options.aspect,
|
|
168
173
|
} = options;
|
|
169
|
-
let { width = options.
|
|
174
|
+
let { width = options.destinationTexture.width, height = options.destinationTexture.height
|
|
170
175
|
// depthOrArrayLayers = 0
|
|
171
176
|
} = options;
|
|
172
|
-
const { framebuffer, destroyFramebuffer } = getFramebuffer(
|
|
177
|
+
const { framebuffer, destroyFramebuffer } = getFramebuffer(sourceTexture);
|
|
173
178
|
const [sourceX, sourceY] = origin;
|
|
174
179
|
const [destinationX, destinationY, destinationZ] = destinationOrigin;
|
|
175
180
|
// @ts-expect-error native bindFramebuffer is overridden by our state tracker
|
|
@@ -178,8 +183,8 @@ function _copyTextureToTexture(device, options) {
|
|
|
178
183
|
// const prevBuffer = gl.readBuffer(attachment);
|
|
179
184
|
let texture = null;
|
|
180
185
|
let textureTarget;
|
|
181
|
-
if (
|
|
182
|
-
texture =
|
|
186
|
+
if (destinationTexture instanceof WEBGLTexture) {
|
|
187
|
+
texture = destinationTexture;
|
|
183
188
|
width = Number.isFinite(width) ? width : texture.width;
|
|
184
189
|
height = Number.isFinite(height) ? height : texture.height;
|
|
185
190
|
texture.bind(0);
|
|
@@ -207,7 +212,69 @@ function _copyTextureToTexture(device, options) {
|
|
|
207
212
|
framebuffer.destroy();
|
|
208
213
|
}
|
|
209
214
|
}
|
|
210
|
-
|
|
215
|
+
/** Clear one mip level of a texture *
|
|
216
|
+
function _clearTexture(device: WebGLDevice, options: ClearTextureOptions) {
|
|
217
|
+
const BORDER = 0;
|
|
218
|
+
const {dimension, width, height, depth = 0, mipLevel = 0} = options;
|
|
219
|
+
const {glInternalFormat, glFormat, glType, compressed} = options;
|
|
220
|
+
const glTarget = getWebGLCubeFaceTarget(options.glTarget, dimension, depth);
|
|
221
|
+
|
|
222
|
+
switch (dimension) {
|
|
223
|
+
case '2d-array':
|
|
224
|
+
case '3d':
|
|
225
|
+
if (compressed) {
|
|
226
|
+
// prettier-ignore
|
|
227
|
+
device.gl.compressedTexImage3D(glTarget, mipLevel, glInternalFormat, width, height, depth, BORDER, null);
|
|
228
|
+
} else {
|
|
229
|
+
// prettier-ignore
|
|
230
|
+
device.gl.texImage3D( glTarget, mipLevel, glInternalFormat, width, height, depth, BORDER, glFormat, glType, null);
|
|
231
|
+
}
|
|
232
|
+
break;
|
|
233
|
+
|
|
234
|
+
case '2d':
|
|
235
|
+
case 'cube':
|
|
236
|
+
if (compressed) {
|
|
237
|
+
// prettier-ignore
|
|
238
|
+
device.gl.compressedTexImage2D(glTarget, mipLevel, glInternalFormat, width, height, BORDER, null);
|
|
239
|
+
} else {
|
|
240
|
+
// prettier-ignore
|
|
241
|
+
device.gl.texImage2D(glTarget, mipLevel, glInternalFormat, width, height, BORDER, glFormat, glType, null);
|
|
242
|
+
}
|
|
243
|
+
break;
|
|
244
|
+
|
|
245
|
+
default:
|
|
246
|
+
throw new Error(dimension);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
*/
|
|
250
|
+
// function _readTexture(device: WebGLDevice, options: CopyTextureToBufferOptions) {}
|
|
251
|
+
// HELPERS
|
|
252
|
+
/**
|
|
253
|
+
* In WebGL, cube maps specify faces by overriding target instead of using the depth parameter.
|
|
254
|
+
* @note We still bind the texture using GL.TEXTURE_CUBE_MAP, but we need to use the face-specific target when setting mip levels.
|
|
255
|
+
* @returns glTarget unchanged, if dimension !== 'cube'.
|
|
256
|
+
*/
|
|
257
|
+
export function getWebGLCubeFaceTarget(glTarget, dimension, level) {
|
|
258
|
+
return dimension === 'cube' ? 34069 + level : glTarget;
|
|
259
|
+
}
|
|
260
|
+
/** Wrap a texture in a framebuffer so that we can use WebGL APIs that work on framebuffers */
|
|
261
|
+
function getFramebuffer(source) {
|
|
262
|
+
if (source instanceof Texture) {
|
|
263
|
+
const { width, height, id } = source;
|
|
264
|
+
const framebuffer = source.device.createFramebuffer({
|
|
265
|
+
id: `framebuffer-for-${id}`,
|
|
266
|
+
width,
|
|
267
|
+
height,
|
|
268
|
+
colorAttachments: [source]
|
|
269
|
+
});
|
|
270
|
+
return { framebuffer, destroyFramebuffer: true };
|
|
271
|
+
}
|
|
272
|
+
return { framebuffer: source, destroyFramebuffer: false };
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Returns number of components in a specific readPixels WebGL format
|
|
276
|
+
* @todo use shadertypes utils instead?
|
|
277
|
+
*/
|
|
211
278
|
export function glFormatToComponents(format) {
|
|
212
279
|
switch (format) {
|
|
213
280
|
case 6406:
|
|
@@ -228,7 +295,10 @@ export function glFormatToComponents(format) {
|
|
|
228
295
|
throw new Error('GLFormat');
|
|
229
296
|
}
|
|
230
297
|
}
|
|
231
|
-
|
|
298
|
+
/**
|
|
299
|
+
* Return byte count for given readPixels WebGL type
|
|
300
|
+
* @todo use shadertypes utils instead?
|
|
301
|
+
*/
|
|
232
302
|
export function glTypeToBytes(type) {
|
|
233
303
|
switch (type) {
|
|
234
304
|
case 5121:
|
|
@@ -244,17 +314,4 @@ export function glTypeToBytes(type) {
|
|
|
244
314
|
throw new Error('GLType');
|
|
245
315
|
}
|
|
246
316
|
}
|
|
247
|
-
|
|
248
|
-
function getFramebuffer(source) {
|
|
249
|
-
if (source instanceof Texture) {
|
|
250
|
-
const { width, height, id } = source;
|
|
251
|
-
const framebuffer = source.device.createFramebuffer({
|
|
252
|
-
id: `framebuffer-for-${id}`,
|
|
253
|
-
width,
|
|
254
|
-
height,
|
|
255
|
-
colorAttachments: [source]
|
|
256
|
-
});
|
|
257
|
-
return { framebuffer, destroyFramebuffer: true };
|
|
258
|
-
}
|
|
259
|
-
return { framebuffer: source, destroyFramebuffer: false };
|
|
260
|
-
}
|
|
317
|
+
//# sourceMappingURL=webgl-command-buffer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webgl-command-buffer.js","sourceRoot":"","sources":["../../../src/adapter/resources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C,QAAQ,IAAI,EAAE,CAAC;QACb;YACE,OAAO,CAAC,CAAC;QACX,WAA6B;QAC7B,WAA+B;QAC/B;YACE,OAAO,CAAC,CAAC;QACX;YACE,OAAO,CAAC,CAAC;QACX,gDAAgD;QAChD;YACE,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgl-command-encoder.d.ts","sourceRoot":"","sources":["../../../src/adapter/resources/webgl-command-encoder.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,cAAc,EAAE,mBAAmB,EAAC,MAAM,eAAe,CAAC;AAClE,OAAO,KAAK,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,2BAA2B,
|
|
1
|
+
{"version":3,"file":"webgl-command-encoder.d.ts","sourceRoot":"","sources":["../../../src/adapter/resources/webgl-command-encoder.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,cAAc,EAAE,mBAAmB,EAAC,MAAM,eAAe,CAAC;AAClE,OAAO,KAAK,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,2BAA2B,EAG3B,QAAQ,EACR,MAAM,EACP,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAC,kBAAkB,EAAC,kCAA+B;AAC1D,OAAO,EAAC,WAAW,EAAC,2BAAwB;AAE5C,qBAAa,mBAAoB,SAAQ,cAAc;IACrD,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAE7B,QAAQ,CAAC,aAAa,EAAE,kBAAkB,CAAC;gBAE/B,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,mBAAmB;IAMlD,OAAO,IAAI,IAAI;IAEf,MAAM,IAAI,IAAI;IAQvB,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,IAAI;IAI5D,mBAAmB,CAAC,OAAO,EAAE,0BAA0B;IAIvD,mBAAmB,CAAC,OAAO,EAAE,0BAA0B,GAAG,IAAI;IAI9D,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,GAAG,IAAI;IAQvD,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IACxC,aAAa;IAEb,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAE5C,eAAe,CACtB,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE;QACR,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC5B,GACA,IAAI;CACR"}
|
|
@@ -30,8 +30,12 @@ export class WEBGLCommandEncoder extends CommandEncoder {
|
|
|
30
30
|
copyTextureToTexture(options) {
|
|
31
31
|
this.commandBuffer.commands.push({ name: 'copy-texture-to-texture', options });
|
|
32
32
|
}
|
|
33
|
+
// clearTexture(options: ClearTextureOptions): void {
|
|
34
|
+
// this.commandBuffer.commands.push({name: 'copy-texture-to-texture', options});
|
|
35
|
+
// }
|
|
33
36
|
pushDebugGroup(groupLabel) { }
|
|
34
37
|
popDebugGroup() { }
|
|
35
38
|
insertDebugMarker(markerLabel) { }
|
|
36
39
|
resolveQuerySet(querySet, destination, options) { }
|
|
37
40
|
}
|
|
41
|
+
//# sourceMappingURL=webgl-command-encoder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webgl-command-encoder.js","sourceRoot":"","sources":["../../../src/adapter/resources/webgl-command-encoder.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,EAAC,cAAc,EAAsB,MAAM,eAAe,CAAC;AAYlE,OAAO,EAAC,kBAAkB,EAAC,kCAA+B;AAG1D,MAAM,OAAO,mBAAoB,SAAQ,cAAc;IAC5C,MAAM,CAAc;IAEpB,aAAa,CAAqB;IAE3C,YAAY,MAAmB,EAAE,KAA0B;QACzD,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,aAAa,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,CAAC;IACtD,CAAC;IAEQ,OAAO,KAAU,CAAC;IAElB,MAAM;QACb,IAAI,CAAC,aAAa,CAAC,cAAc,EAAE,CAAC;IACtC,CAAC;IAED,6EAA6E;IAC7E,8FAA8F;IAC9F,qDAAqD;IAErD,kBAAkB,CAAC,OAAkC;QACnD,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,EAAC,CAAC,CAAC;IAC7E,CAAC;IAED,mBAAmB,CAAC,OAAmC;QACrD,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,EAAC,CAAC,CAAC;IAC9E,CAAC;IAED,mBAAmB,CAAC,OAAmC;QACrD,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,EAAC,CAAC,CAAC;IAC9E,CAAC;IAED,oBAAoB,CAAC,OAAoC;QACvD,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,yBAAyB,EAAE,OAAO,EAAC,CAAC,CAAC;IAC/E,CAAC;IAED,qDAAqD;IACrD,kFAAkF;IAClF,IAAI;IAEK,cAAc,CAAC,UAAkB,IAAS,CAAC;IAC3C,aAAa,KAAI,CAAC;IAElB,iBAAiB,CAAC,WAAmB,IAAS,CAAC;IAE/C,eAAe,CACtB,QAAkB,EAClB,WAAmB,EACnB,OAIC,IACM,CAAC;CACX"}
|
|
@@ -71,6 +71,20 @@ export class WEBGLExternalTexture extends WEBGLTexture {
|
|
|
71
71
|
data.addEventListener('loadeddata', () => this.initialize(props));
|
|
72
72
|
return this;
|
|
73
73
|
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
initialize() {
|
|
77
|
+
// TODO - Video handling, move to ExternalTexture?
|
|
78
|
+
// if (isVideo) {
|
|
79
|
+
// this._video = {
|
|
80
|
+
// video: data,
|
|
81
|
+
// // TODO - should we be using the sampler parameters here?
|
|
82
|
+
// parameters: {},
|
|
83
|
+
// // @ts-expect-error HTMLVideoElement.HAVE_CURRENT_DATA is not declared
|
|
84
|
+
// lastTime: data.readyState >= HTMLVideoElement.HAVE_CURRENT_DATA ? data.currentTime : -1
|
|
85
|
+
// };
|
|
86
|
+
// }
|
|
87
|
+
}
|
|
74
88
|
|
|
75
89
|
update(): this {
|
|
76
90
|
if (this._video) {
|
|
@@ -92,3 +106,4 @@ export class WEBGLExternalTexture extends WEBGLTexture {
|
|
|
92
106
|
|
|
93
107
|
|
|
94
108
|
*/
|
|
109
|
+
//# sourceMappingURL=webgl-external-texture.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webgl-external-texture.js","sourceRoot":"","sources":["../../../src/adapter/resources/webgl-external-texture.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwGE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { FramebufferProps
|
|
2
|
-
import { Framebuffer
|
|
1
|
+
import type { FramebufferProps } from '@luma.gl/core';
|
|
2
|
+
import { Framebuffer } from '@luma.gl/core';
|
|
3
3
|
import { GL } from '@luma.gl/constants';
|
|
4
4
|
import { WebGLDevice } from "../webgl-device.js";
|
|
5
5
|
import { WEBGLTexture } from "./webgl-texture.js";
|
|
@@ -15,40 +15,8 @@ export declare class WEBGLFramebuffer extends Framebuffer {
|
|
|
15
15
|
constructor(device: WebGLDevice, props: FramebufferProps);
|
|
16
16
|
/** destroys any auto created resources etc. */
|
|
17
17
|
destroy(): void;
|
|
18
|
+
protected updateAttachments(): void;
|
|
18
19
|
/** In WebGL we must use renderbuffers for depth/stencil attachments (unless we have extensions) */
|
|
19
|
-
protected createDepthStencilTexture(format: TextureFormat): Texture;
|
|
20
|
-
/**
|
|
21
|
-
* Attachment resize is expected to be a noop if size is same
|
|
22
|
-
*
|
|
23
|
-
protected override resizeAttachments(width: number, height: number): this {
|
|
24
|
-
// for default framebuffer, just update the stored size
|
|
25
|
-
if (this.handle === null) {
|
|
26
|
-
// assert(width === undefined && height === undefined);
|
|
27
|
-
this.width = this.gl.drawingBufferWidth;
|
|
28
|
-
this.height = this.gl.drawingBufferHeight;
|
|
29
|
-
return this;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (width === undefined) {
|
|
33
|
-
width = this.gl.drawingBufferWidth;
|
|
34
|
-
}
|
|
35
|
-
if (height === undefined) {
|
|
36
|
-
height = this.gl.drawingBufferHeight;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// TODO Not clear that this is better than default destroy/create implementation
|
|
40
|
-
|
|
41
|
-
for (const colorAttachment of this.colorAttachments) {
|
|
42
|
-
colorAttachment.texture.clone({width, height});
|
|
43
|
-
}
|
|
44
|
-
if (this.depthStencilAttachment) {
|
|
45
|
-
this.depthStencilAttachment.texture.resize({width, height});
|
|
46
|
-
}
|
|
47
|
-
return this;
|
|
48
|
-
}
|
|
49
|
-
*/
|
|
50
|
-
/** Attach one attachment */
|
|
51
|
-
protected _attachTexture(attachmentPoint: GL, textureView: WEBGLTextureView): void;
|
|
52
20
|
/**
|
|
53
21
|
* @param attachment
|
|
54
22
|
* @param texture
|
|
@@ -57,4 +25,34 @@ export declare class WEBGLFramebuffer extends Framebuffer {
|
|
|
57
25
|
*/
|
|
58
26
|
protected _attachTextureView(attachment: GL, textureView: WEBGLTextureView): void;
|
|
59
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Attachment resize is expected to be a noop if size is same
|
|
30
|
+
*
|
|
31
|
+
protected override resizeAttachments(width: number, height: number): this {
|
|
32
|
+
// for default framebuffer, just update the stored size
|
|
33
|
+
if (this.handle === null) {
|
|
34
|
+
// assert(width === undefined && height === undefined);
|
|
35
|
+
this.width = this.gl.drawingBufferWidth;
|
|
36
|
+
this.height = this.gl.drawingBufferHeight;
|
|
37
|
+
return this;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (width === undefined) {
|
|
41
|
+
width = this.gl.drawingBufferWidth;
|
|
42
|
+
}
|
|
43
|
+
if (height === undefined) {
|
|
44
|
+
height = this.gl.drawingBufferHeight;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// TODO Not clear that this is better than default destroy/create implementation
|
|
48
|
+
|
|
49
|
+
for (const colorAttachment of this.colorAttachments) {
|
|
50
|
+
colorAttachment.texture.clone({width, height});
|
|
51
|
+
}
|
|
52
|
+
if (this.depthStencilAttachment) {
|
|
53
|
+
this.depthStencilAttachment.texture.resize({width, height});
|
|
54
|
+
}
|
|
55
|
+
return this;
|
|
56
|
+
}
|
|
57
|
+
*/
|
|
60
58
|
//# sourceMappingURL=webgl-framebuffer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgl-framebuffer.d.ts","sourceRoot":"","sources":["../../../src/adapter/resources/webgl-framebuffer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"webgl-framebuffer.d.ts","sourceRoot":"","sources":["../../../src/adapter/resources/webgl-framebuffer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;AACpD,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAC,EAAE,EAAC,MAAM,oBAAoB,CAAC;AACtC,OAAO,EAAC,WAAW,EAAC,2BAAwB;AAC5C,OAAO,EAAC,YAAY,EAAC,2BAAwB;AAC7C,OAAO,EAAC,gBAAgB,EAAC,gCAA6B;AAGtD,MAAM,MAAM,UAAU,GAAG,gBAAgB,GAAG,YAAY,CAAC;AAEzD,iDAAiD;AACjD,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,MAAM,EAAE,WAAW,CAAC;IACpB,EAAE,EAAE,sBAAsB,CAAC;IAC3B,MAAM,EAAE,gBAAgB,CAAC;IAEzB,gBAAgB,EAAE,gBAAgB,EAAE,CAAM;IAC1C,sBAAsB,EAAE,gBAAgB,GAAG,IAAI,CAAQ;gBAE3C,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,gBAAgB;IAsBxD,+CAA+C;IACtC,OAAO,IAAI,IAAI;IAQxB,SAAS,CAAC,iBAAiB,IAAI,IAAI;IAqCnC,mGAAmG;IAYnG;;;;;OAKG;IACH,SAAS,CAAC,kBAAkB,CAAC,UAAU,EAAE,EAAE,EAAE,WAAW,EAAE,gBAAgB,GAAG,IAAI;CA8BlF;AAqCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BE"}
|