-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Conversation
@@ -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; |
There was a problem hiding this comment.
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.
@@ -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 |
There was a problem hiding this comment.
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".
Thank you for the PR @ilia-glushchenko
Thank you! |
An assignment is also missing in |
Hello @ilia-glushchenko, |
Hello @ocornut, |
This has now been solved by @rokups (apart from missing makefile update, we will do that soon) |
For the moment I have only the older 2.x series available on my system which uses slightly different header filenames and initialisation, so as a slight variation of the 3.x series support recently implemented here the glue needed to make 2.x series work. I would hope a potential 4.x will not change filenames and such, so the existing flag isn't rebranded to 3 which also avoids breaking compat. References: ocornut#2870, 5e2329b
For the moment I have only the older 2.x series available on my system which uses slightly different header filenames and initialisation, so as a slight variation of the 3.x series support recently implemented here the glue needed to make 2.x series work. I would hope a potential 4.x will not change filenames and such, so the existing flag isn't rebranded to 3 which also avoids breaking compat. References: ocornut#2870, 5e2329b
For the moment I have only the older 2.x series available on my system which uses slightly different header filenames and initialisation, so as a slight variation of the 3.x series support recently implemented here the glue needed to make 2.x series work as well. As having a versioned and a unversioned definition is deemed to confusing we use the unversioned definition for auto-detection on supporting compilers and add two versioned definitions for explicit requests. References: ocornut#2870, 5e2329b
For the moment I have only the older 2.x series available on my system which uses slightly different header filenames and initialisation, so as a slight variation of the 3.x series support recently implemented here the glue needed to make 2.x series work as well. This removes the unversioned definition IMGUI_IMPL_OPENGL_LOADER_GLBINDING in favour of two versioned ones to choose explicitly. References: ocornut#2870, 5e2329b
…r OpenGL3 (ocornut#3061) This removes the unversioned definition IMGUI_IMPL_OPENGL_LOADER_GLBINDING in favor of two versioned ones to choose explicitly. References: ocornut#2870, 5e2329b
Hello!
I think it is a good time to add support for https://github.com/cginternals/glbinding to ImGui.
Since there is already a compile-time check in place for a couple of popular GL bindings libraries such as Glad and Gl3w.
I think this is a shame that we still don't have out of the box support for Glbinding. This is a modern fancy OpenGL biding library that many (myself included) enjoy using.
I really like using example OpenGL3 IMGUI rendering implementation in my projects (and I'm pretty sure many others do as well) as a simple and cheap out of the box solution. However, I also don't really like to modify or do some custom things with my modules, such as adding my custom define statements, which is my main motivation for this PR.
Thanks!