[2.2] How to compile MyGUI for Ogre 2.2

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


libolt
Greenskin
Posts: 126
Joined: Wed Jan 19, 2005 4:48 am
x 9

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

Post by libolt »

So I have managed to get further but it now fails with the following:

Code: Select all

[ 29%] Building CXX object Common/CMakeFiles/Common.dir/Base/Ogre2/BaseManager.cpp.o
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp: In member function ‘bool base::BaseManager::create(int, int)’:
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:121:9: error: ‘InstancingThreadedCullingMethod’ is not a member of ‘Ogre’
  121 |   Ogre::InstancingThreadedCullingMethod threadedCullingMethod = Ogre::INSTANCING_CULLING_SINGLETHREAD;
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:123:4: error: ‘threadedCullingMethod’ was not declared in this scope
  123 |    threadedCullingMethod = Ogre::INSTANCING_CULLING_THREADED;
      |    ^~~~~~~~~~~~~~~~~~~~~
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:123:34: error: ‘INSTANCING_CULLING_THREADED’ is not a member of ‘Ogre’
  123 |    threadedCullingMethod = Ogre::INSTANCING_CULLING_THREADED;
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:124:95: error: ‘threadedCullingMethod’ was not declared in this scope
  124 |   mSceneManager = Ogre::Root::getSingleton().createSceneManager(Ogre::ST_GENERIC, numThreads, threadedCullingMethod);
      |                                                                                               ^~~~~~~~~~~~~~~~~~~~~
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:144:74: error: no matching function for call to ‘Ogre::ResourceGroupManager::initialiseAllResourceGroups()’
  144 |   Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
      |                                                                          ^
In file included from /home/libolt/usr/ogre-2.2-sdk/include/OGRE/OgreBillboardChain.h:39,
                 from /home/libolt/usr/ogre-2.2-sdk/include/OGRE/Ogre.h:41,
                 from /home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.h:10,
                 from /home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:8:
/home/libolt/usr/ogre-2.2-sdk/include/OGRE/OgreResourceGroupManager.h:544:14: note: candidate: ‘void Ogre::ResourceGroupManager::initialiseAllResourceGroups(bool)’
  544 |         void initialiseAllResourceGroups( bool changeLocaleTemporarily );
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/libolt/usr/ogre-2.2-sdk/include/OGRE/OgreResourceGroupManager.h:544:14: note:   candidate expects 1 argument, 0 provided
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp: In member function ‘void base::BaseManager::run()’:
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:167:29: error: ‘class Ogre::RenderSystem’ has no member named ‘_initRenderTargets’
  167 |   mRoot->getRenderSystem()->_initRenderTargets();
      |                             ^~~~~~~~~~~~~~~~~~
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:174:15: error: invalid use of incomplete type ‘class Ogre::Window’
  174 |    if (mWindow->isActive() == false)
      |               ^~
In file included from /home/libolt/usr/ogre-2.2-sdk/include/OGRE/Ogre.h:31,
                 from /home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.h:10,
                 from /home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:8:
/home/libolt/usr/ogre-2.2-sdk/include/OGRE/OgrePrerequisites.h:358:11: note: forward declaration of ‘class Ogre::Window’
  358 |     class Window;
      |           ^~~~~~
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:176:12: error: invalid use of incomplete type ‘class Ogre::Window’
  176 |     mWindow->setActive(true);
      |            ^~
In file included from /home/libolt/usr/ogre-2.2-sdk/include/OGRE/Ogre.h:31,
                 from /home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.h:10,
                 from /home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:8:
/home/libolt/usr/ogre-2.2-sdk/include/OGRE/OgrePrerequisites.h:358:11: note: forward declaration of ‘class Ogre::Window’
  358 |     class Window;
      |           ^~~~~~
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp: In member function ‘void base::BaseManager::destroy()’:
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:205:30: error: no matching function for call to ‘Ogre::SceneManager::clearScene()’
  205 |    mSceneManager->clearScene();
      |                              ^
In file included from /home/libolt/usr/ogre-2.2-sdk/include/OGRE/OgreSceneManagerEnumerator.h:33,
                 from /home/libolt/usr/ogre-2.2-sdk/include/OGRE/OgreRoot.h:34,
                 from /home/libolt/usr/ogre-2.2-sdk/include/OGRE/Ogre.h:88,
                 from /home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.h:10,
                 from /home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:8:
/home/libolt/usr/ogre-2.2-sdk/include/OGRE/OgreSceneManager.h:1602:22: note: candidate: ‘virtual void Ogre::SceneManager::clearScene(bool, bool)’
 1602 |         virtual void clearScene( bool deleteIndestructibleToo, bool reattachCameras=true );
      |                      ^~~~~~~~~~
/home/libolt/usr/ogre-2.2-sdk/include/OGRE/OgreSceneManager.h:1602:22: note:   candidate expects 2 arguments, 0 provided
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:213:11: error: invalid use of incomplete type ‘class Ogre::Window’
  213 |    mWindow->destroy();
      |           ^~
In file included from /home/libolt/usr/ogre-2.2-sdk/include/OGRE/Ogre.h:31,
                 from /home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.h:10,
                 from /home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:8:
/home/libolt/usr/ogre-2.2-sdk/include/OGRE/OgrePrerequisites.h:358:11: note: forward declaration of ‘class Ogre::Window’
  358 |     class Window;
      |           ^~~~~~
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:219:10: error: ‘RenderWindow’ is not a member of ‘Ogre’
  219 |    Ogre::RenderWindow* window = mRoot->getAutoCreatedWindow();
      |          ^~~~~~~~~~~~
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:219:24: error: ‘window’ was not declared in this scope; did you mean ‘Window’?
  219 |    Ogre::RenderWindow* window = mRoot->getAutoCreatedWindow();
      |                        ^~~~~~
      |                        Window
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp: In member function ‘virtual void base::BaseManager::createGui()’:
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:266:92: error: no matching function for call to ‘Ogre::CompositorManager2::addWorkspace(Ogre::SceneManager*&, Ogre::Window*&, Ogre::Camera*&, const Ogre::IdString&, bool)’
  266 |   pCompositorManager->addWorkspace(mSceneManager, mWindow, mCamera, workspaceNameHash, true);
      |                                                                                            ^
In file included from /home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:16:
/home/libolt/usr/ogre-2.2-sdk/include/OGRE/Compositor/OgreCompositorManager2.h:341:30: note: candidate: ‘Ogre::CompositorWorkspace* Ogre::CompositorManager2::addWorkspace(Ogre::SceneManager*, Ogre::TextureGpu*, Ogre::Camera*, Ogre::IdString, bool, int, const UavBufferPackedVec*, const ResourceLayoutMap*, const ResourceAccessMap*, const Ogre::Vector4&, Ogre::uint8, Ogre::uint8)’
  341 |         CompositorWorkspace* addWorkspace( SceneManager *sceneManager, TextureGpu *finalRenderTarget,
      |                              ^~~~~~~~~~~~
/home/libolt/usr/ogre-2.2-sdk/include/OGRE/Compositor/OgreCompositorManager2.h:341:84: note:   no known conversion for argument 2 from ‘Ogre::Window*’ to ‘Ogre::TextureGpu*’
  341 |         CompositorWorkspace* addWorkspace( SceneManager *sceneManager, TextureGpu *finalRenderTarget,
      |                                                                        ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/home/libolt/usr/ogre-2.2-sdk/include/OGRE/Compositor/OgreCompositorManager2.h:350:30: note: candidate: ‘Ogre::CompositorWorkspace* Ogre::CompositorManager2::addWorkspace(Ogre::SceneManager*, const CompositorChannelVec&, Ogre::Camera*, Ogre::IdString, bool, int, const UavBufferPackedVec*, const ResourceLayoutMap*, const ResourceAccessMap*, const Ogre::Vector4&, Ogre::uint8, Ogre::uint8)’
  350 |         CompositorWorkspace* addWorkspace( SceneManager *sceneManager,
      |                              ^~~~~~~~~~~~
/home/libolt/usr/ogre-2.2-sdk/include/OGRE/Compositor/OgreCompositorManager2.h:351:72: note:   no known conversion for argument 2 from ‘Ogre::Window*’ to ‘const CompositorChannelVec&’ {aka ‘const std::vector<Ogre::TextureGpu*, Ogre::STLAllocator<Ogre::TextureGpu*, Ogre::CategorisedAllocPolicy<Ogre::MEMCATEGORY_GENERAL> > >&’}
  351 |                                            const CompositorChannelVec &externalRenderTargets,
      |                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp: At global scope:
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:422:40: error: variable or field ‘windowResized’ declared void
  422 |  void BaseManager::windowResized(Ogre::RenderWindow* _rw)
      |                                        ^~~~~~~~~~~~
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:422:40: error: ‘RenderWindow’ is not a member of ‘Ogre’
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:422:54: error: ‘_rw’ was not declared in this scope
  422 |  void BaseManager::windowResized(Ogre::RenderWindow* _rw)
      |                                                      ^~~
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:436:39: error: variable or field ‘windowClosed’ declared void
  436 |  void BaseManager::windowClosed(Ogre::RenderWindow* _rw)
      |                                       ^~~~~~~~~~~~
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:436:39: error: ‘RenderWindow’ is not a member of ‘Ogre’
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:436:53: error: ‘_rw’ was not declared in this scope
  436 |  void BaseManager::windowClosed(Ogre::RenderWindow* _rw)
      |                                                     ^~~
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp: In member function ‘size_t base::BaseManager::getWindowHandle()’:
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:445:10: error: invalid use of incomplete type ‘class Ogre::Window’
  445 |   mWindow->getCustomAttribute("WINDOW", &handle);
      |          ^~
In file included from /home/libolt/usr/ogre-2.2-sdk/include/OGRE/Ogre.h:31,
                 from /home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.h:10,
                 from /home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:8:
/home/libolt/usr/ogre-2.2-sdk/include/OGRE/OgrePrerequisites.h:358:11: note: forward declaration of ‘class Ogre::Window’
  358 |     class Window;
      |           ^~~~~~
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp: In member function ‘void base::BaseManager::setWindowCaption(const wstring&)’:
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:456:10: error: invalid use of incomplete type ‘class Ogre::Window’
  456 |   mWindow->getCustomAttribute("XDISPLAY", &xDisplay);
      |          ^~
In file included from /home/libolt/usr/ogre-2.2-sdk/include/OGRE/Ogre.h:31,
                 from /home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.h:10,
                 from /home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:8:
/home/libolt/usr/ogre-2.2-sdk/include/OGRE/OgrePrerequisites.h:358:11: note: forward declaration of ‘class Ogre::Window’
  358 |     class Window;
      |           ^~~~~~
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:457:10: error: invalid use of incomplete type ‘class Ogre::Window’
  457 |   mWindow->getCustomAttribute("WINDOW", &windowHandle);
      |          ^~
In file included from /home/libolt/usr/ogre-2.2-sdk/include/OGRE/Ogre.h:31,
                 from /home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.h:10,
                 from /home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:8:
/home/libolt/usr/ogre-2.2-sdk/include/OGRE/OgrePrerequisites.h:358:11: note: forward declaration of ‘class Ogre::Window’
  358 |     class Window;
      |           ^~~~~~
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp: In member function ‘void base::BaseManager::makeScreenShot()’:
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:619:10: error: invalid use of incomplete type ‘class Ogre::Window’
  619 |   mWindow->writeContentsToFile(file);
      |          ^~
In file included from /home/libolt/usr/ogre-2.2-sdk/include/OGRE/Ogre.h:31,
                 from /home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.h:10,
                 from /home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:8:
/home/libolt/usr/ogre-2.2-sdk/include/OGRE/OgrePrerequisites.h:358:11: note: forward declaration of ‘class Ogre::Window’
  358 |     class Window;
      |           ^~~~~~
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp: In member function ‘MyGUI::MapString base::BaseManager::getStatistic()’:
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:630:30: error: invalid use of incomplete type ‘class Ogre::RenderTarget’
  630 |    const Ogre::RenderTarget::FrameStats rtStats = mWindow->getStatistics();
      |                              ^~~~~~~~~~
In file included from /home/libolt/usr/ogre-2.2-sdk/include/OGRE/OgreSceneManager.h:49,
                 from /home/libolt/usr/ogre-2.2-sdk/include/OGRE/OgreSceneManagerEnumerator.h:33,
                 from /home/libolt/usr/ogre-2.2-sdk/include/OGRE/OgreRoot.h:34,
                 from /home/libolt/usr/ogre-2.2-sdk/include/OGRE/Ogre.h:88,
                 from /home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.h:10,
                 from /home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:8:
/home/libolt/usr/ogre-2.2-sdk/include/OGRE/Compositor/Pass/OgreCompositorPass.h:41:11: note: forward declaration of ‘class Ogre::RenderTarget’
   41 |     class RenderTarget;
      |           ^~~~~~~~~~~~
/home/libolt/builds/mygui-ogre-2.2/Common/Base/Ogre2/BaseManager.cpp:631:50: error: ‘rtStats’ was not declared in this scope; did you mean ‘stats’?
  631 |    result["triangle"] = MyGUI::utility::toString(rtStats.triangleCount);
      |                                                  ^~~~~~~
      |                                                  stats
make[2]: *** [Common/CMakeFiles/Common.dir/build.make:83: Common/CMakeFiles/Common.dir/Base/Ogre2/BaseManager.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:703: Common/CMakeFiles/Common.dir/all] Error 2
make: *** [Makefile:150: all] Error 2
Sgoodok
Gnoblar
Posts: 1
Joined: Mon May 11, 2020 2:41 pm

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

Post by Sgoodok »

libolt wrote: Wed May 06, 2020 7:30 pm So I have managed to get further but it now fails with the following:
...
I make it compile with some duct tape. Not sure is my modifications valid:

Code: Select all

diff  BaseManager.h
82,83c82,83
< 		virtual void windowResized(Ogre::RenderWindow* _rw);
< 		virtual void windowClosed(Ogre::RenderWindow* _rw);
---
> 		virtual void windowResized(Ogre::Window* _rw);
> 		virtual void windowClosed(Ogre::Window* _rw);
95c95
< 		Ogre::RenderWindow* mWindow;
---
> 		Ogre::Window* mWindow;

diff  BaseManager.cpp
26a27,28
> #include "OgreTextureGpuManager.h"
> #include "OgreWindow.h"
90,100c92,117
< 
< 		mRoot = new Ogre::Root(pluginsPath, mResourcePath + "ogre.cfg", mResourcePath + "Ogre.log");
< 
< 		setupResources();
< 
< 		// попробуем завестись на дефолтных
< 		if (!mRoot->restoreConfig())
< 		{
< 			// ничего не получилось, покажем диалог
< 			if (!mRoot->showConfigDialog()) return false;
< 		}
---
> 			const Ogre::String pluginsFolder = "./";
> 			const Ogre::String writeAccessFolder = "./";
> #if MYGUI_DEBUG_MODE == 1
> 			const char *pluginsFile = "plugins_d.cfg";
> #else
> 			const char *pluginsFile = "plugins.cfg";
> #endif
> 		//mRoot = new Ogre::Root(pluginsPath, mResourcePath + "ogre.cfg", mResourcePath + "Ogre.log");
> 			mRoot = OGRE_NEW Ogre::Root(pluginsFolder + pluginsFile,     //
> 			writeAccessFolder + "ogre.cfg",  //
> 			writeAccessFolder + "Ogre.log");
> 
> 			setupResources();
> 
> 		
> #if MYGUI_DEBUG_MODE == 1
> 			if (!mRoot->showConfigDialog())
> 				return -1;
> #else
> 			// попробуем завестись на дефолтных
> 			if (!mroot->restoreconfig())
> 			{
> 				// ничего не получилось, покажем диалог
> 				if (!mroot->showconfigdialog()) return false;
> 			}
> #endif
104d120
< 
121,125c137,140
< 		Ogre::InstancingThreadedCullingMethod threadedCullingMethod = Ogre::INSTANCING_CULLING_SINGLETHREAD;
< 		if(numThreads > 1)
< 			threadedCullingMethod = Ogre::INSTANCING_CULLING_THREADED;
< 		mSceneManager = Ogre::Root::getSingleton().createSceneManager(Ogre::ST_GENERIC, numThreads, threadedCullingMethod);
< 
---
> 		//Ogre::InstancingThreadedCullingMethod threadedCullingMethod = Ogre::INSTANCING_CULLING_SINGLETHREAD;
> 		//if(numThreads > 1)
> 		//	threadedCullingMethod = Ogre::INSTANCING_CULLING_THREADED;
> 		mSceneManager = Ogre::Root::getSingleton().createSceneManager(Ogre::ST_GENERIC, numThreads);
132c147
< 		Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5);
---
> 		//Ogre::OgreTextureGpuManager::getSingleton().setDefaultNumMipmaps(5);
133a149
> 		
144c160
< 		Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
---
> 		Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups(true); // TODO check
167,168c183,184
< 		mRoot->getRenderSystem()->_initRenderTargets();
< 
---
> 		//TODO Check is it correct to just comment this
> 		//mRoot->getRenderSystem()->_initRenderTargets();
173,174c189,190
< 
< 			if (mWindow->isActive() == false)
---
> 			//TODO Changed to isHidden. Check is it correct.
> 			if (mWindow->isHidden())
176c192
< 				mWindow->setActive(true);
---
> 				mWindow->setHidden(false);
205c221
< 			mSceneManager->clearScene();
---
> 			mSceneManager->clearScene(true);
219c235
< 			Ogre::RenderWindow* window = mRoot->getAutoCreatedWindow();
---
> 			Ogre::Window* window = mRoot->getAutoCreatedWindow();
221c237
< 				window->removeAllViewports();
---
> 				window->destroy();
245a262
> 	
253a271,272
> 					const Ogre::ColourValue backgroundColour(0.2f, 0.4f, 0.6f);
> 					passClear->mClearColour[0] = backgroundColour;
257d275
< 
259c277
< 					targetDef->addPass(Ogre::PASS_CUSTOM, MyGUI::OgreCompositorPassProvider::mPassId);
---
> 					auto passmGui = targetDef->addPass(Ogre::PASS_CUSTOM, MyGUI::OgreCompositorPassProvider::mPassId);
265,267c283,284
< 
< 		pCompositorManager->addWorkspace(mSceneManager, mWindow, mCamera, workspaceNameHash, true);
< 
---
> 		
> 		pCompositorManager->addWorkspace(mSceneManager, mWindow->getTexture(), mCamera, workspaceNameHash, true);
422c439
< 	void BaseManager::windowResized(Ogre::RenderWindow* _rw)
---
> 	void BaseManager::windowResized(Ogre::Window* _rw)
436c453
< 	void BaseManager::windowClosed(Ogre::RenderWindow* _rw)
---
> 	void BaseManager::windowClosed(Ogre::Window* _rw)
619c636,637
< 		mWindow->writeContentsToFile(file);
---
> 		//mWindow->writeContentsToFile(file);
> 		mWindow->getTexture()->writeContentsToFile(file, 1 , 1);
627a646
> 
628a648
> 			
630,632c650,652
< 			const Ogre::RenderTarget::FrameStats rtStats = mWindow->getStatistics();
< 			result["triangle"] = MyGUI::utility::toString(rtStats.triangleCount);
< 			result["batch"] = MyGUI::utility::toString(rtStats.batchCount);
---
> 			//const Ogre::RenderTarget::FrameStats rtStats = mWindow->getStatistics();
> 			//result["triangle"] = MyGUI::utility::toString(rtStats.triangleCount);
> 			//result["batch"] = MyGUI::utility::toString(rtStats.batchCount);

So now it compiles and run but now all gui elements renders with some solid black material or something like that. Still cant catch why. All textures loads. But Renderables with fully transparent "BackgroundTile.png" in associated HlmsUnlitDatablock renders like black squares.

When i change Polygon blending Mode to Ogre::PM_WIREFRAME on mDataBlock in Ogre2Texture, I can see gui elements in wire frame mode and interact with them. But if change back to Ogre::PM_SOLID whole viewport fills with black colour.
Image
User avatar
cc9cii
Halfling
Posts: 99
Joined: Tue Sep 18, 2018 4:53 am
x 20

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

Post by cc9cii »

Has anyone gotten any further with Ogre 2.2 port of MyGUI? I have (finally) managed to compile against the latest Ogre 2.2 based on the info in this thread but the demos show blank screens only :-(
xrgo
OGRE Expert User
OGRE Expert User
Posts: 1148
Joined: Sat Jul 06, 2013 10:59 pm
Location: Chile
x 168

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

Post by xrgo »

this is my fork that is working on 2.2
https://github.com/yoyTeam/mygui
(its in the 2.1 branch, I didn't bother making a new branch)
BUT!!! I use it for rendering stuffs on textures so I cannot confirm if will work on regular usage
and I took the changes from the forums so I think should be the same that you already have, so the problem might be somewhere else

IMPORTANT!! I have hardcoded some values on line 285 of MyGUI_Ogre2RenderManager.cpp
https://github.com/yoyTeam/mygui/blob/o ... r.cpp#L285
restore this:

Code: Select all

mViewSize.set(1024, 1024);
to this:

Code: Select all

mViewSize.set(_window->getWidth(), _window->getHeight());
Saludos!
User avatar
cc9cii
Halfling
Posts: 99
Joined: Tue Sep 18, 2018 4:53 am
x 20

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

Post by cc9cii »

Thanks for your reply. I made some updates (there were some minor differences) based on your fork, but unfortunately still not working. For example the layout editor throws:

Code: Select all

                    OGRE_EXCEPT( Exception::ERR_INVALIDPARAMS,
                                 "Resolve Texture '" + colourEntry.resolveTexture->getNameStr() +
                                 "' specified, but texture to render to '" +
                                 colourEntry.texture->getNameStr() + "' is not MSAA",
                                 "RenderPassDescriptor::colourEntriesModified" );
The stack trace:

Code: Select all

 	OgreMain_d.dll!Ogre::ExceptionFactory::throwException(Ogre::Exception::ExceptionCodes code, int number, const std::string & desc, const std::string & src, const char * file, long line) Line 285	C++	Symbols loaded.
>	OgreMain_d.dll!Ogre::RenderPassDescriptor::colourEntriesModified() Line 201	C++	Symbols loaded.
 	OgreMain_d.dll!Ogre::RenderPassDescriptor::entriesModified(unsigned int entryTypes) Line 240	C++	Symbols loaded.
 	RenderSystem_Direct3D11_d.dll!Ogre::D3D11RenderPassDescriptor::entriesModified(unsigned int entryTypes) Line 347	C++	Symbols loaded.
 	LayoutEditor.exe!MyGUI::Ogre2RTTexture::begin() Line 103	C++	Symbols loaded.
 	LayoutEditor.exe!MyGUI::RTTLayer::renderToTarget(MyGUI::IRenderTarget * _target, bool _update) Line 61	C++	Symbols loaded.
 	MyGUIEngine_d.dll!MyGUI::LayerManager::renderToTarget(MyGUI::IRenderTarget * _target, bool _update) Line 228	C++	Symbols loaded.
 	MyGUIEngine_d.dll!MyGUI::RenderManager::onRenderToTarget(MyGUI::IRenderTarget * _target, bool _update) Line 42	C++	Symbols loaded.
 	LayoutEditor.exe!MyGUI::Ogre2RenderManager::render() Line 231	C++	Symbols loaded.
 	LayoutEditor.exe!MyGUI::MyGUIPass::execute(const Ogre::Camera * lodCameraconst) Line 38	C++	Symbols loaded.
 	OgreMain_d.dll!Ogre::CompositorNode::_update(const Ogre::Camera * lodCamera, Ogre::SceneManager * sceneManager) Line 898	C++	Symbols loaded.
 	OgreMain_d.dll!Ogre::CompositorWorkspace::_update() Line 837	C++	Symbols loaded.
 	OgreMain_d.dll!Ogre::CompositorManager2::_updateImplementation() Line 725	C++	Symbols loaded.
 	OgreMain_d.dll!Ogre::RenderSystem::updateCompositorManager(Ogre::CompositorManager2 * compositorManager) Line 1252	C++	Symbols loaded.
 	OgreMain_d.dll!Ogre::CompositorManager2::_update() Line 653	C++	Symbols loaded.
 	OgreMain_d.dll!Ogre::Root::_updateAllRenderTargets() Line 1541	C++	Symbols loaded.
 	OgreMain_d.dll!Ogre::Root::renderOneFrame() Line 1114	C++	Symbols loaded.
 	LayoutEditor.exe!base::BaseManager::run() Line 185	C++	Symbols loaded.
xrgo
OGRE Expert User
OGRE Expert User
Posts: 1148
Joined: Sat Jul 06, 2013 10:59 pm
Location: Chile
x 168

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

Post by xrgo »

ohh.. I don't build the layout editor, just the myGuiEngine and the Ogre2Platform. I use prebuilt editors, the generated layout files works fine with my build
User avatar
Crystal Hammer
Gnome
Posts: 317
Joined: Sat Jun 23, 2007 5:16 pm
x 77
Contact:

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

Post by Crystal Hammer »

Hi xrgo, I tried your fork with Ogre 2.3, and after some explaining for CMake I have libMyGUI.Ogre2Platform.a (lib) and libMyGUIEngine.so (dll) built.
Does it mean I can use it now and have Gui?
Because next projects in MyGui like Common (for Samples) throw many of errors, starting in BaseManager.cpp about Ogre RenderWindow, Instancing*Culling, PlatformInformation etc.

User avatar
Crystal Hammer
Gnome
Posts: 317
Joined: Sat Jun 23, 2007 5:16 pm
x 77
Contact:

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

Post by Crystal Hammer »

Right. It is enough to have libMyGUI.Ogre2Platform.a and libMyGUIEngine.so.
I started MyGui in EmptyProject from Ogre 2.3, but I get a crash.
Last line from MyGui.log is
01:28:08 | Core | Info | Load ini file 'MyGUI_Fonts.xml' | /home/ch/_dev/og23/mygui/MyGUIEngine/src/MyGUI_ResourceManager.cpp | 114
and from console (ogre.log):

Code: Select all

Creating resources for group Popular
All done
* Initialise: RenderManager
RenderManager successfully initialized
* Initialise: DataManager
DataManager successfully initialized
* Initialise: Gui
* MyGUI version 3.2.3
* Initialise: ResourceManager
ResourceManager successfully initialized
* Initialise: LayerManager
LayerManager successfully initialized
* Initialise: WidgetManager
WidgetManager successfully initialized
* Initialise: InputManager
InputManager successfully initialized
* Initialise: SubWidgetManager
SubWidgetManager successfully initialized
* Initialise: SkinManager
SkinManager successfully initialized
* Initialise: FontManager
FontManager successfully initialized
* Initialise: ControllerManager
ControllerManager successfully initialized
* Initialise: PointerManager
PointerManager successfully initialized
* Initialise: ClipboardManager
ClipboardManager successfully initialized
* Initialise: LayoutManager
LayoutManager successfully initialized
* Initialise: DynLibManager
DynLibManager successfully initialized
* Initialise: PluginManager
PluginManager successfully initialized
* Initialise: LanguageManager
LanguageManager successfully initialized
* Initialise: FactoryManager
FactoryManager successfully initialized
* Initialise: ToolTipManager
ToolTipManager successfully initialized
Load ini file 'MyGUI_Fonts.xml'
EmptyProject: ../../OgreMain/src/OgreHlmsManager.cpp:179: T* Ogre::HlmsManager::getBasicBlock(typename Ogre::vector<T>::type&, const T&) [with T = Ogre::HlmsBlendblock; Ogre::HlmsBasicBlock type = (Ogre::HlmsBasicBlock)1; long unsigned int maxLimit = 4096; typename Ogre::vector<T>::type = std::vector<Ogre::HlmsBlendblock, Ogre::STLAllocator<Ogre::HlmsBlendblock, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > >]: Assertion `baseParams.mBlockType == type && "baseParams.mBlockType should always be BLOCK_MACRO or BLOCK_BLEND! " "You can ignore this assert,  but it usually indicates memory corruption" "(or you created the block without its default constructor)."' failed.
Aborted

If I don't load fonts xml or images in xml, then it starts.

I changed the first line in this method in mygui/Platforms/Ogre2/Ogre2Platform/src/MyGUI_Ogre2VertexBuffer.cpp to build:

Code: Select all

	void Ogre2VertexBuffer::createVertexBuffer()
	{
		mRenderOperation.vertexData = new Ogre::v1::VertexData( Ogre::v1::HardwareBufferManager::getSingletonPtr( ) );

Can anyone help?
Edit: here is backtrace (callstack) from gdb:

Code: Select all

Load ini file 'MyGUI_Fonts.xml'
EmptyProject: ../../OgreMain/src/OgreHlmsManager.cpp:179: T* Ogre::HlmsManager::getBasicBlock(typename Ogre::vector<T>::type&, const T&) [with T = Ogre::HlmsBlendblock; Ogre::HlmsBasicBlock type = (Ogre::HlmsBasicBlock)1; long unsigned int maxLimit = 4096; typename Ogre::vector<T>::type = std::vector<Ogre::HlmsBlendblock, Ogre::STLAllocator<Ogre::HlmsBlendblock, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > >]: Assertion `baseParams.mBlockType == type && "baseParams.mBlockType should always be BLOCK_MACRO or BLOCK_BLEND! " "You can ignore this assert,  but it usually indicates memory corruption" "(or you created the block without its default constructor)."' failed.

Thread 1 "EmptyProject" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff69ff535 in __GI_abort () at abort.c:79
#2  0x00007ffff69ff40f in __assert_fail_base (fmt=0x7ffff6b61ee0 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
    assertion=0x7ffff7d23ce0 "baseParams.mBlockType == type && \"baseParams.mBlockType should always be BLOCK_MACRO or BLOCK_BLEND! \" \"You can ignore this assert,  but it usually indicates memory corruption\" \"(or you created the bl"..., file=0x7ffff7d23488 "../../OgreMain/src/OgreHlmsManager.cpp", line=179, function=<optimized out>)
    at assert.c:92
#3  0x00007ffff6a0d102 in __GI___assert_fail (
    assertion=0x7ffff7d23ce0 "baseParams.mBlockType == type && \"baseParams.mBlockType should always be BLOCK_MACRO or BLOCK_BLEND! \" \"You can ignore this assert,  but it usually indicates memory corruption\" \"(or you created the bl"..., file=0x7ffff7d23488 "../../OgreMain/src/OgreHlmsManager.cpp", line=179, 
    function=0x7ffff7d24160 <Ogre::HlmsManager::getBasicBlock<Ogre::HlmsBlendblock, (Ogre::HlmsBasicBlock)1, 4096ul>(Ogre::vector<Ogre::HlmsBlendblock, Ogre::STLAllocator<Ogre::HlmsBlendblock, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > >::type&, Ogre::HlmsBlendblock const&)::__PRETTY_FUNCTION__> "T* Ogre::HlmsManager::getBasicBlock(typename Ogre::vector<T>::type&, const T&) [with T = Ogre::HlmsBlendblock; Ogre::HlmsBasicBlock type = (Ogre::HlmsBasicBlock)1; long unsigned int maxLimit = 4096; t"...) at assert.c:101
#4  0x00007ffff78c518b in Ogre::HlmsManager::getBasicBlock<Ogre::HlmsBlendblock, (Ogre::HlmsBasicBlock)1, 4096ul> (
    this=0x555555acc8a0, container=std::vector of length 4, capacity 4096 = {...}, baseParams=...)
    at ../../OgreMain/src/OgreHlmsManager.cpp:176
#5  0x00007ffff78c0061 in Ogre::HlmsManager::getBlendblock (this=0x555555acc8a0, baseParams=...)
    at ../../OgreMain/src/OgreHlmsManager.cpp:248
#6  0x00007ffff7863197 in Ogre::Hlms::createDatablock (this=0x555556027a10, name=..., 
    refName=<error reading variable: Cannot access memory at address 0xc73ecea6>, macroblockRef=..., 
    blendblockRef=..., paramVec=std::vector of length 1004709291869980, capacity 417566318 = {...}, 
    visibleToManager=40, filename=<error reading variable: Cannot access memory at address 0x1f7496ecd>, 
    resourceGroup=<error: Cannot access memory at address 0xffffffff>) at ../../OgreMain/src/OgreHlms.cpp:1784
