summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/src')
-rw-r--r--app/src/app.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/src/app.c b/app/src/app.c
index b6d10ca..1e636af 100644
--- a/app/src/app.c
+++ b/app/src/app.c
@@ -1,5 +1,7 @@
1#include <gfx/app.h> 1#include <gfx/app.h>
2 2
3#include <glad/glad.h>
4
3#include <GLFW/glfw3.h> 5#include <GLFW/glfw3.h>
4#include <log/log.h> 6#include <log/log.h>
5#include <timer.h> 7#include <timer.h>
@@ -110,6 +112,12 @@ bool gfx_app_run(const GfxAppDesc* desc, const GfxAppCallbacks* callbacks) {
110 } 112 }
111 glfwMakeContextCurrent(g_gfx_app.window); 113 glfwMakeContextCurrent(g_gfx_app.window);
112 114
115 // Load GL before calling the application init clalback.
116 if (!gladLoadGL()) {
117 LOGE("Failed loading glad!");
118 return 0;
119 }
120
113 // Initialize the application's state before setting any callbacks. 121 // Initialize the application's state before setting any callbacks.
114 if (!(*g_gfx_app.callbacks.init)( 122 if (!(*g_gfx_app.callbacks.init)(
115 g_gfx_app.app_state, desc->argc, desc->argv)) { 123 g_gfx_app.app_state, desc->argc, desc->argv)) {