Raster Position

this is really an ongoing thing from a Post a few days ago:

What I want to do is display text in location x,y on the screen. I’ve finally managed to get some text on the screen, but if I don’t set the position then is moves across the bottom of the screen this disappears. If I do set the position, then nothing appears at all.
Here’s the code:

char output[MAX_LINE];
float raster[4];





So without the glRasterPosXi the code works, leaving me with no control over the text’s position. With the line, nothing appears at all.
thanks again folks


Check to see if the raster position will actually be on the screen. If the raster position is not on the screen, then ALL of the text drawn at that position will NOT be drawn.


I will do this, however:
if I remove the glRasterPos4i line, then it text appears at the bottom of the screen, therefore I’m partly confused as to why when I am setting the raster to itself why does my text disappear?



You aren’t setting it to itself.
You are getting floating point values but setting integer values. And that raster position that you send gets transformed by the current modelview matrix as well.