Beispiel #1
0
        protected override void Draw(GameTime gameTime)
        {
            Device.Clear(new SharpDX.Color4(SRGBLinearConverter.SRGBtoLinear(0.2f), 0.0f, SRGBLinearConverter.SRGBtoLinear(0.2f), 1.0f));

            game.Draw(new FearGameTimer(gameTime));

            base.Draw(gameTime);
        }
Beispiel #2
0
        private void SwitchToTopRenderTarget()
        {
            RenderTarget target = renderTargetStack.Peek();

            device.SetViewport(target.Viewport);
            device.SetRenderTargets(target.DepthStencil, target.RenderTargetView);

            if (target.DepthStencil != null)
            {
                device.Clear(target.DepthStencil, DepthStencilClearFlags.Depth | DepthStencilClearFlags.Stencil, 1.0f, 0);
            }
            if (target.RenderTargetView != null)
            {
                device.Clear(target.RenderTargetView, new SharpDX.Color4(SRGBLinearConverter.SRGBtoLinear(0.2f), 0.0f, SRGBLinearConverter.SRGBtoLinear(0.2f), 1.0f));
            }
        }
Beispiel #3
0
 public void Draw(GameTimer gameTime)
 {
     fearEngine.Device.Clear(new SharpDX.Color4(SRGBLinearConverter.SRGBtoLinear(0.2f), 0.0f, SRGBLinearConverter.SRGBtoLinear(0.2f), 1.0f));
 }