Jump to content


gluPerspective


  • You cannot reply to this topic
No replies to this topic

#1 davepermen

    Senior Member

  • Members
  • PipPipPipPip
  • 1306 posts

Posted 21 October 2003 - 01:48 PM

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
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users