Вынес управление VkInstance в отдельный класс
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ class RenderEngineBase
|
||||
GLFWwindow* window_ = nullptr;
|
||||
|
||||
public:
|
||||
explicit RenderEngineBase();
|
||||
explicit RenderEngineBase(CoreInstance& core);
|
||||
virtual ~RenderEngineBase();
|
||||
|
||||
virtual void start() = 0;
|
||||
|
||||
Reference in New Issue
Block a user