Skip to main content
gamedev.net
🔒 Locked

2D/3D Viewing ?

Started by Tree Penguin 0 replies 350+ views
Original Post
Tree Penguin
Tree Penguin
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.
Tree Penguin
Tree Penguin
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]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.