void reshape(int w, int h){ tbReshape(w, h); cout<<"Reshape"<<endl; glViewport(0, 0, w, h); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(60.0, (GLdouble)w/h, 0.01,1000); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glTranslatef(0, 0, -10+zoom); }
void myReshape(int w, int h) { glMatrixMode (GL_MODELVIEW); glViewport (0, 0, w, h); glLoadIdentity(); w_win = w; h_win = h; SetCamera(); tbReshape(w_win, h_win); }
void reshape(int width, int height) { GLfloat light_position[4] = { 1.0, 1.0, 1.0, 0.0 }; tbReshape(width, height); glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(60.0, (GLfloat)height / (GLfloat)width, 1.0, 128.0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glLightfv(GL_LIGHT0, GL_POSITION, light_position); glTranslatef(0.0, 0.0, -12.0); glRotatef(15.0, 0.0, 1.0, 0.0); }