diff options
author | sanine-a <sanine.not@pm.me> | 2020-05-20 22:40:44 -0500 |
---|---|---|
committer | sanine-a <sanine.not@pm.me> | 2020-05-20 22:40:44 -0500 |
commit | c3a41085272644709d891bf04137a6c2bd901230 (patch) | |
tree | 24a6b7e82af426428741f3f9cf2976509e9769c4 /src/honey_setup.c | |
parent | c6ec37cd355b313083af5be3435162224020fe5e (diff) |
add overridable update() and draw() callbacks
Diffstat (limited to 'src/honey_setup.c')
-rw-r--r-- | src/honey_setup.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/honey_setup.c b/src/honey_setup.c deleted file mode 100644 index 247c325..0000000 --- a/src/honey_setup.c +++ /dev/null @@ -1,28 +0,0 @@ -#include "include/honey.h" - -honey_window honey_setup(int screen_width, int screen_height, char* window_title) { - glfwInit(); - glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); - glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); - glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - - honey_window window = glfwCreateWindow(screen_width, screen_height, window_title, NULL, NULL); - if (window == NULL) { - fprintf(stderr, "ERROR: failed to create window!\n"); - glfwTerminate(); - return NULL; - } - - glfwMakeContextCurrent(window); - glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED); - - if (!gladLoadGLLoader((GLADloadproc) glfwGetProcAddress)) { - fprintf(stderr, "ERROR: failed to initialize GLAD!\n"); - glfwTerminate(); - return NULL; - } - - return window; -} - - |