mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 03:58:47 +02:00
Backends: GL3: Implement glbinding opengl loader support. (#2870)
This commit is contained in:
@ -13,6 +13,7 @@
|
||||
|
||||
// CHANGELOG
|
||||
// (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-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.
|
||||
@ -85,12 +86,14 @@
|
||||
#undef IMGUI_IMPL_OPENGL_LOADER_GL3W
|
||||
#undef IMGUI_IMPL_OPENGL_LOADER_GLEW
|
||||
#undef IMGUI_IMPL_OPENGL_LOADER_GLAD
|
||||
#undef IMGUI_IMPL_OPENGL_LOADER_GLBINDING
|
||||
#undef IMGUI_IMPL_OPENGL_LOADER_CUSTOM
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
#define IMGUI_IMPL_OPENGL_ES2 // Emscripten -> GL ES 2, "#version 100"
|
||||
#undef IMGUI_IMPL_OPENGL_LOADER_GL3W
|
||||
#undef IMGUI_IMPL_OPENGL_LOADER_GLEW
|
||||
#undef IMGUI_IMPL_OPENGL_LOADER_GLAD
|
||||
#undef IMGUI_IMPL_OPENGL_LOADER_GLBINDING
|
||||
#undef IMGUI_IMPL_OPENGL_LOADER_CUSTOM
|
||||
#endif
|
||||
#endif
|
||||
@ -115,6 +118,10 @@
|
||||
#include <GL/glew.h> // Needs to be initialized with glewInit() in user's code
|
||||
#elif defined(IMGUI_IMPL_OPENGL_LOADER_GLAD)
|
||||
#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
|
||||
#include IMGUI_IMPL_OPENGL_LOADER_CUSTOM
|
||||
#endif
|
||||
@ -186,6 +193,8 @@ bool ImGui_ImplOpenGL3_Init(const char* glsl_version)
|
||||
gl_loader = "GLEW";
|
||||
#elif defined(IMGUI_IMPL_OPENGL_LOADER_GLAD)
|
||||
gl_loader = "GLAD";
|
||||
#elif defined(IMGUI_IMPL_OPENGL_LOADER_GLBINDING)
|
||||
gl_loader = "glbinding";
|
||||
#else // IMGUI_IMPL_OPENGL_LOADER_CUSTOM
|
||||
gl_loader = "Custom";
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user