dotnet/Silk.NET

Override ToString() method in Vulkan object structs

tonisimakov99 opened this issue · 1 comments

Override ToString() method in Vulkan object structs

[NativeName("Name", "VkSemaphore")]
public struct Semaphore
{
    [NativeName("Type", "")]
    [NativeName("Type.Name", "")]
    [NativeName("Name", "")]
    public ulong Handle;

    public Semaphore(ulong? handle = null)
    {
        this = default(Semaphore);
        if (handle.HasValue)
        {
            Handle = handle.Value;
        }
    }

    public override string ToString()
    {
        return Handle.ToString();;
    }
}

it's useful for debug
Image

Good idea.