Archived

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

griffenjam

Fidning the coordinates of the edges of the screen

Recommended Posts

griffenjam    193
I know this sounds dumb, but I can''t figure out how to find out the coordinates of the edges of the screen. I initally thought that it was a set number, but I guess not. Is there a formula? Jason Mickela ICQ : 873518 E-Mail: jmickela@sbcglobal.net ------------------------------ "Evil attacks from all sides but the greatest evil attacks from within." Me ------------------------------

Share this post


Link to post
Share on other sites
Shag    122
Are you talking 2D or 3D?

"Evil attacks from all sides
but the greatest evil attacks
from within." Me

Me = you or Windows ME edition?

Edited by - Shag on October 25, 2001 8:26:52 PM

Share this post


Link to post
Share on other sites
Dactylos    122
a2k: glViewport should be called in the same way regardless of whether you''re going to setup an orthographic projection or a perspective projection. It provides the mapping from normalized device coordinates to window coordinates.

griffenjam: It depends on how you setup your projection matrix.

Share this post


Link to post
Share on other sites
griffenjam    193
I set up my projection like this.

gluPerspective(45.0f,(GLfloat)glWidth/(GLfloat)
glHeight,0.1f,1000.0f);

Now, given the current depth can you figure out the displayable width and height?



Jason Mickela
ICQ : 873518
E-Mail: jmickela@sbcglobal.net
------------------------------
"Evil attacks from all sides
but the greatest evil attacks
from within." Me
------------------------------

Share this post


Link to post
Share on other sites