Delete all nxogre components

CmonGirl

19-10-2010 19:50:50

How can i delete all nxogre components(Wolrd,scene vs..) How Can i do? Someone help me.

betajaen

19-10-2010 19:56:14

Delete the RenderSystem and World. Everything else will be automatically deleted. Just like Ogre.

CmonGirl

20-10-2010 07:46:11

Hmm. Thanks for your reply. I will try.

CmonGirl

20-10-2010 08:41:33

it is good working. But dont delete scenegeometry. That->
I created trianglegeomtry:
NxOgre::Mesh* TMesh = NxOgre::MeshManager::getSingleton()->load(PhysicsName);
NxOgre::TriangleGeometry* TGeometry = new NxOgre::TriangleGeometry(TMesh);
mSceneGeo = mPhysicsScene->createSceneGeometry(TGeometry,NxOgre::Matrix44(InitialPosition));
delete TMesh;
TMesh = NULL;
delete TGeometry;
TGeometry = NULL;

And delete all.
mPhysicsScene->destroySceneGeometry(mSceneGeo);

delete mRenderSystem;
mRenderSystem = NULL;

mWorld->destroyWorld(true);

Delete all component when not created trianglegeometry. Help me beta. :d

betajaen

20-10-2010 09:14:52

DON'T delete them.

In NxOgre; you only need to delete two things:

- The World pointer
- The Rendersystem pointer.

DO NOT DELETE ANYTHING ELSE.

CmonGirl

20-10-2010 09:44:52

Ok dont be angry. I deleted but i seen pointer address at the console screen. This my delete codes:
delete mRenderSystem;
mRenderSystem = NULL;

NxOgre::World::destroyWorld(false);
NxOgre::World::destroySingletons();

std::cout << "deleted : " << mWorld << std::endl;

And world's delete function is member protected. I cant called.

betajaen

20-10-2010 10:10:11

delete mRenderSystem;
NxOgre::World::destroyWorld();

CmonGirl

20-10-2010 15:26:57

ok beta. Thanks for replies. i tried good working now.