Viewport viewing text?

Hi all,

I have 2qn.
a perspective viewport
and i wish to have some text appearing on the screen.
How can I do that?
I tried the following code on ortho view and it works but not on my perspective view…

gl.glTranslatef(0.0f, 0.0f, -2.0f);
gl.glColor3f(1.0f, 1.0f, 1.0f);		        glut.glutBitmapString(GLUT.BITMAP_HELVETICA_12, getText());

And 2nd Qn:
How can I load a 2d Texture on my perspective view as well?

  1. If you want your text to appear on top of your scene (like a heads up display, HUD) you don’t bother with rendering your text while the perspective projection is active. Instead first render your scene with the perspective projection, then switch to ortho and render your text.

  2. Loading of textures has nothing to do with which projection is active, so that can not be what you were asking for and I can’t guess what you’d really wanted to ask. Can you give another description of what you want to do?