I realize this is a rather basic question, but I’ve been struggling with this for a bit…
I have a scene I’m creating with orthographic projection:
gl.glOrtho(0.0f, 100.0f, 0.0f, 100.0f, -1.0f, 1.0f);
I’m trying to rotate the scene 90 deg. counterclockwise using ‘gluLookat()’. I can rotate the scene using ‘glTranslate()’ and ‘glRotate()’, but I’m thinking ‘gluLookat()’ would be better. Here’s what I have working.
gl.glTranslatef(100.0f, 0.0f, 0.0f);
gl.glRotatef(90, 0, 0, 1);
For the life of me I cannot get anything with ‘gluLookat()’ working. The basic (non-rotated) call to ‘gluLookat()’ is:
glu.gluLookAt(
0.0f, 0.0f, 0.0f, // eye X,Y,Z
0.0f, 0.0f, -1.0f, // center X,Y,Z
0.0f, 1.0f, 0.0f); // up X,Y,Z
I can get the scene rotated correctly by specifying ‘1.0f, 0.0f, 0.0f’ as the last three parameters, but I can’t get the scene translated to the right and image is clipped off…
Thanks!