Further migration to using RenderInfo
This commit is contained in:
@@ -276,7 +276,7 @@ class OSG_EXPORT Drawable : public Object
|
||||
/** Immediately compile this \c Drawable into an OpenGL Display List.
|
||||
* @note Operation is ignored if \c _useDisplayList is \c false.
|
||||
*/
|
||||
virtual void compileGLObjects(State& state) const;
|
||||
virtual void compileGLObjects(RenderInfo& renderInfo) const;
|
||||
|
||||
/** If State is non-zero, this function releases OpenGL objects for
|
||||
* the specified graphics context. Otherwise, releases OpenGL objexts
|
||||
|
||||
@@ -126,7 +126,7 @@ class OSG_EXPORT Geode : public Node
|
||||
const DrawableList& getDrawableList() const { return _drawables; }
|
||||
|
||||
/** Compile OpenGL Display List for each drawable.*/
|
||||
void compileDrawables(State& state);
|
||||
void compileDrawables(RenderInfo& renderInfo);
|
||||
|
||||
/** Return the Geode's bounding box, which is the union of all the
|
||||
* bounding boxes of the geode's drawables.*/
|
||||
|
||||
@@ -77,7 +77,7 @@ class OSG_EXPORT Material : public StateAttribute
|
||||
|
||||
Material& operator = (const Material& rhs);
|
||||
|
||||
virtual bool getModeUsage(ModeUsage& usage) const
|
||||
virtual bool getModeUsage(ModeUsage& /*usage*/) const
|
||||
{
|
||||
// note, since Material does it's own glEnable/glDisable of GL_COLOR_MATERIAL
|
||||
// we shouldn't declare usage of that mode, so commenting out the below usage.
|
||||
|
||||
@@ -192,7 +192,7 @@ namespace osgParticle
|
||||
|
||||
virtual ~PrecipitationEffect() {}
|
||||
|
||||
void compileGLObjects(osg::State& state) const;
|
||||
void compileGLObjects(osg::RenderInfo& renderInfo) const;
|
||||
|
||||
void update();
|
||||
|
||||
|
||||
@@ -71,14 +71,23 @@ class OSGUTIL_EXPORT GLObjectsVisitor : public osg::NodeVisitor
|
||||
/** Set the State to use during traversal. */
|
||||
void setState(osg::State* state)
|
||||
{
|
||||
_state = state;
|
||||
_renderInfo.setState(state);
|
||||
}
|
||||
|
||||
osg::State* getState()
|
||||
{
|
||||
return _state.get();
|
||||
return _renderInfo.getState();
|
||||
}
|
||||
|
||||
void setRenderInfo(osg::RenderInfo& renderInfo)
|
||||
{
|
||||
_renderInfo = renderInfo;
|
||||
}
|
||||
|
||||
osg::RenderInfo& getRenderInfo()
|
||||
{
|
||||
return _renderInfo;
|
||||
}
|
||||
|
||||
/** Simply traverse using standard NodeVisitor traverse method.*/
|
||||
virtual void apply(osg::Node& node);
|
||||
@@ -97,7 +106,7 @@ class OSGUTIL_EXPORT GLObjectsVisitor : public osg::NodeVisitor
|
||||
typedef std::set<osg::StateSet*> StatesSetAppliedSet;
|
||||
|
||||
Mode _mode;
|
||||
osg::ref_ptr<osg::State> _state;
|
||||
osg::RenderInfo _renderInfo;
|
||||
DrawableAppliedSet _drawablesAppliedSet;
|
||||
StatesSetAppliedSet _stateSetAppliedSet;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user