#### Archived

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

# rasterpos,ortho, and fonts

## Recommended Posts

dfawcett    122
when in ortho mode(640,480), if i used rasterpos2i(320,240) does my text start in the middle of the screen? what should and should not be enabled when useing fonts?

##### Share on other sites
dfawcett    122
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 on other sites
tinak    122
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