Closed xenogenesi closed 3 years ago
Thanks for reporting this 👍
Looks like IMGUI_IMPL_OPENGL_LOADER_GL3W
wasn't defined anywhere in this project, and it worked on my machine anyway because imgui_impl_opengl3.h
tries to find the loader even if it wasn't defined:
// Otherwise try to detect supported Desktop OpenGL loaders..
#elif defined(__has_include)
#if __has_include(<GL/glew.h>)
#define IMGUI_IMPL_OPENGL_LOADER_GLEW
#elif __has_include(<glad/glad.h>)
#define IMGUI_IMPL_OPENGL_LOADER_GLAD
#elif __has_include(<glad/gl.h>)
#define IMGUI_IMPL_OPENGL_LOADER_GLAD2
#elif __has_include(<GL/gl3w.h>)
#define IMGUI_IMPL_OPENGL_LOADER_GL3W
#elif __has_include(<glbinding/glbinding.h>)
#define IMGUI_IMPL_OPENGL_LOADER_GLBINDING3
#elif __has_include(<glbinding/Binding.h>)
#define IMGUI_IMPL_OPENGL_LOADER_GLBINDING2
#else
#error "Cannot detect OpenGL loader!"
#endif
I defined the gl3w loader explicitly in https://github.com/Nelarius/imnodes/commit/868dda60d5829aec9a736cec7ff6be1299d543c0, so this hopefully doesn't happen to the next person.
Thanks for sharing imnodes!
I'm on Debian/sid, took a bit to figure out that I needed to undefine glew and define gl3w.
If I didn't, ld fail for missing glew symbols, linking glew works but then obviously isn't initialized, glCreateShader is null and the application segv.
edit
Just
#define IMGUI_IMPL_OPENGL_LOADER_GL3W
(is checked first) independencies/imgui-1.80/imconfig.h
to fix it.