Добавил namespace VkObjectsдля обёрток. Вынес управление VkSurface в отдельный класс

This commit is contained in:
Jiga228
2026-06-23 18:02:42 +07:00
parent 7aec01ccc8
commit 70956e2032
6 changed files with 154 additions and 117 deletions
@@ -0,0 +1,17 @@
#include "Surface.hpp"
#include "Instance.hpp"
#include "DeviceFunctions/DeviceFunctions.hpp"
namespace VkObjects
{
Surface::Surface(const Instance& instance, GLFWwindow* window):instance_(instance)
{
VK_CHECK(glfwCreateWindowSurface(instance_.get_native(), window, nullptr, &surface_))
}
Surface::~Surface()
{
vkDestroySurfaceKHR(instance_.get_native(), surface_, nullptr);
}
}