[SOLUTION INSIDE] PLSM2 + Ogre 1.6RC1 = problem?

thr

14-10-2008 20:28:42

Trying to compile PLSM2 with Ogre1.6RC1 but getting a lot of compile errors along the lines of:

1>..\src\OgrePagingLandScapeTile.cpp(150) : error C2039: 'getWorldPosition' : is not a member of 'Ogre::SceneNode'
1> C:\OgreSDK\include\OgreSceneNode.h(52) : see declaration of 'Ogre::SceneNode'


So I'm assuming that PLSM2 is not compatible with Ogre1.6?

thr

14-10-2008 21:35:03

I managed to solve the problem(s), and since I couldn't find any information on the wiki or the forums about how to do this I decided to add the info to the wiki page: http://www.ogre3d.org/wiki/index.php/Paging_Scene_Manager_Installation#VC9.0_.2B_Ogre1.6RC1_Install

If i stepped outside what newcomers to the ogre forums are allowed to do (edit the wiki) someone can just remove it, hope it helps someone though.

tuan kuranes

15-10-2008 18:17:17

You have to try to PLSM2_SVN.sln as it's the one compatible with Ogre 1.6 SVN or ogre source package.

it contains preprocessor definition that removes compiler error. (on vs2005 at least.)

or Wait until 1.6 SDK is the official current ogre.

westpointer

25-12-2008 03:02:14

I just downloaded the latest Ogre and PLSM from SVN. When I compile PLSM using plsm2_vc8_SVN.sln I get following compile error:

1>OgrePagingLandScapeOptions.cpp
1>d:\Program Files\svnhome\ogreaddons\paginglandscape\plugins\paginglandscape2\include\OgrePagingLandScapeOptions.h(161) : error C2039: 'LodDistanceList' : is not a member of 'Ogre::Material'
1> d:\Program Files\svnhome\ogre\OgreMain\include\OgreMaterial.h(83) : see declaration of 'Ogre::Material'

Is the PLSM in SVN not compatible with Ogre 1.6 SVN?

ERSmith

12-02-2009 16:47:30

I get this exact same thing using the new Ogre 1.6 (sdk) and the either the PLSM2 SDK or SVN.

tuan kuranes

12-02-2009 17:34:14

ogre SDK W 1.6 or ogre SVN 1.6 and plsm2 current SVN ?

ERSmith

12-02-2009 18:20:20

I am using the Ogre 1.6 sdk downloaded from the home site.

I attempted to use both the SVN and SDK version of PLSM2 with it. I have decided to move on and work with something else for a while to alleviate the frustration.

LBDude

06-12-2009 08:04:08

So did you ever get this too work. I just got it to build for me. I had to change some things due to interface changes. I'm also not sure if it was correct because of that (for example the LodIndexSquaredDistance is no longer there).

I'm running all SVN code.

I''m currently at the data configuration stage so I will let you know if I can run the demo or not.

LBDude

07-12-2009 11:43:37

Hey I got it working. So yeah, just need to refactor for interface changes.

pldidit

08-06-2010 19:07:32

Hey I got it working. So yeah, just need to refactor for interface changes.
Could you please explain what changed did you make in order to make it work? I am new to Ogre, and am currently using the latest version on VS2010. PLSM is the main reason i started using Ogre, as it provides a very good approach to the project i am working on the moment (according to what i have read on the wiki), but i cannot seem to make it work. I have the exact same problem described in this topic, and checked a few changelogs and things in order to refactor myself, but i only generated more errors. I believe this is mainly due to my lack of knowledge in how Ogre works, and hope a little bit of experience could change it, but as for now i am stuck. I would be glad if someone were to explicit what i have to do in order to make this run in the actual version. Thanks in advance,
pldidit

LBDude

09-06-2010 22:57:56

Hello,

It's been a long while man and frankly I'm not much on details of exactly what I did to resolve the problems. Basically what I did was go through each error, then reference the specific error with respect to the Ogre code and from there fix the errors. And those errors were specifically related to interface changes issues, therefore all I did was refactor to conform to the new interfaces. And that was all. Recalling some more now, I believe a few of the problems were with interface change relating to STL collection iteration. So the change was to use the new method of iterating through collections. Another thing I recall was with the LOD distance thing. But I think there is a method to get something similar, a LOD thing. I did read the code though so I wasn't sure whether this new method changes anything. Although in the end it appears that calling the new method to get LOD does work (demo seem to work.) With that said, it's been awhile since I've touched this code because I've been working on a different aspect of my project for the last couple of month.

You can post your errors here and I will try to help.

pldidit

10-06-2010 19:24:41

