Non-centered Camera Perspective (help)

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 :slight_smile: ).
For example, with 3 cones, like this: O> O <O

  1. 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.

  2. 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!

  1. look up
gluLookAt 

function for non-default camera viewpoint. - AK77

Yes thanks, but gluLookAt() is basically just a combination of rotations and translations, to set the camera angle/directon, but in the end the camera is centered again.
Logically so, because it’s centered in respect of the frustum.

So, staying with the above example of horizontal translation…
…when I focus on the left object with gluLookAt(), this one will be centered, and the right object will be no longer visible, because it’s outside the frustum:

From: [ L> M <R ] to [ L <M ]
… but I’d like it [ L <M <<R ]

I don’t understand what you are trying to do. But with glFrustum you can set up a scewed frustum, if that is what you are after.