From 3c1c392ab177566f09d11a380210e1937741fad2 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 28 May 2023 11:45:01 +0100 Subject: Swap GLEW for more modern glad --- ui/window.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ui/window.cpp') 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 +#include #include #include #include #include -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(glewGetErrorString(r))}; + if (const auto version = gladLoadGL(reinterpret_cast(SDL_GL_GetProcAddress)); version != 40006) { + throw std::runtime_error {std::to_string(version)}; } else { - return r; + return version; } }(); } -- cgit v1.2.3