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(); } }
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(); } }