feat: add texture hot-reload

This commit is contained in:
2026-04-16 15:33:58 +08:00
parent cf9aaa62a7
commit 7d5b9c34b3
8 changed files with 59 additions and 9 deletions

View File

@@ -19,6 +19,10 @@ Window::~Window() {
glfwTerminate();
}
bool Window::is_mouse_enable() const {
return m_mouse_enable;
}
const GLFWwindow* Window::get_glfw_window() const {
return m_window;
}
@@ -97,4 +101,14 @@ void Window::toggle_fullscreen() {
);
}
update_viewport();
}
void Window::toggle_mouse_able() {
if (m_mouse_enable) {
glfwSetInputMode(m_window, GLFW_CURSOR, GLFW_CURSOR_DISABLED);
m_mouse_enable = false;
} else {
glfwSetInputMode(m_window, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
m_mouse_enable = true;
}
}