_initContext()
    {
        const gl = this.gl;

        this.state.reset();

        if (this.screen)
        {
            this.screen.destroy();
        }

        this.screen = new RenderTarget(gl, gl.canvas.width, gl.canvas.height, RenderTarget.defaultScaleMode, true);

        this.state.setRenderTarget(this.screen);

        // this.resize(gl.canvas.width, gl.canvas.height);

        this.onContextChange.dispatch(this);
    }
/**
     * Initializes the WebGL context.
     *
     * @private
     */
Initializes the WebGL context.
@private
Initializes the WebGL context . @private
_initContext()
    {
        const gl = this.gl;
        this.state.reset();
        if (this.screen)
        {
            this.screen.destroy();
        }
        this.screen = new RenderTarget(gl, gl.canvas.width, gl.canvas.height, RenderTarget.defaultScaleMode, true);
        this.state.setRenderTarget(this.screen);
        this.onContextChange.dispatch(this);
    }
_initContext ( ) { const gl = this . gl ; this . state . reset ( ) ; if ( this . screen ) { this . screen . destroy ( ) ; } this . screen = new RenderTarget ( gl , gl . canvas . width , gl . canvas . height , RenderTarget . defaultScaleMode , true ) ; this . state . setRenderTarget ( this . screen ) ; this . onContextChange . dispatch ( this ) ; }
Initializes the WebGL context.
Initializes the WebGL context .
// this.resize(gl.canvas.width, gl.canvas.height);