OGRE TO BOOST PYTHON.error with sampler test


28-07-2013 16:47:51

I Just do a test for boost python.
using namespace Ogre;
class_<Ogre::Root>("Root",init<const String &, const String &, const String &>());
can not compiled.
error C2248: "Ogre :: Singleton <T> :: Singleton": can not access private members (the "Ogre :: Singleton <T>" class declaration) h: \ happyeditor \ dependencies \ ogre \ ogremain \ include \ OgreRoot. h 1071
any one has Experience for this??
thanks in advanced!!!!!!!!!!!!.


29-07-2013 05:22:25

Not too sure what you are trying to achieve here.

I'm guessing the problem is with the copy constructor and the private member variables, try something like:

class_<Ogre::Root, boost::noncopyable>("Root", init<bp::optional< Ogre::String const &, Ogre::String const &, Ogre::String const & > >(( bp::arg("pluginFileName")="plugins.cfg", bp::arg("configFileName")="ogre.cfg", bp::arg("logFileName")="Ogre.log" )) );

http://stackoverflow.com/questions/1509 ... ost-python

You could generate the python-ogre wrapper code for the ogre module and use that as a basis for whatever you're doing.