aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/src/app.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/app/src/app.c b/app/src/app.c
index 9b816ee..e1edf88 100644
--- a/app/src/app.c
+++ b/app/src/app.c
@@ -112,10 +112,14 @@ bool gfx_app_run(const GfxAppDesc* desc, const GfxAppCallbacks* callbacks) {
112 } 112 }
113 glfwMakeContextCurrent(g_gfx_app.window); 113 glfwMakeContextCurrent(g_gfx_app.window);
114 114
115 // Load GL before calling the application init clalback. 115 // Request adaptive sync if supported.
116 if (!gladLoadGL()) { 116 glfwSwapInterval(-1);
117 LOGE("Failed loading glad!"); 117
118 return 0; 118 // Load GL before calling the application init callback.
119 // Use the GLFW loader. See: https://github.com/apitrace/apitrace/issues/954
120 if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)) {
121 LOGE("Failed loading glad");
122 goto cleanup;
119 } 123 }
120 124
121 // Initialize the application's state before setting any callbacks. 125 // Initialize the application's state before setting any callbacks.