Original Post
Hello all
I am trying to display a 2D Image which is to be a HUD onto a 3D Display.
But I have had no luck
This is the code that I use to use, which creates a square object and displays the image on it.
glPushMatrix();
// Load Image //
glLoadIdentity();
glEnable(GL_LIGHTING);
glEnable(GL_TEXTURE_2D);
glColor4ub(0,32, 0,100);
glTranslatef (-0.1397f, -0.165f, -0.55f);
glBindTexture(GL_TEXTURE_2D, HUD_texture[0]);
glEnable(GL_BLEND);
vuX=0.154f;
vuY=(0.083f/2);
glBegin(GL_QUADS);
glNormal3f(0, 0, 1);
glTexCoord2f(0, 0); glVertex2f(-vuX,-vuY);
glTexCoord2f(1, 0); glVertex2f( vuX,-vuY);
glTexCoord2f(1, 1); glVertex2f( vuX, vuY);
glTexCoord2f(0, 1); glVertex2f(-vuX, vuY);
glEnd();
glDisable(GL_BLEND);
glDisable(GL_TEXTURE_2D);
glDisable(GL_LIGHTING);
glPopMatrix();
But 3d objects that are moving towards you over write this image
Does anyone know of any code that will display an image at the front of the screen as a 2D Image.
Or if you know of a nehe Tutorial that does this can you let me know please.
Thanks in advance
Paul Kirby