コード例 #1
0
            public override void Draw(GameTime gameTime)
            {
                frameCounter++;
                surface.Clear();
                surface.Print(0, 0, $"fps: {frameRate}", Color.White, Color.Black);
                surface.Draw(gameTime.ElapsedGameTime);

                Global.GraphicsDevice.SetRenderTarget(null);
                Global.SpriteBatch.Begin(SpriteSortMode.Deferred, BlendState.NonPremultiplied, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullNone);
                Global.SpriteBatch.Draw(surface.LastRenderResult, Vector2.Zero, Color.White);
                Global.SpriteBatch.End();
            }