WebGL - Handling Lost Context

In this episode, I discuss how to handle lost context in WebGL.

Concepts:
* When the GPU is using too many resources (perhaps another tab is using the GPU as well), and the browser frees up resources to regain control.
* gl.isContextLost()
* gl.getExtension('WEBGL_lose_context').loseContext()
* gl.getExtension('WEBGL_lose_context').restoreContext()

## RESOURCES:

* https://github.com/davidwparker/programmingtil-webgl/tree/master/0092-lost-context-part-1
* https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_lose_context/loseContext
* https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_lose_context/restoreContext

© programmingtil.com