#7  0x00005555555f05b8 in MyGUI::OgreHlmsBlocks::createUnlitDataBlock (
    this=this@entry=0x555555618380 <MyGUI::Ogre2Texture::HLMS_BLOCKS>, id="93825008527456_TrueTypeFont")
    at /home/ch/_dev/og23/Ogre/ogre-next/OgreMain/include/OgreIdString.h:121
#8  0x00005555555f0453 in MyGUI::Ogre2Texture::Ogre2Texture (this=0x555555ea0610, 
    _name="93825008527456_TrueTypeFont", _group=...) at /usr/include/c++/8/bits/basic_string.h:936
#9  0x00005555555ecad1 in MyGUI::Ogre2RenderManager::createTexture (this=this@entry=0x555556052ec0, 
    _name="93825008527456_TrueTypeFont")
    at /home/ch/_dev/og23/mygui/Platforms/Ogre2/Ogre2Platform/include/MyGUI_Ogre2DataManager.h:36
#10 0x00007ffff70251d2 in MyGUI::ResourceTrueTypeFont::initialiseFreeType<false, false> (
    this=this@entry=0x5555564de860) at /usr/include/c++/8/bits/basic_ios.h:282
#11 0x00007ffff701924f in MyGUI::ResourceTrueTypeFont::initialise (this=this@entry=0x5555564de860)
    at /home/ch/_dev/og23/mygui/MyGUIEngine/src/MyGUI_ResourceTrueTypeFont.cpp:498
