question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Shared context issue in 118+

See original GitHub issue
Description 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:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
andrewstartcommented, Oct 5, 2020

Nope, sticking with 117.1

2reactions
Mugen87commented, Sep 21, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found