Ejemplo n.º 1
0
 public AeGraphicsSettings(AeGraphics graphics)
 {
     _graphics = graphics;
     _graphics.GraphicsSettings = this;
     graphicsDevice             = _graphics.GraphicsDeviceManager;
     GameResolutionWidth        = graphicsDevice.PreferredBackBufferWidth;
     GameResolutionHeight       = graphicsDevice.PreferredBackBufferHeight;
     CompareGameToScreenResolution();
     ClearColorFinalRenderTarget = Color.Black;
     ScalingMode = AeScalingMode.CLOSEST_MULTIPLE_OF_2;
     SetGameResolution(1280, 720);
     SetScreenResolution(1280, 720);
 }
Ejemplo n.º 2
0
        public AeRenderer(AeGraphics graphics)
        {
            _graphics          = graphics;
            _graphics.Renderer = this;

            _finalPassTarget = new RenderTarget2D(
                _graphics.GraphicsDeviceManager.GraphicsDevice,
                _graphics.GraphicsSettings.GameResolutionWidth,
                _graphics.GraphicsSettings.GameResolutionHeight,
                false,
                SurfaceFormat.Color,
                DepthFormat.None,
                0,
                RenderTargetUsage.DiscardContents);

            _graphics.GraphicsSettings.AddGameResolutionChangeCallback(
                delegate()
            {
                _finalPassTarget = new RenderTarget2D(
                    _graphics.GraphicsDeviceManager.GraphicsDevice,
                    _graphics.GraphicsSettings.GameResolutionWidth,
                    _graphics.GraphicsSettings.GameResolutionHeight);
            });
        }