• ### Announcements

#### Archived

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

# 2D/3D Viewing ?

## Recommended Posts

Tree Penguin    262
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 on other sites
Tree Penguin    262
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 3DglMatrixMode(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]