Skip to content

Commit

Permalink
implemented with glulookat
Browse files Browse the repository at this point in the history
  • Loading branch information
tobby-lie committed Mar 6, 2020
1 parent 74e30e0 commit 27f5fa3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions graphics_hw3/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void display(void)
else
up_vector = { 0, 1, 0 };

gluLookAt(cam_x, cam_y, cam_z, 0, 0, 0, up_vector[0], up_vector[1], up_vector[2]); // set gluLookAt up vecor to look_vector_cross
gluLookAt(-cam_x, -cam_y, cam_z, 0, 0, 0, up_vector[0], up_vector[1], up_vector[2]); // set gluLookAt up vecor to look_vector_cross
glutSolidTeapot(1.0); // display teapot

if (grid_toggle)
Expand Down Expand Up @@ -244,7 +244,7 @@ void motion (int mousex, int mousey)
}
if (prev_mousex < mousex)
{
swing = (swing + (prev_mousex - mousex)) % 360;
swing = (swing - (mousex - prev_mousex)) % 360;
glutPostRedisplay();
}
if (prev_mousey > mousey)
Expand Down

0 comments on commit 27f5fa3

Please sign in to comment.