DevMaster.net Forums
[[ Home | Forums | 3D Engines Database | Wiki | Articles/Tutorials | Game Dev Jobs | IRC Chat Network | Contact Us ]]

Go Back   DevMaster.net Forums > Site Discussions > Code & Snapshot Discussion
User Name
Password
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old 10-21-2003, 07:48 AM   #1
davepermen
Senior Member
 
davepermen's Avatar
 
Join Date: Jan 2003
Location: Switzerland
Posts: 1,333
Default

Code:
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
___________________________________________
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....
davepermen is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Forum Jump


All times are GMT -7. The time now is 07:12 AM.


Powered by vBulletin
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.