Skip to content
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

Customization of imgui causes build error '_FringeScale': is not a member of 'ImDrawList' #25

Closed
CaptainCMake opened this issue Jul 1, 2019 · 2 comments

Comments

@CaptainCMake
Copy link

I already had an official copy of the imgui library in my program and when I added imgui-node-editor, I get this build error when my codebase references the official imgui.h:

'_FringeScale': is not a member of 'ImDrawList'

The following commit added _FringeScale to ThirdParty/imgui/imgui.h:
11d2dca

However, I don't see any reference to it in the official imgui repo:
https://github.com/ocornut/imgui

This customization to imgui means I have to use your custom version of imgui throughout my codebase. Even when I built imgui-node-editor, other libraries in my codebase would reference the official imgui.h, which doesn't have _FringeScale. I suggest contributing this change and any other customizations to the imgui project and only consume them once they are merged to master.

If you really want a custom imgui, please rename the source and the public interfaces so that it can coexist with the official imgui library.

thedmd added a commit that referenced this issue Jul 2, 2019
This change mage _FringeScale extension optional and make canvas
compile without it. SFINAE is used to detect if member variable
is present.

Fringe scale extension to ImDrawList make zoomed geometry look sharp.
It is available here:
https://github.com/thedmd/imgui/tree/feature/draw-list-fringe-scale
@thedmd
Copy link
Owner

thedmd commented Jul 2, 2019

I made use of _FringeScale optional. What it does it allow anti-aliased geometry look sharp when zoomed in (or out). Extension is available here feature/draw-list-fringe-scale. I do have plan to propose this as a PR, or at least start discussion about it on official ImGui repo.

I'm aiming to use vanilla copy of ImGui. Last month I made changes that made this goal viable.

Node Editor depends also from feature/extra-keys, PR is in the queue. Omar is busy at the moment, so there is not way to tell when things will move forward.
I also made similar change to make use of extra key optional. At this point node editor should work with vanilla ImGui copy. As a drawback 'F' (zoom to content) and duplicate action will never be invoked.

thedmd added a commit that referenced this issue Jul 2, 2019
ImGuiKey_D and ImGuiKey_F are used in node editor only if they
are defined in ImGuiKey_ enum.

This commit can be removed when/if ocornut/imgui#2625
PR will be merged.
thedmd added a commit that referenced this issue Jul 2, 2019
This change mage _FringeScale extension optional and make canvas
compile without it. SFINAE is used to detect if member variable
is present.

Fringe scale extension to ImDrawList make zoomed geometry look sharp.
It is available here:
https://github.com/thedmd/imgui/tree/feature/draw-list-fringe-scale
thedmd added a commit that referenced this issue Jul 2, 2019
ImGuiKey_D and ImGuiKey_F are used in node editor only if they
are defined in ImGuiKey_ enum.

This commit can be removed when/if ocornut/imgui#2625
PR will be merged.
@thedmd
Copy link
Owner

thedmd commented Jul 2, 2019

I tested changes on vanilla copy of ImGui and node editor compile fine without errors.

You can now use node editor with your local copy of ImGui. ⚡

As a note, project had cleanup recently:

  • Node Editor is now completely contained inside NodeEditor directory
  • main header was renamed to imgui_node_editor.h
  • picojson is gone

Please let me know if you need anything.

@thedmd thedmd closed this as completed Jul 2, 2019
fdfxalex pushed a commit to fdfxalex/imgui-node-editor that referenced this issue Dec 31, 2019
This change mage _FringeScale extension optional and make canvas
compile without it. SFINAE is used to detect if member variable
is present.

Fringe scale extension to ImDrawList make zoomed geometry look sharp.
It is available here:
https://github.com/thedmd/imgui/tree/feature/draw-list-fringe-scale
fdfxalex pushed a commit to fdfxalex/imgui-node-editor that referenced this issue Dec 31, 2019
ImGuiKey_D and ImGuiKey_F are used in node editor only if they
are defined in ImGuiKey_ enum.

This commit can be removed when/if ocornut/imgui#2625
PR will be merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants