Move DataFormat to vk Format conversion to cast operator
This commit is contained in:
@@ -9,6 +9,11 @@
|
||||
#include <cinttypes>
|
||||
#include <string_view>
|
||||
|
||||
namespace vk
|
||||
{
|
||||
enum class Format;
|
||||
}
|
||||
|
||||
namespace OpenVulkano
|
||||
{
|
||||
class DataFormat
|
||||
@@ -361,6 +366,11 @@ namespace OpenVulkano
|
||||
return m_format;
|
||||
}
|
||||
|
||||
[[nodiscard]] operator const vk::Format&() const
|
||||
{
|
||||
return reinterpret_cast<const vk::Format&>(m_format);
|
||||
}
|
||||
|
||||
static DataFormat GetFromName(std::string_view name);
|
||||
private:
|
||||
Format m_format;
|
||||
|
||||
Reference in New Issue
Block a user