Esempio n. 1
0
        public static void Render(CharRenderBuffer <float> buffer)
        {
            char[] outputChars = buffer.GetRenderBuffer();
            int    cursorPos   = buffer.Width - 1;

            if (CRenderSettings.IsCountFrames)
            {
                cursorPos = DisplayString(outputChars, DisplayNumber(outputChars, cursorPos, _frameCounts) - 1, "Frame:") - 1;
            }
            if (CRenderSettings.IsShowFPS)
            {
                cursorPos = DisplayString(outputChars, DisplayNumber(outputChars, cursorPos, JMath.RoundToInt(1000f / DeltaMS)) - 1, "FPS:") - 1;
            }

            _frameCounts++;
            ConsoleExtension.Output(outputChars);
        }