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.

Optimizing WebGL contexts

See original GitHub issue

At the moment, when using a large number of skinview3d instances, we will get the error: Too many active WebGL contexts. Oldest context will be lost. image

Is there a way to optimize the WebGL contexts on the library side?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

yushijinhuncommented, Sep 6, 2020

@MrZillaGold If you need static skin previews (without animation or interaction), it is unnecessary to create multiple skinview3d instances. You can render the player to a canvas which is not attached to the document, and then take a screenshot using .toDataURL().

But currently it’s a bit inconvenient because skinview3d automatically attaches the canvas to the document. This problem will be solved in #73.

yushijinhuncommented, Sep 9, 2020

I added a new example to show how to generate static previews (by taking screenshots). source; demo;

Read more comments on GitHub >

github_iconTop Results From Across the Web

WebGL best practices - Web APIs - MDN Web Docs - Mozilla
Address and eliminate WebGL errors · Understand extension availability · Understand system limits · Avoid invalidating FBO attachment bindings.
Read more >
Optimizing WebGL — Emscripten 3.1.26-git (dev) documentation
This optimization guide focuses on different techniques that have been found useful ... Check the WebGL context error reason if WebGL initialization fails, ......
Read more >
Debugging and Optimizing WebGL Applications - Google Slides
webgl -debug.js helps simulate lost context events to make your app more robust ... The best optimizations are often domain/target specific.
Read more >
WebGL performance considerations - Unity - Manual
To improve performance, set Exception support to None in the Player settings for WebGL by expanding Other Settings > Stack Trace. Profiling WebGL....
Read more >
WebGL Multiple Views, Multiple Canvases
First, Each canvas would require a different WebGL context WebGL contexts can not share resources so you'd have to compile shaders for each...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found