Renamed osgUtil::RenderGraph to osgUtil::StateGraph
This commit is contained in:
@@ -145,11 +145,10 @@ Referenced
|
||||
ReflectionMapGenerator
|
||||
Registry
|
||||
RenderBin
|
||||
RenderGraph
|
||||
StateGraph
|
||||
RenderLeaf
|
||||
RenderStage
|
||||
RenderStageLighting
|
||||
RenderToTextureStage
|
||||
PositionalStateContianer
|
||||
SceneView
|
||||
Sector
|
||||
SectorPlacer
|
||||
|
||||
@@ -96,46 +96,6 @@ LINK32=link.exe
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\examples\osgfxbrowser\Frame.cpp
|
||||
DEP_CPP_FRAME=\
|
||||
"..\..\..\Include\Osg\Array"\
|
||||
"..\..\..\Include\Osg\BoundingBox"\
|
||||
"..\..\..\Include\Osg\BoundingSphere"\
|
||||
"..\..\..\include\osg\buffered_value"\
|
||||
"..\..\..\Include\Osg\CopyOp"\
|
||||
"..\..\..\include\osg\DisplaySettings"\
|
||||
"..\..\..\Include\Osg\Drawable"\
|
||||
"..\..\..\Include\Osg\Export"\
|
||||
"..\..\..\include\osg\fast_back_stack"\
|
||||
"..\..\..\include\osg\FrameStamp"\
|
||||
"..\..\..\Include\Osg\Gl"\
|
||||
"..\..\..\Include\Osg\Image"\
|
||||
"..\..\..\include\osg\Math"\
|
||||
"..\..\..\Include\Osg\Matrix"\
|
||||
"..\..\..\Include\Osg\Node"\
|
||||
"..\..\..\include\osg\NodeCallback"\
|
||||
"..\..\..\Include\Osg\NodeVisitor"\
|
||||
"..\..\..\Include\Osg\Object"\
|
||||
"..\..\..\Include\Osg\Plane"\
|
||||
"..\..\..\Include\Osg\Polytope"\
|
||||
"..\..\..\Include\Osg\Quat"\
|
||||
"..\..\..\include\osg\ref_ptr"\
|
||||
"..\..\..\Include\Osg\Referenced"\
|
||||
"..\..\..\Include\Osg\Shape"\
|
||||
"..\..\..\Include\Osg\State"\
|
||||
"..\..\..\Include\Osg\StateAttribute"\
|
||||
"..\..\..\Include\Osg\StateSet"\
|
||||
"..\..\..\Include\Osg\Texture"\
|
||||
"..\..\..\Include\Osg\Texture2D"\
|
||||
"..\..\..\include\osg\UByte4"\
|
||||
"..\..\..\Include\Osg\Vec2"\
|
||||
"..\..\..\Include\Osg\Vec3"\
|
||||
"..\..\..\Include\Osg\Vec4"\
|
||||
"..\..\..\include\osg\Viewport"\
|
||||
"..\..\..\include\osgText\Export"\
|
||||
"..\..\..\include\osgText\Font"\
|
||||
"..\..\..\include\osgText\String"\
|
||||
"..\..\..\include\osgText\Text"\
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@@ -144,128 +104,6 @@ SOURCE=..\..\..\examples\osgfxbrowser\Frame.h
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\examples\osgfxbrowser\osgfxbrowser.cpp
|
||||
DEP_CPP_OSGFX=\
|
||||
"..\..\..\Include\Osg\AlphaFunc"\
|
||||
"..\..\..\Include\Osg\AnimationPath"\
|
||||
"..\..\..\Include\osg\ApplicationUsage"\
|
||||
"..\..\..\Include\osg\ArgumentParser"\
|
||||
"..\..\..\Include\Osg\Array"\
|
||||
"..\..\..\Include\Osg\BlendFunc"\
|
||||
"..\..\..\Include\Osg\BoundingBox"\
|
||||
"..\..\..\Include\Osg\BoundingSphere"\
|
||||
"..\..\..\include\osg\buffered_value"\
|
||||
"..\..\..\include\osg\ClearNode"\
|
||||
"..\..\..\Include\Osg\ColorMask"\
|
||||
"..\..\..\Include\Osg\ConvexPlanarOccluder"\
|
||||
"..\..\..\Include\Osg\ConvexPlanarPolygon"\
|
||||
"..\..\..\Include\Osg\CopyOp"\
|
||||
"..\..\..\Include\Osg\CullingSet"\
|
||||
"..\..\..\Include\Osg\CullStack"\
|
||||
"..\..\..\include\osg\DisplaySettings"\
|
||||
"..\..\..\Include\Osg\Drawable"\
|
||||
"..\..\..\Include\Osg\Export"\
|
||||
"..\..\..\include\osg\fast_back_stack"\
|
||||
"..\..\..\include\osg\FrameStamp"\
|
||||
"..\..\..\Include\Osg\Geode"\
|
||||
"..\..\..\Include\Osg\Geometry"\
|
||||
"..\..\..\Include\Osg\Gl"\
|
||||
"..\..\..\Include\Osg\Group"\
|
||||
"..\..\..\Include\Osg\Image"\
|
||||
"..\..\..\Include\Osg\Light"\
|
||||
"..\..\..\Include\Osg\LightSource"\
|
||||
"..\..\..\Include\Osg\LineSegment"\
|
||||
"..\..\..\Include\Osg\Lod"\
|
||||
"..\..\..\include\osg\Math"\
|
||||
"..\..\..\Include\Osg\Matrix"\
|
||||
"..\..\..\Include\Osg\MatrixTransform"\
|
||||
"..\..\..\Include\Osg\Node"\
|
||||
"..\..\..\include\osg\NodeCallback"\
|
||||
"..\..\..\Include\Osg\NodeVisitor"\
|
||||
"..\..\..\Include\Osg\Notify"\
|
||||
"..\..\..\Include\Osg\Object"\
|
||||
"..\..\..\Include\Osg\OccluderNode"\
|
||||
"..\..\..\Include\Osg\PagedLOD"\
|
||||
"..\..\..\Include\Osg\Plane"\
|
||||
"..\..\..\Include\Osg\Polytope"\
|
||||
"..\..\..\Include\Osg\PrimitiveSet"\
|
||||
"..\..\..\Include\Osg\Projection"\
|
||||
"..\..\..\Include\Osg\Quat"\
|
||||
"..\..\..\include\osg\ref_ptr"\
|
||||
"..\..\..\Include\Osg\Referenced"\
|
||||
"..\..\..\Include\Osg\ShadowVolumeOccluder"\
|
||||
"..\..\..\Include\Osg\Shape"\
|
||||
"..\..\..\Include\Osg\State"\
|
||||
"..\..\..\Include\Osg\StateAttribute"\
|
||||
"..\..\..\Include\Osg\StateSet"\
|
||||
"..\..\..\Include\Osg\TexEnv"\
|
||||
"..\..\..\Include\Osg\Texture"\
|
||||
"..\..\..\Include\Osg\Texture2D"\
|
||||
"..\..\..\Include\Osg\Timer"\
|
||||
"..\..\..\Include\Osg\Transform"\
|
||||
"..\..\..\include\osg\UByte4"\
|
||||
"..\..\..\Include\Osg\Vec2"\
|
||||
"..\..\..\Include\Osg\Vec3"\
|
||||
"..\..\..\Include\Osg\Vec4"\
|
||||
"..\..\..\include\osg\Viewport"\
|
||||
"..\..\..\Include\osgDB\DatabasePager"\
|
||||
"..\..\..\Include\osgDB\Export"\
|
||||
"..\..\..\Include\osgDB\ReadFile"\
|
||||
"..\..\..\Include\osgDB\WriteFile"\
|
||||
"..\..\..\include\osgFX\Effect"\
|
||||
"..\..\..\include\osgFX\Export"\
|
||||
"..\..\..\include\osgFX\Registry"\
|
||||
"..\..\..\include\osgFX\Technique"\
|
||||
"..\..\..\Include\osgGA\Export"\
|
||||
"..\..\..\Include\osgGA\GUIActionAdapter"\
|
||||
"..\..\..\Include\osgGA\GUIEventAdapter"\
|
||||
"..\..\..\Include\osgGA\GUIEventHandler"\
|
||||
"..\..\..\Include\osgGA\GUIEventHandlerVisitor"\
|
||||
"..\..\..\Include\osgGA\KeySwitchMatrixManipulator"\
|
||||
"..\..\..\Include\osgGA\MatrixManipulator"\
|
||||
"..\..\..\Include\osgProducer\EventAdapter"\
|
||||
"..\..\..\Include\osgProducer\Export"\
|
||||
"..\..\..\Include\osgProducer\KeyboardMouseCallback"\
|
||||
"..\..\..\include\osgProducer\OsgCameraGroup"\
|
||||
"..\..\..\Include\osgProducer\OsgSceneHandler"\
|
||||
"..\..\..\Include\osgProducer\Viewer"\
|
||||
"..\..\..\include\osgText\Export"\
|
||||
"..\..\..\include\osgText\Font"\
|
||||
"..\..\..\include\osgText\String"\
|
||||
"..\..\..\include\osgText\Text"\
|
||||
"..\..\..\Include\osgUtil\CullVisitor"\
|
||||
"..\..\..\Include\osgUtil\Export"\
|
||||
"..\..\..\Include\osgUtil\IntersectVisitor"\
|
||||
"..\..\..\include\osgUtil\Optimizer"\
|
||||
"..\..\..\include\osgUtil\RenderBin"\
|
||||
"..\..\..\include\osgUtil\RenderGraph"\
|
||||
"..\..\..\include\osgUtil\RenderLeaf"\
|
||||
"..\..\..\include\osgUtil\RenderStage"\
|
||||
"..\..\..\include\osgUtil\RenderStageLighting"\
|
||||
"..\..\..\Include\osgUtil\SceneView"\
|
||||
|
||||
NODEP_CPP_OSGFX=\
|
||||
".\penthreads\barrier"\
|
||||
".\penthreads\condition"\
|
||||
".\penthreads\exports"\
|
||||
".\penthreads\mutex"\
|
||||
".\penthreads\thread"\
|
||||
".\roducer\block"\
|
||||
".\roducer\blockingqueue"\
|
||||
".\roducer\camera"\
|
||||
".\roducer\cameraconfig"\
|
||||
".\roducer\cameragroup"\
|
||||
".\roducer\export"\
|
||||
".\roducer\inputarea"\
|
||||
".\roducer\keyboard"\
|
||||
".\roducer\keyboardmouse"\
|
||||
".\roducer\math"\
|
||||
".\roducer\referenced"\
|
||||
".\roducer\refopenthread"\
|
||||
".\roducer\rendersurface"\
|
||||
".\roducer\timer"\
|
||||
".\roducer\types"\
|
||||
".\roducer\visualchooser"\
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
@@ -135,7 +135,7 @@ SOURCE=..\..\src\osgUtil\RenderBin.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\src\osgUtil\RenderGraph.cpp
|
||||
SOURCE=..\..\src\osgUtil\StateGraph.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@@ -247,7 +247,7 @@ SOURCE=..\..\include\osgUtil\RenderBin
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\include\osgUtil\RenderGraph
|
||||
SOURCE=..\..\include\osgUtil\StateGraph
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
|
||||
@@ -151,6 +151,10 @@ SOURCE=..\..\..\src\osgWrappers\osg\BufferObject.cpp
|
||||
SOURCE=..\..\..\src\osgWrappers\osg\CameraNode.cpp
|
||||
# End Source File
|
||||
|
||||
# Begin Source File
|
||||
SOURCE=..\..\..\src\osgWrappers\osg\CameraView.cpp
|
||||
# End Source File
|
||||
|
||||
# Begin Source File
|
||||
SOURCE=..\..\..\src\osgWrappers\osg\ClearNode.cpp
|
||||
# End Source File
|
||||
|
||||
@@ -107,6 +107,14 @@ SOURCE=..\..\..\src\osgWrappers\osgParticle\AngularAccelOperator.cpp
|
||||
SOURCE=..\..\..\src\osgWrappers\osgParticle\CenteredPlacer.cpp
|
||||
# End Source File
|
||||
|
||||
# Begin Source File
|
||||
SOURCE=..\..\..\src\osgWrappers\osgParticle\ConnectedParticleSystem.cpp
|
||||
# End Source File
|
||||
|
||||
# Begin Source File
|
||||
SOURCE=..\..\..\src\osgWrappers\osgParticle\ConstantRateCounter.cpp
|
||||
# End Source File
|
||||
|
||||
# Begin Source File
|
||||
SOURCE=..\..\..\src\osgWrappers\osgParticle\Counter.cpp
|
||||
# End Source File
|
||||
@@ -219,6 +227,10 @@ SOURCE=..\..\..\src\osgWrappers\osgParticle\Shooter.cpp
|
||||
SOURCE=..\..\..\src\osgWrappers\osgParticle\SmokeEffect.cpp
|
||||
# End Source File
|
||||
|
||||
# Begin Source File
|
||||
SOURCE=..\..\..\src\osgWrappers\osgParticle\SmokeTrailEffect.cpp
|
||||
# End Source File
|
||||
|
||||
# Begin Source File
|
||||
SOURCE=..\..\..\src\osgWrappers\osgParticle\VariableRateCounter.cpp
|
||||
# End Source File
|
||||
|
||||
@@ -143,10 +143,6 @@ SOURCE=..\..\..\src\osgWrappers\osgUtil\ReflectionMapGenerator.cpp
|
||||
SOURCE=..\..\..\src\osgWrappers\osgUtil\RenderBin.cpp
|
||||
# End Source File
|
||||
|
||||
# Begin Source File
|
||||
SOURCE=..\..\..\src\osgWrappers\osgUtil\RenderGraph.cpp
|
||||
# End Source File
|
||||
|
||||
# Begin Source File
|
||||
SOURCE=..\..\..\src\osgWrappers\osgUtil\RenderLeaf.cpp
|
||||
# End Source File
|
||||
@@ -167,6 +163,10 @@ SOURCE=..\..\..\src\osgWrappers\osgUtil\Simplifier.cpp
|
||||
SOURCE=..\..\..\src\osgWrappers\osgUtil\SmoothingVisitor.cpp
|
||||
# End Source File
|
||||
|
||||
# Begin Source File
|
||||
SOURCE=..\..\..\src\osgWrappers\osgUtil\StateGraph.cpp
|
||||
# End Source File
|
||||
|
||||
# Begin Source File
|
||||
SOURCE=..\..\..\src\osgWrappers\osgUtil\Statistics.cpp
|
||||
# End Source File
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include <osg/CullStack>
|
||||
|
||||
#include <osgUtil/RenderGraph>
|
||||
#include <osgUtil/StateGraph>
|
||||
#include <osgUtil/RenderStage>
|
||||
|
||||
#include <osg/Vec3>
|
||||
@@ -91,7 +91,7 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor, public osg::CullStac
|
||||
*/
|
||||
inline void pushStateSet(const osg::StateSet* ss)
|
||||
{
|
||||
_currentRenderGraph = _currentRenderGraph->find_or_insert(ss);
|
||||
_currentStateGraph = _currentStateGraph->find_or_insert(ss);
|
||||
if (ss->useRenderBinDetails())
|
||||
{
|
||||
_currentRenderBin = _currentRenderBin->find_or_insert(ss->getBinNumber(),ss->getBinName());
|
||||
@@ -104,27 +104,27 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor, public osg::CullStac
|
||||
*/
|
||||
inline void popStateSet()
|
||||
{
|
||||
if (_currentRenderGraph->_stateset->useRenderBinDetails())
|
||||
if (_currentStateGraph->_stateset->useRenderBinDetails())
|
||||
{
|
||||
_currentRenderBin = _currentRenderBin->getParent();
|
||||
}
|
||||
_currentRenderGraph = _currentRenderGraph->_parent;
|
||||
_currentStateGraph = _currentStateGraph->_parent;
|
||||
}
|
||||
|
||||
inline void setRenderGraph(RenderGraph* rg)
|
||||
inline void setStateGraph(StateGraph* rg)
|
||||
{
|
||||
_rootRenderGraph = rg;
|
||||
_currentRenderGraph = rg;
|
||||
_rootStateGraph = rg;
|
||||
_currentStateGraph = rg;
|
||||
}
|
||||
|
||||
inline RenderGraph* getRootRenderGraph()
|
||||
inline StateGraph* getRootStateGraph()
|
||||
{
|
||||
return _rootRenderGraph.get();
|
||||
return _rootStateGraph.get();
|
||||
}
|
||||
|
||||
inline RenderGraph* getCurrentRenderGraph()
|
||||
inline StateGraph* getCurrentStateGraph()
|
||||
{
|
||||
return _currentRenderGraph;
|
||||
return _currentStateGraph;
|
||||
}
|
||||
|
||||
inline void setRenderStage(RenderStage* rg)
|
||||
@@ -252,8 +252,8 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor, public osg::CullStac
|
||||
|
||||
osg::ref_ptr<const osg::ClearNode> _clearNode;
|
||||
|
||||
osg::ref_ptr<RenderGraph> _rootRenderGraph;
|
||||
RenderGraph* _currentRenderGraph;
|
||||
osg::ref_ptr<StateGraph> _rootStateGraph;
|
||||
StateGraph* _currentStateGraph;
|
||||
|
||||
osg::ref_ptr<RenderStage> _rootRenderStage;
|
||||
RenderBin* _currentRenderBin;
|
||||
@@ -315,29 +315,29 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor, public osg::CullStac
|
||||
|
||||
inline void CullVisitor::addDrawable(osg::Drawable* drawable,osg::RefMatrix* matrix)
|
||||
{
|
||||
if (_currentRenderGraph->leaves_empty())
|
||||
if (_currentStateGraph->leaves_empty())
|
||||
{
|
||||
// this is first leaf to be added to RenderGraph
|
||||
// this is first leaf to be added to StateGraph
|
||||
// and therefore should not already know to current render bin,
|
||||
// so need to add it.
|
||||
_currentRenderBin->addRenderGraph(_currentRenderGraph);
|
||||
_currentRenderBin->addStateGraph(_currentStateGraph);
|
||||
}
|
||||
//_currentRenderGraph->addLeaf(new RenderLeaf(drawable,matrix));
|
||||
_currentRenderGraph->addLeaf(createOrReuseRenderLeaf(drawable,_projectionStack.back().get(),matrix));
|
||||
//_currentStateGraph->addLeaf(new RenderLeaf(drawable,matrix));
|
||||
_currentStateGraph->addLeaf(createOrReuseRenderLeaf(drawable,_projectionStack.back().get(),matrix));
|
||||
}
|
||||
|
||||
/** Add a drawable and depth to current render graph.*/
|
||||
inline void CullVisitor::addDrawableAndDepth(osg::Drawable* drawable,osg::RefMatrix* matrix,float depth)
|
||||
{
|
||||
if (_currentRenderGraph->leaves_empty())
|
||||
if (_currentStateGraph->leaves_empty())
|
||||
{
|
||||
// this is first leaf to be added to RenderGraph
|
||||
// this is first leaf to be added to StateGraph
|
||||
// and therefore should not already know to current render bin,
|
||||
// so need to add it.
|
||||
_currentRenderBin->addRenderGraph(_currentRenderGraph);
|
||||
_currentRenderBin->addStateGraph(_currentStateGraph);
|
||||
}
|
||||
//_currentRenderGraph->addLeaf(new RenderLeaf(drawable,matrix,depth));
|
||||
_currentRenderGraph->addLeaf(createOrReuseRenderLeaf(drawable,_projectionStack.back().get(),matrix,depth));
|
||||
//_currentStateGraph->addLeaf(new RenderLeaf(drawable,matrix,depth));
|
||||
_currentStateGraph->addLeaf(createOrReuseRenderLeaf(drawable,_projectionStack.back().get(),matrix,depth));
|
||||
}
|
||||
|
||||
/** Add an attribute which is positioned relative to the modelview matrix.*/
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <osg/State>
|
||||
|
||||
#include <osgUtil/RenderLeaf>
|
||||
#include <osgUtil/RenderGraph>
|
||||
#include <osgUtil/StateGraph>
|
||||
|
||||
namespace osgUtil {
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#ifndef OSGUTIL_RENDERBIN
|
||||
#define OSGUTIL_RENDERBIN 1
|
||||
|
||||
#include <osgUtil/RenderGraph>
|
||||
#include <osgUtil/StateGraph>
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
@@ -35,7 +35,7 @@ class OSGUTIL_EXPORT RenderBin : public osg::Object
|
||||
public:
|
||||
|
||||
typedef std::vector<RenderLeaf*> RenderLeafList;
|
||||
typedef std::vector<RenderGraph*> RenderGraphList;
|
||||
typedef std::vector<StateGraph*> StateGraphList;
|
||||
typedef std::map< int, osg::ref_ptr<RenderBin> > RenderBinList;
|
||||
|
||||
enum SortMode
|
||||
@@ -80,8 +80,8 @@ class OSGUTIL_EXPORT RenderBin : public osg::Object
|
||||
|
||||
int getBinNum() const { return _binNum; }
|
||||
|
||||
RenderGraphList& getRenderGraphList() { return _renderGraphList; }
|
||||
const RenderGraphList& getRenderGraphList() const { return _renderGraphList; }
|
||||
StateGraphList& getStateGraphList() { return _stateGraphList; }
|
||||
const StateGraphList& getStateGraphList() const { return _stateGraphList; }
|
||||
|
||||
RenderBinList& getRenderBinList() { return _bins; }
|
||||
const RenderBinList& getRenderBinList() const { return _bins; }
|
||||
@@ -92,9 +92,9 @@ class OSGUTIL_EXPORT RenderBin : public osg::Object
|
||||
|
||||
RenderBin* find_or_insert(int binNum,const std::string& binName);
|
||||
|
||||
void addRenderGraph(RenderGraph* rg)
|
||||
void addStateGraph(StateGraph* rg)
|
||||
{
|
||||
_renderGraphList.push_back(rg);
|
||||
_stateGraphList.push_back(rg);
|
||||
}
|
||||
|
||||
void sort();
|
||||
@@ -138,7 +138,7 @@ class OSGUTIL_EXPORT RenderBin : public osg::Object
|
||||
void getPrims(Statistics* primStats);
|
||||
bool getPrims(Statistics* primStats, int nbin);
|
||||
|
||||
void copyLeavesFromRenderGraphListToRenderLeafList();
|
||||
void copyLeavesFromStateGraphListToRenderLeafList();
|
||||
|
||||
protected:
|
||||
|
||||
@@ -148,7 +148,7 @@ class OSGUTIL_EXPORT RenderBin : public osg::Object
|
||||
RenderBin* _parent;
|
||||
RenderStage* _stage;
|
||||
RenderBinList _bins;
|
||||
RenderGraphList _renderGraphList;
|
||||
StateGraphList _stateGraphList;
|
||||
RenderLeafList _renderLeafList;
|
||||
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
|
||||
namespace osgUtil {
|
||||
|
||||
// Forward declare RenderGraph
|
||||
class RenderGraph;
|
||||
// Forward declare StateGraph
|
||||
class StateGraph;
|
||||
|
||||
/** Container class for all data required for rendering of drawables.
|
||||
*/
|
||||
@@ -61,12 +61,12 @@ class OSGUTIL_EXPORT RenderLeaf : public osg::Referenced
|
||||
|
||||
virtual void render(osg::State& state,RenderLeaf* previous);
|
||||
|
||||
/// Allow RenderGraph to change the RenderLeaf's _parent.
|
||||
friend class osgUtil::RenderGraph;
|
||||
/// Allow StateGraph to change the RenderLeaf's _parent.
|
||||
friend class osgUtil::StateGraph;
|
||||
|
||||
public:
|
||||
|
||||
RenderGraph* _parent;
|
||||
StateGraph* _parent;
|
||||
osg::Drawable* _drawable;
|
||||
osg::ref_ptr<osg::RefMatrix> _projection;
|
||||
osg::ref_ptr<osg::RefMatrix> _modelview;
|
||||
|
||||
@@ -262,17 +262,17 @@ class OSGUTIL_EXPORT SceneView : public osg::Referenced, public osg::CullSetting
|
||||
const osg::CollectOccludersVisitor* getCollectOccludersVisitor() const { return _collectOccludersVisistor.get(); }
|
||||
|
||||
|
||||
void setRenderGraph(osgUtil::RenderGraph* rg) { _rendergraph = rg; }
|
||||
osgUtil::RenderGraph* getRenderGraph() { return _rendergraph.get(); }
|
||||
const osgUtil::RenderGraph* getRenderGraph() const { return _rendergraph.get(); }
|
||||
void setStateGraph(osgUtil::StateGraph* rg) { _rendergraph = rg; }
|
||||
osgUtil::StateGraph* getStateGraph() { return _rendergraph.get(); }
|
||||
const osgUtil::StateGraph* getStateGraph() const { return _rendergraph.get(); }
|
||||
|
||||
void setRenderGraphLeft(osgUtil::RenderGraph* rg) { _rendergraphLeft = rg; }
|
||||
osgUtil::RenderGraph* getRenderGraphLeft() { return _rendergraphLeft.get(); }
|
||||
const osgUtil::RenderGraph* getRenderGraphLeft() const { return _rendergraphLeft.get(); }
|
||||
void setStateGraphLeft(osgUtil::StateGraph* rg) { _rendergraphLeft = rg; }
|
||||
osgUtil::StateGraph* getStateGraphLeft() { return _rendergraphLeft.get(); }
|
||||
const osgUtil::StateGraph* getStateGraphLeft() const { return _rendergraphLeft.get(); }
|
||||
|
||||
void setRenderGraphRight(osgUtil::RenderGraph* rg) { _rendergraphRight = rg; }
|
||||
osgUtil::RenderGraph* getRenderGraphRight() { return _rendergraphRight.get(); }
|
||||
const osgUtil::RenderGraph* getRenderGraphRight() const { return _rendergraphRight.get(); }
|
||||
void setStateGraphRight(osgUtil::StateGraph* rg) { _rendergraphRight = rg; }
|
||||
osgUtil::StateGraph* getStateGraphRight() { return _rendergraphRight.get(); }
|
||||
const osgUtil::StateGraph* getStateGraphRight() const { return _rendergraphRight.get(); }
|
||||
|
||||
|
||||
void setRenderStage(osgUtil::RenderStage* rs) { _renderStage = rs; }
|
||||
@@ -446,7 +446,7 @@ class OSGUTIL_EXPORT SceneView : public osg::Referenced, public osg::CullSetting
|
||||
virtual ~SceneView();
|
||||
|
||||
/** Do cull traversal of attached scene graph using Cull NodeVisitor.*/
|
||||
virtual void cullStage(const osg::Matrixd& projection,const osg::Matrixd& modelview,osgUtil::CullVisitor* cullVisitor, osgUtil::RenderGraph* rendergraph, osgUtil::RenderStage* renderStage);
|
||||
virtual void cullStage(const osg::Matrixd& projection,const osg::Matrixd& modelview,osgUtil::CullVisitor* cullVisitor, osgUtil::StateGraph* rendergraph, osgUtil::RenderStage* renderStage);
|
||||
|
||||
const osg::Matrix computeMVPW() const;
|
||||
|
||||
@@ -462,17 +462,17 @@ class OSGUTIL_EXPORT SceneView : public osg::Referenced, public osg::CullSetting
|
||||
osg::ref_ptr<osg::NodeVisitor> _initVisitor;
|
||||
osg::ref_ptr<osg::NodeVisitor> _updateVisitor;
|
||||
osg::ref_ptr<osgUtil::CullVisitor> _cullVisitor;
|
||||
osg::ref_ptr<osgUtil::RenderGraph> _rendergraph;
|
||||
osg::ref_ptr<osgUtil::StateGraph> _rendergraph;
|
||||
osg::ref_ptr<osgUtil::RenderStage> _renderStage;
|
||||
|
||||
osg::ref_ptr<ComputeStereoMatricesCallback> _computeStereoMatricesCallback;
|
||||
|
||||
osg::ref_ptr<osgUtil::CullVisitor> _cullVisitorLeft;
|
||||
osg::ref_ptr<osgUtil::RenderGraph> _rendergraphLeft;
|
||||
osg::ref_ptr<osgUtil::StateGraph> _rendergraphLeft;
|
||||
osg::ref_ptr<osgUtil::RenderStage> _renderStageLeft;
|
||||
|
||||
osg::ref_ptr<osgUtil::CullVisitor> _cullVisitorRight;
|
||||
osg::ref_ptr<osgUtil::RenderGraph> _rendergraphRight;
|
||||
osg::ref_ptr<osgUtil::StateGraph> _rendergraphRight;
|
||||
osg::ref_ptr<osgUtil::RenderStage> _renderStageRight;
|
||||
|
||||
osg::ref_ptr<osg::CollectOccludersVisitor> _collectOccludersVisistor;
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef OSGUTIL_RENDERGRAPH
|
||||
#define OSGUTIL_RENDERGRAPH 1
|
||||
#ifndef OSGUTIL_STATEGRAPH
|
||||
#define OSGUTIL_STATEGRAPH 1
|
||||
|
||||
#include <osg/Matrix>
|
||||
#include <osg/Drawable>
|
||||
@@ -36,17 +36,17 @@ struct LeafDepthSortFunctor
|
||||
}
|
||||
};
|
||||
|
||||
/** RenderGraph - contained in a renderBin, defines the scene to be drawn.
|
||||
/** StateGraph - contained in a renderBin, defines the scene to be drawn.
|
||||
*/
|
||||
class OSGUTIL_EXPORT RenderGraph : public osg::Referenced
|
||||
class OSGUTIL_EXPORT StateGraph : public osg::Referenced
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
typedef std::map< const osg::StateSet*, osg::ref_ptr<RenderGraph> > ChildList;
|
||||
typedef std::map< const osg::StateSet*, osg::ref_ptr<StateGraph> > ChildList;
|
||||
typedef std::vector< osg::ref_ptr<RenderLeaf> > LeafList;
|
||||
|
||||
RenderGraph* _parent;
|
||||
StateGraph* _parent;
|
||||
const osg::StateSet* _stateset;
|
||||
|
||||
int _depth;
|
||||
@@ -59,7 +59,7 @@ class OSGUTIL_EXPORT RenderGraph : public osg::Referenced
|
||||
osg::ref_ptr<osg::Referenced> _userData;
|
||||
|
||||
|
||||
RenderGraph():
|
||||
StateGraph():
|
||||
_parent(NULL),
|
||||
_stateset(NULL),
|
||||
_depth(0),
|
||||
@@ -69,7 +69,7 @@ class OSGUTIL_EXPORT RenderGraph : public osg::Referenced
|
||||
{
|
||||
}
|
||||
|
||||
RenderGraph(RenderGraph* parent,const osg::StateSet* stateset):
|
||||
StateGraph(StateGraph* parent,const osg::StateSet* stateset):
|
||||
_parent(parent),
|
||||
_stateset(stateset),
|
||||
_depth(0),
|
||||
@@ -80,9 +80,9 @@ class OSGUTIL_EXPORT RenderGraph : public osg::Referenced
|
||||
if (_parent) _depth = _parent->_depth + 1;
|
||||
}
|
||||
|
||||
~RenderGraph() {}
|
||||
~StateGraph() {}
|
||||
|
||||
RenderGraph* cloneType() const { return new RenderGraph; }
|
||||
StateGraph* cloneType() const { return new StateGraph; }
|
||||
|
||||
void setUserData(osg::Referenced* obj) { _userData = obj; }
|
||||
osg::Referenced* getUserData() { return _userData.get(); }
|
||||
@@ -141,18 +141,18 @@ class OSGUTIL_EXPORT RenderGraph : public osg::Referenced
|
||||
std::sort(_leaves.begin(),_leaves.end(),LeafDepthSortFunctor());
|
||||
}
|
||||
|
||||
/** Reset the internal contents of a RenderGraph, including deleting all children.*/
|
||||
/** Reset the internal contents of a StateGraph, including deleting all children.*/
|
||||
void reset();
|
||||
|
||||
/** Recursively clean the RenderGraph of all its drawables, lights and depths.
|
||||
/** Recursively clean the StateGraph of all its drawables, lights and depths.
|
||||
* Leaves children intact, and ready to be populated again.*/
|
||||
void clean();
|
||||
|
||||
/** Recursively prune the RenderGraph of empty children.*/
|
||||
/** Recursively prune the StateGraph of empty children.*/
|
||||
void prune();
|
||||
|
||||
|
||||
inline RenderGraph* find_or_insert(const osg::StateSet* stateset)
|
||||
inline StateGraph* find_or_insert(const osg::StateSet* stateset)
|
||||
{
|
||||
// search for the appropriate state group, return it if found.
|
||||
ChildList::iterator itr = _children.find(stateset);
|
||||
@@ -160,7 +160,7 @@ class OSGUTIL_EXPORT RenderGraph : public osg::Referenced
|
||||
|
||||
// create a state group and insert it into the children list
|
||||
// then return the state group.
|
||||
RenderGraph* sg = new RenderGraph(this,stateset);
|
||||
StateGraph* sg = new StateGraph(this,stateset);
|
||||
_children[stateset] = sg;
|
||||
return sg;
|
||||
}
|
||||
@@ -177,7 +177,7 @@ class OSGUTIL_EXPORT RenderGraph : public osg::Referenced
|
||||
}
|
||||
}
|
||||
|
||||
static inline void moveRenderGraph(osg::State& state,RenderGraph* sg_curr,RenderGraph* sg_new)
|
||||
static inline void moveStateGraph(osg::State& state,StateGraph* sg_curr,StateGraph* sg_new)
|
||||
{
|
||||
if (sg_new==sg_curr || sg_new==NULL) return;
|
||||
|
||||
@@ -185,7 +185,7 @@ class OSGUTIL_EXPORT RenderGraph : public osg::Referenced
|
||||
{
|
||||
|
||||
// use return path to trace back steps to sg_new.
|
||||
std::vector<RenderGraph*> return_path;
|
||||
std::vector<StateGraph*> return_path;
|
||||
|
||||
// need to pop back root render graph.
|
||||
do
|
||||
@@ -194,11 +194,11 @@ class OSGUTIL_EXPORT RenderGraph : public osg::Referenced
|
||||
sg_new = sg_new->_parent;
|
||||
} while (sg_new);
|
||||
|
||||
for(std::vector<RenderGraph*>::reverse_iterator itr=return_path.rbegin();
|
||||
for(std::vector<StateGraph*>::reverse_iterator itr=return_path.rbegin();
|
||||
itr!=return_path.rend();
|
||||
++itr)
|
||||
{
|
||||
RenderGraph* rg = (*itr);
|
||||
StateGraph* rg = (*itr);
|
||||
if (rg->_stateset) state.pushStateSet(rg->_stateset);
|
||||
}
|
||||
return;
|
||||
@@ -226,7 +226,7 @@ class OSGUTIL_EXPORT RenderGraph : public osg::Referenced
|
||||
}
|
||||
|
||||
// use return path to trace back steps to sg_new.
|
||||
std::vector<RenderGraph*> return_path;
|
||||
std::vector<StateGraph*> return_path;
|
||||
|
||||
// need to pop back up to the same depth as the curr state group.
|
||||
while (sg_new->_depth>sg_curr->_depth)
|
||||
@@ -238,7 +238,7 @@ class OSGUTIL_EXPORT RenderGraph : public osg::Referenced
|
||||
// now pop back up both parent paths until they agree.
|
||||
|
||||
// DRT - 10/22/02
|
||||
// should be this to conform with above case where two RenderGraph
|
||||
// should be this to conform with above case where two StateGraph
|
||||
// nodes have the same parent
|
||||
while (sg_curr != sg_new)
|
||||
{
|
||||
@@ -249,17 +249,17 @@ class OSGUTIL_EXPORT RenderGraph : public osg::Referenced
|
||||
sg_new = sg_new->_parent;
|
||||
}
|
||||
|
||||
for(std::vector<RenderGraph*>::reverse_iterator itr=return_path.rbegin();
|
||||
for(std::vector<StateGraph*>::reverse_iterator itr=return_path.rbegin();
|
||||
itr!=return_path.rend();
|
||||
++itr)
|
||||
{
|
||||
RenderGraph* rg = (*itr);
|
||||
StateGraph* rg = (*itr);
|
||||
if (rg->_stateset) state.pushStateSet(rg->_stateset);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
inline static void moveToRootRenderGraph(osg::State& state,RenderGraph* sg_curr)
|
||||
inline static void moveToRootStateGraph(osg::State& state,StateGraph* sg_curr)
|
||||
{
|
||||
// need to pop back all statesets and matrices.
|
||||
while (sg_curr)
|
||||
@@ -273,9 +273,9 @@ class OSGUTIL_EXPORT RenderGraph : public osg::Referenced
|
||||
private:
|
||||
|
||||
/// disallow copy construction.
|
||||
RenderGraph(const RenderGraph&):osg::Referenced() {}
|
||||
StateGraph(const StateGraph&):osg::Referenced() {}
|
||||
/// disallow copy operator.
|
||||
RenderGraph& operator = (const RenderGraph&) { return *this; }
|
||||
StateGraph& operator = (const StateGraph&) { return *this; }
|
||||
|
||||
};
|
||||
|
||||
@@ -153,14 +153,14 @@ void LightPointNode::traverse(osg::NodeVisitor& nv)
|
||||
|
||||
osg::Matrix matrix = cv->getModelViewMatrix();
|
||||
osg::RefMatrix& projection = cv->getProjectionMatrix();
|
||||
osgUtil::RenderGraph* rg = cv->getCurrentRenderGraph();
|
||||
osgUtil::StateGraph* rg = cv->getCurrentStateGraph();
|
||||
|
||||
if (rg->leaves_empty())
|
||||
{
|
||||
// this is first leaf to be added to RenderGraph
|
||||
// this is first leaf to be added to StateGraph
|
||||
// and therefore should not already know to current render bin,
|
||||
// so need to add it.
|
||||
cv->getCurrentRenderBin()->addRenderGraph(rg);
|
||||
cv->getCurrentRenderBin()->addStateGraph(rg);
|
||||
}
|
||||
|
||||
#ifdef USE_TIMER
|
||||
@@ -181,7 +181,7 @@ void LightPointNode::traverse(osg::NodeVisitor& nv)
|
||||
else
|
||||
{
|
||||
// will need to replace UserData.
|
||||
osg::notify(osg::WARN) << "Warning: Replacing osgUtil::RenderGraph::_userData to support osgSim::LightPointNode, may have undefined results."<<std::endl;
|
||||
osg::notify(osg::WARN) << "Warning: Replacing osgUtil::StateGraph::_userData to support osgSim::LightPointNode, may have undefined results."<<std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,9 +197,9 @@ void LightPointNode::traverse(osg::NodeVisitor& nv)
|
||||
}
|
||||
}
|
||||
|
||||
// search for a drawable in the RenderLead list equal to the attached the one attached to RenderGraph user data
|
||||
// search for a drawable in the RenderLead list equal to the attached the one attached to StateGraph user data
|
||||
// as this will be our special light point drawable.
|
||||
osgUtil::RenderGraph::LeafList::iterator litr;
|
||||
osgUtil::StateGraph::LeafList::iterator litr;
|
||||
for(litr = rg->_leaves.begin();
|
||||
litr != rg->_leaves.end() && (*litr)->_drawable!=drawable;
|
||||
++litr)
|
||||
@@ -208,7 +208,7 @@ void LightPointNode::traverse(osg::NodeVisitor& nv)
|
||||
if (litr == rg->_leaves.end())
|
||||
{
|
||||
// havn't found the drawable added in the RenderLeaf list, there this my be the
|
||||
// first time through LightPointNode in this frame, so need to add drawable into the RenderGraph RenderLeaf list
|
||||
// first time through LightPointNode in this frame, so need to add drawable into the StateGraph RenderLeaf list
|
||||
// and update its time signatures.
|
||||
|
||||
drawable->reset();
|
||||
|
||||
@@ -91,7 +91,7 @@ class PrintVisitor : public NodeVisitor
|
||||
|
||||
CullVisitor::CullVisitor():
|
||||
NodeVisitor(CULL_VISITOR,TRAVERSE_ACTIVE_CHILDREN),
|
||||
_currentRenderGraph(NULL),
|
||||
_currentStateGraph(NULL),
|
||||
_currentRenderBin(NULL),
|
||||
_computed_znear(FLT_MAX),
|
||||
_computed_zfar(-FLT_MAX),
|
||||
@@ -1185,8 +1185,7 @@ void CullVisitor::apply(osg::CameraNode& camera)
|
||||
setCurrentRenderBin(previousRenderBin);
|
||||
|
||||
|
||||
|
||||
if (rtts->getRenderGraphList().size()==0 && rtts->getRenderBinList().size()==0)
|
||||
if (rtts->getStateGraphList().size()==0 && rtts->getRenderBinList().size()==0)
|
||||
{
|
||||
// getting to this point means that all the subgraph has been
|
||||
// culled by small feature culling or is beyond LOD ranges.
|
||||
|
||||
@@ -13,7 +13,7 @@ CXXFILES = \
|
||||
IntersectVisitor.cpp\
|
||||
Optimizer.cpp\
|
||||
RenderBin.cpp\
|
||||
RenderGraph.cpp\
|
||||
StateGraph.cpp\
|
||||
RenderLeaf.cpp\
|
||||
RenderStage.cpp\
|
||||
PositionalStateContainer.cpp\
|
||||
|
||||
@@ -37,7 +37,7 @@ void PositionalStateContainer::draw(osg::State& state,RenderLeaf*& previous, con
|
||||
|
||||
if (previous)
|
||||
{
|
||||
RenderGraph::moveToRootRenderGraph(state,previous->_parent);
|
||||
StateGraph::moveToRootStateGraph(state,previous->_parent);
|
||||
state.apply();
|
||||
previous = NULL;
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ RenderBin::RenderBin(const RenderBin& rhs,const CopyOp& copyop):
|
||||
_parent(rhs._parent),
|
||||
_stage(rhs._stage),
|
||||
_bins(rhs._bins),
|
||||
_renderGraphList(rhs._renderGraphList),
|
||||
_stateGraphList(rhs._stateGraphList),
|
||||
_renderLeafList(rhs._renderLeafList),
|
||||
_sortMode(rhs._sortMode),
|
||||
_sortCallback(rhs._sortCallback),
|
||||
@@ -151,7 +151,7 @@ RenderBin::~RenderBin()
|
||||
|
||||
void RenderBin::reset()
|
||||
{
|
||||
_renderGraphList.clear();
|
||||
_stateGraphList.clear();
|
||||
_bins.clear();
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ void RenderBin::sortImplementation()
|
||||
|
||||
struct SortByStateFunctor
|
||||
{
|
||||
bool operator() (const RenderGraph* lhs,const RenderGraph* rhs) const
|
||||
bool operator() (const StateGraph* lhs,const StateGraph* rhs) const
|
||||
{
|
||||
return (*(lhs->_stateset)<*(rhs->_stateset));
|
||||
}
|
||||
@@ -210,15 +210,15 @@ void RenderBin::sortByState()
|
||||
//osg::notify(osg::NOTICE)<<"sortByState()"<<std::endl;
|
||||
// actually we'll do nothing right now, as fine grained sorting by state
|
||||
// appears to cost more to do than it saves in draw. The contents of
|
||||
// the RenderGraph leaves is already coarse grained sorted, this
|
||||
// the StateGraph leaves is already coarse grained sorted, this
|
||||
// sorting is as a function of the cull traversal.
|
||||
// cout << "doing sortByState "<<this<<endl;
|
||||
}
|
||||
|
||||
|
||||
struct RenderGraphFrontToBackSortFunctor
|
||||
struct StateGraphFrontToBackSortFunctor
|
||||
{
|
||||
bool operator() (const RenderGraph* lhs,const RenderGraph* rhs) const
|
||||
bool operator() (const StateGraph* lhs,const StateGraph* rhs) const
|
||||
{
|
||||
return (lhs->_minimumDistance<rhs->_minimumDistance);
|
||||
}
|
||||
@@ -226,14 +226,14 @@ struct RenderGraphFrontToBackSortFunctor
|
||||
|
||||
void RenderBin::sortByStateThenFrontToBack()
|
||||
{
|
||||
for(RenderGraphList::iterator itr=_renderGraphList.begin();
|
||||
itr!=_renderGraphList.end();
|
||||
for(StateGraphList::iterator itr=_stateGraphList.begin();
|
||||
itr!=_stateGraphList.end();
|
||||
++itr)
|
||||
{
|
||||
(*itr)->sortFrontToBack();
|
||||
(*itr)->getMinimumDistance();
|
||||
}
|
||||
std::sort(_renderGraphList.begin(),_renderGraphList.end(),RenderGraphFrontToBackSortFunctor());
|
||||
std::sort(_stateGraphList.begin(),_stateGraphList.end(),StateGraphFrontToBackSortFunctor());
|
||||
}
|
||||
|
||||
struct FrontToBackSortFunctor
|
||||
@@ -247,7 +247,7 @@ struct FrontToBackSortFunctor
|
||||
|
||||
void RenderBin::sortFrontToBack()
|
||||
{
|
||||
copyLeavesFromRenderGraphListToRenderLeafList();
|
||||
copyLeavesFromStateGraphListToRenderLeafList();
|
||||
|
||||
// now sort the list into acending depth order.
|
||||
std::sort(_renderLeafList.begin(),_renderLeafList.end(),FrontToBackSortFunctor());
|
||||
@@ -265,7 +265,7 @@ struct BackToFrontSortFunctor
|
||||
|
||||
void RenderBin::sortBackToFront()
|
||||
{
|
||||
copyLeavesFromRenderGraphListToRenderLeafList();
|
||||
copyLeavesFromStateGraphListToRenderLeafList();
|
||||
|
||||
// now sort the list into acending depth order.
|
||||
std::sort(_renderLeafList.begin(),_renderLeafList.end(),BackToFrontSortFunctor());
|
||||
@@ -273,14 +273,14 @@ void RenderBin::sortBackToFront()
|
||||
// cout << "sort back to front"<<endl;
|
||||
}
|
||||
|
||||
void RenderBin::copyLeavesFromRenderGraphListToRenderLeafList()
|
||||
void RenderBin::copyLeavesFromStateGraphListToRenderLeafList()
|
||||
{
|
||||
_renderLeafList.clear();
|
||||
|
||||
int totalsize=0;
|
||||
RenderGraphList::iterator itr;
|
||||
for(itr=_renderGraphList.begin();
|
||||
itr!=_renderGraphList.end();
|
||||
StateGraphList::iterator itr;
|
||||
for(itr=_stateGraphList.begin();
|
||||
itr!=_stateGraphList.end();
|
||||
++itr)
|
||||
{
|
||||
totalsize += (*itr)->_leaves.size();
|
||||
@@ -289,11 +289,11 @@ void RenderBin::copyLeavesFromRenderGraphListToRenderLeafList()
|
||||
_renderLeafList.reserve(totalsize);
|
||||
|
||||
// first copy all the leaves from the render graphs into the leaf list.
|
||||
for(itr=_renderGraphList.begin();
|
||||
itr!=_renderGraphList.end();
|
||||
for(itr=_stateGraphList.begin();
|
||||
itr!=_stateGraphList.end();
|
||||
++itr)
|
||||
{
|
||||
for(RenderGraph::LeafList::iterator dw_itr = (*itr)->_leaves.begin();
|
||||
for(StateGraph::LeafList::iterator dw_itr = (*itr)->_leaves.begin();
|
||||
dw_itr != (*itr)->_leaves.end();
|
||||
++dw_itr)
|
||||
{
|
||||
@@ -302,7 +302,7 @@ void RenderBin::copyLeavesFromRenderGraphListToRenderLeafList()
|
||||
}
|
||||
|
||||
// empty the render graph list to prevent it being drawn along side the render leaf list (see drawImplementation.)
|
||||
_renderGraphList.clear();
|
||||
_stateGraphList.clear();
|
||||
}
|
||||
|
||||
RenderBin* RenderBin::find_or_insert(int binNum,const std::string& binName)
|
||||
@@ -368,12 +368,12 @@ void RenderBin::drawImplementation(osg::State& state,RenderLeaf*& previous)
|
||||
|
||||
|
||||
// draw coarse grained ordering.
|
||||
for(RenderGraphList::iterator oitr=_renderGraphList.begin();
|
||||
oitr!=_renderGraphList.end();
|
||||
for(StateGraphList::iterator oitr=_stateGraphList.begin();
|
||||
oitr!=_stateGraphList.end();
|
||||
++oitr)
|
||||
{
|
||||
|
||||
for(RenderGraph::LeafList::iterator dw_itr = (*oitr)->_leaves.begin();
|
||||
for(StateGraph::LeafList::iterator dw_itr = (*oitr)->_leaves.begin();
|
||||
dw_itr != (*oitr)->_leaves.end();
|
||||
++dw_itr)
|
||||
{
|
||||
@@ -419,12 +419,12 @@ bool RenderBin::getStats(Statistics* primStats)
|
||||
|
||||
}
|
||||
|
||||
for(RenderGraphList::iterator oitr=_renderGraphList.begin();
|
||||
oitr!=_renderGraphList.end();
|
||||
for(StateGraphList::iterator oitr=_stateGraphList.begin();
|
||||
oitr!=_stateGraphList.end();
|
||||
++oitr)
|
||||
{
|
||||
|
||||
for(RenderGraph::LeafList::iterator dw_itr = (*oitr)->_leaves.begin();
|
||||
for(StateGraph::LeafList::iterator dw_itr = (*oitr)->_leaves.begin();
|
||||
dw_itr != (*oitr)->_leaves.end();
|
||||
++dw_itr)
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
#include <osgUtil/RenderLeaf>
|
||||
#include <osgUtil/RenderGraph>
|
||||
#include <osgUtil/StateGraph>
|
||||
|
||||
using namespace osg;
|
||||
using namespace osgUtil;
|
||||
@@ -33,12 +33,12 @@ void RenderLeaf::render(State& state,RenderLeaf* previous)
|
||||
state.applyModelViewMatrix(_modelview.get());
|
||||
|
||||
// apply state if required.
|
||||
RenderGraph* prev_rg = previous->_parent;
|
||||
RenderGraph* prev_rg_parent = prev_rg->_parent;
|
||||
RenderGraph* rg = _parent;
|
||||
StateGraph* prev_rg = previous->_parent;
|
||||
StateGraph* prev_rg_parent = prev_rg->_parent;
|
||||
StateGraph* rg = _parent;
|
||||
if (prev_rg_parent!=rg->_parent)
|
||||
{
|
||||
RenderGraph::moveRenderGraph(state,prev_rg_parent,rg->_parent);
|
||||
StateGraph::moveStateGraph(state,prev_rg_parent,rg->_parent);
|
||||
|
||||
// send state changes and matrix changes to OpenGL.
|
||||
state.apply(rg->_stateset);
|
||||
@@ -63,7 +63,7 @@ void RenderLeaf::render(State& state,RenderLeaf* previous)
|
||||
state.applyModelViewMatrix(_modelview.get());
|
||||
|
||||
// apply state if required.
|
||||
RenderGraph::moveRenderGraph(state,NULL,_parent->_parent);
|
||||
StateGraph::moveStateGraph(state,NULL,_parent->_parent);
|
||||
|
||||
state.apply(_parent->_stateset);
|
||||
|
||||
|
||||
@@ -703,7 +703,7 @@ void RenderStage::drawImplementation(osg::State& state,RenderLeaf*& previous)
|
||||
// now reset the state so its back in its default state.
|
||||
if (previous)
|
||||
{
|
||||
RenderGraph::moveToRootRenderGraph(state,previous->_parent);
|
||||
StateGraph::moveToRootStateGraph(state,previous->_parent);
|
||||
state.apply();
|
||||
previous = NULL;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ void SceneView::setDefaults(unsigned int options)
|
||||
|
||||
_state = new State;
|
||||
|
||||
_rendergraph = new RenderGraph;
|
||||
_rendergraph = new StateGraph;
|
||||
_renderStage = new RenderStage;
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ void SceneView::setDefaults(unsigned int options)
|
||||
|
||||
_cullVisitor = new CullVisitor;
|
||||
|
||||
_cullVisitor->setRenderGraph(_rendergraph.get());
|
||||
_cullVisitor->setStateGraph(_rendergraph.get());
|
||||
_cullVisitor->setRenderStage(_renderStage.get());
|
||||
|
||||
_globalStateSet->setGlobalDefaults();
|
||||
@@ -397,8 +397,8 @@ void SceneView::cull()
|
||||
}
|
||||
if (!_rendergraph)
|
||||
{
|
||||
osg::notify(osg::INFO) << "Warning: no valid osgUtil::SceneView:: attached, creating a global default RenderGraph automatically."<< std::endl;
|
||||
_rendergraph = new RenderGraph;
|
||||
osg::notify(osg::INFO) << "Warning: no valid osgUtil::SceneView:: attached, creating a global default StateGraph automatically."<< std::endl;
|
||||
_rendergraph = new StateGraph;
|
||||
}
|
||||
if (!_renderStage)
|
||||
{
|
||||
@@ -441,11 +441,11 @@ void SceneView::cull()
|
||||
{
|
||||
|
||||
if (!_cullVisitorLeft.valid()) _cullVisitorLeft = dynamic_cast<CullVisitor*>(_cullVisitor->cloneType());
|
||||
if (!_rendergraphLeft.valid()) _rendergraphLeft = dynamic_cast<RenderGraph*>(_rendergraph->cloneType());
|
||||
if (!_rendergraphLeft.valid()) _rendergraphLeft = dynamic_cast<StateGraph*>(_rendergraph->cloneType());
|
||||
if (!_renderStageLeft.valid()) _renderStageLeft = dynamic_cast<RenderStage*>(_renderStage->clone(osg::CopyOp::DEEP_COPY_ALL));
|
||||
|
||||
if (!_cullVisitorRight.valid()) _cullVisitorRight = dynamic_cast<CullVisitor*>(_cullVisitor->cloneType());
|
||||
if (!_rendergraphRight.valid()) _rendergraphRight = dynamic_cast<RenderGraph*>(_rendergraph->cloneType());
|
||||
if (!_rendergraphRight.valid()) _rendergraphRight = dynamic_cast<StateGraph*>(_rendergraph->cloneType());
|
||||
if (!_renderStageRight.valid()) _renderStageRight = dynamic_cast<RenderStage*>(_renderStage->clone(osg::CopyOp::DEEP_COPY_ALL));
|
||||
|
||||
_cullVisitorLeft->setDatabaseRequestHandler(_cullVisitor->getDatabaseRequestHandler());
|
||||
@@ -488,7 +488,7 @@ void SceneView::cull()
|
||||
|
||||
}
|
||||
|
||||
void SceneView::cullStage(const osg::Matrixd& projection,const osg::Matrixd& modelview,osgUtil::CullVisitor* cullVisitor, osgUtil::RenderGraph* rendergraph, osgUtil::RenderStage* renderStage)
|
||||
void SceneView::cullStage(const osg::Matrixd& projection,const osg::Matrixd& modelview,osgUtil::CullVisitor* cullVisitor, osgUtil::StateGraph* rendergraph, osgUtil::RenderStage* renderStage)
|
||||
{
|
||||
|
||||
if (!_sceneData || !_viewport->valid()) return;
|
||||
@@ -556,7 +556,7 @@ void SceneView::cullStage(const osg::Matrixd& projection,const osg::Matrixd& mod
|
||||
|
||||
cullVisitor->setClearNode(NULL); // reset earth sky on each frame.
|
||||
|
||||
cullVisitor->setRenderGraph(rendergraph);
|
||||
cullVisitor->setStateGraph(rendergraph);
|
||||
cullVisitor->setRenderStage(renderStage);
|
||||
|
||||
cullVisitor->setState( _state.get() );
|
||||
@@ -627,11 +627,11 @@ void SceneView::cullStage(const osg::Matrixd& projection,const osg::Matrixd& mod
|
||||
|
||||
renderStage->sort();
|
||||
|
||||
// prune out any empty RenderGraph children.
|
||||
// prune out any empty StateGraph children.
|
||||
// note, this would be not required if the rendergraph had been
|
||||
// reset at the start of each frame (see top of this method) but
|
||||
// a clean has been used instead to try to minimize the amount of
|
||||
// allocation and deleteing of the RenderGraph nodes.
|
||||
// allocation and deleteing of the StateGraph nodes.
|
||||
rendergraph->prune();
|
||||
}
|
||||
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
#include <osgUtil/RenderGraph>
|
||||
#include <osgUtil/StateGraph>
|
||||
|
||||
#include <osg/Notify>
|
||||
|
||||
using namespace osg;
|
||||
using namespace osgUtil;
|
||||
|
||||
void RenderGraph::reset()
|
||||
void StateGraph::reset()
|
||||
{
|
||||
_parent = NULL;
|
||||
_stateset = NULL;
|
||||
@@ -28,9 +28,9 @@ void RenderGraph::reset()
|
||||
_leaves.clear();
|
||||
}
|
||||
|
||||
/** recursively clean the RenderGraph of all its drawables, lights and depths.
|
||||
/** recursively clean the StateGraph of all its drawables, lights and depths.
|
||||
* Leaves children intact, and ready to be populated again.*/
|
||||
void RenderGraph::clean()
|
||||
void StateGraph::clean()
|
||||
{
|
||||
|
||||
// clean local drawables etc.
|
||||
@@ -46,8 +46,8 @@ void RenderGraph::clean()
|
||||
|
||||
}
|
||||
|
||||
/** recursively prune the RenderGraph of empty children.*/
|
||||
void RenderGraph::prune()
|
||||
/** recursively prune the StateGraph of empty children.*/
|
||||
void StateGraph::prune()
|
||||
{
|
||||
std::vector<const osg::StateSet*> toEraseList;
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
#include <osg/Vec3>
|
||||
#include <osgUtil/CullVisitor>
|
||||
#include <osgUtil/RenderBin>
|
||||
#include <osgUtil/RenderGraph>
|
||||
#include <osgUtil/RenderStage>
|
||||
#include <osgUtil/StateGraph>
|
||||
|
||||
// Must undefine IN and OUT macros defined in Windows headers
|
||||
#ifdef IN
|
||||
@@ -75,9 +75,9 @@ BEGIN_OBJECT_REFLECTOR(osgUtil::CullVisitor)
|
||||
I_Method0(const osg::ClearNode *, getClearNode);
|
||||
I_Method1(void, pushStateSet, IN, const osg::StateSet *, ss);
|
||||
I_Method0(void, popStateSet);
|
||||
I_Method1(void, setRenderGraph, IN, osgUtil::RenderGraph *, rg);
|
||||
I_Method0(osgUtil::RenderGraph *, getRootRenderGraph);
|
||||
I_Method0(osgUtil::RenderGraph *, getCurrentRenderGraph);
|
||||
I_Method1(void, setStateGraph, IN, osgUtil::StateGraph *, rg);
|
||||
I_Method0(osgUtil::StateGraph *, getRootStateGraph);
|
||||
I_Method0(osgUtil::StateGraph *, getCurrentStateGraph);
|
||||
I_Method1(void, setRenderStage, IN, osgUtil::RenderStage *, rg);
|
||||
I_Method0(osgUtil::RenderStage *, getRenderStage);
|
||||
I_Method0(osgUtil::RenderBin *, getCurrentRenderBin);
|
||||
@@ -104,11 +104,11 @@ BEGIN_OBJECT_REFLECTOR(osgUtil::CullVisitor)
|
||||
I_ReadOnlyProperty(osgUtil::CullVisitor::value_type, CalculatedNearPlane);
|
||||
I_Property(const osg::ClearNode *, ClearNode);
|
||||
I_Property(osgUtil::RenderBin *, CurrentRenderBin);
|
||||
I_ReadOnlyProperty(osgUtil::RenderGraph *, CurrentRenderGraph);
|
||||
I_ReadOnlyProperty(osgUtil::StateGraph *, CurrentStateGraph);
|
||||
I_ReadOnlyProperty(osg::Vec3, EyePoint);
|
||||
I_WriteOnlyProperty(osgUtil::RenderGraph *, RenderGraph);
|
||||
I_Property(osgUtil::RenderStage *, RenderStage);
|
||||
I_ReadOnlyProperty(osgUtil::RenderGraph *, RootRenderGraph);
|
||||
I_ReadOnlyProperty(osgUtil::StateGraph *, RootStateGraph);
|
||||
I_Property(osg::State *, State);
|
||||
I_WriteOnlyProperty(osgUtil::StateGraph *, StateGraph);
|
||||
END_REFLECTOR
|
||||
|
||||
|
||||
@@ -14,12 +14,12 @@ CXXFILES =\
|
||||
PositionalStateContainer.cpp\
|
||||
ReflectionMapGenerator.cpp\
|
||||
RenderBin.cpp\
|
||||
RenderGraph.cpp\
|
||||
RenderLeaf.cpp\
|
||||
RenderStage.cpp\
|
||||
SceneView.cpp\
|
||||
Simplifier.cpp\
|
||||
SmoothingVisitor.cpp\
|
||||
StateGraph.cpp\
|
||||
Statistics.cpp\
|
||||
TangentSpaceGenerator.cpp\
|
||||
Tesselator.cpp\
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
#include <osg/Object>
|
||||
#include <osg/State>
|
||||
#include <osgUtil/RenderBin>
|
||||
#include <osgUtil/RenderGraph>
|
||||
#include <osgUtil/RenderLeaf>
|
||||
#include <osgUtil/RenderStage>
|
||||
#include <osgUtil/StateGraph>
|
||||
#include <osgUtil/Statistics>
|
||||
|
||||
// Must undefine IN and OUT macros defined in Windows headers
|
||||
@@ -32,7 +32,7 @@ END_REFLECTOR
|
||||
|
||||
TYPE_NAME_ALIAS(std::vector< osgUtil::RenderLeaf * >, osgUtil::RenderBin::RenderLeafList);
|
||||
|
||||
TYPE_NAME_ALIAS(std::vector< osgUtil::RenderGraph * >, osgUtil::RenderBin::RenderGraphList);
|
||||
TYPE_NAME_ALIAS(std::vector< osgUtil::StateGraph * >, osgUtil::RenderBin::StateGraphList);
|
||||
|
||||
TYPE_NAME_ALIAS(std::map< int COMMA osg::ref_ptr< osgUtil::RenderBin > >, osgUtil::RenderBin::RenderBinList);
|
||||
|
||||
@@ -59,14 +59,14 @@ BEGIN_OBJECT_REFLECTOR(osgUtil::RenderBin)
|
||||
I_Method0(osgUtil::RenderStage *, getStage);
|
||||
I_Method0(const osgUtil::RenderStage *, getStage);
|
||||
I_Method0(int, getBinNum);
|
||||
I_Method0(osgUtil::RenderBin::RenderGraphList &, getRenderGraphList);
|
||||
I_Method0(const osgUtil::RenderBin::RenderGraphList &, getRenderGraphList);
|
||||
I_Method0(osgUtil::RenderBin::StateGraphList &, getStateGraphList);
|
||||
I_Method0(const osgUtil::RenderBin::StateGraphList &, getStateGraphList);
|
||||
I_Method0(osgUtil::RenderBin::RenderBinList &, getRenderBinList);
|
||||
I_Method0(const osgUtil::RenderBin::RenderBinList &, getRenderBinList);
|
||||
I_Method0(osgUtil::RenderBin::RenderLeafList &, getRenderLeafList);
|
||||
I_Method0(const osgUtil::RenderBin::RenderLeafList &, getRenderLeafList);
|
||||
I_Method2(osgUtil::RenderBin *, find_or_insert, IN, int, binNum, IN, const std::string &, binName);
|
||||
I_Method1(void, addRenderGraph, IN, osgUtil::RenderGraph *, rg);
|
||||
I_Method1(void, addStateGraph, IN, osgUtil::StateGraph *, rg);
|
||||
I_Method0(void, sort);
|
||||
I_Method0(void, sortImplementation);
|
||||
I_Method1(void, setSortMode, IN, osgUtil::RenderBin::SortMode, mode);
|
||||
@@ -86,16 +86,16 @@ BEGIN_OBJECT_REFLECTOR(osgUtil::RenderBin)
|
||||
I_Method1(bool, getStats, IN, osgUtil::Statistics *, primStats);
|
||||
I_Method1(void, getPrims, IN, osgUtil::Statistics *, primStats);
|
||||
I_Method2(bool, getPrims, IN, osgUtil::Statistics *, primStats, IN, int, nbin);
|
||||
I_Method0(void, copyLeavesFromRenderGraphListToRenderLeafList);
|
||||
I_Method0(void, copyLeavesFromStateGraphListToRenderLeafList);
|
||||
I_ReadOnlyProperty(int, BinNum);
|
||||
I_Property(osgUtil::RenderBin::DrawCallback *, DrawCallback);
|
||||
I_ReadOnlyProperty(osgUtil::RenderBin *, Parent);
|
||||
I_ReadOnlyProperty(osgUtil::RenderBin::RenderBinList &, RenderBinList);
|
||||
I_ReadOnlyProperty(osgUtil::RenderBin::RenderGraphList &, RenderGraphList);
|
||||
I_ReadOnlyProperty(osgUtil::RenderBin::RenderLeafList &, RenderLeafList);
|
||||
I_Property(osgUtil::RenderBin::SortCallback *, SortCallback);
|
||||
I_Property(osgUtil::RenderBin::SortMode, SortMode);
|
||||
I_ReadOnlyProperty(osgUtil::RenderStage *, Stage);
|
||||
I_ReadOnlyProperty(osgUtil::RenderBin::StateGraphList &, StateGraphList);
|
||||
END_REFLECTOR
|
||||
|
||||
BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgUtil::RenderBin::DrawCallback)
|
||||
@@ -124,7 +124,7 @@ END_REFLECTOR
|
||||
|
||||
STD_MAP_REFLECTOR(std::map< int COMMA osg::ref_ptr< osgUtil::RenderBin > >);
|
||||
|
||||
STD_VECTOR_REFLECTOR(std::vector< osgUtil::RenderGraph * >);
|
||||
|
||||
STD_VECTOR_REFLECTOR(std::vector< osgUtil::RenderLeaf * >);
|
||||
|
||||
STD_VECTOR_REFLECTOR(std::vector< osgUtil::StateGraph * >);
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
#include <osg/Vec4>
|
||||
#include <osg/Viewport>
|
||||
#include <osgUtil/CullVisitor>
|
||||
#include <osgUtil/RenderGraph>
|
||||
#include <osgUtil/RenderStage>
|
||||
#include <osgUtil/SceneView>
|
||||
#include <osgUtil/StateGraph>
|
||||
|
||||
// Must undefine IN and OUT macros defined in Windows headers
|
||||
#ifdef IN
|
||||
@@ -130,15 +130,15 @@ BEGIN_OBJECT_REFLECTOR(osgUtil::SceneView)
|
||||
I_Method1(void, setCollectOccludersVisitor, IN, osg::CollectOccludersVisitor *, cov);
|
||||
I_Method0(osg::CollectOccludersVisitor *, getCollectOccludersVisitor);
|
||||
I_Method0(const osg::CollectOccludersVisitor *, getCollectOccludersVisitor);
|
||||
I_Method1(void, setRenderGraph, IN, osgUtil::RenderGraph *, rg);
|
||||
I_Method0(osgUtil::RenderGraph *, getRenderGraph);
|
||||
I_Method0(const osgUtil::RenderGraph *, getRenderGraph);
|
||||
I_Method1(void, setRenderGraphLeft, IN, osgUtil::RenderGraph *, rg);
|
||||
I_Method0(osgUtil::RenderGraph *, getRenderGraphLeft);
|
||||
I_Method0(const osgUtil::RenderGraph *, getRenderGraphLeft);
|
||||
I_Method1(void, setRenderGraphRight, IN, osgUtil::RenderGraph *, rg);
|
||||
I_Method0(osgUtil::RenderGraph *, getRenderGraphRight);
|
||||
I_Method0(const osgUtil::RenderGraph *, getRenderGraphRight);
|
||||
I_Method1(void, setStateGraph, IN, osgUtil::StateGraph *, rg);
|
||||
I_Method0(osgUtil::StateGraph *, getStateGraph);
|
||||
I_Method0(const osgUtil::StateGraph *, getStateGraph);
|
||||
I_Method1(void, setStateGraphLeft, IN, osgUtil::StateGraph *, rg);
|
||||
I_Method0(osgUtil::StateGraph *, getStateGraphLeft);
|
||||
I_Method0(const osgUtil::StateGraph *, getStateGraphLeft);
|
||||
I_Method1(void, setStateGraphRight, IN, osgUtil::StateGraph *, rg);
|
||||
I_Method0(osgUtil::StateGraph *, getStateGraphRight);
|
||||
I_Method0(const osgUtil::StateGraph *, getStateGraphRight);
|
||||
I_Method1(void, setRenderStage, IN, osgUtil::RenderStage *, rs);
|
||||
I_Method0(osgUtil::RenderStage *, getRenderStage);
|
||||
I_Method0(const osgUtil::RenderStage *, getRenderStage);
|
||||
@@ -198,14 +198,14 @@ BEGIN_OBJECT_REFLECTOR(osgUtil::SceneView)
|
||||
I_Property(osg::StateSet *, LocalStateSet);
|
||||
I_Property(bool, PrioritizeTextures);
|
||||
I_Property(const osg::Matrixd &, ProjectionMatrix);
|
||||
I_Property(osgUtil::RenderGraph *, RenderGraph);
|
||||
I_Property(osgUtil::RenderGraph *, RenderGraphLeft);
|
||||
I_Property(osgUtil::RenderGraph *, RenderGraphRight);
|
||||
I_Property(osgUtil::RenderStage *, RenderStage);
|
||||
I_Property(osgUtil::RenderStage *, RenderStageLeft);
|
||||
I_Property(osgUtil::RenderStage *, RenderStageRight);
|
||||
I_Property(osg::Node *, SceneData);
|
||||
I_Property(osg::State *, State);
|
||||
I_Property(osgUtil::StateGraph *, StateGraph);
|
||||
I_Property(osgUtil::StateGraph *, StateGraphLeft);
|
||||
I_Property(osgUtil::StateGraph *, StateGraphRight);
|
||||
I_Property(osg::NodeVisitor *, UpdateVisitor);
|
||||
I_Property(const osg::Matrixd &, ViewMatrix);
|
||||
I_Property(osg::Viewport *, Viewport);
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
#include <osg/Referenced>
|
||||
#include <osg/StateSet>
|
||||
#include <osgUtil/RenderGraph>
|
||||
#include <osgUtil/RenderLeaf>
|
||||
#include <osgUtil/StateGraph>
|
||||
|
||||
// Must undefine IN and OUT macros defined in Windows headers
|
||||
#ifdef IN
|
||||
@@ -26,15 +26,15 @@ BEGIN_VALUE_REFLECTOR(osgUtil::LeafDepthSortFunctor)
|
||||
I_Constructor0();
|
||||
END_REFLECTOR
|
||||
|
||||
TYPE_NAME_ALIAS(std::map< const osg::StateSet * COMMA osg::ref_ptr< osgUtil::RenderGraph > >, osgUtil::RenderGraph::ChildList);
|
||||
TYPE_NAME_ALIAS(std::map< const osg::StateSet * COMMA osg::ref_ptr< osgUtil::StateGraph > >, osgUtil::StateGraph::ChildList);
|
||||
|
||||
TYPE_NAME_ALIAS(std::vector< osg::ref_ptr< osgUtil::RenderLeaf > >, osgUtil::RenderGraph::LeafList);
|
||||
TYPE_NAME_ALIAS(std::vector< osg::ref_ptr< osgUtil::RenderLeaf > >, osgUtil::StateGraph::LeafList);
|
||||
|
||||
BEGIN_OBJECT_REFLECTOR(osgUtil::RenderGraph)
|
||||
BEGIN_OBJECT_REFLECTOR(osgUtil::StateGraph)
|
||||
I_BaseType(osg::Referenced);
|
||||
I_Constructor0();
|
||||
I_Constructor2(IN, osgUtil::RenderGraph *, parent, IN, const osg::StateSet *, stateset);
|
||||
I_Method0(osgUtil::RenderGraph *, cloneType);
|
||||
I_Constructor2(IN, osgUtil::StateGraph *, parent, IN, const osg::StateSet *, stateset);
|
||||
I_Method0(osgUtil::StateGraph *, cloneType);
|
||||
I_Method1(void, setUserData, IN, osg::Referenced *, obj);
|
||||
I_Method0(osg::Referenced *, getUserData);
|
||||
I_Method0(const osg::Referenced *, getUserData);
|
||||
@@ -46,25 +46,13 @@ BEGIN_OBJECT_REFLECTOR(osgUtil::RenderGraph)
|
||||
I_Method0(void, reset);
|
||||
I_Method0(void, clean);
|
||||
I_Method0(void, prune);
|
||||
I_Method1(osgUtil::RenderGraph *, find_or_insert, IN, const osg::StateSet *, stateset);
|
||||
I_Method1(osgUtil::StateGraph *, find_or_insert, IN, const osg::StateSet *, stateset);
|
||||
I_Method1(void, addLeaf, IN, osgUtil::RenderLeaf *, leaf);
|
||||
I_ReadOnlyProperty(float, AverageDistance);
|
||||
I_ReadOnlyProperty(float, MinimumDistance);
|
||||
I_Property(osg::Referenced *, UserData);
|
||||
END_REFLECTOR
|
||||
|
||||
BEGIN_VALUE_REFLECTOR(osg::ref_ptr< osgUtil::RenderGraph >)
|
||||
I_Constructor0();
|
||||
I_Constructor1(IN, osgUtil::RenderGraph *, t);
|
||||
I_Constructor1(IN, const osg::ref_ptr< osgUtil::RenderGraph > &, rp);
|
||||
I_Method0(bool, valid);
|
||||
I_Method0(osgUtil::RenderGraph *, get);
|
||||
I_Method0(const osgUtil::RenderGraph *, get);
|
||||
I_Method0(osgUtil::RenderGraph *, take);
|
||||
I_Method0(osgUtil::RenderGraph *, release);
|
||||
I_ReadOnlyProperty(osgUtil::RenderGraph *, );
|
||||
END_REFLECTOR
|
||||
|
||||
BEGIN_VALUE_REFLECTOR(osg::ref_ptr< osgUtil::RenderLeaf >)
|
||||
I_Constructor0();
|
||||
I_Constructor1(IN, osgUtil::RenderLeaf *, t);
|
||||
@@ -77,7 +65,19 @@ BEGIN_VALUE_REFLECTOR(osg::ref_ptr< osgUtil::RenderLeaf >)
|
||||
I_ReadOnlyProperty(osgUtil::RenderLeaf *, );
|
||||
END_REFLECTOR
|
||||
|
||||
STD_MAP_REFLECTOR(std::map< const osg::StateSet * COMMA osg::ref_ptr< osgUtil::RenderGraph > >);
|
||||
BEGIN_VALUE_REFLECTOR(osg::ref_ptr< osgUtil::StateGraph >)
|
||||
I_Constructor0();
|
||||
I_Constructor1(IN, osgUtil::StateGraph *, t);
|
||||
I_Constructor1(IN, const osg::ref_ptr< osgUtil::StateGraph > &, rp);
|
||||
I_Method0(bool, valid);
|
||||
I_Method0(osgUtil::StateGraph *, get);
|
||||
I_Method0(const osgUtil::StateGraph *, get);
|
||||
I_Method0(osgUtil::StateGraph *, take);
|
||||
I_Method0(osgUtil::StateGraph *, release);
|
||||
I_ReadOnlyProperty(osgUtil::StateGraph *, );
|
||||
END_REFLECTOR
|
||||
|
||||
STD_MAP_REFLECTOR(std::map< const osg::StateSet * COMMA osg::ref_ptr< osgUtil::StateGraph > >);
|
||||
|
||||
STD_VECTOR_REFLECTOR(std::vector< osg::ref_ptr< osgUtil::RenderLeaf > >);
|
||||
|
||||
Reference in New Issue
Block a user