Hi,
is there any way to get a GraphicsDevice’s current RenderTarget?
Hi,
is there any way to get a GraphicsDevice’s current RenderTarget?
Yeah, well. I wanna do something like this:
var oldTarget = _spriteBatch.GraphicsDevice.GetRenderTargets();
_spriteBatch.GraphicsDevice.SetRenderTarget(target);
_spriteBatch.Begin(effect: effect);
_spriteBatch.Draw(texture, Vector2.Zero,Color.White);
_spriteBatch.End();
_spriteBatch.GraphicsDevice.SetRenderTarget(oldTarget);
How to get a reference to the current renderTarget so I can set it as a render target later on?
Nevermind. I’m stupid.
Obviously if you use “GetRenderTargetS” you have to use “SetRenderTargetS”