Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GameDevWeek
Dependencies
Cpp
mirrage
Commits
34621d64
Commit
34621d64
authored
Apr 01, 2019
by
Florian Oetke
Browse files
fixed imgui <-> glm conversion functions
parent
b27cf8a3
Pipeline
#3117
passed with stage
in 13 minutes and 8 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/mirrage/gui/include/mirrage/gui/gui.hpp
View file @
34621d64
...
...
@@ -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>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment