PathfindingTest.Map.MiniMap.SetRenderTargets C# (CSharp) 메소드

SetRenderTargets() 개인적인 메소드

Sets the render target for scaling.
private SetRenderTargets ( Microsoft.Xna.Framework.Graphics.RenderTargetBinding &oldBindings, RenderTarget2D &newRenderTarget ) : void
oldBindings Microsoft.Xna.Framework.Graphics.RenderTargetBinding The old bindings that you need to reapply in the ResetRenderTargets function
newRenderTarget Microsoft.Xna.Framework.Graphics.RenderTarget2D The newly created render target on the Graphics Card
리턴 void
        private void SetRenderTargets(out RenderTargetBinding[] oldBindings, out RenderTarget2D newRenderTarget)
        {
            oldBindings = Game1.GetInstance().GraphicsDevice.GetRenderTargets();
            Game1.GetInstance().GraphicsDevice.SetRenderTargets(null);
            // Get the Texture with the screen drawn on it
            // Create the Render Target to draw the scaled Texture to
            newRenderTarget =
                new RenderTarget2D(Game1.GetInstance().GraphicsDevice, (int)this.miniMapTileSize.X, (int)this.miniMapTileSize.Y);
            // Set the given Graphics Device to draw to the new Render Target
            Game1.GetInstance().GraphicsDevice.SetRenderTarget(newRenderTarget);
        }