Hi, quite new here, so I would appreciate any help on this.
By default, the camera (in perspective mode) view is looking centered onto the GL window (clumsy description, but you know ).
For example, with 3 cones, like this: O> O <O
-
What I try to achieve is a non-centered perspective.
The same objects, same viewport and everything, but the camera focused on, for example, the left object.
Like this: O <O <<O
The effect is like you would move your camera in front of a stationary projection plane, thereby updating perspective correction. -
In GL4Java I happened to achieve this effect by coincidence, simply made a translation of the projection matrix and a translation (different ratio) of the modelview matrix in the opposite direction.
I tried to reproduce with JOGL, but somehow all translations
of the projection or viewport matrices seem to result in:
a) not the same effect als in GL4Java ;D and
b) a loop (continuous translation)
Regarding the latter: Why does it loop when I for example translate the projection matrix in the display method (…because of the animator?)?
Modelview translations do not loop (unless you would increment within display()). Where (in which method) should I manipulate the projection matrix to avoid this?
You would really help me out if you had suggestions for 1, or an idea whats the problem in 2.
Thanks a lot!