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.

isWebGL2 test failed unexpectedly

See original GitHub issue

https://github.com/mrdoob/three.js/blob/3a42fffb0635674a229249e6f8d1a7ffa50b7edf/src/renderers/webgl/WebGLCapabilities.js#L55 When the WebGLRenderer been created in a iframe/window, and its domElement appended to a parent DOM in another iframe/window, then isWebGL2 test will failed, because the actual constructor is window. WebGL2RenderingContext where window refers to the original window/iframe, so instanceof always returning false

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
Mugen87commented, Sep 17, 2022

We can reconsider this issue if more users run into it. For now, I would not prefer to exchange a simple instanceof check with an actual render to figure out the WebGL version.

0reactions
hxmwrcommented, Sep 17, 2022

Just change to isWebGL2 = true for this special situation, so I don’t need a library level fix for now. For the future maybe complie a small piece of GLSL which is webgl2 specific and then check the compile status to determine if a gl is really instance of webgl2. Thank you Mugen87 as always.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error creating WebGL context while testing TS in Jest
I'm trying to initialize WebGLRenderer in one of my test cases in Jest. But whenever I execute that test case, I'm greeted with...
Read more >
WebGL/oes-texture-half-float-linear.html at main - GitHub
if (wtu.isWebGL2(gl)). throw new Error("OES_texture_half_float_linear is core in WebGL 2.");. const ext = gl.getExtension("OES_texture_half_float");.
Read more >
third_party/blink/renderer/modules/webgl ... - Google Git
String("bindToCurrentThread failed: " + String(gl_info.error_message));. } ... Call the DrawingBufferClient method to restore scissor test, mask, and.
Read more >
948406 | application timed out after 330 seconds with no output
Intermittent TEST-UNEXPECTED-FAIL | tests/content/canvas/test/reftest/webgl-orientation-test.html?readback&__&_____&preserve | application timed ...
Read more >
webgl_rendering_context_base.cc - Chromium Code Search
Shader compilation must fail for invalid constructs farther in the. // pipeline. ... Call the DrawingBufferClient method to restore scissor test, mask, and....
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