hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/src/core/window.cpp
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2025-08-12 18:12:37 +0200
committerhachem <im@hachem.wtf>2025-08-12 18:12:37 +0200
commit50cdd344a3ed87c75a67739e2ffd34762e9b0895 (patch)
tree2a4a107e92687236c6676296281b89e14f8eac01 /src/core/window.cpp
parentdbe642e5e26cf2bd99218f727157b58c7fed286e (diff)
feat: start of a basic rendering backend
Diffstat (limited to 'src/core/window.cpp')
-rw-r--r--src/core/window.cpp9
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);