Добавил namespace VkObjectsдля обёрток. Вынес управление VkSurface в отдельный класс
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user