From 470a99d9f8c7e89c5518b09bbb73e9aad5c1a369 Mon Sep 17 00:00:00 2001 From: Matthew Mott Date: Tue, 8 Sep 2020 20:14:20 +0100 Subject: [PATCH] Adjust GL raster text and render statistics line Increase the font to 14 pixels (from 12) and format the render statistics on a single line. Since we're still using evil hard-coded pixel sizes there is a limit to how much we can tweak this (the same font is used for drawing other text such as grid coordinates and brush bounds). --- radiant/camera/CamWnd.cpp | 15 ++++++++------- radiant/render/OpenGLModule.cpp | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/radiant/camera/CamWnd.cpp b/radiant/camera/CamWnd.cpp index f0fe08b152..58d2c990f1 100644 --- a/radiant/camera/CamWnd.cpp +++ b/radiant/camera/CamWnd.cpp @@ -895,13 +895,14 @@ void CamWnd::Cam_Draw() glEnd(); } - glRasterPos3f(1.0f, static_cast(_camera.height) - 1.0f, 0.0f); - - GlobalOpenGL().drawString(_renderStats.getStatString()); - - glRasterPos3f(1.0f, static_cast(_camera.height) - 11.0f, 0.0f); - - GlobalOpenGL().drawString(render::View::getCullStats()); + // Render the stats and timing text. This may include culling stats in + // debug builds. + glRasterPos3f(4.0f, static_cast(_camera.height) - 4.0f, 0.0f); + std::string statString = render::View::getCullStats(); + if (!statString.empty()) + statString += " | "; + statString += _renderStats.getStatString(); + GlobalOpenGL().drawString(statString); drawTime(); diff --git a/radiant/render/OpenGLModule.cpp b/radiant/render/OpenGLModule.cpp index 58294f59e9..7d13129a89 100644 --- a/radiant/render/OpenGLModule.cpp +++ b/radiant/render/OpenGLModule.cpp @@ -78,7 +78,7 @@ void OpenGLModule::sharedContextCreated() } // Initialise the font before firing the extension initialised signal - _font.reset(new wxutil::GLFont(wxutil::GLFont::FONT_SANS, 12)); + _font.reset(new wxutil::GLFont(wxutil::GLFont::FONT_SANS, 14)); // This call will automatically realise the render system GlobalRenderSystem().extensionsInitialised();