Changeset 32

Show
Ignore:
Timestamp:
03/28/07 19:03:01 (2 years ago)
Author:
astraw
Message:

fix FTBFS on OSG 1.0, 1.1, and 1.2

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/pyosg/PyOSG/__init__.py

    r3 r32  
    2121__all__ = ['Producer', 'osg', 'osgUtil', 'osgGA', 'osgDB', 'osgProducer', 'osgParticle', 'osgText', 'osgSim', 'osgFX'] 
    2222 
    23 version_info = (0,8,0
     23version_info = (1,2,1
    2424build_info = 1 
    2525__version__ = "%d.%d.%d" % version_info 
  • trunk/pyosg/include/held_ptr.hpp

    r23 r32  
    2828#include <osg/ref_ptr> 
    2929#include <osg/Node> 
     30#include <osg/Version> 
    3031 
    3132#define TEST_REF 1 
     
    3334namespace osg { 
    3435 
     36// XXX need to check when this was added to OSG 
     37#if ((OSG_VERSION_MAJOR==1) & (OSG_VERSION_MINOR < 1)) 
    3538template<class T> inline T * get_pointer(osg::ref_ptr<T> const & p) 
    3639{ 
    3740    return const_cast<T *>(p.get()); 
    3841} 
     42#endif 
    3943 
    4044#if 0 
  • trunk/pyosg/modules.py

    r15 r32  
    1010    'osgProducer', 
    1111    'osgSim', 
    12     'osgText', 
     12#    'osgText', # disabled (temporarily) until it works with OSG 1.2 
    1313    'osgUtil', 
    1414    ] 
  • trunk/pyosg/osg/BlendColor.cpp

    r3 r32  
    1313#include <boost/python/scope.hpp> 
    1414 
     15#include <osg/Version> 
    1516#include <osg/BlendColor> 
    1617 
     
    3536    blend_color.def(init<>()) 
    3637        .def("setConstantColor", &osg::BlendColor::setConstantColor) 
     38#if ((OSG_VERSION_MAJOR==1) && (OSG_VERSION_MINOR < 2)) 
    3739        .def("getConstantColor", &osg::BlendColor::getConstantColor) 
     40#endif 
    3841        ; 
    3942} 
  • trunk/pyosg/osg/BlendFunc.cpp

    r3 r32  
    4040        .def(init<>()) 
    4141 
     42#if ((OSG_VERSION_MAJOR==1) && (OSG_VERSION_MINOR < 1)) 
    4243        .def("setFunction", &osg::BlendFunc::setFunction) 
     44#endif 
    4345        .def("setSource", &osg::BlendFunc::setSource) 
    4446        .def("getSource", &osg::BlendFunc::getSource) 
  • trunk/pyosg/osg/LOD.cpp

    r3 r32  
    6161         .def("addChild", (bool (LOD::*)(Node *, float, float)) &LOD::addChild) 
    6262 
     63#if ((OSG_VERSION_MAJOR==1) & (OSG_VERSION_MINOR < 1)) 
    6364         .def("removeChild", &LOD::removeChild) 
     65#else 
     66         .def("removeChildren", &LOD::removeChildren) 
     67#endif 
    6468 
    6569         .def("setCenterMode", &LOD::setCenterMode) 
  • trunk/pyosg/osg/PagedLOD.cpp

    r3 r32  
    6363            &osg::PagedLOD::addChild) 
    6464 
     65#if ((OSG_VERSION_MAJOR==1) & (OSG_VERSION_MINOR < 1)) 
    6566        .def("removeChild", &osg::PagedLOD::removeChild) 
     67#else 
     68        .def("removeChildren", &osg::PagedLOD::removeChildren) 
     69#endif 
    6670        .def("setFileName", &osg::PagedLOD::setFileName) 
    6771        .def("getFileName", 
  • trunk/pyosg/osg/StateSet.cpp

    r3 r32  
    133133    OSG_ENUM_MODE(USE_RENDERBIN_DETAILS); 
    134134    OSG_ENUM_MODE(OVERRIDE_RENDERBIN_DETAILS); 
     135#if ((OSG_VERSION_MAJOR==1) & (OSG_VERSION_MINOR < 1)) 
    135136    OSG_ENUM_MODE(ENCLOSE_RENDERBIN_DETAILS); 
     137#endif 
    136138} 
    137139} 
  • trunk/pyosg/osgProducer/EventAdapter.cpp

    r3 r32  
     1#include <osg/Version> 
     2#if ((OSG_VERSION_MAJOR==1) && (OSG_VERSION_MINOR < 1)) 
     3 
    14// Copyright (C) 2002-2005 Gideon May (gideon@computer.org) 
    25// 
     
    4952 
    5053 
     54#endif // #if ((OSG_VERSION_MAJOR==1) && (OSG_VERSION_MINOR < 1)) 
  • trunk/pyosg/osgProducer/OsgCameraGroup.cpp

    r3 r32  
    258258            &osgProducer::OsgCameraGroup::advance) 
    259259 
     260#if ((OSG_VERSION_MAJOR==1) & (OSG_VERSION_MINOR < 1)) 
    260261        .def("realize", 
    261262            (bool (osgProducer::OsgCameraGroup::*)(Producer::CameraGroup::ThreadingModel)) 
    262263            &osgProducer::OsgCameraGroup::realize) 
     264#endif 
    263265 
    264266        .def("realize", 
  • trunk/pyosg/osgProducer/Viewer.cpp

    r3 r32  
    149149        .def("realize",  
    150150            (bool (Viewer::*)()) &Viewer::realize) 
     151#if ((OSG_VERSION_MAJOR==1) && (OSG_VERSION_MINOR < 2)) 
    151152        .def("realize",  
    152153            (bool (Viewer::*)(Producer::CameraGroup::ThreadingModel)) &Viewer::realize) 
     154#endif 
    153155        .def("update",  
    154156            &Viewer::update) 
  • trunk/pyosg/osgSim/OverlayNode.cpp

    r3 r32  
    4646    /** Inform the OverlayNode that the overlay texture needs to be updated.*/ 
    4747 
     48#if ((OSG_VERSION_MAJOR==1) & (OSG_VERSION_MINOR < 1)) 
    4849    overlaynode.def("setContinousUpdate", 
    4950        &osgSim::OverlayNode::setContinousUpdate); 
     
    5354        &osgSim::OverlayNode::getContinousUpdate); 
    5455    /** Get whether the OverlayNode should update the overlay texture on every frame.*/ 
     56#else 
     57    overlaynode.def("setContinuousUpdate", 
     58        &osgSim::OverlayNode::setContinuousUpdate); 
     59    /** Set whether the OverlayNode should update the overlay texture on every frame.*/ 
    5560 
     61    overlaynode.def("getContinuousUpdate", 
     62        &osgSim::OverlayNode::getContinuousUpdate); 
     63    /** Get whether the OverlayNode should update the overlay texture on every frame.*/ 
     64#endif 
    5665    overlaynode.def("setOverlayClearColor", 
    5766        &osgSim::OverlayNode::setOverlayClearColor); 
  • trunk/pyosg/osgUtil/RenderBin.cpp

    r3 r32  
    116116 
    117117        .def("getStats", &osgUtil::RenderBin:: getStats) 
     118#if ((OSG_VERSION_MAJOR==1) && (OSG_VERSION_MINOR < 1)) 
    118119        .def("getPrims", (void (osgUtil::RenderBin::*)(osgUtil::Statistics *))&osgUtil::RenderBin:: getPrims) 
    119120        .def("getPrims", (bool (osgUtil::RenderBin::*)(osgUtil::Statistics *, int))&osgUtil::RenderBin:: getPrims) 
     121#endif 
    120122        ; 
    121123