I have a sample of combining ortho mode with projection mode (for example, to do the border around the screen a la Quake or Doom) here:
http://home.att.net/~tennisman2/TryingToCombine.zip
But I have a problem: It’s ignoring my call to glColor3f when I draw the bitmap text. No matter what I set the text comes out the same color. Here’s a code snippet:
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glViewport(0, 0, width, height);
glMatrixMode(GL_PROJECTION); glLoadIdentity();
glOrtho(0.0f, width - 1.0, 0.0, height - 1.0, -1.0, 1.0);
glMatrixMode(GL_MODELVIEW); glLoadIdentity();
glRasterPos2i(20,20);
glTranslatef(0.0f, 0.0f, 1.0f);
glDisable(GL_DEPTH_TEST);
glBindTexture(GL_TEXTURE_2D, textures[1]);
glColor3f(1.0f, 1.0f, 1.0f);
glBegin(GL_QUADS);
glTexCoord2f(1.0, 0.0);
[snip]
glVertex3f(200, 200 + bitmapData->sizeY, 0);
glEnd();
glColor3f(1.0f, 0.0f, 1.0f);
PrintString(listBase, “OpenGL Bitmap Fonts!”);
glEnable(GL_DEPTH_TEST);
Any ideas? I’d appreciate them!