Webgl context lost

I have a kitchen scene 6mb and have 20 mesh. I load all mesh textures when scene first loaded before the start render. So thats means create scene and load all textures on mesh and start render. But sometimes it is return webgl context lost error. What is triggering this error? Is it better to render after each texture upload? I start the rendering process after loading all the textures.Which is better and is a have solution for solve context lost error?

The context loss probably happens because you allocate too much resources for your app.

Try to only create the resources which you actually need for your current scene. And also free resources if you don’t need them anymore.

1 Like