Converted the instance of osgNew and osgDelete back to new and delete as part
of depecating the include/osg/MemoryManager
This commit is contained in:
@@ -44,7 +44,7 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor, public osg::CullStac
|
||||
CullVisitor();
|
||||
virtual ~CullVisitor();
|
||||
|
||||
virtual CullVisitor* cloneType() const { return osgNew CullVisitor(); }
|
||||
virtual CullVisitor* cloneType() const { return new CullVisitor(); }
|
||||
|
||||
virtual void reset();
|
||||
|
||||
@@ -312,7 +312,7 @@ inline RenderLeaf* CullVisitor::createOrReuseRenderLeaf(osg::Drawable* drawable,
|
||||
}
|
||||
|
||||
// otherwise need to create new renderleaf.
|
||||
RenderLeaf* renderleaf = osgNew RenderLeaf(drawable,projection,matrix,depth);
|
||||
RenderLeaf* renderleaf = new RenderLeaf(drawable,projection,matrix,depth);
|
||||
_reuseRenderLeafList.push_back(renderleaf);
|
||||
++_currentReuseRenderLeafIndex;
|
||||
return renderleaf;
|
||||
|
||||
@@ -48,8 +48,8 @@ class OSGUTIL_EXPORT RenderBin : public osg::Object
|
||||
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
|
||||
RenderBin(const RenderBin& rhs,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
virtual osg::Object* cloneType() const { return osgNew RenderBin(); }
|
||||
virtual osg::Object* clone(const osg::CopyOp& copyop) const { return osgNew RenderBin(*this,copyop); } // note only implements a clone of type.
|
||||
virtual osg::Object* cloneType() const { return new RenderBin(); }
|
||||
virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new RenderBin(*this,copyop); } // note only implements a clone of type.
|
||||
virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const RenderBin*>(obj)!=0L; }
|
||||
virtual const char* libraryName() const { return "osgUtil"; }
|
||||
virtual const char* className() const { return "RenderBin"; }
|
||||
|
||||
@@ -71,7 +71,7 @@ class OSGUTIL_EXPORT RenderGraph : public osg::Referenced
|
||||
|
||||
~RenderGraph() {}
|
||||
|
||||
RenderGraph* cloneType() const { return osgNew RenderGraph; }
|
||||
RenderGraph* cloneType() const { return new RenderGraph; }
|
||||
|
||||
void setUserData(osg::Referenced* obj) { _userData = obj; }
|
||||
osg::Referenced* getUserData() { return _userData.get(); }
|
||||
@@ -149,7 +149,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 = osgNew RenderGraph(this,stateset);
|
||||
RenderGraph* sg = new RenderGraph(this,stateset);
|
||||
_children[stateset] = sg;
|
||||
return sg;
|
||||
}
|
||||
|
||||
@@ -31,8 +31,8 @@ class OSGUTIL_EXPORT RenderStage : public RenderBin
|
||||
|
||||
RenderStage(const RenderStage& rhs,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
virtual osg::Object* cloneType() const { return osgNew RenderStage(); }
|
||||
virtual osg::Object* clone(const osg::CopyOp& copyop) const { return osgNew RenderStage(*this,copyop); } // note only implements a clone of type.
|
||||
virtual osg::Object* cloneType() const { return new RenderStage(); }
|
||||
virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new RenderStage(*this,copyop); } // note only implements a clone of type.
|
||||
virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const RenderStage*>(obj)!=0L; }
|
||||
virtual const char* className() const { return "RenderStage"; }
|
||||
|
||||
@@ -99,7 +99,7 @@ class OSGUTIL_EXPORT RenderStage : public RenderBin
|
||||
|
||||
RenderStageLighting* getRenderStageLighting() const
|
||||
{
|
||||
if (!_renderStageLighting.valid()) _renderStageLighting = osgNew RenderStageLighting;
|
||||
if (!_renderStageLighting.valid()) _renderStageLighting = new RenderStageLighting;
|
||||
return _renderStageLighting.get();
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@ class OSGUTIL_EXPORT RenderStageLighting : public osg::Object
|
||||
|
||||
|
||||
RenderStageLighting();
|
||||
virtual osg::Object* cloneType() const { return osgNew RenderStageLighting(); }
|
||||
virtual osg::Object* clone(const osg::CopyOp&) const { return osgNew RenderStageLighting(); } // note only implements a clone of type.
|
||||
virtual osg::Object* cloneType() const { return new RenderStageLighting(); }
|
||||
virtual osg::Object* clone(const osg::CopyOp&) const { return new RenderStageLighting(); } // note only implements a clone of type.
|
||||
virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const RenderStageLighting*>(obj)!=0L; }
|
||||
virtual const char* libraryName() const { return "osgUtil"; }
|
||||
virtual const char* className() const { return "RenderStageLighting"; }
|
||||
|
||||
@@ -23,8 +23,8 @@ class OSGUTIL_EXPORT RenderToTextureStage : public RenderStage
|
||||
RenderToTextureStage();
|
||||
|
||||
|
||||
virtual osg::Object* cloneType() const { return osgNew RenderToTextureStage(); }
|
||||
virtual osg::Object* clone(const osg::CopyOp&) const { return osgNew RenderToTextureStage(); } // note only implements a clone of type.
|
||||
virtual osg::Object* cloneType() const { return new RenderToTextureStage(); }
|
||||
virtual osg::Object* clone(const osg::CopyOp&) const { return new RenderToTextureStage(); } // note only implements a clone of type.
|
||||
virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const RenderToTextureStage*>(obj)!=0L; }
|
||||
virtual const char* libraryName() const { return "osgUtil"; }
|
||||
virtual const char* className() const { return "RenderToTextureStage"; }
|
||||
|
||||
@@ -55,7 +55,7 @@ class OSGUTIL_EXPORT SceneView : public osg::Referenced
|
||||
else
|
||||
{
|
||||
// ensure that _viewport is always valid.
|
||||
_viewport = osgNew osg::Viewport;
|
||||
_viewport = new osg::Viewport;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user