Vulkan/Device: Add useful accessors
Former-commit-id: b2b6378b2b9a8de2ad1c47b72f2acd6dd86a087a
This commit is contained in:
@@ -36,6 +36,16 @@ namespace Nz
|
||||
return vkGetDeviceQueue(m_device, queueFamilyIndex, queueIndex, queue);
|
||||
}
|
||||
|
||||
inline Instance& Device::GetInstance()
|
||||
{
|
||||
return m_instance;
|
||||
}
|
||||
|
||||
inline const Instance& Device::GetInstance() const
|
||||
{
|
||||
return m_instance;
|
||||
}
|
||||
|
||||
inline VkResult Device::GetLastErrorCode() const
|
||||
{
|
||||
return m_lastErrorCode;
|
||||
@@ -53,6 +63,11 @@ namespace Nz
|
||||
return true;
|
||||
}
|
||||
|
||||
inline Device::operator VkDevice()
|
||||
{
|
||||
return m_device;
|
||||
}
|
||||
|
||||
inline PFN_vkVoidFunction Device::GetProcAddr(const char* name)
|
||||
{
|
||||
PFN_vkVoidFunction func = m_instance.GetDeviceProcAddr(m_device, name);
|
||||
|
||||
Reference in New Issue
Block a user