I need to develop a cross-platform app that ranges from mobile to desktop to TV. App includes a huge variety of 3D elements which are vital for application's correct display.
At first, I was going to use C++ and native compilers (utilizing directives) but I have gone that road many times, there are a lot of overlapping factors you can't unify (or find work, too much, arounds to overcome this issue), so I decided to try other alternatives.
I found Xamarin most outstanding cross-platform toolkit allowing native performance applications but I got lost in some terminology. In my application, there will be a base class called "GraphRenderer". I will override it for each platform and on each platform, I will include a different GPU library (eg. Metal for Mac, DirectX 12 for Windows, Vulkan for Android) and utilize it. If possible, I don't want to use directives, creating interfaces approach seem way more cleaner in the long run.
Is there a project type (as you can imagine Shared Library, PCL etc. left me confused) that allows this hierarchy:
App
- Shared Code Files
- GraphRenderer.cs : Definition of GraphRenderer with Empty Functions to make it compatible for other shared code
- Platform-Specific Code Files
- GraphRenderer.Windows.cs : Replaces GraphRenderer.cs when compiling App for Windows 10 platform, includes DirectX 12 headers and override functions with proper functionality
Thanks.