Archived

This topic is now archived and is closed to further replies.

dfawcett

rasterpos,ortho, and fonts

Recommended Posts

i should ask more questions more often, every time i ask something i end up figureing things out, man this one was pure luck


glPushMatrix();
glColor3f(255,255,255);
glDisable(GL_DEPTH_TEST);
glDisable(GL_BLEND);
//glBlendFunc(GL_SRC_ALPHA,GL_ONE);
glEnable(GL_TEXTURE_2D);
glRasterPos2i(100,100);
//glTranslatef(100,100,0);
glPushAttrib(GL_LIST_BIT);
glListBase(g_FontListID);
glCallLists(5,GL_UNSIGNED_BYTE,"hello");
glPopAttrib();
//glEnable(GL_DEPTH_TEST);
//glDisable(GL_TEXTURE_2D);
glDisable(GL_BLEND);
glPopMatrix();


i had to play around with a few this but this is the final result that got text to show up where i want it. thanks for your help, you guys never fail me LOL

Share this post


Link to post
Share on other sites
Thanks for this, I was having problems using fonts in my ortho scene without causing problems elsewhere. I even managed to get the code down to :

glPushMatrix();
glColor3f(255,255,255);
glRasterPos2i(0,395);
glPrint(0,430,"Place some text here!!");
glPopMatrix();


Unfortunately the color doesn''t want to work and the font stays black for some reason. Oh well, something else for me to figure out.

Tina

Share this post


Link to post
Share on other sites