mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-23 12:39:24 -05:00
Apply new changes to Fontrendering
This commit is contained in:
+1
-1
Submodule ext/ghoul updated: 56bde8fbde...e2170b1bd2
@@ -595,7 +595,7 @@ void OpenSpaceEngine::loadFonts2() {
|
||||
}
|
||||
|
||||
LINFO("Registering font '" << font << "' with key '" << key << "'");
|
||||
bool success = _fontManager->registerFont(key, font);
|
||||
bool success = _fontManager->registerFontPath(key, font);
|
||||
|
||||
if (!success)
|
||||
LERROR("Error registering font '" << font << "' with key '" << key << "'");
|
||||
@@ -605,7 +605,7 @@ void OpenSpaceEngine::loadFonts2() {
|
||||
if (!initSuccess)
|
||||
LERROR("Error initializing default font renderer");
|
||||
|
||||
ghoul::fontrendering::FontRenderer::defaultRenderer()->setWindowSize(glm::vec2(_windowWrapper->currentWindowResolution()));
|
||||
ghoul::fontrendering::FontRenderer::defaultRenderer().setWindowSize(glm::vec2(_windowWrapper->currentWindowResolution()));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -462,14 +462,17 @@ void RenderEngine::render(const glm::mat4 &projectionMatrix, const glm::mat4 &vi
|
||||
glm::vec4 targetColor(0.00, 0.75, 1.00, 1);
|
||||
double dt = Time::ref().deltaTime();
|
||||
|
||||
if (_mainFont) {
|
||||
using namespace ghoul::fontrendering;
|
||||
FontRenderer::defaultRenderer()->render(
|
||||
FontRenderer::defaultRenderer().render(
|
||||
*_mainFont,
|
||||
glm::vec2(10.f, static_cast<float>(startY - font_size_mono * line++ * 2)),
|
||||
glm::vec4(1.f),
|
||||
glm::vec4(0.f, 0.f, 0.f, 1.f),
|
||||
"Simulation increment (s): %.0f",
|
||||
dt
|
||||
);
|
||||
}
|
||||
|
||||
// PrintColorTextArg(line++, "Simulation increment (s): %.0f", 10, glm::vec4(1), dt);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user