Setup device and queue
This commit is contained in:
@@ -18,11 +18,13 @@ namespace PB::Renderer
|
||||
class VulkanManager
|
||||
{
|
||||
public:
|
||||
static bool InitAll(GLFWwindow* window);
|
||||
static std::optional<VkInstance> Init();
|
||||
static bool Cleanup();
|
||||
|
||||
static std::optional<VkSurfaceKHR> CreateSurface(GLFWwindow* window);
|
||||
static bool PickPhysicalDevice();
|
||||
static bool CreateLogicalDevice();
|
||||
|
||||
private:
|
||||
static bool IsDeviceSuitable(VkPhysicalDevice device, VkSurfaceKHR surface);
|
||||
@@ -34,5 +36,10 @@ namespace PB::Renderer
|
||||
|
||||
static VkPhysicalDevice s_PhysicalDevice;
|
||||
static QueueFamilyIndices s_QueueIndices;
|
||||
|
||||
static VkDevice s_Device;
|
||||
|
||||
static VkQueue s_GraphicsQueue;
|
||||
static VkQueue s_PresentQueue;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user