Converting between raster and model translate coordinates

Hi all,

Very new to this so forgive me if you can’t quite understand what I am writing. I have a screen where I am drawing a number of squares and need to attach to each of them some text. The screen uses the following:
glviewport(0, 0, self.width, self.height)
gluPerspective(45.0, self.width/self.height, 0.1, 1000)
I am using glutBitmapCharacter() to draw the text which requires raster positioning, but the squares are positioned using glTranslatef(). Is there any easy way to convert between these two representations so that I can draw the text onto these squares (the number and position of these squares varies at run-time so it can’t be hard coded).


Use glRasterPos to position your text. It applies the same transformations as glVertex to calculate the screen position.

Thanks, i think I must have got myself a bit confused (hence the stupid question) - it was a problem with my code, but all sorted now

Cheers :slight_smile: