rendering to multiple windows

futnuh

14-09-2010 09:18:07

I'm porting our single-site educational game from Ogre 1.3 on XP to Ogre 1.7.1 on Windows 7. Previously we used "horizontal span" to cover 2 1920x1080 displays. Unfortunately horizontal span isn't supported on Vista and Windows 7 ... and I don't want to splurge on a 5-series ATI card + Eyefinity. I've been experimenting for the last couple of hours with creating two separate 1920x1080 windows (2 calls to ogre.Root().createRenderWindow).

I've read about having a 1x1 Win32 master window as a parent for 2 children. Is this only critical if I worry about someone shutting down windows in the wrong order? This isn't really an issue for us since we don't have window borders and the game is only infrequently shut down.

So I've got two windows up and running. The problem is that only one window can have focus at a time. And when it has focus, the other one stops rendering. Question then: can I force Ogre to update both windows?

futnuh

14-09-2010 09:25:34

So I've got two windows up and running. The problem is that only one window can have focus at a time. And when it has focus, the other one stops rendering. Question then: can I force Ogre to update both windows?
I probably never encountered this by virtue of always having my single-window applications in focus. As this thread explains (http://www.ogre3d.org/forums/viewtopic.php?f=5&t=9756), not rendering when the window loses focus is default Ogre render loop behaviour. It seems if you want differently, you need to write your own main loop and force window updates.


weu = ogre.WindowEventUtilities()
weu.messagePump()
while app.root.renderOneFrame():
weu.messagePump()

Unfortunately, if I try the above, I get the same behaviour as the default Ogre behaviour - only the window with focus is getting updated. Any thoughts on this?

dermont

14-09-2010 14:34:14

Not sure how rendering to multiple windows works on Windows but you could try:

mRenderWindow.disableOnFocusChange(False)

http://www.ogre3d.org/forums/viewtopic. ... 37&start=0
http://www.ogre3d.org/docs/api/html/cla ... indow.html

or try to manually update() the render windows.

You will probably get a better/quicker response on the main forum, failing that you could maybe post a simple example.

andy

15-09-2010 08:30:31

You could also look at this post

Andy