Archived

This topic is now archived and is closed to further replies.

rsegal

gluLookAt

Recommended Posts

Is there some kind of special set up you have to do to get gluLookAt to work properly under portalib? No matter where I place it in my code it doesn''t seem to work.

Share this post


Link to post
Share on other sites
No, none at all. Have a look at ModelViewer.

Perhaps you are misusing it - this is quite common. I know I did when I first tried it.

You should do this first in drawScene:
glLoadIdentity();
gluLookAt(....)
// render objects.

HTH!



~~~
Cheers!
Brett Porter
PortaLib3D : A portable 3D game/demo libary for OpenGL

Share this post


Link to post
Share on other sites
gluLookAt(camx,camy,camz, lookatx,lookaty,lookatz, 0,1,0);

the last 3 variables are for orientation. Set 1 on y so that it points up- I think its for the system (right hand, etc).

-Uthman Apatira
almaroof@msn.com

Share this post


Link to post
Share on other sites