PDA

View Full Version : OpenGL Multiple views?



opengllover
05-30-2003, 06:34 PM
In a SDI project,how to create multiple views to browse my 3d object at 4 projections :XY,XZ,ZY,ISO?Could you please teach me ?Where can I find the samples code ?thank you

JanHH
05-31-2003, 06:01 AM
I think you can split the drawing area into four with glViewport().. for example, if your drawing area is from 0/0 to 100/100

// first

glViewport(0,0,50,50);
gluPerspective(...);
gluLookAt(...);

// second

glViewport(50,0,100,50);
gluPerspective(...);
gluLookAt(...);

// third

glViewport(0,50,0,100);
gluPerspective(...);
gluLookAt(...);

// fourth

glViewport(50,50,100,100);
glOrtho(...);

or something like that http://www.opengl.org/discussion_boards/ubb/wink.gif

Jan

opengllover
06-01-2003, 12:27 AM
Thank you .Let me try...