Thanks for the quick reply. The LOD problem seemed easily, it was only the method name that changed. After correcting that, i had to increase the size of the heap on my compiler, otherwise it would not build at all. Then i get some errors i am not very sure how to solve. Firstly:

1>..\src\OgrePagingLandScapeOctreeNode.cpp(190): error C2664: 'void Ogre::RenderQueue::addRenderable(Ogre::Renderable *)' : cannot convert parameter 1 from 'Ogre::PagingLandScapeOctreeNode *const ' to 'Ogre::Renderable *'
1>


I looked up the class reference http://amber.worldforge.org/ember/doc/h ... eNode.html but am indeed confused on how it should work.

Also, the iterator error you mentioned appears quite a lot

1>..\src\OgrePagingLandScapeOptions.cpp(504): error C2440: 'initializing' : cannot convert from 'std::_Vector_iterator<_Myvec>' to 'std::_Vector_iterator<_Myvec>'
1> with
1> [
1> _Myvec=std::_Vector_val<Ogre::String,Ogre::STLAllocator<Ogre::String,Ogre::GeneralAllocPolicy>>
1> ]
1> and
1> [
1> _Myvec=std::_Vector_val<Ogre::String,std::allocator<Ogre::String>>
1> ]
1> No constructor could take the source type, or constructor overload resolution was ambiguous
1>..\src\OgrePagingLandScapeOptions.cpp(505): error C2678: binary '!=' : no operator found which takes a left-hand operand of type 'std::_Vector_iterator<_Myvec>' (or there is no acceptable conversion)
1> with
1> [
1> _Myvec=std::_Vector_val<Ogre::String,std::allocator<Ogre::String>>
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\system_error(425): could be 'bool std::operator !=(const std::error_code &,const std::error_condition &)' [found using argument-dependent lookup]
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\system_error(432): or 'bool std::operator !=(const std::error_condition &,const std::error_code &)' [found using argument-dependent lookup]
1> c:\ogresdk_vc10_v1-7-1\include\ogre\OgreShadowTextureManager.h(66): or 'bool Ogre::operator !=(const Ogre::ShadowTextureConfig &,const Ogre::ShadowTextureConfig &)'
1> c:\ogresdk_vc10_v1-7-1\include\ogre\OgreUTFString.h(335): or 'bool Ogre::operator !=(const Ogre::UTFString::_const_fwd_iterator &,const Ogre::UTFString::_const_fwd_iterator &)'
1> c:\ogresdk_vc10_v1-7-1\include\ogre\OgreUTFString.h(422): or 'bool Ogre::operator !=(const Ogre::UTFString::_const_rev_iterator &,const Ogre::UTFString::_const_rev_iterator &)'
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\vector(206): or 'bool std::_Vector_const_iterator<_Myvec>::operator !=(const std::_Vector_const_iterator<_Myvec> &) const'
1> with
1> [
1> _Myvec=std::_Vector_val<Ogre::String,std::allocator<Ogre::String>>
1> ]
1> while trying to match the argument list '(std::_Vector_iterator<_Myvec>, std::_Vector_iterator<_Myvec>)'
1> with
1> [
1> _Myvec=std::_Vector_val<Ogre::String,std::allocator<Ogre::String>>
1> ]
1> and
1> [
1> _Myvec=std::_Vector_val<Ogre::String,Ogre::STLAllocator<Ogre::String,Ogre::GeneralAllocPolicy>>
1> ]


Is this simple to solve? I am a bit intimidated by this Ogre::GeneralAllocPolicy, and i have no idea where to start refactoring it. Again, this is the latest version, and getting it to work here would be my first option. As of today, the main SDK page does no include pre-1.6 versions, or so it seems to me. Since this topic is related to the issue on Ogre 1.6RC1 (that persisted later on), does it mean i would have to dwell on even older versions to use PLSM as it is?

pldidit

10-06-2010 19:29:10

Oh, i forgot to add the following error i am receiving as well:
1>..\src\OgrePagingLandScapeOctreeSceneManager.cpp(1150): error C2660: 'Ogre::SceneManager::useRenderableViewProjMode' : function does not take 1 arguments
1> OgrePagingLandScapeOptions.cpp

LBDude

11-06-2010 01:24:56

Okay, here are the diff files. (I may have missed a few; not throughly tested; some of it may have been hacks due to not really trying to understand the problem.)

http://pastebin.com/qYn7VA4m

tuan kuranes

11-06-2010 09:17:19

please post on ogreaddons sourceforge patch tracker http://sourceforge.net/tracker/?group_i ... id=1064241

LBDude

26-07-2010 22:49:13

Okay, will do.