Hey, I’m working on a project where I want to display the same scene four times from different angles, all in one window. Here’s the code I wrote:
//x view
glViewport(0, 0, (winw / 2), (winh / 2));
glLoadIdentity();
gluLookAt(100, 0, 0, 0, 0, 0, 0, 1, 0);
Draw();
//z view
glViewport(0, (winh / 2), (winw / 2), (winh / 2));
glLoadIdentity();
gluLookAt(0, 0, 100, 0, 0, 0, 0, 1, 0);
Draw();
//y view
glViewport((winw / 2), 0, (winw / 2), (winh / 2));
glLoadIdentity();
gluLookAt(0, 100, 0, 0, 0, 0, 0, 1, 0);
Draw();
//movable view
glViewport((winw / 2), (winh / 2), (winw / 2), (winh / 2));
glLoadIdentity();
gluLookAt(0, 0, 0, 0, 0, 0, 0, 1, 0);
Draw();
When I run this it looks like it tries to display all the views, but they flicker on and off. What’s the problem?