Вынес управление VkInstance в отдельный класс
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
#include <mutex>
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
#include "VkObjects/Instance.hpp"
|
||||
|
||||
class Camera;
|
||||
class GPU_GarbageCollector;
|
||||
|
||||
@@ -69,7 +71,7 @@ class UwURenderEngine : public RenderEngineBase
|
||||
std::weak_ptr<Camera> active_camera_;
|
||||
std::mutex m_active_camera_;
|
||||
|
||||
VkInstance instance_ = VK_NULL_HANDLE;
|
||||
Instance instance_;
|
||||
VkSurfaceKHR surface_ = VK_NULL_HANDLE;
|
||||
VkPhysicalDevice physical_device_ = VK_NULL_HANDLE;
|
||||
VkDevice device_ = VK_NULL_HANDLE;
|
||||
@@ -102,13 +104,8 @@ class UwURenderEngine : public RenderEngineBase
|
||||
std::vector<VkSemaphore> image_available_semaphores_, render_finished_semaphores_;
|
||||
std::vector<VkFence> in_flight_fences_;
|
||||
|
||||
#ifdef _DEBUG
|
||||
VkResult enable_layer_validation(const VkDebugUtilsMessengerCreateInfoEXT* create_info);
|
||||
VkDebugUtilsMessengerEXT debug_messenger_;
|
||||
#endif
|
||||
SwapchainSupportDetails query_swapchain_details() const;
|
||||
|
||||
static std::vector<const char*> get_required_extensions();
|
||||
static bool is_device_suitable(VkPhysicalDevice device, VkSurfaceKHR surface);
|
||||
static bool check_device_extensions_support(VkPhysicalDevice device);
|
||||
static QueueFamilyIndices find_queue_family_indices(VkPhysicalDevice physical_device, VkSurfaceKHR surface);
|
||||
@@ -117,7 +114,6 @@ class UwURenderEngine : public RenderEngineBase
|
||||
VkShaderModule create_shader_module(const std::string& code) const;
|
||||
static std::vector<uint32_t> get_unique_family_indices(const QueueFamilyIndices& indices);
|
||||
|
||||
void create_instance();
|
||||
void create_surface();
|
||||
void pick_physical_device();
|
||||
void create_logical_device();
|
||||
|
||||
Reference in New Issue
Block a user