Jump to content
  • Advertisement

Archived

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

Tree Penguin

2D/3D Viewing ?

This topic is 5313 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

Hi, i am building an application that needs to draw using a perspective and after that has to draw menu-like 2d always-on-top objects. Is it possible to first render all 3D and then switch to another type of view (using glOrtho ???) so i always have 640x480 units on the screen using glVertex2d when i draw tje objects? If so, how? Else an alternative will be ok too.

Share this post


Link to post
Share on other sites
Advertisement
Never mind, i got it working . For those interested (you'll never know):

glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0f, (GLfloat)scrw/(GLfloat)scrh, 0.1f, 500.0f);
// Draw 3D

glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0.0f,scrw,scrh,0.0f,-1.0f,1.0f);
// Draw 2D




[edited by - Tree Penguin on January 4, 2004 6:14:08 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!