[Answered]Is it possible to float windows outside of application main window?

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

cstoneburner
Just popping in
Just popping in
Posts: 2
Joined: Tue Jan 17, 2017 21:15

[Answered]Is it possible to float windows outside of application main window?

Postby cstoneburner » Tue Jan 17, 2017 21:45

Utter noob here, so I don't even have the right vocabulary for a good search, although I did try.

Is it possible to float gui windows outside of the boundaries of the main application window?

If it is possible could someone point me in the direction of instructions, examples, and/or better search terms than "float" or "floating"?

What specifically I'm wanting to try: I'm trying to mod a game (Life is Feudal:Forest Village) which uses CEGUI, the files for which the devs have made accessible to modders. All of the gui is currently bounded by the game's window and I'd like to be able to move the windows outside of it (like you can, say, move find and replace windows in MSWord to outside of the editing window) and I would like to mod it so that some or all of it can be shifted outside of it (in my case, to a second monitor).

I have managed some minor tweaks both using CEED (which is great!) and outside of it and am generally willing to poke at things if I know it's not impossible.
Last edited by cstoneburner on Tue Jan 17, 2017 23:07, edited 1 time in total.

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: Is it possible to float windows outside of application main window?

Postby YaronCT » Tue Jan 17, 2017 21:53

I think for that u need more than 1 OS windows, which I don't think should b a problem. Each OS window would have its own gui context.

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: Is it possible to float windows outside of application main window?

Postby YaronCT » Tue Jan 17, 2017 21:55

I don't see though how such a thing could work out of the box.. Perhaps u could somehow create 1 big main OS window which takes the whole screen, all of which is transparent other than some sub-window which is actually your real main window..

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Is it possible to float windows outside of application main window?

Postby Ident » Tue Jan 17, 2017 22:48

Foremost, CEGUI is designed around being an overlay that can be rendered using modern graphics libraries (HW accelerated) into your framebuffer (or a render-to-texture texture). In that sense, it is not so easy to achieve what you want, since that is not what CEGUI is made for. We care more about performance, low impact and closeness to the graphics libs than floaty windows - which are more of an editor than a game thing.

I am not sure exactly how Word etc. do it but I would asume they access the .net library and create new OS-native window handles for each of those dockable/not-dockable pop-up windows. Since this goes pretty deep into the OS, it would be extra hard for us as cross-platform library to support this in CEGUI. Nevertheless, it is something you could add if you really needed it.

Yaron already mentioned some important points, such as each window having its own GUIContext, so that these windows manage their own layouts. You probably still want to share resources on your GPU like textures, vertex buffers. This can be done between different OpenGL Contexts (or whatever is the D3D equivalent) but whatever library you use needs to support setting this up, unless you can figure out how to do it yourself. Using one OpenGL Context across multiple windows afaik is not possible. Using multiple instances of CEGUI in one program is currently not possible because of the singletons (we want to remove those entirely in 1.0) so having multiple OpenGL Contexts sharing resources is your only hope, and this is the best way anyways since otherwise you duplicate a lot of the resources, etc.

But as you can see, this route won't be an easy one, and I do not know of anyone having done multi-context rendering in CEGUI before :)
CrazyEddie: "I don't like GUIs"

cstoneburner
Just popping in
Just popping in
Posts: 2
Joined: Tue Jan 17, 2017 21:15

Re: Is it possible to float windows outside of application main window?

Postby cstoneburner » Tue Jan 17, 2017 23:07

Thanks so much for the speedy replies! It definitely sounds beyond where I am with CEGUI currently, but if I ever get really ambitious I may see what I can make happen, as much for the fun of it as anything else.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 17 guests