-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Configurable OpenGL loader in the example bindings. #2002
Conversation
imgui.h
Outdated
&& !defined(IMGUI_IMPL_OPENGL_LOADER_CUSTOM) | ||
#define IMGUI_IMPL_OPENGL_LOADER_GL3W | ||
#endif | ||
|
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.
This has to be in imgui_impl_opengl3.h and not imgui.h
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.
Ok done. Btw should imgui_impl_opengl3.h
also #include "imgui.h"
? Since IMGUI_IMPL_API
is defined in imgui.h
, it would be a compile error if the include order were reversed in client code.
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.
You are right, but since things have been working well without until now so I wouldn’t change it. This is in case in the future we add user-defines that affect the visibility or certain elements of imgui.h (like we do for imgui_internals.h). The implicit order constraint allows us to keep this a possibility without affecting end-user code.
Ok glfw+opengl3 should work on Linux with glad/gl3w/glew. Let me know if there's anything else you'd like to change. |
@jdumas This is merged now, thanks! (see 2 commits above, made some minor tweaks + applied to the SDL + OpenGL3). Thanks again! I removed the |
Hmm not really using |
This is not ready to merge yet, but I'm opening this PR so we can discuss changes related to #2001.
For now I've only added the glad backend for glfw+opengl3. I believe sdl+opengl3 will be the only other example needing a custom OpenGL loader.
I'll start with gl3w/glad/glew for now, as they are the more popular. Then we may add other loaders from this list, but honestly I'm not sure which one are popular enough so they should be added outside of this 3.