Suslik wrote:Boost113 wrote:You don't seem to be using the Renderer bootstrap function.
I'm not using bootstrap because it calls CEGUI::System::create inside. So if I call bootstrap once per program I get only 1 ogre renderer which's probably not the thing I want. If I call one bootstrap per window I get "Already Initialized" exception. So that's why I'm using 2 renderers without a bootstrap. Is that wrong?
The bootstrap does a few things that aren't done if you directly create the renderer, for example the Ogre workspaces won't be created.
The function (that I just created) CEGUI::OgreRenderer::registerWindow allows creating a second renderer after bootstrapping to avoid this issue.
Suslik wrote:So you advice me to create OgreRenderers manually, one per window. And I don't want to call bootstrap after that, right?
If I don't create a workspace neither for window1 nor for window2, my program crashes. If I create only one workspace for winow1, it somewhat works but window 2 still has some weird glitches:
Adding to my last comment, I recommend that you first bootstrap the first renderer and then create the second one. This way the renderer should setup its own workspace and then you just need to create one that
clears the window.
It *should* be fine to just use the constructor but the registerWindow function might get some additional things at some point like linking the renderers together to share resources (if any actually need to be shared...).
Code for creating a workspace that clears the window: http://pastebin.com/XSW1KE60
Suslik wrote:I really need multiple windows to function properly. I don't care about scaling in runtime and I use non-captured mouse so I'm not interested in mouse constraining either. Would you kindly help me with some code that I tried making somewhat bearable? It works for both ogre 2.0 and 1.9 but the second window glitches in both(in different ways). Here's the code: http://pastebin.com/i773VL6i
I've got the rendering to multiple windows working but the input needs a little tweaking:
Your code seems fine, but you should call CEGUI::OgreRenderer::getDefaultRenderTarget to get the target for a context instead of
Code: Select all
new CEGUI::OgreWindowTarget(
Also you could use the bootstrapping function and then manually create the additional renderers. You could also try removing all your rendering code and this call:
Code: Select all
ceguiOgreRenderer->setRenderingEnabled(false);
That way the ogre renderer should render automatically whenever the ogre window is rendered. (I would get rid of all the draw calls, though I would keep the time calls, in frameRenderingQueued)