Files
Blitz/include/client/display/Display.h
2023-11-09 19:50:08 +01:00

54 lines
773 B
C++

#pragma once
#include <memory>
#include <string>
class SDL_Window;
namespace blitz {
class Client;
namespace gui {
class BlitzGui;
} // namespace gui
class Display {
private:
SDL_Window* m_Window;
void* m_GL_Context;
int m_WindowWidth;
int m_WindowHeight;
float m_AspectRatio;
std::string m_WindowName;
bool m_ShouldClose;
bool m_FullScreen;
Client* m_Client;
std::unique_ptr<gui::BlitzGui> m_BlitzGui;
public:
Display(int width, int height, const std::string& windowName, Client* client);
~Display();
bool Create();
void PollEvents();
void Update();
void Render();
void Destroy();
bool IsCloseRequested();
float GetAspectRatio();
int GetWindowWidth();
int GetWindowHeight();
private:
void InitImGui();
};
} // namespace blitz