contextRestored() {
        this.getExtensions();

        // set blend func
        this.setBlendFunc();

        // enable depth by default
        this.setDepthFunc();
        this.setDepthTest(true);

        // clear texture and programs cache
        this.cache.clear();

        // reset draw stacks
        this.scene.initStacks();

        // we need to reset everything : planes programs, shaders, buffers and textures !
        for(let i = 0; i < this.renderTargets.length; i++) {
            this.renderTargets[i]._restoreContext();
        }

        for(let i = 0; i < this.planes.length; i++) {
            this.planes[i]._restoreContext();
        }

        // same goes for shader passes
        for(let i = 0; i < this.shaderPasses.length; i++) {
            this.shaderPasses[i]._restoreContext();
        }

        // callback if everything is restored
        const isRestoredQueue = this.nextRender.add(() => {
            const isRestored = this.isContextexFullyRestored();
            if(isRestored) {
                isRestoredQueue.keep = false;

                // start drawing again
                this.state.isContextLost = false;

                if(this.onContextRestored) {
                    this.onContextRestored();
                }

                // we've changed the objects, keep Curtains class in sync with our renderer
                this.onSceneChange();

                // force next frame render whatever our drawing flag value
                this.needRender();
            }
        }, true);
    }
Called when the WebGL context is restored
*