Shared context issue in 118+
See original GitHub issueDescription of the problem
In version 118+, Three.js stops rendering when it shares a WebGL context with Pixi.js. In versions 117.1 and below, it works correctly. Specifically, doing
threeRenderer.state.reset();
threeRenderer.render(myScene, myCamera);
pixiRenderer.reset();
is enough to cause the three.js renderer to not render anything on subsequent render attempts (although it clears the canvas correctly).
Codepen: https://codepen.io/andrewstart/pen/XWdybMw?editors=0010 (in settings, change the version of three.js to 117.1 to see a 3D ball correctly rendering behind the bunnies). This example doesn’t seem to log any warnings, but in my actual project rendering a SphereBufferGeometry results in GL_INVALID_OPERATION: No element array buffer and no pointer.
Three.js version
- First appears in 118.0, still present in 120.1.
Browser
- All of them - Tested in Chrome/Firefox, at least
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
How to share context in a cronworkflow? · Issue #118 - GitHub
Suppose I have a cronworkflow to execute a hive sql each day, and do some further process. ws = CronWorkflowService(.
Read more >Enduring Word Bible Commentary Psalm 118
David Guzik commentary on Psalm 118, which contains the Old Testament ... Neither the common man or even princes among men could help...
Read more >Shared partisanship dramatically increases social tie ... - PNAS
Americans are much more likely to be socially connected to copartisans, both in daily life and on social media. However, this observation ...
Read more >Now for Me, Later for Us? Effects of Group Context on ...
Volume 26, Issue 2 p. 118-127 ... Practical implications of the fact that shared consequences can increase individual self-control are also ...
Read more >java.lang.ClassNotFoundException: org.springframework.web ...
I got this when I had the lib in my build path, but not in my deployment assembly. Also when I had a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Nope, sticking with 117.1
Since
r118
three.js
uses a WebGL 2 rendering context by default. I could imagine that this breaks your usage pattern. You should be able to avoid a breakage by using WebGL1Renderer.BTW: From my point of view, it is not recommended to share a WebGL context across different engines.
three.js
caches WebGL state information. If a cached information is changed by a different renderer, the final behavior is undefined.