@luma.gl/webgl 9.3.2 → 9.3.3
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/resources/webgl-framebuffer.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-framebuffer.js +6 -5
- package/dist/adapter/resources/webgl-framebuffer.js.map +1 -1
- package/dist/adapter/resources/webgl-render-pass.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-render-pass.js +4 -6
- package/dist/adapter/resources/webgl-render-pass.js.map +1 -1
- package/dist/dist.dev.js +8 -6
- package/dist/dist.min.js +2 -2
- package/dist/index.cjs +8 -6
- package/dist/index.cjs.map +2 -2
- package/package.json +2 -2
- package/src/adapter/resources/webgl-framebuffer.ts +6 -5
- package/src/adapter/resources/webgl-render-pass.ts +4 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luma.gl/webgl",
|
|
3
|
-
"version": "9.3.
|
|
3
|
+
"version": "9.3.3",
|
|
4
4
|
"description": "WebGL2 adapter for the luma.gl core API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"@math.gl/types": "^4.1.0",
|
|
62
62
|
"@probe.gl/env": "^4.1.1"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "1069000732d3dd5ba6e41f9ad958a7f274125ef4"
|
|
65
65
|
}
|
|
@@ -36,19 +36,20 @@ export class WEBGLFramebuffer extends Framebuffer {
|
|
|
36
36
|
// default framebuffer handle is null, so we can't set debug metadata...
|
|
37
37
|
device._setWebGLDebugMetadata(this.handle, this, {spector: this.props});
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
if (!props.handle) {
|
|
40
|
+
// Auto create textures for attachments if needed
|
|
41
|
+
this.autoCreateAttachmentTextures();
|
|
41
42
|
|
|
42
|
-
|
|
43
|
+
this.updateAttachments();
|
|
44
|
+
}
|
|
43
45
|
}
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
/** destroys any auto created resources etc. */
|
|
47
49
|
override destroy(): void {
|
|
48
50
|
super.destroy(); // destroys owned resources etc.
|
|
49
|
-
if (!this.destroyed && this.handle !== null) {
|
|
51
|
+
if (!this.destroyed && this.handle !== null && !this.props.handle) {
|
|
50
52
|
this.gl.deleteFramebuffer(this.handle);
|
|
51
|
-
// this.handle = null;
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
|
|
@@ -35,7 +35,7 @@ export class WEBGLRenderPass extends RenderPass {
|
|
|
35
35
|
// If no viewport is provided, apply reasonably defaults
|
|
36
36
|
let viewport: NumberArray4 | undefined;
|
|
37
37
|
if (!props?.parameters?.viewport) {
|
|
38
|
-
if (!isDefaultFramebuffer) {
|
|
38
|
+
if (!isDefaultFramebuffer && webglFramebuffer) {
|
|
39
39
|
// Set the viewport to the size of the framebuffer
|
|
40
40
|
const {width, height} = webglFramebuffer;
|
|
41
41
|
viewport = [0, 0, width, height];
|
|
@@ -51,13 +51,11 @@ export class WEBGLRenderPass extends RenderPass {
|
|
|
51
51
|
this.setParameters({viewport, ...this.props.parameters});
|
|
52
52
|
|
|
53
53
|
// Specify mapping of draw buffer locations to color attachments
|
|
54
|
-
|
|
55
|
-
if (!isDefaultFramebuffer) {
|
|
54
|
+
if (!isDefaultFramebuffer && webglFramebuffer?.colorAttachments.length) {
|
|
56
55
|
const drawBuffers = webglFramebuffer.colorAttachments.map((_, i) => GL.COLOR_ATTACHMENT0 + i);
|
|
57
56
|
this.device.gl.drawBuffers(drawBuffers);
|
|
58
|
-
} else {
|
|
59
|
-
// Default framebuffer only supports GL.BACK/GL.NONE draw buffers
|
|
60
|
-
// passed through an explicit framebuffer wrapper.
|
|
57
|
+
} else if (isDefaultFramebuffer) {
|
|
58
|
+
// Default framebuffer only supports GL.BACK/GL.NONE draw buffers
|
|
61
59
|
this.device.gl.drawBuffers([GL.BACK]);
|
|
62
60
|
}
|
|
63
61
|
|