mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 19:02:55 +02:00
Fixing scaling to lineHeight
This commit is contained in:
parent
42703d2234
commit
1af2b65714
1 changed files with 2 additions and 2 deletions
|
@ -63,8 +63,8 @@ void RenderableTextEntityItem::render(RenderArgs* args) {
|
||||||
glTranslatef(-(halfDimensions.x - leftMargin), halfDimensions.y - topMargin, 0.0f);
|
glTranslatef(-(halfDimensions.x - leftMargin), halfDimensions.y - topMargin, 0.0f);
|
||||||
glm::vec4 textColor(toGlm(getTextColorX()), alpha);
|
glm::vec4 textColor(toGlm(getTextColorX()), alpha);
|
||||||
// this is a ratio determined through experimentation
|
// this is a ratio determined through experimentation
|
||||||
static const float testScaleFactor = 0.01f;
|
const float scaleFactor = 0.1f * _lineHeight;
|
||||||
glScalef(testScaleFactor, -testScaleFactor, testScaleFactor);
|
glScalef(scaleFactor, -scaleFactor, scaleFactor);
|
||||||
textRenderer->draw(0, 0, _text, textColor);
|
textRenderer->draw(0, 0, _text, textColor);
|
||||||
}
|
}
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
|
Loading…
Reference in a new issue