void Draw()
 {
     if (drawfpsgraph || drawfpstext)
     {
         m.OrthoMode();
         if (drawfpsgraph)
         {
             DrawGraph();
         }
         if (drawfpstext)
         {
             m.Draw2dText(fpstext, 20, 20, ChatFontSize);
         }
         m.PerspectiveMode();
     }
 }
Exemple #2
0
    void Draw()
    {
        if (ENABLE_STATS)
        {
            // switch to orthographic mode
            m.OrthoMode();

            if (DRAW_FPS_GRAPH || DRAW_FPS_TEXT)
            {
                if (DRAW_FPS_GRAPH)
                {
                    DrawFpsGraph(m.GetWindowWidth() - MaxCount - 20, 20);
                }
                if (DRAW_FPS_TEXT)
                {
                    for (int i = 0; i < StatsLineCount; i++)
                    {
                        m.Draw2dText(StatsLines[i], 20 + 200 * (i / 4), 20 + 1.5f * (i % 4) * displayFont.size, displayFont);
                    }
                }
            }

            // draw additional graphs
            DrawChunkGraph(m.GetWindowWidth() - MaxCount - 20, 120);
            DrawPingGraph(m.GetWindowWidth() - MaxCount - 20, 220);

            // switch back to perspective mode
            m.PerspectiveMode();
        }
    }