diff -r 262345e53050 -r 0eddb5bcf25b src/glShared.h --- a/src/glShared.h Sat Feb 18 02:02:29 2017 +0200 +++ b/src/glShared.h Mon Feb 20 07:56:21 2017 +0200 @@ -19,8 +19,33 @@ #pragma once #include +#include #include "basics.h" +class GLRotationMatrix : public QGenericMatrix<4, 4, GLfloat> +{ +public: + GLRotationMatrix() {} + GLRotationMatrix(GLfloat values[16]) : + QGenericMatrix<4, 4, GLfloat> {values} {} + GLRotationMatrix(std::initializer_list&& values) + { + auto iterator = values.begin(); + + for (int i = 0; i < 4; ++i) + for (int j = 0; j < 4; ++j) + { + (*this)(i, j) = *iterator; + ++iterator; + } + } +}; + +inline void glMultMatrixf(const GLRotationMatrix& matrix) +{ + glMultMatrixf(matrix.constData()); +} + class LDObject; struct LDPolygon