mirror of
https://github.com/zhenyan121/SporeBG-Conid.git
synced 2026-04-10 06:14:08 +08:00
Add WindowManager Class
This commit is contained in:
29
src/core/WindowManager.h
Normal file
29
src/core/WindowManager.h
Normal 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;
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user