summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author0scar <qgt268@alumni.ku.dk>2024-02-06 20:30:39 +0000
committer0scar <qgt268@alumni.ku.dk>2024-02-06 20:35:13 +0000
commitc458a90fa76b5fbfe6c584ab2a77ecc057ce41a4 (patch)
tree834ad8e1e7224ecc45383bdc8e0b4adfee6f9f2c
parentbc51deef41a445a0dfc16701267988f06a816136 (diff)
Fix setting swap interval without GL contex
-rw-r--r--src/rendering/src/window.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/rendering/src/window.c b/src/rendering/src/window.c
index ce5544a..1ddaf47 100644
--- a/src/rendering/src/window.c
+++ b/src/rendering/src/window.c
@@ -36,7 +36,7 @@ void window_size_callback(GLFWwindow* window, int width, int height) {
GladGLContext* create_context(GLFWwindow *window) {
glfwMakeContextCurrent(window);
- GladGLContext* context = (GladGLContext*) calloc(1, sizeof(GladGLContext));
+ GladGLContext* context = (GladGLContext*)malloc(sizeof(GladGLContext));
if (!context) return NULL;
int version = gladLoadGLContext(context, glfwGetProcAddress);
@@ -98,9 +98,6 @@ Window init_window_glfw(
// TODO: input handler callback
glfwSetFramebufferSizeCallback(window, window_size_callback);
- // Minor tweaks
- glfwSwapInterval(0);
-
// Create the window datastructure
ret = (Window)calloc(1, sizeof(Window));
ret->framework = WINDOW_FRAMEWORK_GLFW;