[2.2] How to compile MyGUI for Ogre 2.2

Discussion area about developing with Ogre2 branches (2.1, 2.2 and beyond)
Post Reply
Lax
Gnome
Posts: 369
Joined: Mon Aug 06, 2007 12:53 pm
Location: Saarland, Germany
x 8

[2.2] How to compile MyGUI for Ogre 2.2

Post by Lax » Fri May 17, 2019 4:23 pm

Hi together,

I wanted to ask, if someone already ported the MyGUI Engine to Ogre2.2?
I get a lot of erros in Ogre2Platform project, because textures and compositors api has of course changed.

Best Regards
Lax
0 x

xrgo
OGRE Expert User
OGRE Expert User
Posts: 1047
Joined: Sat Jul 06, 2013 10:59 pm
Location: Chile
x 74

Re: [2.2] How to compile MyGUI for Ogre 2.2

Post by xrgo » Fri May 17, 2019 4:58 pm

rujialiu I summon you!
he helped me with that task, and prefer if he shares it.
rujia, maybe you could make a branch/fork on the official myGui repo?
0 x

al2950
OGRE Expert User
OGRE Expert User
Posts: 1200
Joined: Thu Dec 11, 2008 7:56 pm
Location: Bristol, UK
x 76

Re: [2.2] How to compile MyGUI for Ogre 2.2

Post by al2950 » Fri May 17, 2019 8:21 pm

Arggg. I was also helped by rujialiu, but I did say I would create a PR with my changes but have failed to do that. I am not sure my approach to the changes is the most universal, but maybe I should at least make them public. I ve put it off because it requires git, which just irritates me! Ill try and find time this weekend
0 x

Lax
Gnome
Posts: 369
Joined: Mon Aug 06, 2007 12:53 pm
Location: Saarland, Germany
x 8

Re: [2.2] How to compile MyGUI for Ogre 2.2

Post by Lax » Sat May 18, 2019 2:36 pm

Hi al2950,

that would be great!

Best Regards
Lax
0 x

rujialiu
Goblin
Posts: 224
Joined: Mon May 09, 2016 8:21 am
x 20

Re: [2.2] How to compile MyGUI for Ogre 2.2

Post by rujialiu » Sat May 18, 2019 5:11 pm

xrgo wrote:
Fri May 17, 2019 4:58 pm
rujialiu I summon you!
he helped me with that task, and prefer if he shares it.
rujia, maybe you could make a branch/fork on the official myGui repo?
haha, I was too lazy and hoped that al2950 would find sometime to publish the changes earlier than I do...
Arggg. I was also helped by rujialiu, but I did say I would create a PR with my changes but have failed to do that. I am not sure my approach to the changes is the most universal, but maybe I should at least make them public. I ve put it off because it requires git, which just irritates me! Ill try and find time this weekend
That would be very nice. Even if your changes are not most universal, it must be better than what I originally sent you 8-)
0 x

al2950
OGRE Expert User
OGRE Expert User
Posts: 1200
Joined: Thu Dec 11, 2008 7:56 pm
Location: Bristol, UK
x 76

Re: [2.2] How to compile MyGUI for Ogre 2.2

Post by al2950 » Wed May 22, 2019 9:56 am

Sorry, failed to do this last weekend. I will try Friday. Please just keep pestering me!
1 x

Lax
Gnome
Posts: 369
Joined: Mon Aug 06, 2007 12:53 pm
Location: Saarland, Germany
x 8

Re: [2.2] How to compile MyGUI for Ogre 2.2

Post by Lax » Sun May 26, 2019 9:58 am

Hi al2950,

you asked to pestering you :D
Is there any progress?

Best regards
Lax
0 x

al2950
OGRE Expert User
OGRE Expert User
Posts: 1200
Joined: Thu Dec 11, 2008 7:56 pm
Location: Bristol, UK
x 76

Re: [2.2] How to compile MyGUI for Ogre 2.2

Post by al2950 » Sun May 26, 2019 11:52 am

ok, so it turns out I was even lazier than I thought. I think i took rujialiu changes and made them less sensible! I would really like to sort this properly so there is 1 ogre branch in mygui, with as much shared code as possible. This will obviously take a little while, and might be too messy to actually do. in the meantime I have uploaded what I currently use for 2.2:

https://github.com/al2950/mygui/tree/Ogre2.2
3 x

Lax
Gnome
Posts: 369
Joined: Mon Aug 06, 2007 12:53 pm
Location: Saarland, Germany
x 8

Re: [2.2] How to compile MyGUI for Ogre 2.2

Post by Lax » Sun May 26, 2019 5:20 pm

