Skip to content

Commit

Permalink
Adjust GL raster text and render statistics line
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
Matthew Mott committed Sep 8, 2020
1 parent 7f489c0 commit 470a99d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions radiant/camera/CamWnd.cpp
Expand Up @@ -895,13 +895,14 @@ void CamWnd::Cam_Draw()
glEnd();
}

glRasterPos3f(1.0f, static_cast<float>(_camera.height) - 1.0f, 0.0f);

GlobalOpenGL().drawString(_renderStats.getStatString());

glRasterPos3f(1.0f, static_cast<float>(_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<float>(_camera.height) - 4.0f, 0.0f);
std::string statString = render::View::getCullStats();
if (!statString.empty())
statString += " | ";
statString += _renderStats.getStatString();
GlobalOpenGL().drawString(statString);

drawTime();

Expand Down
2 changes: 1 addition & 1 deletion radiant/render/OpenGLModule.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit 470a99d

Please sign in to comment.