48 lines
1.2 KiB
C++
48 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#define GLFW_INCLUDE_VULKAN
|
|
#include <GLFW/glfw3.h>
|
|
|
|
// struct FCreateDebugUtilsMessengerExtParams
|
|
//{
|
|
// VkInstance Instance;
|
|
// const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo;
|
|
// const VkAllocationCallbacks* pAllocator;
|
|
// VkDebugUtilsMessengerEXT* pDebugMessenger;
|
|
// };
|
|
//
|
|
// struct FDestroyDebugUtilsMessengerExtParams
|
|
//{
|
|
// VkInstance Instance;
|
|
// VkDebugUtilsMessengerEXT DebugMessenger;
|
|
// const VkAllocationCallbacks* pAllocator;
|
|
// };
|
|
|
|
class VulkanDeviceManager
|
|
{
|
|
public:
|
|
VulkanDeviceManager();
|
|
~VulkanDeviceManager();
|
|
|
|
VulkanDeviceManager(const VulkanDeviceManager&) = delete;
|
|
VulkanDeviceManager& operator=(const VulkanDeviceManager&) = delete;
|
|
|
|
VulkanDeviceManager(VulkanDeviceManager&& Other) noexcept;
|
|
VulkanDeviceManager& operator=(VulkanDeviceManager&& Other) noexcept;
|
|
|
|
void Initialize(VkInstance Instance);
|
|
void Cleanup();
|
|
|
|
bool IsInitialized() const { return PhysicalDevice != VK_NULL_HANDLE; }
|
|
|
|
private:
|
|
VkPhysicalDevice PhysicalDevice = VK_NULL_HANDLE;
|
|
VkInstance Instance = VK_NULL_HANDLE;
|
|
|
|
void PickPhysicalDevice();
|
|
|
|
// bool IsDeviceSuitable(VkPhysicalDevice Device);
|
|
|
|
int RateDeviceSuitability(VkPhysicalDevice Device);
|
|
};
|