nice
This commit is contained in:
43
include/td/input/Display.h
Normal file
43
include/td/input/Display.h
Normal file
@@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <SDL3/SDL_video.h>
|
||||
|
||||
namespace td {
|
||||
|
||||
class Display {
|
||||
public:
|
||||
Display(int a_Width, int a_Height, const std::string& a_Title);
|
||||
~Display();
|
||||
|
||||
void PollEvents();
|
||||
void Update();
|
||||
|
||||
bool IsCloseRequested() {
|
||||
return m_ShouldClose;
|
||||
}
|
||||
|
||||
float GetAspectRatio() {
|
||||
return m_AspectRatio;
|
||||
}
|
||||
|
||||
int GetWindowWidth() {
|
||||
return m_LastWidth;
|
||||
}
|
||||
|
||||
int GetWindowHeight() {
|
||||
return m_LastHeight;
|
||||
}
|
||||
|
||||
private:
|
||||
SDL_Window* m_Window;
|
||||
SDL_GLContext m_GLContext;
|
||||
|
||||
int m_LastWidth, m_LastHeight;
|
||||
float m_AspectRatio;
|
||||
|
||||
bool m_ShouldClose;
|
||||
};
|
||||
|
||||
} // namespace td
|
||||
Reference in New Issue
Block a user