OgreOde的编译

话说想做天龙样式的游戏,这牵扯到人物和地面碰撞和其他建筑碰转的问题。话说用射线检测确实简单,但是有现成的物理引擎干吗不用呢,小试了下ode但是却让我绝望了

弄了两个小时终于编译通过

但运行又崩溃了,我这个郁闷啊。。。

得,还是信一下nvidia,换physx

我来了NxOgre。。。

 

ogreode编译过程

我很懒的,直接转载:)

 

Preparation

I use the great RBGui for my project, therefor I need to use the current Ogre CVS version, namely Shoggoth. I have fresh CVS and SVN versions of Ogre, OgreOde and ode on my computer. To compile OgreOde you need to copy your ode version to the OgreOde directory.

Open ogreode/scripts/OgreOde_Source.sln. Visual Studio complains that ode_Source.vcproj is missing. Remove it from the projects list in the Solution Explorer and add ogreode/ode/build/vs2005/ode.sln afterwards. Then rightclick OgreOde_Core, click Project Dependencies, mark ode and click OK.

Ogre_Ode Core

Open the Project Properties for OgreOde_Core. Go to Configuration Properties->C++ and edit the include directories. Replace ../../../OgreMain/include by your Ogre version. If you downloaded Ogre and all the addons to the same directory, that would be ../../../../ogrenew/OgreMain/include. In Configuration Properties->Linker replace the additional Library Directory for ogre by your path. In the case described above that would be ../../../../ogrenew/lib. In Configuration Properties->Build Events->Post-Build Event remove the command line. This is not necessary because the library will compile anyway, but maybe you want to know where that strange post build error comes from.

Do all this both for the debug and release configuration.

In my current OgreOde version are some errors, I hope they will be removed in time. To compile OgreOde anyway

in ogremovableobject.h change this line:

        virtual void visitRenderables(Renderable::Visitor* visitor, 
        			bool debugRenderables = false) = 0;

to

        #if OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR > 4
        void visitRenderables(Ogre::Renderable::Visitor* visitor, bool debugRenderables = false) = 0;
        #endif 

in OgreOdeGeometry.h in the constructor of TriangleMeshGeometry change this line

        dGeomTriMeshDataBuildSimple(_data,(const dReal*)_vertices, (int)vertex_count, (int*)_indices, (int)index_count); 

to

        dGeomTriMeshDataBuildSimple(_data,(const dReal*)_vertices, (int)vertex_count, (dTriIndex*)_indices, (int)index_count);

You should now be able to compile the project OgreOde_Core. Do so.

 

 

话说下载了最新版的svn版的ogreode后这些问题都解决了,编译ok,但是运行郁闷,只要往场景中加东西就crash,貌似是ode的问题,几近放弃,研究physx了,但是ogreode封装的很好,有很多地方也可以借鉴,要不,咱也整个wrapper?

 

 

经过半个多月的磨练,再回来看,应该是编译sdk版本的而非source版本的。。。被骗了。。。。今天终于编译成功。。。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值