Hid Vulkan helper structs
This commit is contained in:
@@ -4,28 +4,6 @@
|
||||
|
||||
namespace PB::Renderer
|
||||
{
|
||||
struct QueueFamilyIndices
|
||||
{
|
||||
static constexpr uint32_t UNDEFINED_UINT32_VALUE = 0xFFFFFFFF;
|
||||
|
||||
uint32_t graphicsFamily = UNDEFINED_UINT32_VALUE;
|
||||
uint32_t presentFamily = UNDEFINED_UINT32_VALUE;
|
||||
|
||||
[[nodiscard]] bool Complete() const
|
||||
{
|
||||
return
|
||||
graphicsFamily != UNDEFINED_UINT32_VALUE &&
|
||||
presentFamily != UNDEFINED_UINT32_VALUE;
|
||||
}
|
||||
};
|
||||
|
||||
struct SwapChainSupportDetails
|
||||
{
|
||||
VkSurfaceCapabilitiesKHR capabilities;
|
||||
std::vector<VkSurfaceFormatKHR> formats;
|
||||
std::vector<VkPresentModeKHR> presentModes;
|
||||
};
|
||||
|
||||
class VulkanManager
|
||||
{
|
||||
public:
|
||||
@@ -111,6 +89,30 @@ namespace PB::Renderer
|
||||
static bool RenderPass(GLFWwindow* window);
|
||||
|
||||
private:
|
||||
// === Internal helper structs === //
|
||||
|
||||
struct QueueFamilyIndices
|
||||
{
|
||||
static constexpr uint32_t UNDEFINED_UINT32_VALUE = 0xFFFFFFFF;
|
||||
|
||||
uint32_t graphicsFamily = UNDEFINED_UINT32_VALUE;
|
||||
uint32_t presentFamily = UNDEFINED_UINT32_VALUE;
|
||||
|
||||
[[nodiscard]] bool Complete() const
|
||||
{
|
||||
return
|
||||
graphicsFamily != UNDEFINED_UINT32_VALUE &&
|
||||
presentFamily != UNDEFINED_UINT32_VALUE;
|
||||
}
|
||||
};
|
||||
|
||||
struct SwapChainSupportDetails
|
||||
{
|
||||
VkSurfaceCapabilitiesKHR capabilities;
|
||||
std::vector<VkSurfaceFormatKHR> formats;
|
||||
std::vector<VkPresentModeKHR> presentModes;
|
||||
};
|
||||
|
||||
// === Vulkan init helpers === //
|
||||
|
||||
static bool IsDeviceSuitable(const VkPhysicalDevice& device);
|
||||
|
||||
Reference in New Issue
Block a user