glFrustum vs PerspectiveFovRH

I was a bit stumped when I stumbled into PowerVR's iPhone SDK for OGL ES 1.1. namely, I wasn't sure what PerspectiveFovRH was for... I messed around with the numbers a little, and discovered the relationship between PerspectiveFovRH and the usual glFrustum method:

glFrustum(frustumLeft, frustumRight, frustumBottom, frustumTop, frustumNear, frustumFar)

is the same as:

float fovy = 2 * atanf( (frustumTop - frustumBottom) / (2 * frustumNear) );
PerspectiveFovRH(fovy, 320/480, frustumNear, frustumFar, OGL, false);

No comments: