+ // check that its version is compatible with ours
+ wxRendererVersion ver = renderer->GetVersion();
+ if ( !wxRendererVersion::IsCompatible(ver) )
+ {
+ wxLogError(_("Renderer \"%s\" has incompatible version %d.%d and couldn't be loaded."),
+ name.c_str(), ver.version, ver.age);
+ delete renderer;
+
+ return NULL;
+ }
+
+ // finally wrap the renderer in an object which will delete it and unload
+ // the library when it is deleted and return it to the caller