According to Bgfx C API these funcs returns uint32_t:
bgfx_get_avail_transient_index_buffer
bgfx_get_avail_transient_vertex_buffer
bgfx_get_avail_instance_data_buffer
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.
According to Bgfx C API these funcs returns
uint32_t
:bgfx_get_avail_transient_index_buffer
bgfx_get_avail_transient_vertex_buffer
bgfx_get_avail_instance_data_buffer
But their declaration in NativeMethods class has
MarshalAs(UnmanagedType.U1)
attribute of returned value that causeMarshalDirectiveException
when function called.I suppose that proper solution is to replace return type with
uint
and drop explicit marshalling.