#12 0x00007ffff7019451 in MyGUI::ResourceTrueTypeFont::deserialization (this=this@entry=0x5555564de860, 
    _node=0x5555564dda60, _version=..., _version@entry=...)
    at /home/ch/_dev/og23/mygui/MyGUIEngine/src/MyGUI_ResourceTrueTypeFont.cpp:376
#13 0x00007ffff700ad0f in MyGUI::ResourceManager::loadFromXmlNode (this=0x555555ea0540, _node=<optimized out>, 
    _file=..., _version=...) at /home/ch/_dev/og23/mygui/MyGUIEngine/src/MyGUI_ResourceManager.cpp:100
#14 0x00007ffff70080a8 in MyGUI::delegates::CMethodDelegate3<MyGUI::ResourceManager, MyGUI::xml::Element*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, MyGUI::Version>::invoke (p3=..., 
    p2="MyGUI_Fonts.xml", p1=0x5555564dd840, this=<optimized out>)
    at /home/ch/_dev/og23/mygui/MyGUIEngine/include/MyGUI_DelegateImplement.h:87
#15 MyGUI::delegates::CDelegate3<MyGUI::xml::Element*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, MyGUI::Version>::operator() (this=<optimized out>, p3=..., p2="MyGUI_Fonts.xml", 
    p1=0x5555564dd840) at /home/ch/_dev/og23/mygui/MyGUIEngine/include/MyGUI_DelegateImplement.h:192
#16 MyGUI::ResourceManager::_loadImplement (this=0x555555ea0540, _file="MyGUI_Fonts.xml", _match=<optimized out>, 
--Type <RET> for more, q to quit, c to continue without paging--
    _type="", _instance="ResourceManager")
    at /home/ch/_dev/og23/mygui/MyGUIEngine/src/MyGUI_ResourceManager.cpp:163
#17 0x00007ffff7009e61 in MyGUI::ResourceManager::_loadList (this=0x555555ea0540, _node=<optimized out>, 
    _file=..., _version=...) at /usr/include/c++/8/bits/basic_string.h:252
#18 0x00007ffff70080a8 in MyGUI::delegates::CMethodDelegate3<MyGUI::ResourceManager, MyGUI::xml::Element*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, MyGUI::Version>::invoke (p3=..., 
    p2="MyGUI_Core.xml", p1=0x5555564dac40, this=<optimized out>)
    at /home/ch/_dev/og23/mygui/MyGUIEngine/include/MyGUI_DelegateImplement.h:87
#19 MyGUI::delegates::CDelegate3<MyGUI::xml::Element*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, MyGUI::Version>::operator() (this=<optimized out>, p3=..., p2="MyGUI_Core.xml", 
    p1=0x5555564dac40) at /home/ch/_dev/og23/mygui/MyGUIEngine/include/MyGUI_DelegateImplement.h:192
#20 MyGUI::ResourceManager::_loadImplement (this=0x555555ea0540, _file="MyGUI_Core.xml", _match=<optimized out>, 
    _type="", _instance="ResourceManager")
    at /home/ch/_dev/og23/mygui/MyGUIEngine/src/MyGUI_ResourceManager.cpp:163
#21 0x00007ffff700997c in MyGUI::ResourceManager::load (this=0x555555ea0540, _file="MyGUI_Core.xml")
    at /usr/include/c++/8/bits/basic_string.h:252
#22 0x00007ffff6f98ee1 in MyGUI::Gui::initialise (this=0x555555ea03a0, _core="MyGUI_Core.xml")
    at /home/ch/_dev/og23/mygui/MyGUIEngine/src/MyGUI_Gui.cpp:107
#23 0x00005555555b3919 in Demo::EmptyProjectGameState::createScene01 (this=0x555555650240)
    at ../src/EmptyProjectGameState.cpp:57
#24 0x00005555555b4671 in Demo::BaseSystem::createScene01 (this=0x5555556502d0)
    at ../src/OgreCommon/BaseSystem.cpp:28
#25 0x00005555555cc05a in Demo::MainEntryPoints::mainAppSingleThreaded (argc=1, argv=0x7fffffffdfd8)
    at ../src/OgreCommon/System/Desktop/MainLoopSingleThreaded.cpp:99
#26 0x00005555555b3009 in mainApp (argc=1, argv=0x7fffffffdfd8) at ../src/EmptyProject.cpp:35
#27 0x00005555555b2f4e in main (argc=1, argv=0x7fffffffdfd8) at ../include/OgreCommon/MainEntryPointHelper.h:40
(gdb) 
User avatar
Crystal Hammer
Gnome
Posts: 317
Joined: Sat Jun 23, 2007 5:16 pm
x 77
Contact:

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

Post by Crystal Hammer »

I did look around regarding that assert but all seems to be good.
So I moved to Release and everything started fine.

Now I don't see anything rendered from MyGUI.
MyGUI::Ogre2RenderManager::getInstance().getBatchCount() is just 0.

Hmm render() wasn't called, I guess something wrong with workspace?
I added in EmptyProjectGameState::update:
mPlatform->getRenderManagerPtr()->render();
but it SegFaults somewhere later (I guess this is not the right way).

Hi xrgo, can you tell or share some code lines on how do you tell MyGUI to render to a texture? Maybe if that'd work I could just draw that texture.

Edit:
Ok I think MyGUI pass is missing.
There is this code in void BaseManager::createGui() here.
which does in code:

Code: Select all

targetDef->addPass(Ogre::PASS_CUSTOM, MyGUI::OgreCompositorPassProvider::mPassId);

