Sign in to follow this  
asafdav2

positioning text

Recommended Posts

asafdav2    122
hello to display text, i'm using glRasterPos2f(,) to set the position and then glutBitmapCharacter to actually render the text. the problem is that the position depends on the window size. if, for example, i want a message to appear in the exact middle of the screen - it moves a bit when changing the window size. any idea how to solve it?

Share this post


Link to post
Share on other sites
CrimsonSun    336
Store your window's height and width values (modify them when your window is resized such that these variables are always "correct"..) and computer the relevant coordinates from there.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this