Multiple OS Windows sharing rendering context

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

JohnArgentieri
Just popping in
Just popping in
Posts: 15
Joined: Tue Jan 09, 2007 16:14

Multiple OS Windows sharing rendering context

Postby JohnArgentieri » Sat Jan 13, 2007 01:18

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

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Sat Jan 13, 2007 10:56

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!

JohnArgentieri
Just popping in
Just popping in
Posts: 15
Joined: Tue Jan 09, 2007 16:14

Postby JohnArgentieri » Sat Jan 13, 2007 15:17

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

JohnArgentieri
Just popping in
Just popping in
Posts: 15
Joined: Tue Jan 09, 2007 16:14

Postby JohnArgentieri » Mon Jan 15, 2007 00:51

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 !!

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Mon Jan 15, 2007 08:08

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 :-)

JohnArgentieri
Just popping in
Just popping in
Posts: 15
Joined: Tue Jan 09, 2007 16:14

Postby JohnArgentieri » Mon Jan 15, 2007 13:21

Thanks scriptkid.

That seems to have worked nicely. I greatly appreciate your help. Have a nice day today.

John

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Tue Jan 16, 2007 08:21

Okay no problem, glad to hear that you got it to work :-)


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 8 guests