Пример #1
0
        public static void Draw(GameTime gameTime)
        {
            GameTimeElapsedRender = gameTime.ElapsedGameTime.TotalSeconds;
            GameTimeDraw          = gameTime;

            ConsoleRenderStack.Render();
            EngineDrawFrame?.Invoke(null, System.EventArgs.Empty);
        }
Пример #2
0
        public static void Draw(GameTime gameTime)
        {
            GameTimeElapsedRender = gameTime.ElapsedGameTime.TotalSeconds;
            GameTimeDraw          = gameTime;

            if (DoRender)
            {
                Device.SetRenderTarget(renderTarget);
                ConsoleRenderStack.Render();
                Device.SetRenderTarget(null);

                // Render based on full screen settings

                renderBatch.Begin(SpriteSortMode.Deferred, BlendState.NonPremultiplied, SamplerState.PointClamp, DepthStencilState.DepthRead, RasterizerState.CullNone);
                renderBatch.Draw(renderTarget, RenderRect, Color.White);
                renderBatch.End();
            }

            EngineDrawFrame?.Invoke(null, System.EventArgs.Empty);
        }