I am trying to create a projection that makes the top edge of an object in my scene align to the top edge of the screen. The top edge of my object is y=1. I also want the near clipping plane to be the x,y plane. This seemed easy using glFrustum
I thought that as long as Z1=Z2 everything would by OK because I am putting the eye at the same distance as the length of the frustum. But it doesn't work. The camera is a little too far away. If I make zfrustrum smaller still keeping zeye equal to it, the camera gets farther away. What am I getting wrong?
I don't have the code here to try this, but on the drive in to my day job was imagining that maybe the near parameter in glFrustum is actually the distance to the near clipping plane on the hypotenose, but that doesn't match any tutorials I have seen. It would explain why longer values bring the camera closer though. Of course, this has to be wrong because the fuction is called glFrustum.
Thanks for any help.