Work on the RenderToTexture usage of the new osg::CameraNode. Both osghud
and osgprerender now ported across to osg::CameraNode.
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include <osg/StateSet>
|
||||
#include <osg/State>
|
||||
#include <osg/ClearNode>
|
||||
#include <osg/CameraNode>
|
||||
#include <osg/Notify>
|
||||
|
||||
#include <osg/CullStack>
|
||||
@@ -75,6 +76,7 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor, public osg::CullStac
|
||||
virtual void apply(osg::Switch& node);
|
||||
virtual void apply(osg::LOD& node);
|
||||
virtual void apply(osg::ClearNode& node);
|
||||
virtual void apply(osg::CameraNode& node);
|
||||
virtual void apply(osg::OccluderNode& node);
|
||||
|
||||
void setClearNode(const osg::ClearNode* earthSky) { _clearNode = earthSky; }
|
||||
|
||||
@@ -127,9 +127,14 @@ class OSGUTIL_EXPORT RenderStage : public RenderBin
|
||||
|
||||
virtual void draw(osg::State& state,RenderLeaf*& previous);
|
||||
|
||||
virtual void drawPostRenderStages(osg::State& state,RenderLeaf*& previous);
|
||||
|
||||
virtual void drawImplementation(osg::State& state,RenderLeaf*& previous);
|
||||
|
||||
void addToDependencyList(RenderStage* rs);
|
||||
void addToDependencyList(RenderStage* rs) { addPreRenderStage(rs); }
|
||||
|
||||
void addPreRenderStage(RenderStage* rs);
|
||||
void addPostRenderStage(RenderStage* rs);
|
||||
|
||||
/** Extract stats for current draw list. */
|
||||
bool getStats(Statistics* primStats);
|
||||
@@ -138,10 +143,11 @@ class OSGUTIL_EXPORT RenderStage : public RenderBin
|
||||
|
||||
virtual ~RenderStage();
|
||||
|
||||
typedef std::vector< osg::ref_ptr<RenderStage> > DependencyList;
|
||||
typedef std::vector< osg::ref_ptr<RenderStage> > RenderStageList;
|
||||
|
||||
bool _stageDrawnThisFrame;
|
||||
DependencyList _dependencyList;
|
||||
RenderStageList _preRenderList;
|
||||
RenderStageList _postRenderList;
|
||||
|
||||
// viewport x,y,width,height.
|
||||
osg::ref_ptr<osg::Viewport> _viewport;
|
||||
|
||||
Reference in New Issue
Block a user