Split screen & Multidisplay

Dec 9, 2009 at 9:30 PM
Edited Dec 9, 2009 at 11:51 PM

Hi,

I would be really gratefull, if anyone gave me any hints on how to implement split screen and/or multidisplay in and ox engine based game.

EDIT: this code somewhat works, but only 1 viewports fully works, 2nd one displays only cursor and frame count. Playing with prerender ended with 2nd viewport going totally black

in the defualtengine class:

 

protected override void DrawHook(GameTime gameTime)
{
sceneSystem.PreDraw(gameTime, Camera);

backBuffer.Activate();
{
GraphicsDevice.Viewport = rightViewport;
GraphicsDevice.Clear(ClearOptions.DepthBuffer | ClearOptions.Target, Color.Black, 1.0f, 0);
sceneSystem.Draw(gameTime, Camera);
guiSystem.Draw(gameTime);

}
//backBuffer.Resolve();

//sceneSystem.PreDraw(gameTime, Camera);

//backBuffer.Activate();
{
GraphicsDevice.Viewport = leftViewport;
GraphicsDevice.Clear(ClearOptions.DepthBuffer | ClearOptions.Target, Color.Green, 1.0f, 0);
sceneSystem.Draw(gameTime, Camera);
guiSystem.Draw(gameTime);

}
backBuffer.Resolve();

frameRater.RegisterFrame(gameTime);
}

 

Thank you in advance :)