Originally posted by Chadyo:
I just started using openGL. I'm having trouble with moving the view of the camera. I want to move the scene a little to the left when i click on the left side in my program. Is there something i have to do to refresh the view? here's what i have in the myMouse function:
if(button == GLUT_LEFT_BUTTON && state == GLUT_DOWN && x < (win_width/2)){
printf ("X is on the left side of the screen at %i\n", x);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
gluLookAt(-2.0, 2.0, 2.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
}
This should work i thought but it doesn't change the scene at all, x used to be 2.0 and i'm changing it to -2.0 when i click once, just something simple, thanks!