Page 1 of 1

Tutorial Lights: return to the failures with 1.0.0RC1

Posted: Sun Feb 06, 2005 5:07 pm
by sargar
Hello,

I had the tutorial of Space totally working in old ogre version 0.15.0.

Problem: with the new version (1.0.0RC1), when compiling it gives problems.

The error that it gives is in the lines type:

Controller<Real>* mBlueLightController = mControllerManager->createController(mControllerManager->getFrameTimeSource(), mBlueLightFlasher, mBlueLightControllerFunc);


and the error is:

error: no matching function for call to `
Ogre::ControllerManager::createController(Ogre::ControllerValueRealPtr,
LightFlasher*&, LightFlasherControllerFunction*&)'

/usr/local/include/OGRE/OgreControllerManager.h:64: error: candidates are:
Ogre::Controller<Real>* Ogre::ControllerManager::createController(Ogre::SharedPtr<Ogre::ControllerValue<Real>>, Ogre::SharedPtr<Ogre::ControllerValue<Real> >, Ogre::SharedPtr<Ogre::ControllerFunction<Real> >)


Please, somebody has a solution? For that we are initiating to create applications in Ogre, these problems are very discouraging... :(

Thanks in advance.

Posted: Sun Feb 06, 2005 5:32 pm
by haffax
Many Manager interfaces have been changed to access resources through shared pointers. You have to wrap your controllers and controller functions through those pointers.
ControllerFunctionRealPtr

In the case of your error you have to change the method call to:

Code: Select all

Controller<Real>* mBlueLightController = mControllerManager->createController(mControllerManager->getFrameTimeSource(),
    ControllerValueRealPtr(mBlueLightFlasher),    
    ControllerFunctionRealPtr(mBlueLightControllerFunc));
With the help of the API documentation you'll probably solve all those errors. I didn't come around to change the tutorial, but I'm sure it will be done in the next time, if not by me, then by someone other. :)

Posted: Sun Feb 06, 2005 7:07 pm
by sargar
Tanis,

Thanks for the solution ;).

The truth, you are all the right: to read the API is the solution :oops:. I hope to review it shortly ...

A greeting