lavalamp
01-09-2003, 09:52 AM
I'm using gluPerspective in a 30-deg FOV with a huge depth in a space simulator.
If I move in space using gltranslatef, my scene renders "normally".
i.e. gltranslatef(Xtrans,Ytrans,Ztrans)
If I use glulookat, different points (stars) in space seem to disappear and reappear as I move, or maybe the rendering is so slow the display is just flickering.
I change the 1st three coordinates as I move, the 2nd set are the location I'm moving towards (fixed) and I leave 0,1,0 for the up vector.
example:
at time1 - glulookat(Xtrans1,Ytrans1,Ztrans1,Xdest,Ydest,Zdes t,0,1,0)
at time2 - glulookat(Xtrans2,Ytrans2,Ztrans2,Xdest,Ydest,Zdes t,0,1,0)
Should I be recalculating Xdest,Ydest,Zdest as I move?
If I move in space using gltranslatef, my scene renders "normally".
i.e. gltranslatef(Xtrans,Ytrans,Ztrans)
If I use glulookat, different points (stars) in space seem to disappear and reappear as I move, or maybe the rendering is so slow the display is just flickering.
I change the 1st three coordinates as I move, the 2nd set are the location I'm moving towards (fixed) and I leave 0,1,0 for the up vector.
example:
at time1 - glulookat(Xtrans1,Ytrans1,Ztrans1,Xdest,Ydest,Zdes t,0,1,0)
at time2 - glulookat(Xtrans2,Ytrans2,Ztrans2,Xdest,Ydest,Zdes t,0,1,0)
Should I be recalculating Xdest,Ydest,Zdest as I move?