Commit 34621d64 authored by Florian Oetke's avatar Florian Oetke

fixed imgui <-> glm conversion functions

parent b27cf8a3
Pipeline #3117 passed with stage
in 13 minutes and 8 seconds
......@@ -15,22 +15,12 @@
#include <glm/vec4.hpp>
#define IM_VEC2_CLASS_EXTRA \
constexpr ImVec2(const glm::vec2& f) \
{ \
x = f.x; \
y = f.y; \
} \
constexpr operator glm::vec2() const { return glm::vec2(x, y); }
#define IM_VEC4_CLASS_EXTRA \
constexpr ImVec4(const glm::vec4& f) \
{ \
x = f.x; \
y = f.y; \
z = f.z; \
w = f.w; \
} \
constexpr operator glm::vec4() const { return glm::vec4(x, y, z, w); }
#define IM_VEC2_CLASS_EXTRA \
ImVec2(const glm::vec2& f) : x(f.x), y(f.y) {} \
operator glm::vec2() const { return glm::vec2(x, y); }
#define IM_VEC4_CLASS_EXTRA \
ImVec4(const glm::vec4& f) : x(f.x), y(f.y), z(f.z), w(f.w) {} \
operator glm::vec4() const { return glm::vec4(x, y, z, w); }
#include <imgui.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment