Changeset 3214
- Timestamp:
- 08/02/04 14:19:50 (9 years ago)
- Location:
- OpenSceneGraph/trunk
- Files:
-
- 10 modified
-
examples/osgdepthshadow/osgdepthshadow.cpp (modified) (4 diffs)
-
examples/osgdistortion/osgdistortion.cpp (modified) (3 diffs)
-
examples/osgprerender/osgprerender.cpp (modified) (3 diffs)
-
examples/osgprerendercubemap/osgprerendercubemap.cpp (modified) (3 diffs)
-
examples/osgshadowtexture/CreateShadowedScene.cpp (modified) (3 diffs)
-
include/osgUtil/CullVisitor (modified) (3 diffs)
-
include/osgUtil/RenderBin (modified) (4 diffs)
-
include/osgUtil/RenderStage (modified) (2 diffs)
-
include/osgUtil/SceneView (modified) (1 diff)
-
src/osgUtil/CullVisitor.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgdepthshadow/osgdepthshadow.cpp
r2634 r3214 135 135 { 136 136 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()) 139 139 { 140 140 _request_render_to_depth_texture(*node, *cullVisitor); … … 164 164 // currently ignore lights in the scene graph itself.. 165 165 // will do later. 166 osgUtil::RenderStage* previous_stage = cv.getCurrentRenderBin()-> _stage;166 osgUtil::RenderStage* previous_stage = cv.getCurrentRenderBin()->getStage(); 167 167 168 168 // set up the background color and clear mask. 169 169 rtts->setClearMask(GL_DEPTH_BUFFER_BIT); 170 rtts-> _colorMask = new ColorMask(false, false, false, false);170 rtts->setColorMask(new ColorMask(false, false, false, false)); 171 171 172 172 // set up to charge the same RenderStageLighting is the parent previous stage. … … 220 220 cv.setCurrentRenderBin(previousRenderBin); 221 221 222 if (rtts-> _renderGraphList.size()==0 && rtts->_bins.size()==0)222 if (rtts->getRenderGraphList().size()==0 && rtts->getRenderBinList().size()==0) 223 223 { 224 224 // getting to this point means that all the subgraph has been … … 231 231 // and the render to texture stage to the current stages 232 232 // dependancy list. 233 cv.getCurrentRenderBin()-> _stage->addToDependencyList(rtts.get());233 cv.getCurrentRenderBin()->getStage()->addToDependencyList(rtts.get()); 234 234 235 235 // if one exist attach texture to the RenderToTextureStage. -
OpenSceneGraph/trunk/examples/osgdistortion/osgdistortion.cpp
r2688 r3214 186 186 // currently ignore lights in the scene graph itself.. 187 187 // will do later. 188 osgUtil::RenderStage* previous_stage = cv.getCurrentRenderBin()-> _stage;188 osgUtil::RenderStage* previous_stage = cv.getCurrentRenderBin()->getStage(); 189 189 190 190 // set up the background color and clear mask. … … 217 217 cv.setCurrentRenderBin(previousRenderBin); 218 218 219 if (rtts-> _renderGraphList.size()==0 && rtts->_bins.size()==0)219 if (rtts->getRenderGraphList().size()==0 && rtts->getRenderBinList().size()==0) 220 220 { 221 221 // getting to this point means that all the subgraph has been … … 244 244 // and the render to texture stage to the current stages 245 245 // dependancy list. 246 cv.getCurrentRenderBin()-> _stage->addToDependencyList(rtts.get());246 cv.getCurrentRenderBin()->getStage()->addToDependencyList(rtts.get()); 247 247 248 248 // if one exist attach texture to the RenderToTextureStage. -
OpenSceneGraph/trunk/examples/osgprerender/osgprerender.cpp
r1844 r3214 101 101 // currently ignore lights in the scene graph itself.. 102 102 // will do later. 103 osgUtil::RenderStage* previous_stage = cv.getCurrentRenderBin()-> _stage;103 osgUtil::RenderStage* previous_stage = cv.getCurrentRenderBin()->getStage(); 104 104 105 105 // set up the background color and clear mask. … … 160 160 cv.setCurrentRenderBin(previousRenderBin); 161 161 162 if (rtts-> _renderGraphList.size()==0 && rtts->_bins.size()==0)162 if (rtts->getRenderGraphList().size()==0 && rtts->getRenderBinList().size()==0) 163 163 { 164 164 // getting to this point means that all the subgraph has been … … 189 189 // and the render to texture stage to the current stages 190 190 // dependancy list. 191 cv.getCurrentRenderBin()-> _stage->addToDependencyList(rtts.get());191 cv.getCurrentRenderBin()->getStage()->addToDependencyList(rtts.get()); 192 192 193 193 // if one exist attach texture to the RenderToTextureStage. -
OpenSceneGraph/trunk/examples/osgprerendercubemap/osgprerendercubemap.cpp
r3033 r3214 164 164 // currently ignore lights in the scene graph itself.. 165 165 // will do later. 166 osgUtil::RenderStage* previous_stage = cv.getCurrentRenderBin()-> _stage;166 osgUtil::RenderStage* previous_stage = cv.getCurrentRenderBin()->getStage(); 167 167 168 168 // set up the background color and clear mask. … … 222 222 cv.setCurrentRenderBin(previousRenderBin); 223 223 224 if (rtts-> _renderGraphList.size()==0 && rtts->_bins.size()==0)224 if (rtts->getRenderGraphList().size()==0 && rtts->getRenderBinList().size()==0) 225 225 { 226 226 // getting to this point means that all the subgraph has been … … 248 248 // and the render to texture stage to the current stages 249 249 // dependancy list. 250 cv.getCurrentRenderBin()-> _stage->addToDependencyList(rtts.get());250 cv.getCurrentRenderBin()->getStage()->addToDependencyList(rtts.get()); 251 251 252 252 // if one exist attach image to the RenderToTextureStage. -
OpenSceneGraph/trunk/examples/osgshadowtexture/CreateShadowedScene.cpp
r3126 r3214 80 80 // currently ignore lights in the scene graph itself.. 81 81 // will do later. 82 osgUtil::RenderStage* previous_stage = cv.getCurrentRenderBin()-> _stage;82 osgUtil::RenderStage* previous_stage = cv.getCurrentRenderBin()->getStage(); 83 83 84 84 // set up the background color and clear mask. 85 85 rtts->setClearColor(osg::Vec4(1.0f,1.0f,1.0f,1.0f)); 86 rtts->setClearMask(previous_stage->getClearMask());86 //rtts->setClearMask(previous_stage->getClearMask()); 87 87 88 88 // set up to charge the same RenderStageLighting is the parent previous stage. … … 161 161 cv.setCurrentRenderBin(previousRenderBin); 162 162 163 if (rtts-> _renderGraphList.size()==0 && rtts->_bins.size()==0)163 if (rtts->getRenderGraphList().size()==0 && rtts->getRenderBinList().size()==0) 164 164 { 165 165 // getting to this point means that all the shadower has been … … 190 190 // and the render to texture stage to the current stages 191 191 // dependancy list. 192 cv.getCurrentRenderBin()-> _stage->addToDependencyList(rtts.get());192 cv.getCurrentRenderBin()->getStage()->addToDependencyList(rtts.get()); 193 193 194 194 // if one exist attach texture to the RenderToTextureStage. -
OpenSceneGraph/trunk/include/osgUtil/CullVisitor
r3188 r3214 108 108 if (_currentRenderGraph->_stateset->useRenderBinDetails()) 109 109 { 110 _currentRenderBin = _currentRenderBin-> _parent;110 _currentRenderBin = _currentRenderBin->getParent(); 111 111 } 112 112 _currentRenderGraph = _currentRenderGraph->_parent; … … 352 352 inline void CullVisitor::addPositionedAttribute(osg::RefMatrix* matrix,const osg::StateAttribute* attr) 353 353 { 354 _currentRenderBin-> _stage->addPositionedAttribute(matrix,attr);354 _currentRenderBin->getStage()->addPositionedAttribute(matrix,attr); 355 355 } 356 356 … … 358 358 inline void CullVisitor::addPositionedTextureAttribute(unsigned int textureUnit, osg::RefMatrix* matrix,const osg::StateAttribute* attr) 359 359 { 360 _currentRenderBin-> _stage->addPositionedTextureAttribute(textureUnit,matrix,attr);360 _currentRenderBin->getStage()->addPositionedTextureAttribute(textureUnit,matrix,attr); 361 361 } 362 362 -
OpenSceneGraph/trunk/include/osgUtil/RenderBin
r2029 r3214 63 63 virtual void reset(); 64 64 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 65 81 RenderBin* find_or_insert(int binNum,const std::string& binName); 66 82 … … 105 121 const DrawCallback* getDrawCallback() const { return _drawCallback.get(); } 106 122 107 108 109 123 /** extract stats for current draw list. */ 110 124 bool getStats(Statistics* primStats); … … 112 126 bool getPrims(Statistics* primStats, int nbin); 113 127 128 #ifndef USE_DEPRECATED_API 129 protected: 130 #endif 114 131 115 public: 116 132 virtual ~RenderBin(); 117 133 118 134 void copyLeavesFromRenderGraphListToRenderLeafList(); … … 131 147 osg::ref_ptr<DrawCallback> _drawCallback; 132 148 133 protected:134 135 virtual ~RenderBin();136 149 137 150 }; -
OpenSceneGraph/trunk/include/osgUtil/RenderStage
r3077 r3214 134 134 bool getStats(Statistics* primStats); 135 135 136 public: 136 #ifndef USE_DEPRECATED_API 137 protected: 138 #endif 137 139 140 virtual ~RenderStage(); 141 138 142 typedef std::vector< osg::ref_ptr<RenderStage> > DependencyList; 139 143 … … 153 157 mutable osg::ref_ptr<RenderStageLighting> _renderStageLighting; 154 158 155 protected:156 159 157 virtual ~RenderStage();158 160 159 161 }; -
OpenSceneGraph/trunk/include/osgUtil/SceneView
r3161 r3214 132 132 const osg::StateSet* getLocalStateSet() const { return _localStateSet.get(); } 133 133 134 #if 1135 134 typedef Options LightingMode; 136 #else 137 enum LightingMode { 138 HEADLIGHT, // default 139 SKY_LIGHT, 140 NO_SCENEVIEW_LIGHT 141 }; 142 #endif 135 143 136 void setLightingMode(LightingMode mode) { _lightingMode=mode; } 144 137 LightingMode getLightingMode() const { return _lightingMode; } -
OpenSceneGraph/trunk/src/osgUtil/CullVisitor.cpp
r3198 r3214 1203 1203 // currently ignore lights in the scene graph itself.. 1204 1204 // will do later. 1205 RenderStage* previous_stage = _currentRenderBin-> _stage;1205 RenderStage* previous_stage = _currentRenderBin->getStage(); 1206 1206 1207 1207 // set up the background color and clear mask. … … 1331 1331 1332 1332 1333 if (rtts-> _renderGraphList.size()==0 && rtts->_bins.size()==0)1333 if (rtts->getRenderGraphList().size()==0 && rtts->getRenderBinList().size()==0) 1334 1334 { 1335 1335 // getting to this point means that all the subgraph has been … … 1476 1476 // and the render to texture stage to the current stages 1477 1477 // dependancy list. 1478 _currentRenderBin-> _stage->addToDependencyList(rtts.get());1478 _currentRenderBin->getStage()->addToDependencyList(rtts.get()); 1479 1479 1480 1480 // attach texture to the RenderToTextureStage.
