Вынес движок рендера в отдельный модуль ввиде статической библиотеки
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#include "RenderEngineBase.hpp"
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
RenderEngineBase::RenderEngineBase()
|
||||
{
|
||||
if (!glfwInit())
|
||||
throw std::runtime_error("Fail init glfw");
|
||||
|
||||
glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);
|
||||
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
|
||||
|
||||
window_ = glfwCreateWindow(800, 600, "UwU Engine", nullptr, nullptr);
|
||||
if (window_ == nullptr)
|
||||
throw std::runtime_error("Fail create window");
|
||||
}
|
||||
|
||||
RenderEngineBase::~RenderEngineBase()
|
||||
{
|
||||
if (window_ != nullptr)
|
||||
glfwDestroyWindow(window_);
|
||||
|
||||
glfwTerminate();
|
||||
}
|
||||
Reference in New Issue
Block a user