Initial Gitea Commit
This commit is contained in:
47
VulkanDeviceManager.h
Normal file
47
VulkanDeviceManager.h
Normal file
@@ -0,0 +1,47 @@
|
||||
#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);
|
||||
};
|
||||
Reference in New Issue
Block a user