activate()
    {
        const gl = this.gl;

        this.framebuffer.bind();

        this.calculateProjection(this.destinationFrame, this.sourceFrame);

        if (this.transform)
        {
            this.projectionMatrix.multiply(this.transform);
        }

        if (this.destinationFrame.equals(this.sourceFrame))
        {
            gl.enable(gl.SCISSOR_TEST);
            gl.scissor(
                this.destinationFrame.x | 0,
                this.destinationFrame.y | 0,
                (this.destinationFrame.width/* * this.resolution*/) | 0,
                (this.destinationFrame.height/* * this.resolution*/) | 0
            );
        }
        else
        {
            gl.disable(gl.SCISSOR_TEST);
        }

        // set viewport to this target
        gl.viewport(
            this.destinationFrame.x | 0,
            this.destinationFrame.y | 0,
            (this.destinationFrame.width/* * this.resolution*/) | 0,
            (this.destinationFrame.height/* * this.resolution*/) | 0
        );

        return this;
    }
/**
     * Binds the buffers and initialises the viewport.
     *
     * @return {RenderTarget} Returns itself.
     */
Binds the buffers and initialises the viewport.
@return {RenderTarget} Returns itself.
Binds the buffers and initialises the viewport . @return { RenderTarget } Returns itself .
activate()
    {
        const gl = this.gl;
        this.framebuffer.bind();
        this.calculateProjection(this.destinationFrame, this.sourceFrame);
        if (this.transform)
        {
            this.projectionMatrix.multiply(this.transform);
        }
        if (this.destinationFrame.equals(this.sourceFrame))
        {
            gl.enable(gl.SCISSOR_TEST);
            gl.scissor(
                this.destinationFrame.x | 0,
                this.destinationFrame.y | 0,
                (this.destinationFrame.width) | 0,
                (this.destinationFrame.height) | 0
            );
        }
        else
        {
            gl.disable(gl.SCISSOR_TEST);
        }
        gl.viewport(
            this.destinationFrame.x | 0,
            this.destinationFrame.y | 0,
            (this.destinationFrame.width) | 0,
            (this.destinationFrame.height) | 0
        );
        return this;
    }
activate ( ) { const gl = this . gl ; this . framebuffer . bind ( ) ; this . calculateProjection ( this . destinationFrame , this . sourceFrame ) ; if ( this . transform ) { this . projectionMatrix . multiply ( this . transform ) ; } if ( this . destinationFrame . equals ( this . sourceFrame ) ) { gl . enable ( gl . SCISSOR_TEST ) ; gl . scissor ( this . destinationFrame . x | 0 , this . destinationFrame . y | 0 , ( this . destinationFrame . width ) | 0 , ( this . destinationFrame . height ) | 0 ) ; } else { gl . disable ( gl . SCISSOR_TEST ) ; } gl . viewport ( this . destinationFrame . x | 0 , this . destinationFrame . y | 0 , ( this . destinationFrame . width ) | 0 , ( this . destinationFrame . height ) | 0 ) ; return this ; }
Binds the buffers and initialises the viewport.
Binds the buffers and initialises the viewport .
/* * this.resolution*/ /* * this.resolution*/ // set viewport to this target /* * this.resolution*/ /* * this.resolution*/