diff options
Diffstat (limited to 'src/core/window.cpp')
| -rw-r--r-- | src/core/window.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/window.cpp b/src/core/window.cpp index ab5b977..77ef885 100644 --- a/src/core/window.cpp +++ b/src/core/window.cpp @@ -1,6 +1,7 @@ #include "window.h" #include <cstdint> #include <iostream> +#include <glad/glad.h> namespace Donut { @@ -42,6 +43,14 @@ namespace Donut } glfwMakeContextCurrent(m_window); + + if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)) + { + std::cout << "Failed to initialize GLAD!" << std::endl; + glfwTerminate(); + return; + } + glfwSetWindowUserPointer(m_window, this); glfwSetErrorCallback(glfw_error_callback); |
