PDA

View Full Version : Want mutilple views of a scene



immy
03-30-2002, 12:00 AM
hi all
I wanna have different views of an air craft(top view,front view,side view).For example in the 1st view i only want my model to show its rotation abt z-axis(roll) in second pitch & in third only yaw.
okay now the problem. For this thing to work i have to make three differnet windows for each view or is it possible to make it work with one window only(may be by using different view ports).
All ideas are welcomed but Pls write to me the full idea.
thanks in advance http://www.opengl.org/discussion_boards/ubb/smile.gif bye bye

dUckmAnn
03-30-2002, 12:10 AM
glViewport(0, 0, w/2, h/2);
glMatrixMode(GL_PROJECTION);
//set projection matrix
glMatrixMode(GL_MODELVIEW);
//set modelview
renderscene();
glViewport(0, h/2, w/2, h);
glMatrixMode(GL_PROJECTION);
//set projection matrix
glMatrixMode(GL_MODELVIEW);
//set modelview
renderscene();
glViewport(w/2, 0, w, h/2);
glMatrixMode(GL_PROJECTION);
//set projection matrix
glMatrixMode(GL_MODELVIEW);
//set modelview
renderscene();
glViewport(w/2, h/2, w, h);
glMatrixMode(GL_PROJECTION);
//set projection matrix
glMatrixMode(GL_MODELVIEW);
//set modelview
renderscene();


carl

ps: not really an advanced question

davepermen
03-30-2002, 02:09 AM
not really an advanced answer eighter http://www.opengl.org/discussion_boards/ubb/smile.gif
at least here i have to enable scissoring then..
glEnable(GL_SCISSOR_TEST);
glScissor(left,top,right,bottom); //or other way around
glViewport(left,top,right,bottom); //or other way around, too http://www.opengl.org/discussion_boards/ubb/wink.gif
glMatrixMode(GL_PROJECTION);
if(thisview->perspective) {
gluPerspective(blahblah);
} else {
gluOrtho(blahblah);
}

that should do the trick..

knackered
03-30-2002, 05:13 AM
Try not to create seperate windows for the different views - context switching is really expensive, and will significantly impact your performance.

immy
04-01-2002, 02:05 AM
>>>>>DavePerman<<<<<<<<<<
Hi
What this Scissor test is for. Pls tell me. waiting Dave http://www.opengl.org/discussion_boards/ubb/smile.gif

knackered
04-01-2002, 03:49 AM
You have an internet connection?
Go to this site:- www.google.com (http://www.google.com)

and type "scissor test" into the box.