diff options
| author | hachem <im@hachem.wtf> | 2025-08-12 18:12:37 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2025-08-12 18:12:37 +0200 |
| commit | a2ec7dabd48a70ea69623406ddd0f8f97af403c8 (patch) | |
| tree | 52d71b51753b88473607f5e97f8bc15bdb5ad7d3 /src/Core/Window.cpp | |
| parent | 16dff443789c7f1461b46ce52966972ae14c042b (diff) | |
[add]: Start of a basic rendering backend
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); |
