CEGUI on OGRE 2.1

Discussion regarding the development of CEGUI itself - as opposed to questions about CEGUI usage that should be in the help forums.

Moderators: CEGUI MVP, CEGUI Team

lucebac
Just can't stay away
Just can't stay away
Posts: 193
Joined: Sat May 24, 2014 21:55

Re: CEGUI on OGRE 2.1

Postby lucebac » Sat Apr 25, 2015 09:10

Updating PRs does only work as long as they are open - once they get merged you have to create a new one.

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

Re: CEGUI on OGRE 2.1

Postby Ident » Sat Apr 25, 2015 09:21

If your previous PR has been merged fully then you can simply make a new PR on the same repo of yours.
CrazyEddie: "I don't like GUIs"

Jayray
Just popping in
Just popping in
Posts: 13
Joined: Sun Mar 15, 2015 21:42

Re: CEGUI on OGRE 2.1

Postby Jayray » Tue Apr 28, 2015 21:41

OK, thanks for your answers!

The changes I had to make to have the GUI displayed with D3D11 included setting the TU_DYNAMIC flag on the textures instead of the TU_DEFAULT flag (TU_DEFAULT = TU_AUTOMIPMAP | TU_STATIC_WRITE_ONLY).
The cause of this change is likely to be a bug in the D3D11 render system in OGRE 2.1 (to be confirmed). Anyway, this makes me wonder: should the TU_DEFAULT flag be kept for textures if possible, or would the TU_DYNAMIC flag better?

From what I have understood, the TU_STATIC flag (included in the TU_DEFAULT flag) has better performances for textures that are not updated often but is slower to update a texture.
So I guess the questions are:
- In CEGUI, are most of the textures updated often or rarely?
- Is it better to have a higher update time but better performances when the texture is not updated, or the contrary?

The details of the impact of setting the dynamic flag can be found in this post.

PS: as for the previous PR, these changes are between macros and will only affect CEGUI on OGRE 2.1.

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

Re: CEGUI on OGRE 2.1

Postby Ident » Tue Apr 28, 2015 22:12

The textures are never changed after resource setup normally
CrazyEddie: "I don't like GUIs"

Jayray
Just popping in
Just popping in
Posts: 13
Joined: Sun Mar 15, 2015 21:42

Re: CEGUI on OGRE 2.1

Postby Jayray » Thu Apr 30, 2015 12:03

OK, so this means that the static flag must be kept and that the issue in the D3D11 render system must be fixed in Ogre 2.1.
Thanks for your help!

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

Re: CEGUI on OGRE 2.1

Postby Ident » Thu Apr 30, 2015 12:18

Just to reaffirm: By updating you meant changing the texture itself (uploading a subset of texels or an entirely new image as texture) and not the usage, as in texture-binding
CrazyEddie: "I don't like GUIs"

Jayray
Just popping in
Just popping in
Posts: 13
Joined: Sun Mar 15, 2015 21:42

Re: CEGUI on OGRE 2.1

Postby Jayray » Thu Apr 30, 2015 12:27

Yes, this is what I meant :)

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

Re: CEGUI on OGRE 2.1

Postby Ident » Thu Apr 30, 2015 12:33

Yea that is very static
CrazyEddie: "I don't like GUIs"

Jayray
Just popping in
Just popping in
Posts: 13
Joined: Sun Mar 15, 2015 21:42

Re: CEGUI on OGRE 2.1

Postby Jayray » Mon May 04, 2015 18:49

I managed to fix the issue, it was indeed a bug in the Ogre D3D11 render system \o/
I have made a new pull request here: https://bitbucket.org/cegui/cegui/pull-request/156/ogre-renderer-updated-to-be-compatible/diff

Thanks for your help! :D

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

Re: CEGUI on OGRE 2.1

Postby Ident » Mon May 04, 2015 20:36

I merged it without testing. It looked fine on first glance and I trust that you tested it sufficiently.
CrazyEddie: "I don't like GUIs"

Jayray
Just popping in
Just popping in
Posts: 13
Joined: Sun Mar 15, 2015 21:42

Re: CEGUI on OGRE 2.1

Postby Jayray » Wed May 06, 2015 19:29

Thanks!
Yes, I have tested it :)
I just did not try to compile it against a previous Ogre version, but I have double-checked that all my changes only affect the code inside the macros dedicated to Ogre 2.1.

I will try to report these changes in the default branch when I can, but it may take some time as I do not have a project working with the default branch, and I have seen that the Ogre renderer has changed a lot since the 0.8 branch.

123iamking
Just popping in
Just popping in
Posts: 4
Joined: Thu Oct 19, 2017 13:14

Re: CEGUI on OGRE 2.1

Postby 123iamking » Thu Oct 19, 2017 13:20

It's been 2 years and Ogre 2.1 has changed a lot :rofl: CEGUI still not officially support Ogre 2.1. So the reason because CEGUI only support the official Ogre version or CEGUI may never support Ogre 2.1 (for break ABI API reason). And if it's the break ABI API reason, Is it safe that I manually tweak it to eliminate build error and use it (I mean even the creator of CEGUI afraid of it, presumably ...) :pint: . I don't mean to underestimate anyone's effort, I just ask this out of curiosity :hammer:
Thanks :D

Jayray
Just popping in
Just popping in
Posts: 13
Joined: Sun Mar 15, 2015 21:42

Re: CEGUI on OGRE 2.1

Postby Jayray » Thu Oct 19, 2017 13:47

Hi,

It's been a long time since I have not developped on OGRE / CEGUI (2 years approximately... :roll: ), but I think the ABI / API break can be avoided by using the CEGUI_USE_OGRE_HLMS define, like I have done in my pull request (this one).
IMHO, it is safe to manually tweak CEGUI to make it build with OGRE 2.1 if all your code is between #ifdef CEGUI_USE_OGRE_HLMS.

123iamking
Just popping in
Just popping in
Posts: 4
Joined: Thu Oct 19, 2017 13:14

Re: CEGUI on OGRE 2.1

Postby 123iamking » Fri Oct 20, 2017 00:25

I see that Kohedlo is trying to fix for CEGUI to work with DirectX in Ogre 2.1. Hope soon CEGUI can be used easily with Ogre 2.1 :D

123iamking
Just popping in
Just popping in
Posts: 4
Joined: Thu Oct 19, 2017 13:14

Re: CEGUI on OGRE 2.1

Postby 123iamking » Fri Oct 20, 2017 09:34

I don't know but do you think it would be a good idea to have a working branch for Ogre 2.1, just like MyGUI. :mrgreen:


Return to “CEGUI Library Development Discussion”

Who is online

Users browsing this forum: No registered users and 12 guests