-
-
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
No way to use custom OpenGL ES loader #5861
Comments
See also #4810 It's somewhat intentional that you can't provide your own loader. In the past Dear ImGui required you to provide your own loader and it was an endless source of headaches and confusion, which is why we use our own. Another alternative might be to define |
Wouldn't it be ok to provide additional ways to configure Dear ImGui? Now that there is a default loader, the existing codebases shouldn't break if a way to use your own loader is implemented. And also because there is a default loader, the only ones using custom loaders would be users, who, hopefully, know what they are doing.
I considered that, but it seems like a pretty hacky way to solve the problem. There is also an option of creating my own imgui_impl_opengl3.cpp, and using it instead, but my version would differ only slightly from the original, and that is why I thought implementing a small change can provide more flexibility to imgui_impl_opengl3.cpp for those who need it. |
It sounds like a legitimate advanced scenario to me, but Omar has the final say. I think the main concern is that if there's an obvious escape hatch for specifying your own loader people will use it for the wrong reasons. A very common source of issues around here are university students using broken project templates provided by their professors with borderline insane configuration choices. Another less common problem is third party package maintainers making weird configuration defaults on behalf of their consumers. I can definitely see an overzealous package maintainer thinking "Why should we distribute
It's sort of what it's intended for (it's specifically meant to support single file/unity builds), but yeah I get that. |
It's not a matter of configuring Dear ImGui here. So the real question for me, why doesn't imgui_impl_opengl3.cpp work with ANGLE because afaik ANGLE provides ES compatible headers? |
It does, but the problem is with imgui's shenanigans with cross-platform code that includes ES headers from some random places according to the platform-specific defines, but I can't recall my problem fully now that this much time has passed. |
Note I had the same issue today as well but it was relatively easy to fix. You just need to link the ImGui library to the libEGL.dll.lib of ANGLE and make sure |
Branch of Dear ImGui:
Branch: master
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_opengl3.cpp + imgui_impl_glfw.cpp
My Issue/Question:
In my project I'm using OpenGL ES 3 backend provided by ANGLE which implements it using other graphical backends. I would like to use ImGui in this project, but I don't see any other way to do this without changing imgui_impl_opengl3.cpp code other than:
#define IMGUI_IMPL_OPENGL_ES3
<GLES3/gl3.h>
include path corresponds to the chosen OpenGL ES loader library (in my case, glad).It would have been so much easier, and more customizable, if there was a way to provide the path to the loader using a define, for example:
UPD:
Also I didn't take in consideration, that since I'm using OpenGL ES 3 this wouldn't solve the issue completely, because the rest of the code should also be changed, as if IMGUI_IMPL_OPENGL_ES3 was defined, but with this define the solution provided by me isn't going to work. So to solve this issue there should be a way to provide a path to custom loader, but also define IMGUI_IMPL_OPENGL_ES3 to change the rest of the code appropriately.
The text was updated successfully, but these errors were encountered: