[2.2] How to compile MyGUI for Ogre 2.2

Discussion area about developing with Ogre2 branches (2.1, 2.2 and beyond)
libolt
Greenskin
Posts: 111
Joined: Wed Jan 19, 2005 4:48 am
x 5

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: 91
Joined: Tue Sep 18, 2018 4:53 am
x 19

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: 1147
Joined: Sat Jul 06, 2013 10:59 pm
Location: Chile
x 166

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: 91
Joined: Tue Sep 18, 2018 4:53 am
x 19

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: 1147
Joined: Sat Jul 06, 2013 10:59 pm
Location: Chile
x 166

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

Post Reply