#### Archived

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

# 800x600

## Recommended Posts

ok, this is what I think is a simple question...and I hope it is. How would I set it up so that when using glvertex3f I can put in 0, 0, -1 and get the top left of the screen, then put in 800, 600, -1 and get the bottom right. This would make getting some code I''ve written to work as it should far easier. Thanks in advance...

##### Share on other sites
glViewport(0, 0, (GLsizei) ScreenWidth, (GLsizei) ScreenHeight);glMatrixMode(GL_PROJECTION);glLoadIdentity();glOrtho(0.0f,ScreenWidth,ScreenHeight,0.0f,Near,Far);glMatrixMode(GL_MODELVIEW);glLoadIdentity();

Just plug in -1.0f and 1.0f for near and far, respectively, if you don''t need to use the depth buffer.

thanks

• ### Forum Statistics

• Total Topics
628345
• Total Posts
2982187

• 9
• 24
• 9
• 9
• 13