@luma.gl/webgl 9.1.3 → 9.1.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/resources/webgl-render-pass.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-render-pass.js +9 -6
- package/dist/adapter/resources/webgl-render-pass.js.map +1 -1
- package/dist/dist.dev.js +10 -7
- package/dist/dist.min.js +2 -2
- package/dist/index.cjs +8 -5
- package/dist/index.cjs.map +2 -2
- package/package.json +3 -3
- package/src/adapter/resources/webgl-render-pass.ts +11 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luma.gl/webgl",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.5",
|
|
4
4
|
"description": "WebGL2 adapter for the luma.gl core API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"@luma.gl/core": "^9.1.0"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@luma.gl/constants": "9.1.
|
|
46
|
+
"@luma.gl/constants": "9.1.5",
|
|
47
47
|
"@math.gl/types": "^4.1.0",
|
|
48
48
|
"@probe.gl/env": "^4.0.8"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "83b1bfdcca2cacd0d614982a7dd000bec80d1a6f"
|
|
51
51
|
}
|
|
@@ -9,6 +9,7 @@ import {GL, GLParameters} from '@luma.gl/constants';
|
|
|
9
9
|
import {withGLParameters} from '../../context/state-tracker/with-parameters';
|
|
10
10
|
import {setGLParameters} from '../../context/parameters/unified-parameter-api';
|
|
11
11
|
import {WEBGLQuerySet} from './webgl-query-set';
|
|
12
|
+
import {WEBGLFramebuffer} from './webgl-framebuffer';
|
|
12
13
|
|
|
13
14
|
const COLOR_CHANNELS = [0x1, 0x2, 0x4, 0x8]; // GPUColorWrite RED, GREEN, BLUE, ALPHA
|
|
14
15
|
|
|
@@ -41,13 +42,16 @@ export class WEBGLRenderPass extends RenderPass {
|
|
|
41
42
|
this.setParameters({viewport, ...this.props.parameters});
|
|
42
43
|
|
|
43
44
|
// Specify mapping of draw buffer locations to color attachments
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
const webglFramebuffer = this.props.framebuffer as WEBGLFramebuffer;
|
|
46
|
+
if (webglFramebuffer?.handle) {
|
|
47
|
+
if (this.props.framebuffer) {
|
|
48
|
+
const drawBuffers = this.props.framebuffer.colorAttachments.map(
|
|
49
|
+
(_, i) => GL.COLOR_ATTACHMENT0 + i
|
|
50
|
+
);
|
|
51
|
+
this.device.gl.drawBuffers(drawBuffers);
|
|
52
|
+
} else {
|
|
53
|
+
this.device.gl.drawBuffers([GL.BACK]);
|
|
54
|
+
}
|
|
51
55
|
}
|
|
52
56
|
|
|
53
57
|
// Hack - for now WebGL draws in "immediate mode" (instead of queueing the operations)...
|