Shanq using non-GLM sharp vector and matrix types
chuggafan opened this issue · 3 comments
As in the title, I was looking into using Shanq (It's pretty cool) but I don't like the fact that I'm essentially locked into using glmSharp, I am asking this as I would perfer to be able to use the System.Numerics.Vector library instead, as it is built into windows and mono and has hardware/non-hardware acceleration built into it. It can be used in Vulkan as shown by plenty of other librarys, will System.Numerics vectors see any support?
So glmSharp is being used during the prototype stage, as it has support for all the vector & matrix element types, while System.Numeric only implements vectors of float. The intention is to add a mapping type so you can use any vector/matrix library, but I won't have chance to get to that till I've finished the .NET Standard porting & testing.
Ok, thanks for the information, I hope the porting & testing goes quickly for you.
The vector/matrix type dependencies have now been separated into their own NuGet packages for v0.4.0; the base ShanqShader methods accept an IVectorTypeLibrary instance for type mapping. The SharpVk.Shanq.Numerics package includes System.Numerics mappings and extension methods for creating Shanq shader modules directly off Devices (e.g. https://github.com/FacticiusVir/SharpVk-Samples/blob/master/SharpVk.UniformBuffers/Program.cs#L520).