ngill
07-08-2000, 02:28 PM
I tried this on the beginner board... and received no replies... I hope on this board I get better luck.
well, ever played Starfox64 multiplayer with less than 4 players? if so, you've noticed the "camera" quadrant(s). That's what I am trying to accomplish (in a very basic way).
my window size: 480x240
so, my first guess was... setting the Viewport in my InitGL() by:
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glViewport(0,0,240,240);
glOrtho(-2.0f,2.0f,-2.0f,2.0f,-1.0f,1.0f);
glViewport(240,0,240,240);
glOrtho(-2.0f,2.0f,-2.0f,2.0f,-1.0f,1.0f);
glMatrixMode(GL_MODELVIEW);
So... in my DrawScene() i drew a circle with r=1 at the origin... I expected to see two circles, but instead I only got the right viewport... perhaps I was mistakened but I thought you would specify the viewport, and then assign the clipping plane to it... and you could do this over and over... but, am I mistakened? if so, how else could I do what I want to do?
well, ever played Starfox64 multiplayer with less than 4 players? if so, you've noticed the "camera" quadrant(s). That's what I am trying to accomplish (in a very basic way).
my window size: 480x240
so, my first guess was... setting the Viewport in my InitGL() by:
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glViewport(0,0,240,240);
glOrtho(-2.0f,2.0f,-2.0f,2.0f,-1.0f,1.0f);
glViewport(240,0,240,240);
glOrtho(-2.0f,2.0f,-2.0f,2.0f,-1.0f,1.0f);
glMatrixMode(GL_MODELVIEW);
So... in my DrawScene() i drew a circle with r=1 at the origin... I expected to see two circles, but instead I only got the right viewport... perhaps I was mistakened but I thought you would specify the viewport, and then assign the clipping plane to it... and you could do this over and over... but, am I mistakened? if so, how else could I do what I want to do?