Actually, I am not supposed to need to use glutReshape… to do this. I am trying to create 4 wins - 1 win 650x650 w/some user interaction, 3 210x210 w/o but right now, I can’t even display all of them. The first win works ok alone but when I try to add the others, it doesn’t come up (wins are empty). Here is what I have:
In main:
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize(650, 650);
glutInitWindowPosition(0, 0);
w1=glutCreateWindow(“main”);
/* user interaction for main win */
glutKeyboardFunc(keyboard);
glutSpecialFunc(processSpecialKeys);
glutMouseFunc(mouse);
glutMotionFunc(motion);
glutTimerFunc(50, update, 1);
glutIdleFunc(display);
glutDisplayFunc(display);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize(210, 210);
glutInitWindowPosition(652, 0);
w2=glutCreateWindow(“win2”);
glutDisplayFunc(display);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize(210, 210);
glutInitWindowPosition(652, 220);
w3=glutCreateWindow(“win3”);
glutDisplayFunc(display);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize(210, 210);
glutInitWindowPosition(652, 440);
w4=glutCreateWindow(“win4”);
glutDisplayFunc(display);
In display routine:
glutSetWindow(w2);
gluPerspective(60, 1, 1, 1000);
gluLookAt(eye_x, eye_y, eye_z, wcenter_x, wcenter_y, wcenter_z, up_x, up_y, up_z);
glClearColor(0.0, 0.0, 0.0, 1.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
render_scene_only();
glutSetWindow(w3);
gluPerspective(60, 1, 1, 1000);
gluLookAt(eye_x, eye_y, eye_z, wcenter_x, wcenter_y, wcenter_z, up_x, up_y, up_z);
glClearColor(0.0, 0.0, 0.0, 1.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
render_scene_only();
glutSetWindow(w4);
gluPerspective(60, 1, 1, 1000);
gluLookAt(eye_x, eye_y, eye_z, wcenter_x, wcenter_y, wcenter_z, up_x, up_y, up_z);
glClearColor(0.0, 0.0, 0.0, 1.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
render_scene_only();
Any suggestions on what I am doing wrong in either main or my display routine?
Thanks.