isWebGL2 test failed unexpectedly
See original GitHub issuehttps://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:
- Created a year ago
- Reactions:1
- Comments:5
Top 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 >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
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.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 agl
is really instance of webgl2. Thank you Mugen87 as always.