Sdw
03-01-2003, 12:07 PM
I want to render a scene half the screen at the time. Like this:
Screen:
+-------+-------+
| | |
| 1 | 2 |
| | |
+-------+-------+
At the moment I'm doing like this:
gluPerspective(55.0,(float)(xres/2)/(float)yres, 0.01f, 100.0f);
glPushMatrix();
glViewport(0,0,xres/2,yres);
DrawScene();
glPopMatrix();
glPushMatrix();
glViewport(xres/2,0,xres/2,yres);
DrawScene();
glPopMatrix();
But this doesn't provide a seemless render, instead I get the "middle" of the scene rendered twice. How do I set it up so that the end result will look just like if I had done like this:
gluPerspective(55.0,(float)(xres)/(float)yres, 0.01f, 100.0f);
glViewport(0,0,xres,yres);
glPushMatrix();
DrawScene();
glPopMatrix();
And, yes there is a reason that I want to render this in two steps like this http://www.opengl.org/discussion_boards/ubb/smile.gif
[This message has been edited by Sdw (edited 03-01-2003).]
Screen:
+-------+-------+
| | |
| 1 | 2 |
| | |
+-------+-------+
At the moment I'm doing like this:
gluPerspective(55.0,(float)(xres/2)/(float)yres, 0.01f, 100.0f);
glPushMatrix();
glViewport(0,0,xres/2,yres);
DrawScene();
glPopMatrix();
glPushMatrix();
glViewport(xres/2,0,xres/2,yres);
DrawScene();
glPopMatrix();
But this doesn't provide a seemless render, instead I get the "middle" of the scene rendered twice. How do I set it up so that the end result will look just like if I had done like this:
gluPerspective(55.0,(float)(xres)/(float)yres, 0.01f, 100.0f);
glViewport(0,0,xres,yres);
glPushMatrix();
DrawScene();
glPopMatrix();
And, yes there is a reason that I want to render this in two steps like this http://www.opengl.org/discussion_boards/ubb/smile.gif
[This message has been edited by Sdw (edited 03-01-2003).]