When i put my text rendering code between my two functions which enable and disable 2D drawing, my text doesnt appear. here is the code for my text function:
void GLPrintString(unsigned int Font, char *str)
{
if ((Font == 0) || (str == NULL))
return;
glPushAttrib(GL_LIST_BIT);
glListBase(Base - 32);
glCallLists(strlen(str), GL_UNSIGNED_BYTE, str);
glPopAttrib();
}
And my 2D drawing functions:
void GLEnable2D(long ScreenResX, long ScreenRezY)
{
int vPort[4];
glGetIntegerv(GL_VIEWPORT, vPort);
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
glOrtho(0, ScreenResX, ScreenRezY, 0, -10, 10);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
}
void GLDisable2D()
{
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
}
Any help would be REALY appreciated, the sooner i get this working, the sooner i can start major work on my game =D.