Thanks a lot!
At least it compiled :)

Best Regards
Lax
0 x

rujialiu
Goblin
Posts: 224
Joined: Mon May 09, 2016 8:21 am
x 20

Re: [2.2] How to compile MyGUI for Ogre 2.2

Post by rujialiu » Wed May 29, 2019 4:12 pm

al2950 wrote:
Sun May 26, 2019 11:52 am
ok, so it turns out I was even lazier than I thought. I think i took rujialiu changes and made them less sensible! I would really like to sort this properly so there is 1 ogre branch in mygui, with as much shared code as possible. This will obviously take a little while, and might be too messy to actually do. in the meantime I have uploaded what I currently use for 2.2:

https://github.com/al2950/mygui/tree/Ogre2.2
yeah!!!
0 x

xrgo
OGRE Expert User
OGRE Expert User
Posts: 1047
Joined: Sat Jul 06, 2013 10:59 pm
Location: Chile
x 74

Re: [2.2] How to compile MyGUI for Ogre 2.2

Post by xrgo » Tue Aug 13, 2019 9:07 pm

Hello! I have MyGui working with Ogre 2.2 and OpenGL... the main usage for my is to render gui in to a texture that I use on some object inside the 3D scene.
Now I am porting my engine to Direct3D11 and all the MyGui stuffs don't show on the objects on the scene but it shows on the main render window :S

I am giving the correct texture when I call addWorkspace, and checked that the workspace has indeed the correct texture when update is being called. Also checked on renderdoc that the correct texture is not being filled with the gui image.

anyone else is using MyGui to render in to an Ogre 2.2 texture?

thanks!
0 x

xrgo
OGRE Expert User
OGRE Expert User
Posts: 1047
Joined: Sat Jul 06, 2013 10:59 pm
Location: Chile
x 74

Re: [2.2] How to compile MyGUI for Ogre 2.2

Post by xrgo » Fri Aug 23, 2019 10:54 pm

xrgo wrote:
Tue Aug 13, 2019 9:07 pm
Now I am porting my engine to Direct3D11 and all the MyGui stuffs don't show on the objects on the scene but it shows on the main render window :S
solved this problem thanks to dark_sylinc, by changing MyGUIPass::execute to this:

Code: Select all

	void MyGUIPass::execute(const Ogre::Camera *lodCameraconst)
	{
        profilingBegin();
        executeResourceTransitions();
        setRenderPassDescToCurrent();
		static_cast<MyGUI::Ogre2RenderManager*>(MyGUI::RenderManager::getInstancePtr())->render();
        profilingEnd();
	}
plus some profiling stuffs

thanks!
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 4077
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 231
Contact:

Re: [2.2] How to compile MyGUI for Ogre 2.2

Post by dark_sylinc » Fri Aug 23, 2019 10:59 pm

The order of executeResourceTransitions and setRenderPassDescToCurrent was inverted!

setRenderPassDescToCurrent must be called first!
executeResourceTransitions is only relevant for Metal.
0 x

rujialiu
Goblin
Posts: 224
Joined: Mon May 09, 2016 8:21 am
x 20

Re: [2.2] How to compile MyGUI for Ogre 2.2

Post by rujialiu » Tue Sep 10, 2019 2:05 pm

A gentle reminder: the latest commit breaks a few API. In order to compile MyGUI, you need a simple change:

Code: Select all

Platforms/Ogre2/Ogre2Platform/src/MyGUI_Ogre2RTTexture.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Platforms/Ogre2/Ogre2Platform/src/MyGUI_Ogre2RTTexture.cpp b/Platforms/Ogre2/Ogre2Platform/src/MyGUI_Ogre2RTTexture.cpp
index 72a57b5..a32177d 100644
--- a/Platforms/Ogre2/Ogre2Platform/src/MyGUI_Ogre2RTTexture.cpp
+++ b/Platforms/Ogre2/Ogre2Platform/src/MyGUI_Ogre2RTTexture.cpp
@@ -100,7 +100,7 @@ namespace MyGUI
         //mSaveRenderPassDesc = system->getCurrentPassDescriptor();
         Ogre::Vector4 viewportSize(0, 0, 1, 1);
         Ogre::Vector4 scissors(0, 0, 1, 1);
-        system->beginRenderPassDescriptor(mRenderPassDesc, mTexture, 0, viewportSize, scissors, false, false);
+        system->beginRenderPassDescriptor(mRenderPassDesc, mTexture, 0, &viewportSize, &scissors, 1, false, false);
 #endif
     }
The line might not match because I'm using my own MyGUI branch.
0 x

Post Reply