Changeset 3214

Show
Ignore:
Timestamp:
08/02/04 14:19:50 (10 years ago)
Author:
robert
Message:

Made the member variables in RenderStage? and RenderBin? protected

Location:
OpenSceneGraph/trunk
Files:
10 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgdepthshadow/osgdepthshadow.cpp

    r2634 r3214  
    135135  { 
    136136 
    137     osgUtil::CullVisitor* cullVisitor = dynamic_cast<osgUtil::CullVisitor*>(nv); 
    138     if (cullVisitor && _texture.valid() && _subgraph.valid()) 
     137     osgUtil::CullVisitor* cullVisitor = dynamic_cast<osgUtil::CullVisitor*>(nv); 
     138     if (cullVisitor && _texture.valid() && _subgraph.valid()) 
    139139      {             
    140140        _request_render_to_depth_texture(*node, *cullVisitor); 
     
    164164  // currently ignore lights in the scene graph itself.. 
    165165  // will do later. 
    166   osgUtil::RenderStage* previous_stage = cv.getCurrentRenderBin()->_stage; 
     166  osgUtil::RenderStage* previous_stage = cv.getCurrentRenderBin()->getStage(); 
    167167 
    168168  // set up the background color and clear mask. 
    169169  rtts->setClearMask(GL_DEPTH_BUFFER_BIT); 
    170   rtts->_colorMask = new ColorMask(false, false, false, false); 
     170  rtts->setColorMask(new ColorMask(false, false, false, false)); 
    171171 
    172172  // set up to charge the same RenderStageLighting is the parent previous stage. 
     
    220220  cv.setCurrentRenderBin(previousRenderBin); 
    221221 
    222   if (rtts->_renderGraphList.size()==0 && rtts->_bins.size()==0) 
     222  if (rtts->getRenderGraphList().size()==0 && rtts->getRenderBinList().size()==0) 
    223223    { 
    224224      // getting to this point means that all the subgraph has been 
     
    231231  // and the render to texture stage to the current stages 
    232232  // dependancy list. 
    233   cv.getCurrentRenderBin()->_stage->addToDependencyList(rtts.get()); 
     233  cv.getCurrentRenderBin()->getStage()->addToDependencyList(rtts.get()); 
    234234 
    235235  // if one exist attach texture to the RenderToTextureStage. 
  • OpenSceneGraph/trunk/examples/osgdistortion/osgdistortion.cpp

    r2688 r3214  
    186186    // currently ignore lights in the scene graph itself.. 
    187187    // will do later. 
    188     osgUtil::RenderStage* previous_stage = cv.getCurrentRenderBin()->_stage; 
     188    osgUtil::RenderStage* previous_stage = cv.getCurrentRenderBin()->getStage(); 
    189189 
    190190    // set up the background color and clear mask. 
     
    217217    cv.setCurrentRenderBin(previousRenderBin); 
    218218 
    219     if (rtts->_renderGraphList.size()==0 && rtts->_bins.size()==0) 
     219    if (rtts->getRenderGraphList().size()==0 && rtts->getRenderBinList().size()==0) 
    220220    { 
    221221        // getting to this point means that all the subgraph has been 
     
    244244    // and the render to texture stage to the current stages 
    245245    // dependancy list. 
    246     cv.getCurrentRenderBin()->_stage->addToDependencyList(rtts.get()); 
     246    cv.getCurrentRenderBin()->getStage()->addToDependencyList(rtts.get()); 
    247247 
    248248    // if one exist attach texture to the RenderToTextureStage. 
  • OpenSceneGraph/trunk/examples/osgprerender/osgprerender.cpp

    r1844 r3214  
    101101    // currently ignore lights in the scene graph itself.. 
    102102    // will do later. 
    103     osgUtil::RenderStage* previous_stage = cv.getCurrentRenderBin()->_stage; 
     103    osgUtil::RenderStage* previous_stage = cv.getCurrentRenderBin()->getStage(); 
    104104 
    105105    // set up the background color and clear mask. 
     
    160160    cv.setCurrentRenderBin(previousRenderBin); 
    161161 
    162     if (rtts->_renderGraphList.size()==0 && rtts->_bins.size()==0) 
     162    if (rtts->getRenderGraphList().size()==0 && rtts->getRenderBinList().size()==0) 
    163163    { 
    164164        // getting to this point means that all the subgraph has been 
     
    189189    // and the render to texture stage to the current stages 
    190190    // dependancy list. 
    191     cv.getCurrentRenderBin()->_stage->addToDependencyList(rtts.get()); 
     191    cv.getCurrentRenderBin()->getStage()->addToDependencyList(rtts.get()); 
    192192 
    193193    // if one exist attach texture to the RenderToTextureStage. 
  • OpenSceneGraph/trunk/examples/osgprerendercubemap/osgprerendercubemap.cpp

    r3033 r3214  
    164164    // currently ignore lights in the scene graph itself.. 
    165165    // will do later. 
    166     osgUtil::RenderStage* previous_stage = cv.getCurrentRenderBin()->_stage; 
     166    osgUtil::RenderStage* previous_stage = cv.getCurrentRenderBin()->getStage(); 
    167167 
    168168    // set up the background color and clear mask. 
     
    222222    cv.setCurrentRenderBin(previousRenderBin); 
    223223 
    224     if (rtts->_renderGraphList.size()==0 && rtts->_bins.size()==0) 
     224    if (rtts->getRenderGraphList().size()==0 && rtts->getRenderBinList().size()==0) 
    225225    { 
    226226        // getting to this point means that all the subgraph has been 
     
    248248    // and the render to texture stage to the current stages 
    249249    // dependancy list. 
    250     cv.getCurrentRenderBin()->_stage->addToDependencyList(rtts.get()); 
     250    cv.getCurrentRenderBin()->getStage()->addToDependencyList(rtts.get()); 
    251251 
    252252    // if one exist attach image to the RenderToTextureStage. 
  • OpenSceneGraph/trunk/examples/osgshadowtexture/CreateShadowedScene.cpp

    r3126 r3214  
    8080    // currently ignore lights in the scene graph itself.. 
    8181    // will do later. 
    82     osgUtil::RenderStage* previous_stage = cv.getCurrentRenderBin()->_stage; 
     82    osgUtil::RenderStage* previous_stage = cv.getCurrentRenderBin()->getStage(); 
    8383 
    8484    // set up the background color and clear mask. 
    8585    rtts->setClearColor(osg::Vec4(1.0f,1.0f,1.0f,1.0f)); 
    86     rtts->setClearMask(previous_stage->getClearMask()); 
     86    //rtts->setClearMask(previous_stage->getClearMask()); 
    8787 
    8888    // set up to charge the same RenderStageLighting is the parent previous stage. 
     
    161161    cv.setCurrentRenderBin(previousRenderBin); 
    162162 
    163     if (rtts->_renderGraphList.size()==0 && rtts->_bins.size()==0) 
     163    if (rtts->getRenderGraphList().size()==0 && rtts->getRenderBinList().size()==0) 
    164164    { 
    165165        // getting to this point means that all the shadower has been 
     
    190190    // and the render to texture stage to the current stages 
    191191    // dependancy list. 
    192     cv.getCurrentRenderBin()->_stage->addToDependencyList(rtts.get()); 
     192    cv.getCurrentRenderBin()->getStage()->addToDependencyList(rtts.get()); 
    193193 
    194194    // if one exist attach texture to the RenderToTextureStage. 
  • OpenSceneGraph/trunk/include/osgUtil/CullVisitor

    r3188 r3214  
    108108            if (_currentRenderGraph->_stateset->useRenderBinDetails()) 
    109109            { 
    110                 _currentRenderBin = _currentRenderBin->_parent; 
     110                _currentRenderBin = _currentRenderBin->getParent(); 
    111111            } 
    112112            _currentRenderGraph = _currentRenderGraph->_parent; 
     
    352352inline void CullVisitor::addPositionedAttribute(osg::RefMatrix* matrix,const osg::StateAttribute* attr) 
    353353{ 
    354     _currentRenderBin->_stage->addPositionedAttribute(matrix,attr); 
     354    _currentRenderBin->getStage()->addPositionedAttribute(matrix,attr); 
    355355} 
    356356 
     
    358358inline void CullVisitor::addPositionedTextureAttribute(unsigned int textureUnit, osg::RefMatrix* matrix,const osg::StateAttribute* attr) 
    359359{ 
    360     _currentRenderBin->_stage->addPositionedTextureAttribute(textureUnit,matrix,attr); 
     360    _currentRenderBin->getStage()->addPositionedTextureAttribute(textureUnit,matrix,attr); 
    361361} 
    362362 
  • OpenSceneGraph/trunk/include/osgUtil/RenderBin

    r2029 r3214  
    6363        virtual void reset(); 
    6464         
     65        RenderBin* getParent() { return _parent; } 
     66        const RenderBin* getParent() const { return _parent; } 
     67 
     68        RenderStage* getStage() { return _stage; } 
     69        const RenderStage* getStage() const { return _stage; } 
     70 
     71        RenderGraphList& getRenderGraphList() { return _renderGraphList; } 
     72        const RenderGraphList& getRenderGraphList() const { return _renderGraphList; } 
     73 
     74        RenderBinList& getRenderBinList() { return _bins; } 
     75        const RenderBinList& getRenderBinList() const { return _bins; } 
     76 
     77        RenderLeafList& getRenderLeafList() { return _renderLeafList; } 
     78        const RenderLeafList& getRenderLeafList() const { return _renderLeafList; } 
     79 
     80 
    6581        RenderBin* find_or_insert(int binNum,const std::string& binName); 
    6682 
     
    105121        const DrawCallback* getDrawCallback() const { return _drawCallback.get(); } 
    106122 
    107  
    108  
    109123        /** extract stats for current draw list. */ 
    110124        bool getStats(Statistics* primStats); 
     
    112126        bool getPrims(Statistics* primStats, int nbin); 
    113127 
     128#ifndef USE_DEPRECATED_API 
     129    protected: 
     130#endif 
    114131 
    115     public: 
    116  
     132        virtual ~RenderBin(); 
    117133 
    118134        void copyLeavesFromRenderGraphListToRenderLeafList(); 
     
    131147        osg::ref_ptr<DrawCallback>      _drawCallback; 
    132148 
    133     protected: 
    134      
    135         virtual ~RenderBin(); 
    136149 
    137150}; 
  • OpenSceneGraph/trunk/include/osgUtil/RenderStage

    r3077 r3214  
    134134        bool getStats(Statistics* primStats);  
    135135         
    136     public: 
     136#ifndef USE_DEPRECATED_API 
     137    protected: 
     138#endif 
    137139         
     140        virtual ~RenderStage(); 
     141 
    138142        typedef std::vector< osg::ref_ptr<RenderStage> > DependencyList; 
    139143 
     
    153157        mutable osg::ref_ptr<RenderStageLighting>   _renderStageLighting; 
    154158         
    155     protected: 
    156159     
    157         virtual ~RenderStage(); 
    158160 
    159161}; 
  • OpenSceneGraph/trunk/include/osgUtil/SceneView

    r3161 r3214  
    132132        const osg::StateSet* getLocalStateSet() const { return _localStateSet.get(); } 
    133133 
    134 #if 1 
    135134        typedef Options LightingMode; 
    136 #else 
    137         enum LightingMode { 
    138             HEADLIGHT, // default 
    139             SKY_LIGHT, 
    140             NO_SCENEVIEW_LIGHT 
    141         }; 
    142 #endif 
     135 
    143136        void setLightingMode(LightingMode mode) { _lightingMode=mode; } 
    144137        LightingMode getLightingMode() const { return _lightingMode; } 
  • OpenSceneGraph/trunk/src/osgUtil/CullVisitor.cpp

    r3198 r3214  
    12031203    // currently ignore lights in the scene graph itself.. 
    12041204    // will do later. 
    1205     RenderStage* previous_stage = _currentRenderBin->_stage; 
     1205    RenderStage* previous_stage = _currentRenderBin->getStage(); 
    12061206 
    12071207    // set up the background color and clear mask. 
     
    13311331 
    13321332 
    1333     if (rtts->_renderGraphList.size()==0 && rtts->_bins.size()==0) 
     1333    if (rtts->getRenderGraphList().size()==0 && rtts->getRenderBinList().size()==0) 
    13341334    { 
    13351335        // getting to this point means that all the subgraph has been 
     
    14761476    // and the render to texture stage to the current stages 
    14771477    // dependancy list. 
    1478     _currentRenderBin->_stage->addToDependencyList(rtts.get()); 
     1478    _currentRenderBin->getStage()->addToDependencyList(rtts.get()); 
    14791479 
    14801480    // attach texture to the RenderToTextureStage.