diff --git a/src/nostalgia/core/glfw/core.cpp b/src/nostalgia/core/glfw/core.cpp index 590c98b9..1125cd1f 100644 --- a/src/nostalgia/core/glfw/core.cpp +++ b/src/nostalgia/core/glfw/core.cpp @@ -2,9 +2,9 @@ * Copyright 2016 - 2022 Gary Talent (gary@drinkingtea.net). All rights reserved. */ +#include #include -#include #include #include #include diff --git a/src/nostalgia/core/glfw/gfx.cpp b/src/nostalgia/core/glfw/gfx.cpp index 28d20fbe..791c1d55 100644 --- a/src/nostalgia/core/glfw/gfx.cpp +++ b/src/nostalgia/core/glfw/gfx.cpp @@ -2,6 +2,7 @@ * Copyright 2016 - 2022 Gary Talent (gary@drinkingtea.net). All rights reserved. */ +#include #include #include @@ -109,6 +110,9 @@ ox::Error initGfx(Context *ctx) noexcept { glfwSetKeyCallback(id->window, handleGlfwKeyEvent); glfwSetWindowUserPointer(id->window, ctx); glfwMakeContextCurrent(id->window); + if (!gladLoadGLES2Loader(reinterpret_cast(glfwGetProcAddress))) { + return OxError(2, "Could not init Glad"); + } if constexpr(config::ImGuiEnabled) { IMGUI_CHECKVERSION(); ImGui::CreateContext(); diff --git a/src/nostalgia/glutils/glutils.hpp b/src/nostalgia/glutils/glutils.hpp index 942ac514..c3ffaae1 100644 --- a/src/nostalgia/glutils/glutils.hpp +++ b/src/nostalgia/glutils/glutils.hpp @@ -6,15 +6,7 @@ #include -#define GL_GLEXT_PROTOTYPES 1 -#ifdef OX_OS_Darwin -#ifndef GL_SILENCE_DEPRECATION -#define GL_SILENCE_DEPRECATION -#endif -#include -#else #include -#endif #include #include