stories/engine/physicaldevice.h

32 lines
671 B
C++

#pragma once
#include <set>
#include <string>
#include <vector>
#include <vulkan/vulkan.h>
#include "utils.h"
#include "surface.h"
namespace Engine {
class LogicalDevice;
class PhysicalDevice {
friend class LogicalDevice;
public:
PhysicalDevice(VkPhysicalDevice raw, const QueueFamilyIndices& indices, const SwapChainSupportDetails& swapChainSupport);
void recreateSwapChainSupportDetails(const Surface* surface);
static bool checkDeviceExtensionSupport(VkPhysicalDevice device, std::set<std::string> requiredExtensions);
const QueueFamilyIndices indices;
SwapChainSupportDetails swapChainSupport;
private:
VkPhysicalDevice vk;
};
}