MikePopoloski / SharpBgfx

C# bindings for the bgfx graphics library
MIT License
169 stars 30 forks source link

bgfx_get_avail_*_buffer() has wrong return value marshaling #13

Closed PowerStateFailure closed 7 years ago

PowerStateFailure commented 7 years ago

According to Bgfx C API these funcs returns uint32_t:

But their declaration in NativeMethods class has MarshalAs(UnmanagedType.U1) attribute of returned value that cause MarshalDirectiveException when function called.

I suppose that proper solution is to replace return type with uint and drop explicit marshalling.

MikePopoloski commented 7 years ago

It looks like this was some accidental copy paste. Thanks for reporting it.