WebGLRenderer: WebGL fallback from WebGL2 does not honor context attributes
See original GitHub issueConsequently, the attributes must be repeated to take effect.
var canvas = document.createElement( 'canvas' );
var context = canvas.getContext( 'webgl2', { alpha: true } );
renderer = new THREE.WebGLRenderer( { canvas: canvas, context: context, alpha: true } );
- [ x ] Dev
- [ x ] r115
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
WebGLRenderer – three.js docs
The WebGL renderer displays your beautifully crafted scenes using WebGL. ... If not passed in here, a new canvas element will be created....
Read more >WebGL Specification - Khronos Registry
The actual context parameters are set to the attributes of the created drawing buffer. The alpha , premultipliedAlpha and preserveDrawingBuffer ...
Read more >Three.js detect webgl support and fallback to regular canvas
Yes, it's possible. You can use CanvasRenderer instead of WebGLRenderer . About WebGL detection: 1) Read this WebGL wiki article: ...
Read more >WebGL2RenderingContext - Web APIs | MDN
Chrome Edge
WebGL2RenderingContext Full support. Chrome56. Toggle history Full support. Edge79. T...
activeTexture Full support. Chrome56. Toggle history Full support. Edge79. T...
attachShader Full support. Chrome56....
Read more >layers.amd-switchable-gfx.enabled - ADMX Help
Registry Hive, HKEY_LOCAL_MACHINE. Registry Path, Software\Policies\Mozilla\lockPref. Value Name, layers.amd-switchable-gfx.enabled. Value Type, REG_DWORD.
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
This is messy… Maybe it’s time to start supporting WebGL2 by default?
Agree that a change needs to be made (default webgl2 sounds great) but, until then, it is possible to use ES6 syntax to work around the issue: