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












