FacticiusVir / SharpVk

C# Bindings for the Vulkan API & SPIR-V
MIT License
147 stars 18 forks source link

Add static bool32 members #35

Closed realvictorprm closed 6 years ago

realvictorprm commented 7 years ago

Hi, during my work with SharpVK I noticed that I need to apply every time casts to my bool values etc.

Instead of conversions I would like to see additional static members e.g.

partial class Bool32 {
   public static bool True = Bool32(true);
   public static bool False = Bool32(false);
}
FacticiusVir commented 7 years ago

Oh, that's unpleasant; there are implicit casts between bool and Bool32, but if you're using F# those aren't compatible. I'll see about removing Bool32 from the public API, if that's not workable I'll add some Bool32.True/False shortcuts.

realvictorprm commented 7 years ago

This would be nice :)

FacticiusVir commented 6 years ago

The resolution for this issue is included in release 0.4.0; Bool32 should be automatically marshalled from bool in all uses in the public API.