mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
impr: Move OpenGL loaders into header to avoid issues in the future
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
8
lib/third_party/imgui/custom/include/opengl_support.h
vendored
Normal file
8
lib/third_party/imgui/custom/include/opengl_support.h
vendored
Normal 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
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user