How to rendering QuickGUI to mutliple Ogre::renderWindow

williamJiang

12-08-2009 04:39:32

Hi all
How renderering QuickGUI to mutliple Ogre::RenderWindow?
thanks

kungfoomasta

12-08-2009 06:15:40

1. Create a RenderWindow using Ogre
2. Create a SceneManager
3. Create a Camera from that SceneManager
4. Create a Viewport from that Camera
5. Use the SceneManager and Viewport in the following code:


QuickGUI::GUIManagerDesc gmDesc;
gmDesc.sceneManager = mOgreSceneManager;
gmDesc.viewport = mViewport;
mGUIManager = QuickGUI::Root::getSingleton().createGUIManager(gmDesc);
mGUIManager->setActiveSheet(QuickGUI::SheetManager::getSingleton().createSheet(QuickGUI::Size(800,600)));


6. Make sure to inject events into the GUIManager

williamJiang

12-08-2009 15:47:08

Thanks for your reply!
Your mean i must create multiple SceneManager for this demand?

kungfoomasta

12-08-2009 20:45:13

This is what I have done. In my project, each OS Window has its own:

RenderWindow
SceneManager
Camera
Viewport
GUIManager

You might be able to do something differently, you'll have to experiment. Basically the GUIManager just wants a scenemanager and a viewport, if you can supply those items, GUI will be rendered to the viewport. (SceneManager controls GUI rendering, Viewport specifies where GUI is drawn)