Add WindowManager Class

This commit is contained in:
2025-12-06 10:24:54 +08:00
parent eaf7ea27f7
commit db87a54e8b
2 changed files with 98 additions and 0 deletions

29
src/core/WindowManager.h Normal file
View File

@@ -0,0 +1,29 @@
#pragma once
#include<SDL3/SDL.h>
#include "utils/Config.h"
class WindowManager {
public:
WindowManager();
~WindowManager();
// 初始化
bool Initialize(GameConfig& config);
//关闭
void Shutdown();
//清理上一帧窗口
void Clear();
//呈现窗口
void Present();
SDL_Renderer* GetRenderer();
SDL_Window* GetWindow();
private:
SDL_Window* m_window;
SDL_Renderer* m_renderer;
int m_width;
int m_height;
};