I’ve tried to do 2D text in my 3D world, but I with no success so far.
I’ve tried going to gluOrtho2D and then using glRasterPos2D to place the text, and then glutBitmapCharacter to actually draw the text.
The problem is, I don’t exactly know how to set up gluOrtho2D, and then what coordinates to put in glRasterPos2D (I’ve tried 0,1,0,1 in gluOrtho2D and then something like 0.4,0.4 in glRasterPos2D but that didn’t work).
If someone can please point me in the right direction, including what matrix operations I need to do (like glPushMatrix or glMatrixMode to go to the projection matrix maybe?).
I’m trying to do the same, raster a 2d text. It works fine, but after restoring the projection and modelview matrixs something doesn’t work properly with selection. I always get a hit wherever I put the mouse pointer. It seems like something is wrong with the modelview restoration. I don’t know what I’m missing.