I need to integrate a custom renderer which is built as native c++ DLLs into Rhino5
Is there any drawbacks if I decide to use RhinoCommon? First of all, can I use managed C++ to interop with these native DLLs without problems?
We are thinking about it because it’s possible that we will need to support our custom renderer on Mac in the future.
I think using RhinoCommon is a great way to go. @andy and @JohnM can help with any rendering SDK questions you may have during the process.
I would recommend NOT using managed C++ though for interop and instead write exported C functions that your C# plug-in can use through pinvokes. We can help with getting that process working smoothly also. Managed C++ does not exist on OSX, so your going to run into problems if you decide to port to Mac in the future. I also have found that having the clean divide between C# and C++ is really helpful for code separation and debugging.
That’s exactly what I was trying to recommend. This is what I do for the RhinoCommon SDK. The Rhino C++ SDK is really C++ (classes and all those non-C type things). There is a wrapper DLL named rhcommon_c which is a large collection of exported C functions which call into the lower level Rhino C++ SDK.