Paint.BaseGame.CreateRenderTargets C# (CSharp) Method

CreateRenderTargets() protected method

Creates the canvas.
protected CreateRenderTargets ( ) : void
return void
        protected virtual void CreateRenderTargets()
        {
            this.InMemoryToolboxRenderTarget = new RenderTarget2D(
                this.GraphicsDeviceManager.GraphicsDevice,
                this.ImageStateData.Width,
                this.ImageStateData.Height);

            this.InMemoryCanvasRenderTarget = new RenderTarget2D(
                this.GraphicsDeviceManager.GraphicsDevice,
                this.ImageStateData.Width,
                this.ImageStateData.Height);

            // Strange behaviour where the image used by the previous 'Game' is left in the RenderTarget2D
            // therefore we blank the rendertarget first to ensure nothing left behind
            this.BlankRenderTarget(this.InMemoryCanvasRenderTarget);
        }