You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm new to OSG in general, so this is question may come off as stupid, but I couldn't find out what the best way to achieve what I wanted is. I have an osg::Geode with 2 different blocks of osgText::Text that needs to be displayed on the screen of a full-screen application. The problem is that it looks fine on 1920x1080 displays, but when I tried it on a 4k display, the text is small, almost to the point of being illegible. So, I want to scale the text size according to the resolution, so that it stays approximately the same size.
Now, I have a solution of sorts where I just scale it using text->setCharacterSize() and the resolution. But, I feel like there might be a better way to do this. One problem is that some of the displays can also be vertical, so just scaling the text using osg::Matrix::scale() ended up with the text going out of the screen on the vertical display. What would be a good way to do this?
On another note, what exactly is the difference between the CharacterSizeModes()? Couldn't really find any documentation about that. As far as I can tell, using SCREEN_COORDS scales it down according to...something. What is that something? Again, this is probably because I'm new, so sorry if this is a stupid question. :P
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I'm new to OSG in general, so this is question may come off as stupid, but I couldn't find out what the best way to achieve what I wanted is. I have an osg::Geode with 2 different blocks of osgText::Text that needs to be displayed on the screen of a full-screen application. The problem is that it looks fine on 1920x1080 displays, but when I tried it on a 4k display, the text is small, almost to the point of being illegible. So, I want to scale the text size according to the resolution, so that it stays approximately the same size.
Now, I have a solution of sorts where I just scale it using
text->setCharacterSize()
and the resolution. But, I feel like there might be a better way to do this. One problem is that some of the displays can also be vertical, so just scaling the text using osg::Matrix::scale() ended up with the text going out of the screen on the vertical display. What would be a good way to do this?On another note, what exactly is the difference between the CharacterSizeModes()? Couldn't really find any documentation about that. As far as I can tell, using SCREEN_COORDS scales it down according to...something. What is that something? Again, this is probably because I'm new, so sorry if this is a stupid question. :P
Beta Was this translation helpful? Give feedback.
All reactions