Currently, SharpDX project structure mainly revolves around DirectX components. However, each component of DirectX has it own versioning. SharpDX unfortunately, ends up wrapping them all as one blob. And DirectX doesn't make this easy, since the interface naming is unfortunately, meaningless. For example, ID3D1Device can have the suffixes 1, 2, and 3. But they carry no meaning. They could have all been introduced it in the same version, or may indicate the next version.
In C++, its easy to target a platform and a version, since the headers files, in most scenarios differ. But in SharpDX, this ends up being a nightmare.
Some of the most common interfaces that I use, I ended up forming a simple text table, that looks like this to refer to.
Obviously, its painful. This would be far simpler, if instead, SharpDX separated its components into different projects to form a structure that realizes this.
`SharpDX.dll` - Core libary
`SharpDX.DXGI.dll` - Core DXGI + v1.0
`SharpDX.DXGI-1.1.dll` - DXGI v1.1 (Dependency on both the above)
So, now the interfaces are cleanly tucked away. And if someone is to target a particular platform, all that the library has are the correct interfaces for the particular platform.
Multiple binaries shouldn't be much of an issue, since it can be ILMerged from the developer side should it be a problem.
Currently, SharpDX project structure mainly revolves around DirectX components. However, each component of DirectX has it own versioning. SharpDX unfortunately, ends up wrapping them all as one blob. And DirectX doesn't make this easy, since the interface naming is unfortunately, meaningless. For example, ID3D1Device can have the suffixes 1, 2, and 3. But they carry no meaning. They could have all been introduced it in the same version, or may indicate the next version.
In C++, its easy to target a platform and a version, since the headers files, in most scenarios differ. But in SharpDX, this ends up being a nightmare.
Some of the most common interfaces that I use, I ended up forming a simple text table, that looks like this to refer to.
Source: https://github.com/prasannavl/WinApi/blob/master/WinApi.DxUtils/DxVersionInfo.txt
Obviously, its painful. This would be far simpler, if instead, SharpDX separated its components into different projects to form a structure that realizes this.
So, now the interfaces are cleanly tucked away. And if someone is to target a particular platform, all that the library has are the correct interfaces for the particular platform.
Multiple binaries shouldn't be much of an issue, since it can be ILMerged from the developer side should it be a problem.