feat: window is open
This commit is contained in:
@ -19,12 +19,15 @@ private:
|
||||
|
||||
int m_width;
|
||||
int m_height;
|
||||
|
||||
bool m_is_open;
|
||||
public:
|
||||
Window();
|
||||
~Window();
|
||||
public:
|
||||
[[nodiscard]] inline int GetWidth() const { return m_width; }
|
||||
[[nodiscard]] inline int GetHeight() const { return m_height; }
|
||||
[[nodiscard]] inline bool IsOpen() const { return m_is_open; }
|
||||
public:
|
||||
void ProcessEvents();
|
||||
public:
|
||||
|
@ -31,7 +31,7 @@ Engine::Engine() {
|
||||
}
|
||||
|
||||
bool Engine::Running() const {
|
||||
return m_isRunning;
|
||||
return m_isRunning && m_window->IsOpen();
|
||||
}
|
||||
|
||||
void Engine::Stop() {
|
||||
|
@ -61,6 +61,8 @@ Window::Window() {
|
||||
glDebugMessageCallback(MessageCallback, nullptr);
|
||||
|
||||
glViewport(0, 0, m_width, m_height);
|
||||
|
||||
m_is_open = true;
|
||||
}
|
||||
|
||||
void Window::ProcessEvents() {
|
||||
|
Reference in New Issue
Block a user