Split Screen For Multiple Scenes

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
OverlordOutpost
Posts: 5
Joined: Thu Sep 30, 2010 12:55 pm

Split Screen For Multiple Scenes

Post by OverlordOutpost »

I'm being asked for a project to make Irrlicht split *all* scenes played through it.

I know how to split an individual scene thanks for the tutorial, and can import that code into most any scene for an easy split for that scene only, but the person is asking me for a way to have every scene (including ones already built) split-screen, either through a .dll change or some sort of preloading.

Is there a step in the right direction on how this can be done, or can it even be done like that?
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

Do you mean having multiple scenes displayed at once? You need a seperate scene manager for every scene you want to display which can be created by "ISceneManager::createNewSceneManager". I'm using this method to preview the selected level in "Stunt Marble Racers". You have a scene in the background and the selected level being previewed in another small viewport.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
macron12388
Posts: 126
Joined: Wed Sep 29, 2010 8:23 pm

Post by macron12388 »

Brainsaw wrote:Do you mean having multiple scenes displayed at once? You need a seperate scene manager for every scene you want to display which can be created by "ISceneManager::createNewSceneManager". I'm using this method to preview the selected level in "Stunt Marble Racers". You have a scene in the background and the selected level being previewed in another small viewport.
Is this how you can do some GUI thing with a gun? I mean have a camera looking at a gun in an FPS style, and then have that scene on a 'layer' in front of the main 3d scene? Like an overlay scene(<---OMG BLENDER!!!) ?
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

I don't know. Have never tried that. What I did was this:

Image

You can see a scene with a rotating cube with my logo in the background and in the upper right corner you see a preview of the selected track.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
grumpymonkey
Posts: 222
Joined: Mon Jan 19, 2009 10:03 pm
Location: Miami, Florida
Contact:

Post by grumpymonkey »

For the fps gun thing you should just render it manually after the scene and before the gui to be sure its on top of everything. no need to render to a different texture
Image
macron12388
Posts: 126
Joined: Wed Sep 29, 2010 8:23 pm

Post by macron12388 »

grumpymonkey wrote:For the fps gun thing you should just render it manually after the scene and before the gui to be sure its on top of everything. no need to render to a different texture
Oh doh!, of course! :D I keep forgetting about the emergent flexibility of irrlicht and c++. Thanks!
OverlordOutpost
Posts: 5
Joined: Thu Sep 30, 2010 12:55 pm

Post by OverlordOutpost »

I guess I should've been a bit more specific. The person I'm working with has a Head-Mounted Device, with two monitors inside it, one for left eye and one for right eye. It's read the screen like a horizontal split

Left Eye
-----------
Right Eye

Like so. I can code the split screen individually for each scene that the guy wants to run in the HMD, but I won't always be there, and he doesn't like to touch C++. So what I'm wondering is if there's something I can add, a preloader program, or a change to the irrlicht.dll that'll apply that horizontal split automatically to any loaded scene.
macron12388
Posts: 126
Joined: Wed Sep 29, 2010 8:23 pm

Post by macron12388 »

Hmm, what kind of software is preloaded into the headset? I'm sure it might be something like putting each view-port onto dual monitors on a desk.
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

Oh .. in that case you only need one scene manager but two viewports. Check for code that uses mutliple viewports and use that code instead of the normal "beginScene --> drawall --> endScene". You just need to set the viewports right.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Post Reply