Вынес управление VkInstance в отдельный класс

This commit is contained in:
Jiga228
2026-06-23 17:46:21 +07:00
parent 280f843fb7
commit 7aec01ccc8
7 changed files with 130 additions and 100 deletions
+4 -2
View File
@@ -2,7 +2,9 @@
#include <stdexcept>
RenderEngineBase::RenderEngineBase()
#include "Core/CoreInstance.hpp"
RenderEngineBase::RenderEngineBase(CoreInstance& core)
{
if (!glfwInit())
throw std::runtime_error("Fail init glfw");
@@ -10,7 +12,7 @@ RenderEngineBase::RenderEngineBase()
glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
window_ = glfwCreateWindow(800, 600, "UwU Engine", nullptr, nullptr);
window_ = glfwCreateWindow(800, 600, core.getGameName().c_str(), nullptr, nullptr);
if (window_ == nullptr)
throw std::runtime_error("Fail create window");
}
+1 -1
View File
@@ -10,7 +10,7 @@ class RenderEngineBase
GLFWwindow* window_ = nullptr;
public:
explicit RenderEngineBase();
explicit RenderEngineBase(CoreInstance& core);
virtual ~RenderEngineBase();
virtual void start() = 0;