Tutorial Lights: return to the failures with 1.0.0RC1

Problems building or running the engine, queries about how to use features etc.
Post Reply
sargar
Gnoblar
Posts: 20
Joined: Sun Jan 23, 2005 12:36 am

Tutorial Lights: return to the failures with 1.0.0RC1

Post 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.
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 8
Contact:

Post 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. :)
team-pantheon programmer
creators of Rastullahs Lockenpracht
sargar
Gnoblar
Posts: 20
Joined: Sun Jan 23, 2005 12:36 am

Post 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
Post Reply