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:
@@ -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; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user