Page 1 of 1
Multiple OS Windows sharing rendering context
Posted: Sat Jan 13, 2007 01:18
by JohnArgentieri
Dear all,
I have gotten CEGUI 0.4.2 to work in multiple OS windows which are rendered sequentially and must share a rendering context. We intend to implement a set of CEGUI layouts which get cloned for use in each OS Window as needed. Since CEGUI uses singletons, I suppose that this might present a problem. For instance, when I load an XML layout, and rename all the windows in the layout, there are still problems with loading the XML layout a second time, despite the fact that the CEGUI windows have been renamed? Can anyone offer some advice in this area? Is it even possible to succeed at implementing something like this? Thank you for your time and understanding.
Many thanks,
John Argentieri
Posted: Sat Jan 13, 2007 10:56
by scriptkid
Hi and welcome
What do you mean with 'multiple windows'? Multiple child windows within the same application?
Renaming all windows before loading a layout again will work, but is only useful when the widgets will have different content. For example an editbox which has another text value in one window from the other. If such situations won't occur you can just load a layout only once.
Multiple views on cegui is however not easy. I know that Drumicube has made modifications to the GL renderer for the ImagesetEditor. You might read this thread-page for details:
http://www.cegui.org.uk/phpBB2/viewtopi ... c&start=30
Good luck!
Posted: Sat Jan 13, 2007 15:17
by JohnArgentieri
scriptkid,
You are correct. I was speaking of multiple child windows of the same program rendering at once.
Are you saying that it is not possible to have exactly the same CEGUI GUI layout loaded twice where the two layouts are only different in the names of the windows? In other words, they will appear exactly the same in both windows but be unique, e.g. if I move window A in view A, window A's lookalike does not move in window B. Please forgive my anxiety but I have been banging my head all week over this and I must know
Thanks,
John Argentieri
Posted: Mon Jan 15, 2007 00:51
by JohnArgentieri
P.S. What is the best technique for renaming a layout, from the root down? I should've remembered to ask you this as well...
Thanks for your help scriptkid !!
Posted: Mon Jan 15, 2007 08:08
by scriptkid
JohnArgentieri wrote:Are you saying that it is not possible to have exactly the same CEGUI GUI layout loaded twice where the two layouts are only different in the names of the windows? In other words, they will appear exactly the same in both windows but be unique, e.g. if I move window A in view A, window A's lookalike does not move in window B.
No i meant that it
is possible, though only
useful when you need them to be unique. You example shows that they should be. The LoadWindowLayout method has an optional prefix parameter, for details please see this:
http://www.cegui.org.uk/api_reference/c ... 94578743c2
(Of course when all names are unique, for cegui it doesn't matter whether is has loaded a same layout twice, or two completely different layouts.)
Good luck again

Posted: Mon Jan 15, 2007 13:21
by JohnArgentieri
Thanks scriptkid.
That seems to have worked nicely. I greatly appreciate your help. Have a nice day today.
John
Posted: Tue Jan 16, 2007 08:21
by scriptkid
Okay no problem, glad to hear that you got it to work
