Integration in Unity builds / Single translation unit projects #4646
jsancheznet
started this conversation in
Build/Link/Run/Fonts issues ONLY!
Replies: 2 comments
-
As of 1.84 Dear ImGui's OpenGL 3 backend uses its own minimal OpenGL loader, you can read more details about this here: #4445 In your case, the Dear ImGui loader and Glad are conflicting since you're building them in the same translation unit. I believe the easiest workaround in your case would be to define |
Beta Was this translation helpful? Give feedback.
0 replies
-
@PathogenDavid Defining Thank you! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, i'm failing to integrate Dear ImGui in my project which is just one single .cpp file. I'm using SDL backend + OpenGL 3 + glad opengl loader.
TLDR: What is the proper way to integrate Dear ImGUI in projects that use unity builds/single translation unit compilation?
The following is the full story.
I started by succesfully compiling and executing example_sdl_opengl3 by rearranging this:
to this:
So i naturally tried the same on my project, just to have dear imgui clash with glad.
MSVC spits out this error:
So i thought about including glad before Dear ImGui:
And then i get big list of warnings for macro redefinitions for each opengl function Dear ImGui loaded plus a few errors.
If i remove glad from my project, gladLoadGL is not defined and i cant call OpenGL functions.
What is the proper way to integrate Dear ImGUI in projects that use unity builds/single translation unit compilation?
thank you for your time.
Beta Was this translation helpful? Give feedback.
All reactions