Add getString(VkEnum)/getString(VKFlags) support

This commit is contained in:
Markus Tavenrath
2016-02-18 12:12:55 +01:00
parent 4aa2b3f4dc
commit be14a994fb
3 changed files with 1657 additions and 0 deletions

View File

@@ -109,6 +109,12 @@ vk::ImageCreateInfo ci(
</code>
</pre>
# String conversions
At development time it can be quite handy to have a utility function that can convert an enum or flags to a string for debugging purposes. To achieve this,
we have implemented <code>getString(type)</code> functions for all enums and flags. Calling <code>getString(vk::SharingMode::eExclusive)</code> will return 'Exclusive' and calling
<code>getString(vk::QueueFlagBits::eGraphics | vk::QueueFlagBits::eCompute)</code> will return the concatenated string 'Graphics | Compute'.
# Alternative Initialization of Structs
Another nice feature of those constructors is that sType is being initialized internally and thus is always correct.