Esempio n. 1
0
        public UIRenderPlane(UISpriteBatch batch, Promise <Texture2D> texture)
        {
            this.GD      = batch.GraphicsDevice;
            this.Target  = batch.GetBuffer();
            this.Texture = texture;
            this.Batch   = batch;

            if (!UISpriteBatch.Invalidated)
            {
                /** Switch the render target **/
                Batch.Pause();
                GD.SetRenderTarget(Target);
                GD.Clear(Color.Transparent);
                Batch.Resume();
            }
        }
Esempio n. 2
0
        public UIRenderPlane(UISpriteBatch batch, Promise<Texture2D> texture)
        {
            this.GD = batch.GraphicsDevice;
            this.Target = batch.GetBuffer();
            this.Texture = texture;
            this.Batch = batch;

            if(!UISpriteBatch.Invalidated)
            {
                /** Switch the render target **/
                Batch.Pause();
                GD.SetRenderTarget(Target);
                GD.Clear(Color.Transparent);
                Batch.Resume();
            }
        }