gluPerspective

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Oct 21, 2003 at 13:48
void myPerspective(GLfloat fov,GLfloat aspect,GLfloat near,GLfloat far) {
    GLfloat range = near*tan(deg2rad(fov/2));
    glFrustum(-range*aspect,range*aspect,-range,range,near,far);
}

reason i’ve set this up? the glu32.lib somehow cannot link to gluPerspective with the digitalmars linker, so i’ve checked mesa3d for the source. then i thought, woah, thats a huge piece of code.. can’t that get simplified?

it can.

a two-liner :D

0 Replies

Please log in or register to post a reply.

No replies have been made yet.