Jump to content

View more

Image of the Day

Working on an auto spawn system. #gamedev #indiedev #screenshotsaturday https://t.co/Mm2kfekz7b
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Fidning the coordinates of the edges of the screen

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
4 replies to this topic

#1 griffenjam   Members   

193
Like
Likes
Like

Posted 25 October 2001 - 12:04 PM

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 ------------------------------

#2 Shag   Members   

122
Like
Likes
Like

Posted 25 October 2001 - 01:23 PM

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

#3 a2k   Members   

124
Like
Likes
Like

Posted 25 October 2001 - 01:55 PM

the extents would be whatever you set for glViewport in 3d or in glOrtho in 2d



#4 Dactylos   Members   

122
Like
Likes
Like

Posted 25 October 2001 - 02:26 PM

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.

#5 griffenjam   Members   

193
Like
Likes
Like

Posted 26 October 2001 - 04:41 AM

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
------------------------------





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.