Sourpotato

02-22-2004, 02:54 PM

In the perspective projection , for the given z coordiniate,

how i can get the leftest and righest x coordinates as well as the highest and lowest y coordinates.

For example, if i set the gluPerspective(45.0f,(GLfloat)width/(GLfloat)height,0.1f,100.0f), if z = -1 , the rightest x is about 0.56 , the leftest x is about -0.56 , the highest y is 0.56 and lowest y is about -0.56 .but i get these values by try and miss . i don't know any api/function to get these values. Can i in some way or other to get the x y bounding alue directly ???Any input is appreciated

how i can get the leftest and righest x coordinates as well as the highest and lowest y coordinates.

For example, if i set the gluPerspective(45.0f,(GLfloat)width/(GLfloat)height,0.1f,100.0f), if z = -1 , the rightest x is about 0.56 , the leftest x is about -0.56 , the highest y is 0.56 and lowest y is about -0.56 .but i get these values by try and miss . i don't know any api/function to get these values. Can i in some way or other to get the x y bounding alue directly ???Any input is appreciated