Files
MacroLibX/runtime/Sources/Platform/Window.cpp
Kbz-8 af70e2e354 yes
2024-11-03 01:23:52 +01:00

22 lines
483 B
C++

#include <PreCompiled.h>
#include <Core/SDLManager.h>
#include <Platform/Window.h>
namespace mlx
{
Window::Window(std::size_t w, std::size_t h, const std::string& title, bool is_resizable, bool hidden) : m_name(title), m_width(w), m_height(h)
{
p_window = SDLManager::Get().CreateWindow(title, w, h, hidden, m_id, is_resizable);
}
void Window::Destroy() noexcept
{
if(p_window != nullptr)
{
SDLManager::Get().DestroyWindow(p_window);
p_window = nullptr;
}
}
}