diff options
Diffstat (limited to 'src/Core/Window.cpp')
| -rw-r--r-- | src/Core/Window.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Core/Window.cpp b/src/Core/Window.cpp index 13025cf..440aeb1 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,15 @@ namespace Donut } glfwMakeContextCurrent(m_Window); + + // Initialize GLAD + if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)) + { + std::cout << "Failed to initialize GLAD!" << std::endl; + glfwTerminate(); + return; + } + glfwSetWindowUserPointer(m_Window, this); glfwSetErrorCallback(GLFWErrorCallback); |
