From f8bad7e1e31713e6d5c66fa71fa78b66a620adda Mon Sep 17 00:00:00 2001 From: Siarhei Fiedartsou Date: Tue, 24 Aug 2021 16:26:55 +0300 Subject: [PATCH] Backends: OpenGL3: Add TargetConditionals.h (#4473) + standardize include --- backends/imgui_impl_opengl3.cpp | 3 +++ backends/imgui_impl_opengl3.h | 2 +- backends/imgui_impl_sdl.cpp | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/backends/imgui_impl_opengl3.cpp b/backends/imgui_impl_opengl3.cpp index 5637a0fe..eb583a7f 100644 --- a/backends/imgui_impl_opengl3.cpp +++ b/backends/imgui_impl_opengl3.cpp @@ -105,6 +105,9 @@ #include #endif #elif defined(IMGUI_IMPL_OPENGL_ES3) +#if defined(__APPLE__) +#include +#endif #if (defined(__APPLE__) && (TARGET_OS_IOS || TARGET_OS_TV)) #include // Use GL ES 3 #else diff --git a/backends/imgui_impl_opengl3.h b/backends/imgui_impl_opengl3.h index b1fb49c7..98c9aca1 100644 --- a/backends/imgui_impl_opengl3.h +++ b/backends/imgui_impl_opengl3.h @@ -42,7 +42,7 @@ IMGUI_IMPL_API void ImGui_ImplOpenGL3_DestroyDeviceObjects(); // Try to detect GLES on matching platforms #if defined(__APPLE__) -#include "TargetConditionals.h" +#include #endif #if (defined(__APPLE__) && (TARGET_OS_IOS || TARGET_OS_TV)) || (defined(__ANDROID__)) #define IMGUI_IMPL_OPENGL_ES3 // iOS, Android -> GL ES 3, "#version 300 es" diff --git a/backends/imgui_impl_sdl.cpp b/backends/imgui_impl_sdl.cpp index f5677646..669c7b77 100644 --- a/backends/imgui_impl_sdl.cpp +++ b/backends/imgui_impl_sdl.cpp @@ -57,7 +57,7 @@ #include #include #if defined(__APPLE__) -#include "TargetConditionals.h" +#include #endif #if SDL_VERSION_ATLEAST(2,0,4) && !defined(__EMSCRIPTEN__) && !defined(__ANDROID__) && !(defined(__APPLE__) && TARGET_OS_IOS)