]> git.localhorst.tv Git - blank.git/blobdiff - src/graphics/glm.hpp
glm backwards compatibility
[blank.git] / src / graphics / glm.hpp
diff --git a/src/graphics/glm.hpp b/src/graphics/glm.hpp
new file mode 100644 (file)
index 0000000..db886e0
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef BLANK_GRAPHICS_GLM_HPP_
+#define BLANK_GRAPHICS_GLM_HPP_
+
+#ifndef GLM_FORCE_RADIANS
+#  define GLM_FORCE_RADIANS 1
+#endif
+
+#include <glm/glm.hpp>
+
+// GLM moved tvec[1234] from glm::detail to glm in 0.9.6
+
+#if GLM_VERSION < 96
+#  define TVEC1 glm::detail::tvec1
+#  define TVEC2 glm::detail::tvec2
+#  define TVEC3 glm::detail::tvec3
+#  define TVEC4 glm::detail::tvec4
+#else
+#  define TVEC1 glm::tvec1
+#  define TVEC2 glm::tvec2
+#  define TVEC3 glm::tvec3
+#  define TVEC4 glm::tvec4
+#endif
+
+#endif