how do i display 2 windows at the same time, generated from within one program?I have created a rectangle in one and a triangle in another window.?Thank u
How do you create the windows or choose them for redrawing or?..
try to use 2 viewports at the render function…
glClear…;
glClearColor…;
glViewport(0,0,1024,768);
glPushMatrix();
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective();
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
SetupCamera ();
DrawObject();
glPopMatrix();
glViewport(400,690,230,70);
glPushMatrix();
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective();
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
SetupCamera2();
DrawObject2();
glPopMatrix();
glFlush();
glutSwapBuffers();
I think that should be work…