mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 09:48:44 +02:00
fix display name scaling
This commit is contained in:
parent
da05c26aad
commit
230d761ec3
1 changed files with 1 additions and 3 deletions
|
@ -678,9 +678,7 @@ void Avatar::renderDisplayName() {
|
||||||
glRotatef(glm::degrees(angle), 0.0f, 1.0f, 0.0f);
|
glRotatef(glm::degrees(angle), 0.0f, 1.0f, 0.0f);
|
||||||
|
|
||||||
float scaleFactor = calculateDisplayNameScaleFactor(textPosition, inHMD);
|
float scaleFactor = calculateDisplayNameScaleFactor(textPosition, inHMD);
|
||||||
glScalef(scaleFactor, scaleFactor, 1.0);
|
glScalef(scaleFactor, -scaleFactor, scaleFactor); // TextRenderer::draw paints the text upside down in y axis
|
||||||
|
|
||||||
glScalef(1.0f, -1.0f, 1.0f); // TextRenderer::draw paints the text upside down in y axis
|
|
||||||
|
|
||||||
int text_x = -_displayNameBoundingRect.width() / 2;
|
int text_x = -_displayNameBoundingRect.width() / 2;
|
||||||
int text_y = -_displayNameBoundingRect.height() / 2;
|
int text_y = -_displayNameBoundingRect.height() / 2;
|
||||||
|
|
Loading…
Reference in a new issue