// remember to convert fovy from degree to radius before calling tan
void I_my_gluPerspective(GLdouble fovy, GLdouble aspect,
    GLdouble zNear, GLdouble zFar)
{
    GLdouble frustumW, frustumH;

    frustumH = tanf( fovy / 360.0 * PI ) * zNear;
    frustumW = frustumH * aspect;

    I_my_glFrustum(-frustumW, frustumW, -frustumH, frustumH, zNear, zFar);
}
예제 #2
0
// remember to convert fovy from degree to radius before calling tan
void I_my_gluPerspective(GLdouble fovy, GLdouble aspect, 
    GLdouble zNear, GLdouble zFar)
{
	GLdouble top, bottom, right, left;

	printf("Call to I_my_gluPerspective\n");

	top = zNear * tan(fovy*PI/360);
    bottom = -top;
    right = top * aspect;
    left = -right;

    I_my_glFrustum(left, right, bottom, top, zNear, zFar);
}