Archived

This topic is now archived and is closed to further replies.

Ortho and extern problem

This topic is 4958 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hello, I am working on a little tie fighetr game, and i wanted it to have a radar in the bottom of the screen. to do this i found out that i need to use ortho, but all the tutorials i found wernt much use to me (im just like that). Here is a function i made to draw it:
void DrawRadar()
{
//I NEED TO TURN ON ORTHO HERE

glDisable(GL_TEXTURE_2D);
glBegin(GL_QUADS);
glColor3f(0.5,0.5,1.0);
glVertex2f(-0.5,0.5);
glVertex2f(0.5,0.5);
glVertex2f(0.5,-0.5);
glVertex2f(-0.5,-0.5);
glEnd();
glBegin(GL_POINTS);
glColor3f(1.0,0.0,0);
glVertex2f(g_Camera.m_vPosition.x/10,g_Camera.m_vPosition.z/10);
glEnd();
glColor3f(1.0,1.0,1.0);
glEnable(GL_TEXTURE_2D);
//I NEED TO TURN ON PERSPECTIVE HERE

}
Also, i have been trying in vain to make variables external. I have put extern infront of them, but it dosnt work... Anyone have any idea? thx -------- "Here lies a toppled God, His fall was not a small one, We but built his pedastle, A narrow, and a tall one" Frank Herbert (Dune:Messiah)

Share this post


Link to post
Share on other sites