Can anybody point me in the direction I need to go in in order to create a “HUD” for my first person shooter interface? Something that will display like the persons health etc.
I’m looking for mainly how to create a crosshair in the middle of the screen. Any help, links, information, or sample code would be greatly appreciated.
After you’ve drawn your scene, call matrixmode to projection then Ortho2d and draw your HUD, don’t forget to return to projection mode afterwards www.gametutorials.com , masking could be handy
[This message has been edited by M/\dm/
(edited 12-22-2002).]
glMatrixMode( GL_PROJECTION ); // For drawing the HUD
glOrtho(0, 100, 0, 100, 0, 1);
glLoadIdentity();
glColor3f(1, 1, 1);
I tried putting that in and drawing afterwards but I didn’t see anything. I’m a little confused about the near/far arguements. What should I put them to be considering I dont want depth?
So now I should be able to use glVertex2f to draw polygons and stuff right? I tried to and it doesnt appear to be working, maybe I just cant see the polygon…
Originally posted by 31337:
[b]Can anybody point me in the direction I need to go in in order to create a “HUD” for my first person shooter interface? Something that will display like the persons health etc.
I’m looking for mainly how to create a crosshair in the middle of the screen. Any help, links, information, or sample code would be greatly appreciated.[/b]
Well i have something 4U to take a look about Graphics pointers, crosshairs and HUDs
but it’s a .RAR, so give an e-mail address to sen U’daScraps!
Originally posted by 31337:
[b]Can anybody point me in the direction I need to go in in order to create a “HUD” for my first person shooter interface? Something that will display like the persons health etc.
I’m looking for mainly how to create a crosshair in the middle of the screen. Any help, links, information, or sample code would be greatly appreciated.[/b]