Multi-camera

Is there a EZ solution for multiple cameras is in scene…I mean that i want a split-screen like so:


1 2
3 4

So theres going to be for different views of the world

glViewport/glScissor

As ffish mentioned, you can use multiple glViewport calls in your drawing routine:

glViewport(viewX, viewY, viewWidth, viewHeight);
glMatrixMode(GL_PROJECTION);
// set up projection you want to use for a view
glMatrixMode(GL_MODELVIEW);
// draw 1st view

// repeat steps above with different (or same, if you wish) projections changing your viewX and viewY every time

Hope this helps

Originally posted by Aster:
[b]
glViewport(viewX, viewY, viewWidth, viewHeight);
glMatrixMode(GL_PROJECTION);
// set up projection you want to use for a view
glMatrixMode(GL_MODELVIEW);
// draw 1st view

// repeat steps above with different (or same, if you wish) projections changing your viewX and viewY every time
[/b]

this will work as long as you don’t call a gl Clear. I would stick to glScissor.

Chris