Removed deprecated drawImplementation(State&) method from Drawable and Drawable::DrawCallback
This commit is contained in:
@@ -57,7 +57,7 @@ class OSG_EXPORT DrawPixels : public Drawable
|
||||
void setSubImageDimensions(unsigned int offsetX,unsigned int offsetY,unsigned int width,unsigned int height);
|
||||
void getSubImageDimensions(unsigned int& offsetX,unsigned int& offsetY,unsigned int& width,unsigned int& height) const;
|
||||
|
||||
virtual void drawImplementation(State& state) const;
|
||||
virtual void drawImplementation(RenderInfo& state) const;
|
||||
|
||||
virtual BoundingBox computeBound() const;
|
||||
|
||||
|
||||
@@ -404,11 +404,8 @@ class OSG_EXPORT Drawable : public Object
|
||||
|
||||
META_Object(osg,DrawCallback);
|
||||
|
||||
/** Deprecated.*/
|
||||
virtual void drawImplementation(osg::State&,const osg::Drawable*) const {}
|
||||
|
||||
/** do customized draw code.*/
|
||||
virtual void drawImplementation(osg::RenderInfo& renderInfo,const osg::Drawable* drawable) const { drawImplementation(*renderInfo.getState(), drawable); }
|
||||
virtual void drawImplementation(osg::RenderInfo& /*renderInfo*/,const osg::Drawable* /*drawable*/) const {}
|
||||
};
|
||||
|
||||
/** Set the DrawCallback which allows users to attach customize the drawing of existing Drawable object.*/
|
||||
@@ -420,15 +417,12 @@ class OSG_EXPORT Drawable : public Object
|
||||
/** Get the const DrawCallback.*/
|
||||
const DrawCallback* getDrawCallback() const { return _drawCallback.get(); }
|
||||
|
||||
/** Deprecated. */
|
||||
virtual void drawImplementation(State&) const {}
|
||||
|
||||
/** drawImplementation(State&) is a pure virtual method for the actual implementation of OpenGL drawing calls, such as vertex arrays and primitives, that
|
||||
/** drawImplementation(RenderInfo&) is a pure virtual method for the actual implementation of OpenGL drawing calls, such as vertex arrays and primitives, that
|
||||
* must be implemented in concrete subclasses of the Drawable base class, examples include osg::Geometry and osg::ShapeDrawable.
|
||||
* drawImplementation(State&) is called from the draw(State&) method, with the draw method handling management of OpenGL display lists,
|
||||
* and drawImplementation(State&) handling the actuall drawing itself.
|
||||
* drawImplementation(RenderInfo&) is called from the draw(RenderInfo&) method, with the draw method handling management of OpenGL display lists,
|
||||
* and drawImplementation(RenderInfo&) handling the actuall drawing itself.
|
||||
* @param state The osg::State object that encapulates the current OpenGL state for the current graphics context. */
|
||||
virtual void drawImplementation(RenderInfo& renderInfo) const { drawImplementation(*renderInfo.getState()); }
|
||||
virtual void drawImplementation(RenderInfo& renderInfo) const = 0;
|
||||
|
||||
|
||||
/** Return a OpenGL display list handle a newly generated or reused from display list cache. */
|
||||
|
||||
@@ -336,7 +336,7 @@ class OSG_EXPORT Geometry : public Drawable
|
||||
* This is the internal draw method which does the drawing itself,
|
||||
* and is the method to override when deriving from Geometry for user-drawn objects.
|
||||
*/
|
||||
virtual void drawImplementation(State& state) const;
|
||||
virtual void drawImplementation(RenderInfo& renderInfo) const;
|
||||
|
||||
/** Return true, osg::Geometry does support accept(Drawable::AttributeFunctor&). */
|
||||
virtual bool supports(const Drawable::AttributeFunctor&) const { return true; }
|
||||
|
||||
@@ -160,7 +160,7 @@ class OSG_EXPORT ShapeDrawable : public Drawable
|
||||
* drawing itself, and is the method to override when deriving from
|
||||
* ShapeDrawable for user-drawn objects.
|
||||
*/
|
||||
virtual void drawImplementation(State& state) const;
|
||||
virtual void drawImplementation(RenderInfo& renderInfo) const;
|
||||
|
||||
/* Not all virtual overloads of these methods are overridden in this class, so
|
||||
bring the base class implementation in to avoid hiding the non-used ones. */
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace osgParticle
|
||||
virtual void reuseParticle(int i);
|
||||
|
||||
/// Draw the connected particles as either a line or a quad strip, depending upon viewing distance. .
|
||||
virtual void drawImplementation(osg::State& state) const;
|
||||
virtual void drawImplementation(osg::RenderInfo& renderInfo) const;
|
||||
|
||||
///Get the (const) particle from where the line or quadstrip starts to be drawn
|
||||
const osgParticle::Particle* getStartParticle() const
|
||||
|
||||
@@ -162,7 +162,7 @@ namespace osgParticle
|
||||
/// Update the particles. Don't call this directly, use a <CODE>ParticleSystemUpdater</CODE> instead.
|
||||
virtual void update(double dt);
|
||||
|
||||
virtual void drawImplementation(osg::State& state) const;
|
||||
virtual void drawImplementation(osg::RenderInfo& renderInfo) const;
|
||||
|
||||
virtual osg::BoundingBox computeBound() const;
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ class OSGSIM_EXPORT ImpostorSprite : public osg::Drawable
|
||||
int t() const { return _t; }
|
||||
|
||||
/** Draw ImpostorSprite directly. */
|
||||
virtual void drawImplementation(osg::State& state) const;
|
||||
virtual void drawImplementation(osg::RenderInfo& renderInfo) const;
|
||||
|
||||
/** Return true, osg::ImpostorSprite does support accept(Drawable::AttributeFunctor&). */
|
||||
virtual bool supports(const Drawable::AttributeFunctor&) const { return true; }
|
||||
|
||||
Reference in New Issue
Block a user