diff --git a/include/osg/Callback b/include/osg/Callback index 93cb61600..30cd1aa6f 100644 --- a/include/osg/Callback +++ b/include/osg/Callback @@ -312,6 +312,9 @@ public: META_Object(osg,DrawableEventCallback); + virtual DrawableEventCallback* asDrawableEventCallback() { return this; } + virtual const DrawableEventCallback* asDrawableEventCallback() const { return this; } + /** override Callback::run() entry point to adapt to StateAttributeCallback::run(..) method.*/ virtual bool run(osg::Object* object, osg::Object* data); @@ -328,6 +331,9 @@ public: META_Object(osg,DrawableCullCallback); + virtual DrawableCullCallback* asDrawableCullCallback() { return this; } + virtual const DrawableCullCallback* asDrawableCullCallback() const { return this; } + // just use the standard run implementation to passes run onto any nested callbacks. using Callback::run;