1. Shankar Giri
  2. ogre

Commits

David Rogers  committed 343cc44

Create and destroy the ProceduralManualObjectFactory in the ParticleGS sample. Fixes errors on startup

  • Participants
  • Parent commits 0e5366f
  • Branches v1-8

Comments (0)

Files changed (1)

File Samples/ParticleGS/src/ParticleGS.cpp

View file
     {
         demoTime = 0;
 
-        mProceduralManualObjectFactory = new ProceduralManualObjectFactory;
+        mProceduralManualObjectFactory = OGRE_NEW ProceduralManualObjectFactory();
+        Root::getSingleton().addMovableObjectFactory(mProceduralManualObjectFactory);
+
 		createProceduralParticleSystem();
 
 		mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(mParticleSystem);
     void cleanupContent()
     {
         Root::getSingleton().removeMovableObjectFactory(mProceduralManualObjectFactory);
+        OGRE_DELETE mProceduralManualObjectFactory;
+        mProceduralManualObjectFactory = 0;
+
         MeshManager::getSingleton().remove("Myplane");
     }