summaryrefslogtreecommitdiff
path: root/ui/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ui/window.cpp')
-rw-r--r--ui/window.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/window.cpp b/ui/window.cpp
index 731996a..93e85bd 100644
--- a/ui/window.cpp
+++ b/ui/window.cpp
@@ -1,20 +1,20 @@
#include "window.h"
#include "uiComponent.h"
#include "worldOverlay.h"
-#include <GL/glew.h>
+#include <glad/gl.h>
#include <glm/glm.hpp>
#include <stdexcept>
#include <tuple>
#include <type_traits>
-Window::GlewInitHelper::GlewInitHelper()
+Window::GLInitHelper::GLInitHelper()
{
[[maybe_unused]] static auto init = []() {
- if (const auto r = glewInit(); r != GLEW_OK) {
- throw std::runtime_error {reinterpret_cast<const char *>(glewGetErrorString(r))};
+ if (const auto version = gladLoadGL(reinterpret_cast<GLADloadfunc>(SDL_GL_GetProcAddress)); version != 40006) {
+ throw std::runtime_error {std::to_string(version)};
}
else {
- return r;
+ return version;
}
}();
}