Fixing scaling to lineHeight

This commit is contained in:
Brad Davis 2015-02-03 22:21:32 -08:00
parent 42703d2234
commit 1af2b65714

View file

@ -63,8 +63,8 @@ void RenderableTextEntityItem::render(RenderArgs* args) {
glTranslatef(-(halfDimensions.x - leftMargin), halfDimensions.y - topMargin, 0.0f);
glm::vec4 textColor(toGlm(getTextColorX()), alpha);
// this is a ratio determined through experimentation
static const float testScaleFactor = 0.01f;
glScalef(testScaleFactor, -testScaleFactor, testScaleFactor);
const float scaleFactor = 0.1f * _lineHeight;
glScalef(scaleFactor, -scaleFactor, scaleFactor);
textRenderer->draw(0, 0, _text, textColor);
}
glPopMatrix();