mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-30 18:34:34 +01:00
Automatically include the available gl loader header
This commit is contained in:
parent
80b3ab7d3e
commit
44cd8e39da
@ -32,8 +32,20 @@
|
||||
&& !defined(IMGUI_IMPL_OPENGL_LOADER_GLEW) \
|
||||
&& !defined(IMGUI_IMPL_OPENGL_LOADER_GLAD) \
|
||||
&& !defined(IMGUI_IMPL_OPENGL_LOADER_CUSTOM)
|
||||
// to avoid problem with non-clang compilers not having this macro.
|
||||
#if defined(__has_include)
|
||||
// check if the header exists, then automatically define the macros ..
|
||||
#if __has_include(<GL/glew.h>)
|
||||
#define IMGUI_IMPL_OPENGL_LOADER_GLEW
|
||||
#elif __has_include(<glad/glad.h>)
|
||||
#define IMGUI_IMPL_OPENGL_LOADER_GLAD
|
||||
#else
|
||||
#define IMGUI_IMPL_OPENGL_LOADER_GL3W
|
||||
#endif
|
||||
#else
|
||||
#define IMGUI_IMPL_OPENGL_LOADER_GL3W
|
||||
#endif
|
||||
#endif
|
||||
|
||||
IMGUI_IMPL_API bool ImGui_ImplOpenGL3_Init(const char* glsl_version = NULL);
|
||||
IMGUI_IMPL_API void ImGui_ImplOpenGL3_Shutdown();
|
||||
|
Loading…
Reference in New Issue
Block a user