diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-05-12 14:14:06 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-05-12 14:14:06 +0200 |
| commit | 7b214503608550dc2853b9e01526723f8c65baf3 (patch) | |
| tree | ddbc37eb2627b43eb33774bd2bf205336cd1a9e6 /src/glfw.c | |
| parent | d07d87964f13d3c1e6ad8c2f6d7db21101f1ef34 (diff) | |
| download | scop-7b214503608550dc2853b9e01526723f8c65baf3.tar.gz scop-7b214503608550dc2853b9e01526723f8c65baf3.tar.bz2 scop-7b214503608550dc2853b9e01526723f8c65baf3.zip | |
Added mat4 in libftm, can rotate, scale and translate vector
Diffstat (limited to 'src/glfw.c')
| -rw-r--r-- | src/glfw.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -6,12 +6,18 @@ /* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/05/11 01:58:00 by charles #+# #+# */ -/* Updated: 2020/05/11 09:41:51 by charles ### ########.fr */ +/* Updated: 2020/05/12 13:58:51 by charles ### ########.fr */ /* */ /* ************************************************************************** */ #include "scop.h" +void st_resize_callback(GLFWwindow *window, int width, int height) +{ + (void)window; + glViewport(0, 0, width, height); +} + GLFWwindow *glfw_init(int width, int height) { GLFWwindow *window; @@ -28,6 +34,7 @@ GLFWwindow *glfw_init(int width, int height) return (NULL); } glfwMakeContextCurrent(window); + glfwSetFramebufferSizeCallback(window, st_resize_callback); if (glewInit() != GLEW_OK) { glfwDestroyWindow(window); @@ -35,6 +42,6 @@ GLFWwindow *glfw_init(int width, int height) return (NULL); } glfwSwapInterval(1); - glViewport(0, 0, width, height); + /* glViewport(0, 0, width, height); */ return (window); } |
