Jeff Saremi
Jeff Saremi

Reputation: 3024

How to handle a webglcontextrestored event

What is the right way of dealing with a context restored event? Do i go ahead and create a new WebGL Rendering Context? What happens to all cached textures, programs, shaders that I had?

Upvotes: 0

Views: 136

Answers (1)

user128511
user128511

Reputation:

When you lose the webgl context all your textures, programs, shaders, renderbuffers and buffers are gone.

The webglcontextrestored event is basically just an event telling you you have a new webgl context, start over.

Upvotes: 2

Related Questions