I am trying to get the implicit conversion between ImGui's (ImVec) and glm's (glm::vec) vector types working.
In here I read, that I have to change the following lines in the imconfig.h
file:
#define IM_VEC2_CLASS_EXTRA \
constexpr ImVec2(const MyVec2& f) : x(f.x), y(f.y) {} \
operator MyVec2() const { return MyVec2(x,y); }
#define IM_VEC4_CLASS_EXTRA \
constexpr ImVec4(const MyVec4& f) : x(f.x), y(f.y), z(f.z), w(f.w) {} \
operator MyVec4() const { return MyVec4(x,y,z,w); }
The first line makes sense to me, but I don't see the point of the second making a new constructor for MyVec.
Since I really have no idea what is going on here, I just tried to replace MyVecN
with either glm::vecN
or vecN
, but neither works.
Also I don't get why there are these backslashes, I guess they're to comment out? Either way, I removed them, and it still didn't work.
The compiler ends up throwing tons of errors so I don't know where the problem is.