One Scene, Four Cameras, 4 Windows

Problems building or running the engine, queries about how to use features etc.
Post Reply
Brainshack
Greenskin
Posts: 118
Joined: Tue Feb 19, 2008 1:01 pm

One Scene, Four Cameras, 4 Windows

Post by Brainshack »

Is it possible to render the same scene simultaniously to 4 different Windows, using 4 different cameras? And would it be possible to mix between Ortho view and 3d View?

I wan't to create a view like in valve's Hammer Editor: http://upload.wikimedia.org/wikipedia/e ... editor.jpg

Using four windows for this would be my approach.But in Hammer i doesn't seem to use seperate windows for the four views. How could i do this in the Win API?
Image
User avatar
DWORD
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 1365
Joined: Tue Sep 07, 2004 12:43 pm
Location: Aalborg, Denmark
Contact:

Post by DWORD »

Of course. ;) You just create 4 windows and 4 cameras. Then you set up whether you want each of the cameras to be perspective/orthogonal. You can find something that does this in my old GtkOgre. Note that I didn't update it for a long time, but the camera code should be ok.
Brainshack
Greenskin
Posts: 118
Joined: Tue Feb 19, 2008 1:01 pm

Post by Brainshack »

Hello and thanks :)

How is the widget called you use for your four views?
Image
User avatar
DWORD
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 1365
Joined: Tue Sep 07, 2004 12:43 pm
Location: Aalborg, Denmark
Contact:

Post by DWORD »

If you mean the splitter between them, then that's just three individual splitters, one vertical and two horizontal - one on each side. This isn't really working right, because the horizontal ones are not moving together. But it was just mean as a proof of concept, so it didn't matter.
Brainshack
Greenskin
Posts: 118
Joined: Tue Feb 19, 2008 1:01 pm

Post by Brainshack »

So is this one window using this splitters? Or how exactly does this work?

I'd like to build something exactly like this using WinAPI.
Image
User avatar
DWORD
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 1365
Joined: Tue Sep 07, 2004 12:43 pm
Location: Aalborg, Denmark
Contact:

Post by DWORD »

Brainshack wrote:So is this one window using this splitters? Or how exactly does this work?
It's 4 embedded render windows, separated by splitters (can't remember whether that's the actual GTK name for them, but you get the point).
Brainshack wrote:I'd like to build something exactly like this using WinAPI.
That's going to be a bit different, but the principle is the same. Create 4 windows and embed an Ogre render window into each of them - or you could create one large render window and then add 4 viewports to it. Maybe you'll find it useful to use some existing GUI toolkits like e.g. MFC or wxWidgets. That'll probably make things easier than using the raw Windows API.

Edit: IIRC at some point sinbad made a 4-way splitter for wxWidgets - search his blog for some information on it. I'm not sure whether he got around to releasing it.
Post Reply