Changeset 40
- Timestamp:
- 04/01/07 15:41:36 (2 years ago)
- Files:
-
- trunk/pyosg/BUILD_BOOST_ON_OSX.txt (added)
- trunk/pyosg/MANIFEST.in (modified) (1 diff)
- trunk/pyosg/Producer/Camera.cpp (modified) (4 diffs)
- trunk/pyosg/README (modified) (3 diffs)
- trunk/pyosg/modules.py (modified) (1 diff)
- trunk/pyosg/osgProducer/Viewer.cpp (modified) (3 diffs)
- trunk/pyosg/setup.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/pyosg/MANIFEST.in
r3 r40 1 1 include setup*.py 2 include SConstruct3 include Jamfile4 include Jamrules5 recursive-include scons *.py6 2 recursive-include include *.hpp 7 3 include include/osgScript/Export trunk/pyosg/Producer/Camera.cpp
r3 r40 96 96 }; 97 97 98 98 /* 99 99 void Camera_addPreCullCallback(Producer::Camera * self, PyObject * cb) 100 100 { … … 168 168 } 169 169 } 170 */ 170 171 171 172 tuple getProjectionRectangle(Producer::Camera * self) … … 385 386 .def("advance", &Producer::Camera::advance) 386 387 .def("sync", &Producer::Camera::sync) 387 388 /* 388 389 .def("addPreCullCallback", 389 390 &Camera_addPreCullCallback) … … 397 398 .def("addPostDrawCallback", 398 399 &Camera_addPostDrawCallback) 400 */ 399 401 .def("cancel", &Producer::Camera::cancel) 400 402 .def("run", &Producer::Camera::run) trunk/pyosg/README
r37 r40 2 2 3 3 = Welcome to PyOSG = 4 5 A Python wrapper for [http://openscenegraph.org OpenSceneGraph] 4 6 5 7 Given: … … 15 17 16 18 As I am not able to devote much time to maintaining PyOSG, I ask the community for any and all help with this site and the source -- I will happily grant commit access to either if to anyone with more than a trivial patch. 19 20 = News = 21 22 * 2007-04-01 PyOSG (trunk in svn repository) now compiles against OSG 23 1.0, 1.1, and 1.2 on linux and Mac OS X. I'm still having trouble 24 getting it running on Mac OS X (boost::python issues), but 25 hopefully the worst is behind us and Windows support can be added 26 relatively painlessly. 17 27 18 28 = Development = … … 35 45 * Miguel Escriva has been implementing bindings that use the new osgIntrospection features: [http://mescriva.okode.com/svn/osgPython/trunk svn repository] [http://mescriva.okode.com/svn/osgPython/trunk/examples/viewer.py viewer example] 36 46 47 = Building notes = 37 48 38 - Andrew Straw [mailto:strawman@astraw.com strawman@astraw.com] (a.k.a. [mailto:astraw@caltech.edu astraw@caltech.edu]) 49 PyOSG is known to compile and run with OSG versions 1.0, 1.1, and 1.2 50 on linux. It compiles on Mac OS X but doesn't currently run. 51 52 - Andrew Straw [mailto:strawman@astraw.com strawman@astraw.com] trunk/pyosg/modules.py
r32 r40 10 10 'osgProducer', 11 11 'osgSim', 12 # 'osgText', # disabled (temporarily) until it workswith OSG 1.212 # 'osgText', # disabled until someone can get the Python wrapper to work with OSG 1.2 13 13 'osgUtil', 14 14 ] trunk/pyosg/osgProducer/Viewer.cpp
r32 r40 52 52 void setUpViewer_2(osgProducer::Viewer::ViewerOptions options) { osgProducer::Viewer::setUpViewer(options); } 53 53 54 /* 54 55 unsigned int addCameraManipulator(PyObject * cm) 55 56 { … … 66 67 } 67 68 } 68 69 */ 69 70 /** compute, from normalized mouse coords, for all Cameras, intersections with the specified subgraph.*/ 70 71 bool computeIntersections_1(float x,float y,unsigned int cameraNum,osg::Node *node,osgUtil::IntersectVisitor::HitList& hits,osg::Node::NodeMask traversalMask) … … 159 160 .def("getUsage", 160 161 &Viewer::getUsage) 161 162 /* 162 163 .def("addCameraManipulator", 163 164 &Viewer::addCameraManipulator) 165 */ 164 166 .def("selectCameraManipulator", 165 167 &Viewer::selectCameraManipulator) trunk/pyosg/setup.py
r15 r40 55 55 DistributionMetadata.download_url = None 56 56 57 define_macros=[('VERSION','"'+__version__+'"')] 58 library_dirs = [] 59 extra_link_args = [] 60 libraries=['OpenThreads','Producer']+modules.ext_modules 61 libraries.append('osgText') # currently not being built 62 63 data_files = [] 64 65 if sys.platform == 'darwin': 66 ## data_files = [ 67 ## ('/usr/local/lib', ['/usr/local/lib/libboost_python-' + boost_version_default + '.dylib']) 68 ## ] 69 if 'osgSound' in modules.ext_modules: 70 data_files.append( ('/usr/local/lib', ['/usr/local/lib/libfmodex.dylib']) ) 71 package_data = {} 72 #define_macros.append( ('__USE_OSX_CGL_IMPLEMENTATION__',None ) ) # prevent building OSG glx version 73 define_macros.append( ('__USE_OSX_AGL_IMPLEMENTATION__',None ) ) # prevent building OSG glx version 74 library_dirs.append( os.path.join(sys.prefix,'lib') ) 75 76 for lib in libraries: 77 extra_link_args.append('-framework') 78 extra_link_args.append(lib) 79 libraries=[] # overwrite 80 81 elif sys.platform == 'win32': 82 data_files.extend([ 83 ('.' , [boost_root_default + '\\lib\\' + 'boost_python-vc71-mt-' + boost_version_default + '.dll']) 84 ]) 85 if 'osgSound' in modules.ext_modules: 86 data_files.append( ('.', ['\\gideon\\bin\\fmodex.dll']) ) 87 data_files.append( ('.', ['\\gideon\\bin\\osgsound.dll']) ) 88 package_data = {} 89 else: 90 package_data = {} 91 92 libraries.insert(0,'boost_python') 93 57 94 extensions = [] 58 95 for libname in modules.ext_modules: … … 65 102 cppfiles, 66 103 include_dirs=['include'], 67 define_macros=[('VERSION','"'+__version__+'"')], 68 libraries=['boost_python','Producer']+modules.ext_modules)) 104 define_macros=define_macros, 105 library_dirs=library_dirs, 106 libraries=libraries, 107 extra_link_args=extra_link_args, 108 )) 69 109 70 71 if sys.platform == 'darwin':72 data_files = [73 ('/usr/local/lib', ['/usr/local/lib/libboost_python-' + boost_version_default + '.dylib'])74 ]75 if 'osgSound' in modules.ext_modules:76 data_files.append( ('/usr/local/lib', ['/usr/local/lib/libfmodex.dylib']) )77 package_data = {}78 elif sys.platform == 'win32':79 data_files = [80 ('.' , [boost_root_default + '\\lib\\' + 'boost_python-vc71-mt-' + boost_version_default + '.dll'])81 ]82 if 'osgSound' in modules.ext_modules:83 data_files.append( ('.', ['\\gideon\\bin\\fmodex.dll']) )84 data_files.append( ('.', ['\\gideon\\bin\\osgsound.dll']) )85 package_data = {}86 else:87 data_files = []88 package_data = {}89 110 90 111 scriptfiles = filter(isfile, glob('applications/*'))
