impr: Move OpenGL loaders into header to avoid issues in the future

This commit is contained in:
WerWolv
2023-11-20 23:58:49 +01:00
parent 3da209b562
commit fc23efdb25
6 changed files with 17 additions and 39 deletions

View File

@@ -9,13 +9,7 @@
#include <span>
#include <string>
#if defined(OS_WEB)
#define GLFW_INCLUDE_ES3
#include <GLES3/gl3.h>
#else
#include <imgui_impl_opengl3_loader.h>
#endif
#include <opengl_support.h>
#include <GLFW/glfw3.h>
namespace hex::gl {

View File

@@ -1,16 +1,11 @@
#include <hex/helpers/opengl.hpp>
#include <opengl_support.h>
#include <hex/helpers/utils.hpp>
#include <hex/helpers/logger.hpp>
#include <wolv/utils/guards.hpp>
#if defined(OS_WEB)
#define GLFW_INCLUDE_ES3
#include <GLES3/gl3.h>
#else
#include <imgui_impl_opengl3_loader.h>
#endif
namespace hex::gl {

View File

@@ -1,18 +1,8 @@
#include <hex/ui/imgui_imhex_extensions.h>
#if defined(OS_WEB)
#define IMGL3W_IMPL
#endif
#include <imgui.h>
#include <imgui_internal.h>
#if defined(OS_WEB)
#define GLFW_INCLUDE_ES3
#include <GLES3/gl3.h>
#else
#include <imgui_impl_opengl3_loader.h>
#endif
#include <opengl_support.h>
#undef IMGUI_DEFINE_MATH_OPERATORS

View File

@@ -0,0 +1,8 @@
#pragma once
#if defined(OS_WEB)
#define GLFW_INCLUDE_ES3
#include <GLES3/gl3.h>
#else
#include <imgui_impl_opengl3_loader.h>
#endif

View File

@@ -14,10 +14,14 @@
#include <imgui.h>
#include <imgui_internal.h>
#include <hex/ui/imgui_imhex_extensions.h>
#include <imgui_impl_glfw.h>
#include <imgui_impl_opengl3.h>
#include <fonts/fontawesome_font.h>
#include <GLFW/glfw3.h>
#include <opengl_support.h>
#include <fonts/fontawesome_font.h>
#include <wolv/utils/guards.hpp>
@@ -28,13 +32,6 @@
#include <numeric>
#include <random>
#if defined(OS_WEB)
#define GLFW_INCLUDE_ES3
#include <GLES3/gl3.h>
#include <emscripten/html5.h>
#else
#include <imgui_impl_opengl3_loader.h>
#endif
using namespace std::literals::chrono_literals;

View File

@@ -10,13 +10,7 @@
#include <imgui.h>
#include <implot.h>
#if defined(OS_WEB)
#define GLFW_INCLUDE_ES3
#include <GLES3/gl3.h>
#else
#include <imgui_impl_opengl3_loader.h>
#endif
#include <opengl_support.h>
#include <GLFW/glfw3.h>
#include <hex/ui/imgui_imhex_extensions.h>