Initial Gitea Commit

This commit is contained in:
onTheZero
2026-01-05 10:36:27 -05:00
parent 5b32d32b0b
commit fa7ae9ac1c
19 changed files with 1372 additions and 288 deletions

47
VulkanDeviceManager.h Normal file
View 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);
};