mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-09 02:07:04 +08:00
feat: add texture hot-reload
This commit is contained in:
@@ -6,20 +6,26 @@
|
||||
|
||||
class TextureManager {
|
||||
private:
|
||||
bool m_need_reload = false;
|
||||
GLuint m_block_status_array;
|
||||
GLuint m_texture_array;
|
||||
GLuint m_ui_array;
|
||||
void load_block_status(unsigned status_id);
|
||||
void load_block_texture(unsigned block_id);
|
||||
void load_ui_texture(unsigned id);
|
||||
|
||||
public:
|
||||
TextureManager();
|
||||
~TextureManager();
|
||||
|
||||
|
||||
void delet_texture();
|
||||
GLuint get_block_status_array() const;
|
||||
GLuint get_texture_array() const;
|
||||
GLuint get_ui_array() const;
|
||||
// Must call after MapTable::init_map() and glfwMakeContextCurrent(window);
|
||||
void init_texture();
|
||||
void hot_reload();
|
||||
void need_reload();
|
||||
void update();
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user