diff --git a/examples/imgui_impl_opengl3.cpp b/examples/imgui_impl_opengl3.cpp index 90358f6d8..1cd8c0513 100644 --- a/examples/imgui_impl_opengl3.cpp +++ b/examples/imgui_impl_opengl3.cpp @@ -57,8 +57,11 @@ #else #include // intptr_t #endif +#if defined(__APPLE__) +#include "TargetConditionals.h" +#endif -#ifdef __EMSCRIPTEN__ +#if (defined(__APPLE__) && TARGET_OS_IOS) || (defined(__EMSCRIPTEN__)) #include // Use GL ES 3 #else // About OpenGL function loaders: