From Mike Wittman, "This is another weirdo change to support code generation. It brings all the Drawable::supports and Drawable::accepts overloads into the ShapeDrawable scope to avoid errors invoking the ones that are not defined in ShapeDrawable. Currently you'll get compilation errors if you pass a Drawable::AttributeFunctor or PrimitiveIndexFunctor to the "accept" function invoked on a ShapeDrawable pointer or reference, since those overloads are only defined in the base class. You'll also get the same error passing a PrimitiveIndexFunctor to the "supports" function. These errors occur because C++ function overload resolution does not cross inheritance boundaries."

This commit is contained in:
Robert Osfield
2007-03-26 13:00:29 +00:00
parent 4e2eaf4d0d
commit 7013c12a0d

View File

@@ -162,6 +162,11 @@ class OSG_EXPORT ShapeDrawable : public Drawable
*/
virtual void drawImplementation(State& state) 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. */
using Drawable::supports;
using Drawable::accept;
/** Return false, osg::ShapeDrawable does not support accept(AttributeFunctor&).*/
virtual bool supports(const AttributeFunctor&) const { return false; }