But also, as written, this could do the same:

Code: Select all

pass custom MYGUI
{
}

Is this enough or should it be more inside { }?

I tried adding this at end of compositor_node PbsMaterialsRenderingNode
but now it is throwing:

Code: Select all

An exception has occured: OGRE EXCEPTION(1:InvalidStateException): Using custom compositor passes but no provider is set in CompositorTargetDef::addPass at ../../OgreMain/src/Compositor/Pass/OgreCompositorPassDef.cpp (line 155)

I think it is too early? And Gui should initialize first, like in that code from BaseManager.
Man is it complicated to just draw triangles now.

User avatar
Crystal Hammer
Gnome
Posts: 317
Joined: Sat Jun 23, 2007 5:16 pm
x 77
Contact:

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

Post by Crystal Hammer »

Allright I see MyGUI now in Ogre 2.3. I will deal with events next.
So in case anyone wanted, here is what I did in EmptyProject sample:
I added:
MyGUI::Gui* mGui;
MyGUI::Ogre2Platform* mPlatform;
in class EmptyProjectGameState
then in void EmptyProjectGameState::createScene01()

Code: Select all

    	using namespace MyGUI;
        using namespace Ogre;
        //  Gui
        mPlatform = new Ogre2Platform();

    mPlatform->initialise(
        mGraphicsSystem->getRenderWindow(), mGraphicsSystem->getSceneManager(),
        Ogre::ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME);

	const Ogre::String workspaceName = "scene workspace";
	const Ogre::IdString workspaceNameHash = workspaceName;

	Ogre::CompositorManager2* pCompositorManager = Ogre::Root::getSingleton().getCompositorManager2();
	Ogre::CompositorNodeDef *nodeDef = pCompositorManager->addNodeDefinition("myworkspace");
	//Input texture
	nodeDef->addTextureSourceName("WindowRT", 0, Ogre::TextureDefinitionBase::TEXTURE_INPUT);
	nodeDef->setNumTargetPass(1);
	{
		Ogre::CompositorTargetDef *targetDef = nodeDef->addTargetPass("WindowRT");
		targetDef->setNumPasses(3);
		{
			{
				Ogre::CompositorPassClearDef* passClear = static_cast<Ogre::CompositorPassClearDef*>
				    (targetDef->addPass(Ogre::PASS_CLEAR));
				Ogre::CompositorPassSceneDef *passScene = static_cast<Ogre::CompositorPassSceneDef*>
					(targetDef->addPass(Ogre::PASS_SCENE));
				passScene->mShadowNode = Ogre::IdString();

				// For the MyGUI pass
				targetDef->addPass(Ogre::PASS_CUSTOM, MyGUI::OgreCompositorPassProvider::mPassId);
			}
		}
	}
	Ogre::CompositorWorkspaceDef *workDef = pCompositorManager->addWorkspaceDefinition(workspaceName);
	workDef->connectExternal(0, nodeDef->getName(), 0);

mGraphicsSystem->mWorkspace = pCompositorManager->addWorkspace(
        mGraphicsSystem->getSceneManager(),
        mGraphicsSystem->getRenderWindow()->getTexture(),
        mGraphicsSystem->getCamera(),
        workspaceNameHash, true);

    mGui = new Gui();
    mGui->initialise();

    LayoutManager::getInstance().loadLayout("Game.layout");

and very important I had to comment out this:
//mWorkspace = setupCompositor();
in void GraphicsSystem::initialize(

Post Reply