Canvas Like Widget Control?

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

Rixarn
Just popping in
Just popping in
Posts: 3
Joined: Tue Aug 06, 2013 21:51

Canvas Like Widget Control?

Postby Rixarn » Tue Aug 06, 2013 21:58

Hello, I'm new to CEGUI and I want to consider it as the gui subsystem for my next C++ game project. I've checked some of the control descriptions but I have no clue if any of them can be used as a "Canvas". What I want to do is have a widget where I can put my own render routine.

Is it possible?

Thanks :)

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

Re: Canvas Like Widget Control?

Postby Ident » Wed Aug 07, 2013 16:39

From what i understand you want to render into a texture and then display this texture inside a widget. If you use an OpenGL or Direct3D texture to render your normal stuff into and you can create an Image, apply your texture to it and then use the image inside a CEGUI window.

That's what I understand from your post. However I do not know what a Widget Control / Canvas is, can you offer a link to what u mean?
CrazyEddie: "I don't like GUIs"

Rixarn
Just popping in
Just popping in
Posts: 3
Joined: Tue Aug 06, 2013 21:51

Re: Canvas Like Widget Control?

Postby Rixarn » Wed Aug 14, 2013 18:31

Hello Ident,

Thanks for your reply! I was on vacation and didn't had the time to check the forum. Actually what you say pretty much solves what I want to do I think. A "Canvas" widget would be, for example, a small contained space inside a window where I can render, for example, a mini-map of a game or some 2d charts and the like.

So that's how it's done, render to texture? Is that fast?

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

Re: Canvas Like Widget Control?

Postby Ident » Thu Aug 15, 2013 00:18

it can be very fast yes, it depends on how fast u make it. Rendering to texture is basically as fast as all rendering in general - so, very fast. Unless, of course, you are doing something in a way it is not supposed to be done, for example using complex fragment shaders, a lot of state switches, uploading data each frame, etc.

Of course you have to take care of the whole rendering in your specific render engine yourself then.

if you want to draw something specific like a rectangle (with certain stroke, fill, etc.) and other primitive objects for minimap objects, then you should wait till the GSOC 2013 project is finished and integrated. It will allow to add such things more conveniently and just have the resulting Image being part of a window, being rendered by CEGUI automatically...
CrazyEddie: "I don't like GUIs"

Rixarn
Just popping in
Just popping in
Posts: 3
Joined: Tue Aug 06, 2013 21:51

Re: Canvas Like Widget Control?

Postby Rixarn » Fri Aug 16, 2013 12:44

Sounds Good! I still have to wait until I finish some other stuff so yeah, I can wait :)


Return to “Help”

Who is online

Users browsing this forum: No registered users and 30 guests