Skip to content

ImVec2 operator* is after imgui 19268 - #335

Open
sonoro1234 wants to merge 3 commits into
thedmd:masterfrom
sonoro1234:ImVec2operator
Open

ImVec2 operator* is after imgui 19268#335
sonoro1234 wants to merge 3 commits into
thedmd:masterfrom
sonoro1234:ImVec2operator

Conversation

@sonoro1234

Copy link
Copy Markdown

Solves #334 for building with latest imgui (not examples with old imgui for IM__TRUNC)

sonoro1234 and others added 3 commits April 23, 2026 17:37
Gate the 4 affected call sites (1 PathStroke + 3 AddRect) on
IMGUI_VERSION_NUM < 19276 — last two args (flags, thickness) were
swapped to (thickness, flags) in ocornut/imgui v1.92.8.
Fix for ImGui 1.92.8 AddRect/PathStroke arg swap

@samehhhhhhhh samehhhhhhhh left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works with latest master

@sonoro1234

sonoro1234 commented Aug 12, 2026

Copy link
Copy Markdown
Author

@samehhhhhhhh

çIt does not: checkout master, add PR #339
compile:

[  2%] Building CXX object CMakeFiles/cimgui_base.dir/cimnodes_editor/imgui-node-editor/imgui_node_editor.cpp.obj
In file included from C:\LuaGL\gitsources\anima\LuaJIT-ImGui\cimnodes_editor\imgui-node-editor\imgui_extra_math.h:73,
                 from C:\LuaGL\gitsources\anima\LuaJIT-ImGui\cimnodes_editor\imgui-node-editor\imgui_node_editor_internal.h:27,
                 from C:\LuaGL\gitsources\anima\LuaJIT-ImGui\cimnodes_editor\imgui-node-editor\imgui_node_editor.cpp:12:
C:\LuaGL\gitsources\anima\LuaJIT-ImGui\cimnodes_editor\imgui-node-editor\imgui_extra_math.inl:34:15: error: redefinition of 'ImVec2 operator*(float, const ImVec2&)'
   34 | inline ImVec2 operator*(const float lhs, const ImVec2& rhs)
      |               ^~~~~~~~
In file included from C:\LuaGL\gitsources\anima\LuaJIT-ImGui\cimnodes_editor\imgui-node-editor\imgui_node_editor.h:18,
                 from C:\LuaGL\gitsources\anima\LuaJIT-ImGui\cimnodes_editor\imgui-node-editor\imgui_node_editor_internal.h:21:
C:/LuaGL/gitsources/anima/LuaJIT-ImGui/cimgui/imgui/imgui.h:3075:16: note: 'ImVec2 operator*(float, const ImVec2&)' previously defined here
 3075 | inline ImVec2  operator*(const float lhs, const ImVec2& rhs)    { return ImVec2(lhs * rhs.x, lhs * rhs.y); }
      |                ^~~~~~~~
mingw32-make[2]: *** [CMakeFiles\cimgui_base.dir\build.make:511: CMakeFiles/cimgui_base.dir/cimnodes_editor/imgui-node-editor/imgui_node_editor.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:88: CMakeFiles/cimgui_base.dir/all] Error 2
mingw32-make: *** [Makefile:135: all] Error 2

@samehhhhhhhh

Copy link
Copy Markdown

@sonoro1234

Yeah sorry, that's what i meant, i did exactly that and it works !

@sonoro1234

sonoro1234 commented Aug 12, 2026

Copy link
Copy Markdown
Author

Yeah sorry, that's what i meant, i did exactly that and it works !

exactly that?:

gives error shown above: error: redefinition of 'ImVec2 operator*(float, const ImVec2&)

You have to try with last imgui version!!

@samehhhhhhhh

Copy link
Copy Markdown

🤣🤣🤣 to make myself cleaaaar,

I did what you told me in the last messages ! Checked out on master and added your pr manually by editing the files your fix is good, i was stuck without it for a good hour ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants