@ -13,6 +13,7 @@
// CHANGELOG
// CHANGELOG
// (minor and older changes stripped away, please see git history for details)
// (minor and older changes stripped away, please see git history for details)
// 2020-01-07: OpenGL: Added support for glbindings OpenGL loader.
// 2019-10-25: OpenGL: Using a combination of GL define and runtime GL version to decide whether to use glDrawElementsBaseVertex(). Fix building with pre-3.2 GL loaders.
// 2019-10-25: OpenGL: Using a combination of GL define and runtime GL version to decide whether to use glDrawElementsBaseVertex(). Fix building with pre-3.2 GL loaders.
// 2019-09-22: OpenGL: Detect default GL loader using __has_include compiler facility.
// 2019-09-22: OpenGL: Detect default GL loader using __has_include compiler facility.
// 2019-09-16: OpenGL: Tweak initialization code to allow application calling ImGui_ImplOpenGL3_CreateFontsTexture() before the first NewFrame() call.
// 2019-09-16: OpenGL: Tweak initialization code to allow application calling ImGui_ImplOpenGL3_CreateFontsTexture() before the first NewFrame() call.
@ -85,12 +86,14 @@
# undef IMGUI_IMPL_OPENGL_LOADER_GL3W
# undef IMGUI_IMPL_OPENGL_LOADER_GL3W
# undef IMGUI_IMPL_OPENGL_LOADER_GLEW
# undef IMGUI_IMPL_OPENGL_LOADER_GLEW
# undef IMGUI_IMPL_OPENGL_LOADER_GLAD
# undef IMGUI_IMPL_OPENGL_LOADER_GLAD
# undef IMGUI_IMPL_OPENGL_LOADER_GLBINDING
# undef IMGUI_IMPL_OPENGL_LOADER_CUSTOM
# undef IMGUI_IMPL_OPENGL_LOADER_CUSTOM
# elif defined(__EMSCRIPTEN__)
# elif defined(__EMSCRIPTEN__)
# define IMGUI_IMPL_OPENGL_ES2 // Emscripten -> GL ES 2, "#version 100"
# define IMGUI_IMPL_OPENGL_ES2 // Emscripten -> GL ES 2, "#version 100"
# undef IMGUI_IMPL_OPENGL_LOADER_GL3W
# undef IMGUI_IMPL_OPENGL_LOADER_GL3W
# undef IMGUI_IMPL_OPENGL_LOADER_GLEW
# undef IMGUI_IMPL_OPENGL_LOADER_GLEW
# undef IMGUI_IMPL_OPENGL_LOADER_GLAD
# undef IMGUI_IMPL_OPENGL_LOADER_GLAD
# undef IMGUI_IMPL_OPENGL_LOADER_GLBINDING
# undef IMGUI_IMPL_OPENGL_LOADER_CUSTOM
# undef IMGUI_IMPL_OPENGL_LOADER_CUSTOM
# endif
# endif
# endif
# endif
@ -115,6 +118,10 @@
# include <GL/glew.h> // Needs to be initialized with glewInit() in user's code
# include <GL/glew.h> // Needs to be initialized with glewInit() in user's code
# elif defined(IMGUI_IMPL_OPENGL_LOADER_GLAD)
# elif defined(IMGUI_IMPL_OPENGL_LOADER_GLAD)
# include <glad/glad.h> // Needs to be initialized with gladLoadGL() in user's code
# include <glad/glad.h> // Needs to be initialized with gladLoadGL() in user's code
# elif defined(IMGUI_IMPL_OPENGL_LOADER_GLBINDING)
# include <glbinding/gl/gl.h> // Initialize with glbinding::initialize()
# include <glbinding/glbinding.h>
using namespace gl ;
# else
# else
# include IMGUI_IMPL_OPENGL_LOADER_CUSTOM
# include IMGUI_IMPL_OPENGL_LOADER_CUSTOM
# endif
# endif
@ -186,6 +193,8 @@ bool ImGui_ImplOpenGL3_Init(const char* glsl_version)
gl_loader = " GLEW " ;
gl_loader = " GLEW " ;
# elif defined(IMGUI_IMPL_OPENGL_LOADER_GLAD)
# elif defined(IMGUI_IMPL_OPENGL_LOADER_GLAD)
gl_loader = " GLAD " ;
gl_loader = " GLAD " ;
# elif defined(IMGUI_IMPL_OPENGL_LOADER_GLBINDING)
gl_loader = " glbinding " ;
# else // IMGUI_IMPL_OPENGL_LOADER_CUSTOM
# else // IMGUI_IMPL_OPENGL_LOADER_CUSTOM
gl_loader = " Custom " ;
gl_loader = " Custom " ;
# endif
# endif