progress in handling variable window width/height (mostly only in imperative shell though)

This commit is contained in:
2024-12-16 00:58:59 +00:00
parent cc7f30f718
commit 20c4060124
7 changed files with 39 additions and 19 deletions

View File

@@ -18,3 +18,13 @@ void keyCallback(GLFWwindow* window, int key, int scancode, int action, int mods
void setKeyCallback(GLFWwindow* window) {
glfwSetKeyCallback(window, keyCallback);
}
void framebufferSizeCallback(GLFWwindow* window, int width, int height) {
glViewport(0, 0, width, height);
mltonFramebufferSizeCallback((float) width, (float) height);
}
void setFramebufferSizeCallback(GLFWwindow* window) {
glfwSetFramebufferSizeCallback(window, framebufferSizeCallback);
}