done with imperative shell/ffi aspect of sending KEY_ESC to update thread when that action has occurred

This commit is contained in:
2024-11-08 09:46:01 +00:00
parent a4dea7626f
commit 6e66d4c968
5 changed files with 33 additions and 0 deletions

View File

@@ -6,6 +6,7 @@
int PRESS = GLFW_PRESS;
int REPEAT = GLFW_REPEAT;
int RELEASE = GLFW_RELEASE;
int KEY_ESC = GLFW_KEY_ESCAPE;
void framebufferSizeCallback(GLFWwindow* window, int width, int height) {
glViewport(0, 0, width, height);
@@ -24,3 +25,11 @@ void setCharCallback(GLFWwindow* window) {
glfwSetCharCallback(window, charCallback);
}
void keyCallback(GLFWwindow *window, int key, int scancode, int action, int mods) {
mltonKeyCallback(key, scancode, action, mods);
}
void setKeyCallback(GLFWwindow *window) {
glfwSetKeyCallback(window, keyCallback);
}