Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Glbinding loader library in OpenGL3 example. #2870

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions examples/example_sdl_opengl3/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
#include <GL/glew.h> // Initialize with glewInit()
#elif defined(IMGUI_IMPL_OPENGL_LOADER_GLAD)
#include <glad/glad.h> // Initialize with gladLoadGL()
#elif defined(IMGUI_IMPL_OPENGL_LOADER_GLBINDING)
#include <glbinding/gl/gl.h> // glbinding::Binding::initialize();
using namespace gl;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use same comment syntax as other comments above.

#else
#include IMGUI_IMPL_OPENGL_LOADER_CUSTOM
#endif
Expand Down
3 changes: 3 additions & 0 deletions examples/imgui_impl_opengl3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@
#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> // Needs to be initialized with gladLoadGL() in user's code
using namespace gl; // Has to be set to expose OpenGL to the global namespace
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong function name here.
May remove "Has to be set to".

#else
#include IMGUI_IMPL_OPENGL_LOADER_CUSTOM
#endif
Expand Down
2 changes: 2 additions & 0 deletions examples/imgui_impl_opengl3.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ IMGUI_IMPL_API void ImGui_ImplOpenGL3_DestroyDeviceObjects();
#define IMGUI_IMPL_OPENGL_LOADER_GLAD
#elif __has_include(<GL/gl3w.h>)
#define IMGUI_IMPL_OPENGL_LOADER_GL3W
#elif __has_include(<glbinding/gl/gl.h>)
#define IMGUI_IMPL_OPENGL_LOADER_GLBINDING
#else
#error "Cannot detect OpenGL loader!"
#endif
Expand Down