New Wrapper for the Ogre Engine

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: New Wrapper for the Ogre Engine

Postby Slick » Tue Aug 27, 2013 6:53 pm

Julio Jerez wrote:are those object created form a newton update?
when the crash happen see if there is a Newton thread also running.

before you start creation object call this funtions. this will make sure that there is not a newton update in progress.

GetPhysics()->WaitForUpdateToFinish();


The objects are created at the loaddynamicscene. Nothing too special.

I had changed to nonconcurrent and 1 thread as you suggested earlier.

I will try putting that function in.
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now

Re: New Wrapper for the Ogre Engine

Postby Julio Jerez » Tue Aug 27, 2013 7:11 pm

that crash does not make sence, that has never happens. teh onel time I have a crash ther is when running in 32 bit and windoes run out of memory.
The memory manager is error prood as long as there is memory.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: New Wrapper for the Ogre Engine

Postby Julio Jerez » Tue Aug 27, 2013 7:17 pm

ha ok that the bug, is i son thso funtion.

Code: Select all
bool DemoApplication::OgreNewtonExample::OnBodiesAABBOverlap (const dNewtonBody* const body0, const dNewtonBody* const body1, int threadIndex) const
{
   dNewtonCollision* const collision0 = body0->GetCollision();
   dNewtonCollision* const collision1 = body1->GetCollision();

   // check if these twp collision shape are part of a hierarchical model
   void* const node0 = collision0->GetUserData();
   void* const node1 = collision1->GetUserData();
   if (node0 && node1) {
      //both collision are child nodes, check if there are self colliding
      return GetHierarchyTransformManager()->SelfCollisionTest (node0, node1);
   }

   // check all other collision using the bitfield mask,
   //for now simple return true
   return true;
}


It need to chek if the nodes are form different controller. yes that's a bug I will fix it that now.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: New Wrapper for the Ogre Engine

Postby Slick » Tue Aug 27, 2013 7:20 pm

I will change my project to static build. I think I just add the preprocessor NEWTON_STATIC or similar.

I changed my builds to MCBS and not unicode. Also I built all libraries like that. I don't think that should have an issue. I don't think I have debug/release mixed up but I will check.

It does sound like the problem might be me. Ideally creating 2 forklifts with dotscene might be a cleaner test.
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now

Re: New Wrapper for the Ogre Engine

Postby Julio Jerez » Tue Aug 27, 2013 7:25 pm

sync newton and rebuild again, I fixed the the bug there.
basically when teh bode were form diffrent controller it was try to read for illegal menery

that does no explain the crash in te hmemory manager.
please try again see if this at leas fixed the whell explosion.
as for this
Slick wrote:I will change my project to static build. I think I just add the preprocessor NEWTON_STATIC or similar.

yes that will be cause of teh Bug in te hmemory manage.
if you mix static with dynamics the code will compile but the static will simply crash because the point to netwon form DLL and netwon static will be to different thing.
see how I setted the DLL options. so that you use the same settings.

also if you run the CMake in OgreNeton It will create a DLL project with teh righ options and ready to go.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: New Wrapper for the Ogre Engine

Postby Slick » Tue Aug 27, 2013 7:32 pm

ok cool I will synch and try again.
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now

Re: New Wrapper for the Ogre Engine

Postby Julio Jerez » Tue Aug 27, 2013 7:34 pm

tonigh I will check how to make soe that I can load tow vehicles. I can't beleive teh fiel loader cna no dela with that.

hwo do people place mutiple copied of the same graphs in the world.
Having the scenesNodes have a unique name is a but short comming in ogre in my opnion.
that's good for meshes but not for nodes.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: New Wrapper for the Ogre Engine

Postby Slick » Tue Aug 27, 2013 7:41 pm

Julio Jerez wrote:if you mix static with dynamics the code will compile but the static will simply crash because the point to newton form DLL and newton static will be to different thing.
see how I setted the DLL options. so that you use the same settings.

also if you run the CMake in OgreNeton It will create a DLL project with teh righ options and ready to go.


It looks like I might have to rebuild/redo to test. Currently I have ogernewton.dll, newton.dll and djointlibrary.dll that are required for the app to run.
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now

Re: New Wrapper for the Ogre Engine

Postby Julio Jerez » Tue Aug 27, 2013 7:44 pm

Slick wrote:Currently I have ogernewton.dll, newton.dll and djointlibrary.dll that are required for the app to run.

yes that is correct. dll work with DLLs.
static work wi th static, ther is not mix.


try the cmake. I tested and it create correct VS2008 and 2010 DLL.
has you use CMake before. all you have to do is drag the Cmakefile.txt that is in the root forder and it cleck configure and create.

you need latest CMake. CMake is full of bugs. most of the define do not work in preveius versions you need 2.8.11
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: New Wrapper for the Ogre Engine

Postby Slick » Tue Aug 27, 2013 8:00 pm

Yep I have used cmake before. I will copy my current SVN so I don't lose my projects and try a fresh build after getting a fresh SVN and using cmake. Hopefully tomorrow.
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now

Re: New Wrapper for the Ogre Engine

Postby Julio Jerez » Wed Aug 28, 2013 2:12 pm

Ok I found a way to hack the dotSceneLoader so that can load teh same scene more than once.
now I checked in the code with tow forklift.

Now thsi exposed a new bug that I chek in because I thonk is cool.
The controller is send teh same imput to both vehicles, and teh drive in unison.

Itis a bug in teh demo or teh imput manage, but is coll because the tow vehicles look like artistic vallet skating dancing.
The both do the same thing in repsond to teh key.
I will fix that later, so that I can collide them and see when happens.

you need to sync newton and Ogre, I also foidn another bug that I fixed last night.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: New Wrapper for the Ogre Engine

Postby Slick » Wed Aug 28, 2013 2:14 pm

Ok I will try and do some updates later today and see.
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now

Re: New Wrapper for the Ogre Engine

Postby Slick » Wed Aug 28, 2013 4:03 pm

Julio Jerez wrote:try the cmake. I tested and it create correct VS2008 and 2010 DLL.
has you use CMake before. all you have to do is drag the Cmakefile.txt that is in the root forder and it cleck configure and create.

you need latest CMake. CMake is full of bugs. most of the define do not work in preveius versions you need 2.8.11


I tried a clean version and used CMAKE. It worked well. I got 32 builds without errors on the first batch build.

My only suggestion would be on the final lib file paths. Some are under paths called "source" etc. A little cleanup maybe calling the path extension "lib" instead. The core and package libraries are in different "package" or "corelib" paths which is possibly intended. Anyway I will use this nice new build environment. See the attached pic for what I mean.

8-28-2013 12-57-39 PM.png
8-28-2013 12-57-39 PM.png (114.39 KiB) Viewed 7401 times
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now

Re: New Wrapper for the Ogre Engine

Postby Slick » Wed Aug 28, 2013 4:06 pm

One more thought. The debug libraries don't have a _d extension. Was this intentional?
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now

Re: New Wrapper for the Ogre Engine

Postby Slick » Wed Aug 28, 2013 4:08 pm

Another thought. These are all .lib there are no .dll builds.
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 35 guests