1 | initial version |
imho, the main problem is , that you're omitting the smartpointers there, so your 'raw' pointer is already deadbeef
on line 1.
so, in the end it should be :
Ptr<Blender> blender = Blender::createDefault(Blender::FEATHER, false);
// 3.0 has dynamiccast:
// Ptr<FeatherBlender> fb = blender.dynamicCast<FeatherBlender>();
// 2.4 does it simply like this:
Ptr<FeatherBlender> fb(blender);
fb->setSharpness(1.f/20);