diff --git a/.dir-local.el b/.dir-local.el new file mode 100644 index 0000000..c882478 --- /dev/null +++ b/.dir-local.el @@ -0,0 +1 @@ +((c-mode . ((mode . c++)))) diff --git a/1504168289.png b/1504168289.png new file mode 100644 index 0000000..fa1c43a Binary files /dev/null and b/1504168289.png differ diff --git a/1504168338.png b/1504168338.png new file mode 100644 index 0000000..029d2a2 Binary files /dev/null and b/1504168338.png differ diff --git a/comp.txt b/comp.txt deleted file mode 100644 index 0861b0a..0000000 --- a/comp.txt +++ /dev/null @@ -1,1907 +0,0 @@ -[ 2%] Building CXX object CMakeFiles/vtk.dir/src/game.cpp.o -In file included from /home/user/dev/voxeltronik/src/game.cpp:22:0: -/home/user/dev/voxeltronik/./include/graphics/glstate.h:17:14: error: expected ‘{’ before ‘::’ token - namespace vtk::gls { - ^ -/home/user/dev/voxeltronik/./include/graphics/glstate.h:17:16: error: ‘gls’ in namespace ‘::’ does not name a type - namespace vtk::gls { - ^ -In file included from /home/user/dev/voxeltronik/src/game.cpp:28:0: -/usr/include/glm/gtc/matrix_transform.hpp:86:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/matrix_transform.hpp:87:16: error: ‘tmat4x4’ does not name a type - GLM_FUNC_DECL tmat4x4 translate( - ^ -/usr/include/glm/gtc/matrix_transform.hpp:100:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/matrix_transform.hpp:101:16: error: ‘tmat4x4’ does not name a type - GLM_FUNC_DECL tmat4x4 rotate( - ^ -/usr/include/glm/gtc/matrix_transform.hpp:114:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/matrix_transform.hpp:115:16: error: ‘tmat4x4’ does not name a type - GLM_FUNC_DECL tmat4x4 scale( - ^ -/usr/include/glm/gtc/matrix_transform.hpp:131:16: error: ‘tmat4x4’ does not name a type - GLM_FUNC_DECL tmat4x4 ortho( - ^ -/usr/include/glm/gtc/matrix_transform.hpp:149:16: error: ‘tmat4x4’ does not name a type - GLM_FUNC_DECL tmat4x4 ortho( - ^ -/usr/include/glm/gtc/matrix_transform.hpp:166:16: error: ‘tmat4x4’ does not name a type - GLM_FUNC_DECL tmat4x4 frustum( - ^ -In file included from /home/user/dev/voxeltronik/src/game.cpp:28:0: -/usr/include/glm/gtc/matrix_transform.hpp:183:16: error: ‘tmat4x4’ does not name a type - GLM_FUNC_DECL tmat4x4 perspective( - ^ -/usr/include/glm/gtc/matrix_transform.hpp:199:16: error: ‘tmat4x4’ does not name a type - GLM_FUNC_DECL tmat4x4 perspectiveFov( - ^ -/usr/include/glm/gtc/matrix_transform.hpp:214:16: error: ‘tmat4x4’ does not name a type - GLM_FUNC_DECL tmat4x4 infinitePerspective( - ^ -/usr/include/glm/gtc/matrix_transform.hpp:225:16: error: ‘tmat4x4’ does not name a type - GLM_FUNC_DECL tmat4x4 tweakedInfinitePerspective( - ^ -/usr/include/glm/gtc/matrix_transform.hpp:237:16: error: ‘tmat4x4’ does not name a type - GLM_FUNC_DECL tmat4x4 tweakedInfinitePerspective( - ^ -/usr/include/glm/gtc/matrix_transform.hpp:250:36: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/matrix_transform.hpp:251:16: error: ‘tvec3’ does not name a type - GLM_FUNC_DECL tvec3 project( - ^ -/usr/include/glm/gtc/matrix_transform.hpp:267:36: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/matrix_transform.hpp:268:16: error: ‘tvec3’ does not name a type - GLM_FUNC_DECL tvec3 unProject( - ^ -/usr/include/glm/gtc/matrix_transform.hpp:282:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/matrix_transform.hpp:283:16: error: ‘tmat4x4’ does not name a type - GLM_FUNC_DECL tmat4x4 pickMatrix( - ^ -/usr/include/glm/gtc/matrix_transform.hpp:295:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/matrix_transform.hpp:296:16: error: ‘tmat4x4’ does not name a type - GLM_FUNC_DECL tmat4x4 lookAt( - ^ -In file included from /usr/include/glm/gtc/matrix_transform.hpp:304:0, - from /home/user/dev/voxeltronik/src/game.cpp:28: -/usr/include/glm/gtc/matrix_transform.inl:39:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/matrix_transform.inl:40:21: error: ‘tmat4x4’ does not name a type - GLM_FUNC_QUALIFIER tmat4x4 translate - ^ -/usr/include/glm/gtc/matrix_transform.inl:51:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/matrix_transform.inl:52:21: error: ‘tmat4x4’ does not name a type - GLM_FUNC_QUALIFIER tmat4x4 rotate - ^ -/usr/include/glm/gtc/matrix_transform.inl:87:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/matrix_transform.inl:88:21: error: ‘tmat4x4’ does not name a type - GLM_FUNC_QUALIFIER tmat4x4 rotate_slow - ^ -/usr/include/glm/gtc/matrix_transform.inl:121:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/matrix_transform.inl:122:21: error: ‘tmat4x4’ does not name a type - GLM_FUNC_QUALIFIER tmat4x4 scale - ^ -/usr/include/glm/gtc/matrix_transform.inl:136:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/matrix_transform.inl:137:21: error: ‘tmat4x4’ does not name a type - GLM_FUNC_QUALIFIER tmat4x4 scale_slow - ^ -/usr/include/glm/gtc/matrix_transform.inl:151:21: error: ‘tmat4x4’ does not name a type - GLM_FUNC_QUALIFIER tmat4x4 ortho - ^ -/usr/include/glm/gtc/matrix_transform.inl:172:21: error: ‘tmat4x4’ does not name a type - GLM_FUNC_QUALIFIER tmat4x4 ortho - ^ -/usr/include/glm/gtc/matrix_transform.inl:190:21: error: ‘tmat4x4’ does not name a type - GLM_FUNC_QUALIFIER tmat4x4 frustum - ^ -/usr/include/glm/gtc/matrix_transform.inl:212:21: error: ‘tmat4x4’ does not name a type - GLM_FUNC_QUALIFIER tmat4x4 perspective - ^ -/usr/include/glm/gtc/matrix_transform.inl:235:21: error: ‘tmat4x4’ does not name a type - GLM_FUNC_QUALIFIER tmat4x4 perspectiveFov - ^ -/usr/include/glm/gtc/matrix_transform.inl:262:21: error: ‘tmat4x4’ does not name a type - GLM_FUNC_QUALIFIER tmat4x4 infinitePerspective - ^ -/usr/include/glm/gtc/matrix_transform.inl:286:21: error: ‘tmat4x4’ does not name a type - GLM_FUNC_QUALIFIER tmat4x4 tweakedInfinitePerspective - ^ -/usr/include/glm/gtc/matrix_transform.inl:310:21: error: ‘tmat4x4’ does not name a type - GLM_FUNC_QUALIFIER tmat4x4 tweakedInfinitePerspective - ^ -/usr/include/glm/gtc/matrix_transform.inl:320:36: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/matrix_transform.inl:321:21: error: ‘tvec3’ does not name a type - GLM_FUNC_QUALIFIER tvec3 project - ^ -/usr/include/glm/gtc/matrix_transform.inl:341:36: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/matrix_transform.inl:342:21: error: ‘tvec3’ does not name a type - GLM_FUNC_QUALIFIER tvec3 unProject - ^ -/usr/include/glm/gtc/matrix_transform.inl:363:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/matrix_transform.inl:364:21: error: ‘tmat4x4’ does not name a type - GLM_FUNC_QUALIFIER tmat4x4 pickMatrix - ^ -/usr/include/glm/gtc/matrix_transform.inl:387:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/matrix_transform.inl:388:21: error: ‘tmat4x4’ does not name a type - GLM_FUNC_QUALIFIER tmat4x4 lookAt - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:66:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/quaternion.hpp:62:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:82:12: error: ‘length_t’ does not name a type - typedef length_t length_type; - ^ -/usr/include/glm/gtc/quaternion.hpp:84:32: error: ‘length_type’ does not name a type - GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const; - ^ -/usr/include/glm/gtc/quaternion.hpp:86:33: error: declaration of ‘operator[]’ as non-function - GLM_FUNC_DECL T & operator[](length_type i); - ^ -/usr/include/glm/gtc/quaternion.hpp:86:31: error: expected ‘;’ at end of member declaration - GLM_FUNC_DECL T & operator[](length_type i); - ^ -/usr/include/glm/gtc/quaternion.hpp:86:45: error: expected ‘)’ before ‘i’ - GLM_FUNC_DECL T & operator[](length_type i); - ^ -/usr/include/glm/gtc/quaternion.hpp:87:39: error: declaration of ‘operator[]’ as non-function - GLM_FUNC_DECL T const & operator[](length_type i) const; - ^ -/usr/include/glm/gtc/quaternion.hpp:87:37: error: expected ‘;’ at end of member declaration - GLM_FUNC_DECL T const & operator[](length_type i) const; - ^ -/usr/include/glm/gtc/quaternion.hpp:87:51: error: expected ‘)’ before ‘i’ - GLM_FUNC_DECL T const & operator[](length_type i) const; - ^ -/usr/include/glm/gtc/quaternion.hpp:94:13: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:100:36: error: only declarations of constructors can be ‘explicit’ - GLM_FUNC_DECL explicit tquat(ctor); - ^ -/usr/include/glm/gtc/quaternion.hpp:101:45: error: ‘tvec3’ has not been declared - GLM_FUNC_DECL explicit tquat(T const & s, tvec3 const & v); - ^ -/usr/include/glm/gtc/quaternion.hpp:101:50: error: expected ‘,’ or ‘...’ before ‘<’ token - GLM_FUNC_DECL explicit tquat(T const & s, tvec3 const & v); - ^ -/usr/include/glm/gtc/quaternion.hpp:111:26: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:117:36: error: ‘tmat3x3’ does not name a type - GLM_FUNC_DECL explicit operator tmat3x3(); - ^ -/usr/include/glm/gtc/quaternion.hpp:118:36: error: ‘tmat4x4’ does not name a type - GLM_FUNC_DECL explicit operator tmat4x4(); - ^ -/usr/include/glm/gtc/quaternion.hpp:127:37: error: expected ‘)’ before ‘<’ token - GLM_FUNC_DECL explicit tquat(tvec3 const & u, tvec3 const & v); - ^ -/usr/include/glm/gtc/quaternion.hpp:130:37: error: expected ‘)’ before ‘<’ token - GLM_FUNC_DECL explicit tquat(tvec3 const & eulerAngles); - ^ -/usr/include/glm/gtc/quaternion.hpp:131:39: error: expected ‘)’ before ‘<’ token - GLM_FUNC_DECL explicit tquat(tmat3x3 const & m); - ^ -/usr/include/glm/gtc/quaternion.hpp:132:39: error: expected ‘)’ before ‘<’ token - GLM_FUNC_DECL explicit tquat(tmat4x4 const & m); - ^ -/usr/include/glm/gtc/quaternion.hpp:142:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:145:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:148:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:151:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:152:16: error: ‘tvec3’ does not name a type - GLM_FUNC_DECL tvec3 operator*(tquat const & q, tvec3 const & v); - ^ -/usr/include/glm/gtc/quaternion.hpp:154:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:155:16: error: ‘tvec3’ does not name a type - GLM_FUNC_DECL tvec3 operator*(tvec3 const & v, tquat const & q); - ^ -/usr/include/glm/gtc/quaternion.hpp:157:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:158:16: error: ‘tvec4’ does not name a type - GLM_FUNC_DECL tvec4 operator*(tquat const & q, tvec4 const & v); - ^ -/usr/include/glm/gtc/quaternion.hpp:160:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:161:16: error: ‘tvec4’ does not name a type - GLM_FUNC_DECL tvec4 operator*(tvec4 const & v, tquat const & q); - ^ -/usr/include/glm/gtc/quaternion.hpp:163:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:166:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:169:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:175:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:181:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:187:24: error: ‘precision’ has not been declared - template class quatType> - ^ -/usr/include/glm/gtc/quaternion.hpp:187:57: error: ‘precision’ has not been declared - template class quatType> - ^ -/usr/include/glm/gtc/quaternion.hpp:200:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:211:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:222:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:228:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:234:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:244:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:245:75: error: ‘tvec3’ has not been declared - GLM_FUNC_DECL tquat rotate(tquat const & q, T const & angle, tvec3 const & axis); - ^ -/usr/include/glm/gtc/quaternion.hpp:245:80: error: expected ‘,’ or ‘...’ before ‘<’ token - GLM_FUNC_DECL tquat rotate(tquat const & q, T const & angle, tvec3 const & axis); - ^ -/usr/include/glm/gtc/quaternion.hpp:251:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:252:16: error: ‘tvec3’ does not name a type - GLM_FUNC_DECL tvec3 eulerAngles(tquat const & x); - ^ -/usr/include/glm/gtc/quaternion.hpp:257:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:263:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:269:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:275:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:276:16: error: ‘tmat3x3’ does not name a type - GLM_FUNC_DECL tmat3x3 mat3_cast(tquat const & x); - ^ -/usr/include/glm/gtc/quaternion.hpp:281:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:282:16: error: ‘tmat4x4’ does not name a type - GLM_FUNC_DECL tmat4x4 mat4_cast(tquat const & x); - ^ -/usr/include/glm/gtc/quaternion.hpp:287:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:288:38: error: template declaration of ‘vtk::glm::tquat vtk::glm::quat_cast’ - GLM_FUNC_DECL tquat quat_cast(tmat3x3 const & x); - ^ -/usr/include/glm/gtc/quaternion.hpp:288:38: error: ‘tmat3x3’ was not declared in this scope -/usr/include/glm/gtc/quaternion.hpp:288:38: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:38:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_mat.hpp:51:44: note: ‘glm::tmat3x3’ - template struct tmat3x3; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:66:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/quaternion.hpp:288:47: error: expected primary-expression before ‘,’ token - GLM_FUNC_DECL tquat quat_cast(tmat3x3 const & x); - ^ -/usr/include/glm/gtc/quaternion.hpp:288:52: error: expected primary-expression before ‘const’ - GLM_FUNC_DECL tquat quat_cast(tmat3x3 const & x); - ^ -/usr/include/glm/gtc/quaternion.hpp:293:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:294:38: error: template declaration of ‘vtk::glm::tquat vtk::glm::quat_cast’ - GLM_FUNC_DECL tquat quat_cast(tmat4x4 const & x); - ^ -/usr/include/glm/gtc/quaternion.hpp:294:38: error: ‘tmat4x4’ was not declared in this scope -/usr/include/glm/gtc/quaternion.hpp:294:38: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:38:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_mat.hpp:55:44: note: ‘glm::tmat4x4’ - template struct tmat4x4; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:66:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/quaternion.hpp:294:47: error: expected primary-expression before ‘,’ token - GLM_FUNC_DECL tquat quat_cast(tmat4x4 const & x); - ^ -/usr/include/glm/gtc/quaternion.hpp:294:52: error: expected primary-expression before ‘const’ - GLM_FUNC_DECL tquat quat_cast(tmat4x4 const & x); - ^ -/usr/include/glm/gtc/quaternion.hpp:299:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:305:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:306:16: error: ‘tvec3’ does not name a type - GLM_FUNC_DECL tvec3 axis(tquat const & x); - ^ -/usr/include/glm/gtc/quaternion.hpp:314:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:315:55: error: ‘tvec3’ has not been declared - GLM_FUNC_DECL tquat angleAxis(T const & angle, tvec3 const & axis); - ^ -/usr/include/glm/gtc/quaternion.hpp:315:60: error: expected ‘,’ or ‘...’ before ‘<’ token - GLM_FUNC_DECL tquat angleAxis(T const & angle, tvec3 const & axis); - ^ -/usr/include/glm/gtc/quaternion.hpp:322:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:323:16: error: ‘tvec4’ does not name a type - GLM_FUNC_DECL tvec4 lessThan(tquat const & x, tquat const & y); - ^ -/usr/include/glm/gtc/quaternion.hpp:330:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:331:16: error: ‘tvec4’ does not name a type - GLM_FUNC_DECL tvec4 lessThanEqual(tquat const & x, tquat const & y); - ^ -/usr/include/glm/gtc/quaternion.hpp:338:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:339:16: error: ‘tvec4’ does not name a type - GLM_FUNC_DECL tvec4 greaterThan(tquat const & x, tquat const & y); - ^ -/usr/include/glm/gtc/quaternion.hpp:346:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:347:16: error: ‘tvec4’ does not name a type - GLM_FUNC_DECL tvec4 greaterThanEqual(tquat const & x, tquat const & y); - ^ -/usr/include/glm/gtc/quaternion.hpp:354:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:355:16: error: ‘tvec4’ does not name a type - GLM_FUNC_DECL tvec4 equal(tquat const & x, tquat const & y); - ^ -/usr/include/glm/gtc/quaternion.hpp:362:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.hpp:363:16: error: ‘tvec4’ does not name a type - GLM_FUNC_DECL tvec4 notEqual(tquat const & x, tquat const & y); - ^ -In file included from /usr/include/glm/gtc/quaternion.hpp:367:0, - from /usr/include/glm/gtc/type_ptr.hpp:66, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/quaternion.inl:41:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:42:9: error: ‘compute_dot’ is not a class template - struct compute_dot - ^ -/usr/include/glm/gtc/quaternion.inl: In static member function ‘static T vtk::glm::detail::compute_dot::call(const vtk::glm::tquat&, const vtk::glm::tquat&)’: -/usr/include/glm/gtc/quaternion.inl:46:4: error: ‘tvec4’ was not declared in this scope - tvec4 tmp(x.x * y.x, x.y * y.y, x.z * y.z, x.w * y.w); - ^ -/usr/include/glm/gtc/quaternion.inl:46:4: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:37:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_vec.hpp:43:44: note: ‘glm::tvec4’ - template struct tvec4; - ^ -In file included from /usr/include/glm/gtc/quaternion.hpp:367:0, - from /usr/include/glm/gtc/type_ptr.hpp:66, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/quaternion.inl:46:11: error: expected primary-expression before ‘,’ token - tvec4 tmp(x.x * y.x, x.y * y.y, x.z * y.z, x.w * y.w); - ^ -/usr/include/glm/gtc/quaternion.inl:47:12: error: ‘tmp’ was not declared in this scope - return (tmp.x + tmp.y) + (tmp.z + tmp.w); - ^ -/usr/include/glm/gtc/quaternion.inl: At global scope: -/usr/include/glm/gtc/quaternion.inl:76:25: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:77:92: error: no ‘constexpr typename vtk::glm::tquat::length_type vtk::glm::tquat::length() const’ member function declared in class ‘vtk::glm::tquat’ - GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tquat::length_type tquat::length() const - ^ -/usr/include/glm/gtc/quaternion.inl:82:25: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:83:85: error: no ‘T& vtk::glm::tquat::operator[](typename vtk::glm::tquat::length_type)’ member function declared in class ‘vtk::glm::tquat’ - GLM_FUNC_QUALIFIER T & tquat::operator[](typename tquat::length_type i) - ^ -/usr/include/glm/gtc/quaternion.inl:89:25: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:90:93: error: no ‘const T& vtk::glm::tquat::operator[](typename vtk::glm::tquat::length_type) const’ member function declared in class ‘vtk::glm::tquat’ - GLM_FUNC_QUALIFIER T const & tquat::operator[](typename tquat::length_type i) const - ^ -/usr/include/glm/gtc/quaternion.inl:100:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:107:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:108:12: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:116:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:117:44: error: ‘vtk::glm::tquat::tquat’ declared as an ‘inline’ variable - GLM_FUNC_QUALIFIER tquat::tquat(ctor) - ^ -/usr/include/glm/gtc/quaternion.inl:117:44: error: ‘int vtk::glm::tquat::tquat’ is not a static member of ‘struct vtk::glm::tquat’ -/usr/include/glm/gtc/quaternion.inl:117:44: error: template definition of non-template ‘int vtk::glm::tquat::tquat’ -In file included from /usr/include/glm/gtc/type_ptr.hpp:66:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/quaternion.hpp:100:36: error: invalid use of non-static data member ‘vtk::glm::tquat::ctor’ - GLM_FUNC_DECL explicit tquat(ctor); - ^ -In file included from /usr/include/glm/gtc/quaternion.hpp:367:0, - from /usr/include/glm/gtc/type_ptr.hpp:66, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/quaternion.inl:117:40: error: from this location - GLM_FUNC_QUALIFIER tquat::tquat(ctor) - ^ -/usr/include/glm/gtc/quaternion.inl:120:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:121:53: error: ‘tvec3’ has not been declared - GLM_FUNC_QUALIFIER tquat::tquat(T const & s, tvec3 const & v) - ^ -/usr/include/glm/gtc/quaternion.inl:121:58: error: expected ‘,’ or ‘...’ before ‘<’ token - GLM_FUNC_QUALIFIER tquat::tquat(T const & s, tvec3 const & v) - ^ -/usr/include/glm/gtc/quaternion.inl: In constructor ‘vtk::glm::tquat::tquat(const T&, int)’: -/usr/include/glm/gtc/quaternion.inl:122:7: error: ‘v’ was not declared in this scope - : x(v.x), y(v.y), z(v.z), w(s) - ^ -/usr/include/glm/gtc/quaternion.inl: At global scope: -/usr/include/glm/gtc/quaternion.inl:125:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:133:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:134:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:160:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:161:40: error: ‘vtk::glm::tquat::tquat’ declared as an ‘inline’ variable - GLM_FUNC_QUALIFIER tquat::tquat(tvec3 const & u, tvec3 const & v) - ^ -/usr/include/glm/gtc/quaternion.inl:161:40: error: ‘int vtk::glm::tquat::tquat’ is not a static member of ‘struct vtk::glm::tquat’ -/usr/include/glm/gtc/quaternion.inl:161:40: error: template definition of non-template ‘int vtk::glm::tquat::tquat’ -/usr/include/glm/gtc/quaternion.inl:161:40: error: ‘tvec3’ was not declared in this scope -/usr/include/glm/gtc/quaternion.inl:161:40: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:37:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_vec.hpp:42:44: note: ‘glm::tvec3’ - template struct tvec3; - ^ -In file included from /usr/include/glm/gtc/quaternion.hpp:367:0, - from /usr/include/glm/gtc/type_ptr.hpp:66, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/quaternion.inl:161:47: error: expected primary-expression before ‘,’ token - GLM_FUNC_QUALIFIER tquat::tquat(tvec3 const & u, tvec3 const & v) - ^ -/usr/include/glm/gtc/quaternion.inl:161:52: error: expected primary-expression before ‘const’ - GLM_FUNC_QUALIFIER tquat::tquat(tvec3 const & u, tvec3 const & v) - ^ -/usr/include/glm/gtc/quaternion.inl:161:63: error: ‘tvec3’ was not declared in this scope - GLM_FUNC_QUALIFIER tquat::tquat(tvec3 const & u, tvec3 const & v) - ^ -/usr/include/glm/gtc/quaternion.inl:161:63: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:37:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_vec.hpp:42:44: note: ‘glm::tvec3’ - template struct tvec3; - ^ -In file included from /usr/include/glm/gtc/quaternion.hpp:367:0, - from /usr/include/glm/gtc/type_ptr.hpp:66, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/quaternion.inl:161:70: error: expected primary-expression before ‘,’ token - GLM_FUNC_QUALIFIER tquat::tquat(tvec3 const & u, tvec3 const & v) - ^ -/usr/include/glm/gtc/quaternion.inl:161:75: error: expected primary-expression before ‘const’ - GLM_FUNC_QUALIFIER tquat::tquat(tvec3 const & u, tvec3 const & v) - ^ -/usr/include/glm/gtc/quaternion.inl:170:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:171:40: error: ‘vtk::glm::tquat::tquat’ declared as an ‘inline’ variable - GLM_FUNC_QUALIFIER tquat::tquat(tvec3 const & eulerAngle) - ^ -/usr/include/glm/gtc/quaternion.inl:171:40: error: ‘int vtk::glm::tquat::tquat’ is not a static member of ‘struct vtk::glm::tquat’ -/usr/include/glm/gtc/quaternion.inl:171:40: error: template definition of non-template ‘int vtk::glm::tquat::tquat’ -/usr/include/glm/gtc/quaternion.inl:171:40: error: ‘tvec3’ was not declared in this scope -/usr/include/glm/gtc/quaternion.inl:171:40: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:37:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_vec.hpp:42:44: note: ‘glm::tvec3’ - template struct tvec3; - ^ -In file included from /usr/include/glm/gtc/quaternion.hpp:367:0, - from /usr/include/glm/gtc/type_ptr.hpp:66, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/quaternion.inl:171:47: error: expected primary-expression before ‘,’ token - GLM_FUNC_QUALIFIER tquat::tquat(tvec3 const & eulerAngle) - ^ -/usr/include/glm/gtc/quaternion.inl:171:52: error: expected primary-expression before ‘const’ - GLM_FUNC_QUALIFIER tquat::tquat(tvec3 const & eulerAngle) - ^ -/usr/include/glm/gtc/quaternion.inl:182:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:183:40: error: ‘vtk::glm::tquat::tquat’ declared as an ‘inline’ variable - GLM_FUNC_QUALIFIER tquat::tquat(tmat3x3 const & m) - ^ -/usr/include/glm/gtc/quaternion.inl:183:40: error: ‘int vtk::glm::tquat::tquat’ is not a static member of ‘struct vtk::glm::tquat’ -/usr/include/glm/gtc/quaternion.inl:183:40: error: template definition of non-template ‘int vtk::glm::tquat::tquat’ -/usr/include/glm/gtc/quaternion.inl:183:40: error: ‘tmat3x3’ was not declared in this scope -/usr/include/glm/gtc/quaternion.inl:183:40: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:38:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_mat.hpp:51:44: note: ‘glm::tmat3x3’ - template struct tmat3x3; - ^ -In file included from /usr/include/glm/gtc/quaternion.hpp:367:0, - from /usr/include/glm/gtc/type_ptr.hpp:66, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/quaternion.inl:183:49: error: expected primary-expression before ‘,’ token - GLM_FUNC_QUALIFIER tquat::tquat(tmat3x3 const & m) - ^ -/usr/include/glm/gtc/quaternion.inl:183:54: error: expected primary-expression before ‘const’ - GLM_FUNC_QUALIFIER tquat::tquat(tmat3x3 const & m) - ^ -/usr/include/glm/gtc/quaternion.inl:188:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:189:40: error: ‘vtk::glm::tquat::tquat’ declared as an ‘inline’ variable - GLM_FUNC_QUALIFIER tquat::tquat(tmat4x4 const & m) - ^ -/usr/include/glm/gtc/quaternion.inl:189:40: error: ‘int vtk::glm::tquat::tquat’ is not a static member of ‘struct vtk::glm::tquat’ -/usr/include/glm/gtc/quaternion.inl:189:40: error: template definition of non-template ‘int vtk::glm::tquat::tquat’ -/usr/include/glm/gtc/quaternion.inl:189:40: error: ‘tmat4x4’ was not declared in this scope -/usr/include/glm/gtc/quaternion.inl:189:40: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:38:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_mat.hpp:55:44: note: ‘glm::tmat4x4’ - template struct tmat4x4; - ^ -In file included from /usr/include/glm/gtc/quaternion.hpp:367:0, - from /usr/include/glm/gtc/type_ptr.hpp:66, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/quaternion.inl:189:49: error: expected primary-expression before ‘,’ token - GLM_FUNC_QUALIFIER tquat::tquat(tmat4x4 const & m) - ^ -/usr/include/glm/gtc/quaternion.inl:189:54: error: expected primary-expression before ‘const’ - GLM_FUNC_QUALIFIER tquat::tquat(tmat4x4 const & m) - ^ -/usr/include/glm/gtc/quaternion.inl:195:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:196:43: error: ‘tmat3x3’ does not name a type - GLM_FUNC_QUALIFIER tquat::operator tmat3x3() - ^ -/usr/include/glm/gtc/quaternion.inl:201:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:202:43: error: ‘tmat4x4’ does not name a type - GLM_FUNC_QUALIFIER tquat::operator tmat4x4() - ^ -/usr/include/glm/gtc/quaternion.inl:208:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:214:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:223:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:233:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:245:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:255:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:268:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:274:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:280:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:287:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:288:21: error: ‘tvec3’ does not name a type - GLM_FUNC_QUALIFIER tvec3 operator*(tquat const & q, tvec3 const & v) - ^ -/usr/include/glm/gtc/quaternion.inl:297:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:298:21: error: ‘tvec3’ does not name a type - GLM_FUNC_QUALIFIER tvec3 operator*(tvec3 const & v, tquat const & q) - ^ -/usr/include/glm/gtc/quaternion.inl:303:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:304:21: error: ‘tvec4’ does not name a type - GLM_FUNC_QUALIFIER tvec4 operator*(tquat const & q, tvec4 const & v) - ^ -/usr/include/glm/gtc/quaternion.inl:309:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:310:21: error: ‘tvec4’ does not name a type - GLM_FUNC_QUALIFIER tvec4 operator*(tvec4 const & v, tquat const & q) - ^ -/usr/include/glm/gtc/quaternion.inl:315:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:322:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:328:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:338:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:344:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:351:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl: In function ‘T vtk::glm::length(const vtk::glm::tquat&)’: -/usr/include/glm/gtc/quaternion.inl:354:10: error: ‘sqrt’ is not a member of ‘vtk::glm’ - return glm::sqrt(dot(q, q)); - ^ -/usr/include/glm/gtc/quaternion.inl:354:10: note: suggested alternatives: -In file included from /usr/include/features.h:368:0, - from /usr/include/stdint.h:25, - from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/include/stdint.h:9, - from /usr/include/GL/glew.h:229, - from /home/user/dev/voxeltronik/./include/game.h:21, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/bits/mathcalls.h:156:1: note: ‘sqrt’ - __MATHCALL (sqrt,, (_Mdouble_ __x)); - ^ -In file included from /usr/include/glm/detail/_fixes.hpp:33:0, - from /usr/include/glm/glm.hpp:81, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/include/g++-v4/cmath:494:5: note: ‘std::sqrt’ - sqrt(_Tp __x) - ^ -In file included from /usr/include/features.h:368:0, - from /usr/include/stdint.h:25, - from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/include/stdint.h:9, - from /usr/include/GL/glew.h:229, - from /home/user/dev/voxeltronik/./include/game.h:21, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/bits/mathcalls.h:156:1: note: ‘sqrt’ - __MATHCALL (sqrt,, (_Mdouble_ __x)); - ^ -In file included from /usr/include/glm/gtc/quaternion.hpp:367:0, - from /usr/include/glm/gtc/type_ptr.hpp:66, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/quaternion.inl: At global scope: -/usr/include/glm/gtc/quaternion.inl:357:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:367:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:453:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:476:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:486:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:519:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:520:80: error: ‘tvec3’ has not been declared - GLM_FUNC_QUALIFIER tquat rotate(tquat const & q, T const & angle, tvec3 const & v) - ^ -/usr/include/glm/gtc/quaternion.inl:520:85: error: expected ‘,’ or ‘...’ before ‘<’ token - GLM_FUNC_QUALIFIER tquat rotate(tquat const & q, T const & angle, tvec3 const & v) - ^ -/usr/include/glm/gtc/quaternion.inl: In function ‘vtk::glm::tquat vtk::glm::rotate(const vtk::glm::tquat&, const T&, int)’: -/usr/include/glm/gtc/quaternion.inl:522:3: error: ‘tvec3’ was not declared in this scope - tvec3 Tmp = v; - ^ -/usr/include/glm/gtc/quaternion.inl:522:3: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:37:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_vec.hpp:42:44: note: ‘glm::tvec3’ - template struct tvec3; - ^ -In file included from /usr/include/glm/gtc/quaternion.hpp:367:0, - from /usr/include/glm/gtc/type_ptr.hpp:66, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/quaternion.inl:522:10: error: expected primary-expression before ‘,’ token - tvec3 Tmp = v; - ^ -/usr/include/glm/gtc/quaternion.inl:522:15: error: ‘Tmp’ was not declared in this scope - tvec3 Tmp = v; - ^ -/usr/include/glm/gtc/quaternion.inl:522:21: error: ‘v’ was not declared in this scope - tvec3 Tmp = v; - ^ -/usr/include/glm/gtc/quaternion.inl: At global scope: -/usr/include/glm/gtc/quaternion.inl:541:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:542:21: error: ‘tvec3’ does not name a type - GLM_FUNC_QUALIFIER tvec3 eulerAngles(tquat const & x) - ^ -/usr/include/glm/gtc/quaternion.inl:547:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:553:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:559:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:565:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:566:21: error: ‘tmat3x3’ does not name a type - GLM_FUNC_QUALIFIER tmat3x3 mat3_cast(tquat const & q) - ^ -/usr/include/glm/gtc/quaternion.inl:593:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:594:21: error: ‘tmat4x4’ does not name a type - GLM_FUNC_QUALIFIER tmat4x4 mat4_cast(tquat const & q) - ^ -/usr/include/glm/gtc/quaternion.inl:599:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:600:43: error: ‘vtk::glm::quat_cast’ declared as an ‘inline’ variable - GLM_FUNC_QUALIFIER tquat quat_cast(tmat3x3 const & m) - ^ -/usr/include/glm/gtc/quaternion.inl:600:43: error: template declaration of ‘vtk::glm::tquat vtk::glm::quat_cast’ -/usr/include/glm/gtc/quaternion.inl:600:43: error: ‘tmat3x3’ was not declared in this scope -/usr/include/glm/gtc/quaternion.inl:600:43: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:38:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_mat.hpp:51:44: note: ‘glm::tmat3x3’ - template struct tmat3x3; - ^ -In file included from /usr/include/glm/gtc/quaternion.hpp:367:0, - from /usr/include/glm/gtc/type_ptr.hpp:66, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/quaternion.inl:600:52: error: expected primary-expression before ‘,’ token - GLM_FUNC_QUALIFIER tquat quat_cast(tmat3x3 const & m) - ^ -/usr/include/glm/gtc/quaternion.inl:600:57: error: expected primary-expression before ‘const’ - GLM_FUNC_QUALIFIER tquat quat_cast(tmat3x3 const & m) - ^ -/usr/include/glm/gtc/quaternion.inl:663:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:664:43: error: ‘vtk::glm::quat_cast’ declared as an ‘inline’ variable - GLM_FUNC_QUALIFIER tquat quat_cast(tmat4x4 const & m4) - ^ -/usr/include/glm/gtc/quaternion.inl:664:43: error: template declaration of ‘vtk::glm::tquat vtk::glm::quat_cast’ -/usr/include/glm/gtc/quaternion.inl:664:43: error: ‘tmat4x4’ was not declared in this scope -/usr/include/glm/gtc/quaternion.inl:664:43: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:38:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_mat.hpp:55:44: note: ‘glm::tmat4x4’ - template struct tmat4x4; - ^ -In file included from /usr/include/glm/gtc/quaternion.hpp:367:0, - from /usr/include/glm/gtc/type_ptr.hpp:66, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/quaternion.inl:664:52: error: expected primary-expression before ‘,’ token - GLM_FUNC_QUALIFIER tquat quat_cast(tmat4x4 const & m4) - ^ -/usr/include/glm/gtc/quaternion.inl:664:57: error: expected primary-expression before ‘const’ - GLM_FUNC_QUALIFIER tquat quat_cast(tmat4x4 const & m4) - ^ -/usr/include/glm/gtc/quaternion.inl:669:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:675:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:676:21: error: ‘tvec3’ does not name a type - GLM_FUNC_QUALIFIER tvec3 axis(tquat const & x) - ^ -/usr/include/glm/gtc/quaternion.inl:685:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:686:60: error: ‘tvec3’ has not been declared - GLM_FUNC_QUALIFIER tquat angleAxis(T const & angle, tvec3 const & v) - ^ -/usr/include/glm/gtc/quaternion.inl:686:65: error: expected ‘,’ or ‘...’ before ‘<’ token - GLM_FUNC_QUALIFIER tquat angleAxis(T const & angle, tvec3 const & v) - ^ -/usr/include/glm/gtc/quaternion.inl: In function ‘vtk::glm::tquat vtk::glm::angleAxis(const T&, int)’: -/usr/include/glm/gtc/quaternion.inl:688:22: error: ‘uninitialize’ was not declared in this scope - tquat Result(uninitialize); - ^ -/usr/include/glm/gtc/quaternion.inl:688:22: note: suggested alternative: -In file included from /usr/include/glm/detail/type_int.hpp:35:0, - from /usr/include/glm/fwd.hpp:35, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/setup.hpp:883:12: note: ‘uninitialize’ - enum ctor{uninitialize}; - ^ -In file included from /usr/include/glm/gtc/quaternion.hpp:367:0, - from /usr/include/glm/gtc/type_ptr.hpp:66, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/quaternion.inl:691:15: error: ‘sin’ is not a member of ‘vtk::glm’ - T const s = glm::sin(a * static_cast(0.5)); - ^ -/usr/include/glm/gtc/quaternion.inl:691:15: note: suggested alternatives: -In file included from /usr/include/features.h:368:0, - from /usr/include/stdint.h:25, - from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/include/stdint.h:9, - from /usr/include/GL/glew.h:229, - from /home/user/dev/voxeltronik/./include/game.h:21, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/bits/mathcalls.h:65:1: note: ‘sin’ - __MATHCALL_VEC (sin,, (_Mdouble_ __x)); - ^ -In file included from /usr/include/glm/detail/_fixes.hpp:33:0, - from /usr/include/glm/glm.hpp:81, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/include/g++-v4/cmath:456:5: note: ‘std::sin’ - sin(_Tp __x) - ^ -In file included from /usr/include/features.h:368:0, - from /usr/include/stdint.h:25, - from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/include/stdint.h:9, - from /usr/include/GL/glew.h:229, - from /home/user/dev/voxeltronik/./include/game.h:21, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/bits/mathcalls.h:65:1: note: ‘sin’ - __MATHCALL_VEC (sin,, (_Mdouble_ __x)); - ^ -In file included from /usr/include/glm/gtc/quaternion.hpp:367:0, - from /usr/include/glm/gtc/type_ptr.hpp:66, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/quaternion.inl:693:14: error: ‘cos’ is not a member of ‘vtk::glm’ - Result.w = glm::cos(a * static_cast(0.5)); - ^ -/usr/include/glm/gtc/quaternion.inl:693:14: note: suggested alternatives: -In file included from /usr/include/features.h:368:0, - from /usr/include/stdint.h:25, - from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/include/stdint.h:9, - from /usr/include/GL/glew.h:229, - from /home/user/dev/voxeltronik/./include/game.h:21, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/bits/mathcalls.h:63:1: note: ‘cos’ - __MATHCALL_VEC (cos,, (_Mdouble_ __x)); - ^ -In file included from /usr/include/glm/detail/_fixes.hpp:33:0, - from /usr/include/glm/glm.hpp:81, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/include/g++-v4/cmath:215:5: note: ‘std::cos’ - cos(_Tp __x) - ^ -In file included from /usr/include/features.h:368:0, - from /usr/include/stdint.h:25, - from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/include/stdint.h:9, - from /usr/include/GL/glew.h:229, - from /home/user/dev/voxeltronik/./include/game.h:21, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/bits/mathcalls.h:63:1: note: ‘cos’ - __MATHCALL_VEC (cos,, (_Mdouble_ __x)); - ^ -In file included from /usr/include/glm/gtc/quaternion.hpp:367:0, - from /usr/include/glm/gtc/type_ptr.hpp:66, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/quaternion.inl:694:14: error: ‘v’ was not declared in this scope - Result.x = v.x * s; - ^ -/usr/include/glm/gtc/quaternion.inl: At global scope: -/usr/include/glm/gtc/quaternion.inl:700:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:701:21: error: ‘tvec4’ does not name a type - GLM_FUNC_QUALIFIER tvec4 lessThan(tquat const & x, tquat const & y) - ^ -/usr/include/glm/gtc/quaternion.inl:709:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:710:21: error: ‘tvec4’ does not name a type - GLM_FUNC_QUALIFIER tvec4 lessThanEqual(tquat const & x, tquat const & y) - ^ -/usr/include/glm/gtc/quaternion.inl:718:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:719:21: error: ‘tvec4’ does not name a type - GLM_FUNC_QUALIFIER tvec4 greaterThan(tquat const & x, tquat const & y) - ^ -/usr/include/glm/gtc/quaternion.inl:727:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:728:21: error: ‘tvec4’ does not name a type - GLM_FUNC_QUALIFIER tvec4 greaterThanEqual(tquat const & x, tquat const & y) - ^ -/usr/include/glm/gtc/quaternion.inl:736:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:737:21: error: ‘tvec4’ does not name a type - GLM_FUNC_QUALIFIER tvec4 equal(tquat const & x, tquat const & y) - ^ -/usr/include/glm/gtc/quaternion.inl:745:24: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/quaternion.inl:746:21: error: ‘tvec4’ does not name a type - GLM_FUNC_QUALIFIER tvec4 notEqual(tquat const & x, tquat const & y) - ^ -In file included from /home/user/dev/voxeltronik/src/game.cpp:29:0: -/usr/include/glm/gtc/type_ptr.hpp:98:16: error: ‘tvec2’ does not name a type - GLM_FUNC_DECL tvec2 make_vec2(T const * const ptr); - ^ -/usr/include/glm/gtc/type_ptr.hpp:103:16: error: ‘tvec3’ does not name a type - GLM_FUNC_DECL tvec3 make_vec3(T const * const ptr); - ^ -/usr/include/glm/gtc/type_ptr.hpp:108:16: error: ‘tvec4’ does not name a type - GLM_FUNC_DECL tvec4 make_vec4(T const * const ptr); - ^ -/usr/include/glm/gtc/type_ptr.hpp:113:16: error: ‘tmat2x2’ does not name a type - GLM_FUNC_DECL tmat2x2 make_mat2x2(T const * const ptr); - ^ -/usr/include/glm/gtc/type_ptr.hpp:118:16: error: ‘tmat2x3’ does not name a type - GLM_FUNC_DECL tmat2x3 make_mat2x3(T const * const ptr); - ^ -/usr/include/glm/gtc/type_ptr.hpp:123:16: error: ‘tmat2x4’ does not name a type - GLM_FUNC_DECL tmat2x4 make_mat2x4(T const * const ptr); - ^ -/usr/include/glm/gtc/type_ptr.hpp:128:16: error: ‘tmat3x2’ does not name a type - GLM_FUNC_DECL tmat3x2 make_mat3x2(T const * const ptr); - ^ -/usr/include/glm/gtc/type_ptr.hpp:133:16: error: ‘tmat3x3’ does not name a type - GLM_FUNC_DECL tmat3x3 make_mat3x3(T const * const ptr); - ^ -/usr/include/glm/gtc/type_ptr.hpp:138:16: error: ‘tmat3x4’ does not name a type - GLM_FUNC_DECL tmat3x4 make_mat3x4(T const * const ptr); - ^ -/usr/include/glm/gtc/type_ptr.hpp:143:16: error: ‘tmat4x2’ does not name a type - GLM_FUNC_DECL tmat4x2 make_mat4x2(T const * const ptr); - ^ -/usr/include/glm/gtc/type_ptr.hpp:148:16: error: ‘tmat4x3’ does not name a type - GLM_FUNC_DECL tmat4x3 make_mat4x3(T const * const ptr); - ^ -/usr/include/glm/gtc/type_ptr.hpp:153:16: error: ‘tmat4x4’ does not name a type - GLM_FUNC_DECL tmat4x4 make_mat4x4(T const * const ptr); - ^ -/usr/include/glm/gtc/type_ptr.hpp:158:16: error: ‘tmat2x2’ does not name a type - GLM_FUNC_DECL tmat2x2 make_mat2(T const * const ptr); - ^ -/usr/include/glm/gtc/type_ptr.hpp:163:16: error: ‘tmat3x3’ does not name a type - GLM_FUNC_DECL tmat3x3 make_mat3(T const * const ptr); - ^ -/usr/include/glm/gtc/type_ptr.hpp:168:16: error: ‘tmat4x4’ does not name a type - GLM_FUNC_DECL tmat4x4 make_mat4(T const * const ptr); - ^ -/usr/include/glm/gtc/type_ptr.hpp:173:25: error: ‘defaultp’ was not declared in this scope - GLM_FUNC_DECL tquat make_quat(T const * const ptr); - ^ -/usr/include/glm/gtc/type_ptr.hpp:173:25: note: suggested alternative: -In file included from /usr/include/glm/detail/type_vec.hpp:35:0, - from /usr/include/glm/fwd.hpp:37, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/precision.hpp:42:3: note: ‘defaultp’ - defaultp = highp - ^ -In file included from /home/user/dev/voxeltronik/src/game.cpp:29:0: -/usr/include/glm/gtc/type_ptr.hpp:173:33: error: template argument 2 is invalid - GLM_FUNC_DECL tquat make_quat(T const * const ptr); - ^ -/usr/include/glm/gtc/type_ptr.hpp:173:65: error: invalid type in declaration before ‘;’ token - GLM_FUNC_DECL tquat make_quat(T const * const ptr); - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:42:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:45:3: error: ‘vtk::glm::value_ptr’ declared as an ‘inline’ variable - tvec2 const & vec - ^ -/usr/include/glm/gtc/type_ptr.inl:45:3: error: template declaration of ‘const T* vtk::glm::value_ptr’ -/usr/include/glm/gtc/type_ptr.inl:45:3: error: ‘tvec2’ was not declared in this scope -/usr/include/glm/gtc/type_ptr.inl:45:3: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:37:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_vec.hpp:41:44: note: ‘glm::tvec2’ - template struct tvec2; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:45:10: error: expected primary-expression before ‘,’ token - tvec2 const & vec - ^ -/usr/include/glm/gtc/type_ptr.inl:45:15: error: expected primary-expression before ‘const’ - tvec2 const & vec - ^ -/usr/include/glm/gtc/type_ptr.inl:53:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:56:3: error: ‘vtk::glm::value_ptr’ declared as an ‘inline’ variable - tvec2 & vec - ^ -/usr/include/glm/gtc/type_ptr.inl:56:3: error: template declaration of ‘T* vtk::glm::value_ptr’ -/usr/include/glm/gtc/type_ptr.inl:56:3: error: ‘tvec2’ was not declared in this scope -/usr/include/glm/gtc/type_ptr.inl:56:3: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:37:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_vec.hpp:41:44: note: ‘glm::tvec2’ - template struct tvec2; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:56:10: error: expected primary-expression before ‘,’ token - tvec2 & vec - ^ -/usr/include/glm/gtc/type_ptr.inl:56:17: error: ‘vec’ was not declared in this scope - tvec2 & vec - ^ -/usr/include/glm/gtc/type_ptr.inl:64:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:67:3: error: ‘vtk::glm::value_ptr’ declared as an ‘inline’ variable - tvec3 const & vec - ^ -/usr/include/glm/gtc/type_ptr.inl:67:3: error: template declaration of ‘const T* vtk::glm::value_ptr’ -/usr/include/glm/gtc/type_ptr.inl:67:3: error: ‘tvec3’ was not declared in this scope -/usr/include/glm/gtc/type_ptr.inl:67:3: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:37:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_vec.hpp:42:44: note: ‘glm::tvec3’ - template struct tvec3; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:67:10: error: expected primary-expression before ‘,’ token - tvec3 const & vec - ^ -/usr/include/glm/gtc/type_ptr.inl:67:15: error: expected primary-expression before ‘const’ - tvec3 const & vec - ^ -/usr/include/glm/gtc/type_ptr.inl:75:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:78:3: error: ‘vtk::glm::value_ptr’ declared as an ‘inline’ variable - tvec3 & vec - ^ -/usr/include/glm/gtc/type_ptr.inl:78:3: error: template declaration of ‘T* vtk::glm::value_ptr’ -/usr/include/glm/gtc/type_ptr.inl:78:3: error: ‘tvec3’ was not declared in this scope -/usr/include/glm/gtc/type_ptr.inl:78:3: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:37:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_vec.hpp:42:44: note: ‘glm::tvec3’ - template struct tvec3; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:78:10: error: expected primary-expression before ‘,’ token - tvec3 & vec - ^ -/usr/include/glm/gtc/type_ptr.inl:78:17: error: ‘vec’ was not declared in this scope - tvec3 & vec - ^ -/usr/include/glm/gtc/type_ptr.inl:86:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:89:3: error: ‘vtk::glm::value_ptr’ declared as an ‘inline’ variable - tvec4 const & vec - ^ -/usr/include/glm/gtc/type_ptr.inl:89:3: error: template declaration of ‘const T* vtk::glm::value_ptr’ -/usr/include/glm/gtc/type_ptr.inl:89:3: error: ‘tvec4’ was not declared in this scope -/usr/include/glm/gtc/type_ptr.inl:89:3: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:37:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_vec.hpp:43:44: note: ‘glm::tvec4’ - template struct tvec4; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:89:10: error: expected primary-expression before ‘,’ token - tvec4 const & vec - ^ -/usr/include/glm/gtc/type_ptr.inl:89:15: error: expected primary-expression before ‘const’ - tvec4 const & vec - ^ -/usr/include/glm/gtc/type_ptr.inl:97:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:100:3: error: ‘vtk::glm::value_ptr’ declared as an ‘inline’ variable - tvec4 & vec - ^ -/usr/include/glm/gtc/type_ptr.inl:100:3: error: template declaration of ‘T* vtk::glm::value_ptr’ -/usr/include/glm/gtc/type_ptr.inl:100:3: error: ‘tvec4’ was not declared in this scope -/usr/include/glm/gtc/type_ptr.inl:100:3: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:37:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_vec.hpp:43:44: note: ‘glm::tvec4’ - template struct tvec4; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:100:10: error: expected primary-expression before ‘,’ token - tvec4 & vec - ^ -/usr/include/glm/gtc/type_ptr.inl:100:17: error: ‘vec’ was not declared in this scope - tvec4 & vec - ^ -/usr/include/glm/gtc/type_ptr.inl:108:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:111:3: error: ‘vtk::glm::value_ptr’ declared as an ‘inline’ variable - tmat2x2 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:111:3: error: template declaration of ‘const T* vtk::glm::value_ptr’ -/usr/include/glm/gtc/type_ptr.inl:111:3: error: ‘tmat2x2’ was not declared in this scope -/usr/include/glm/gtc/type_ptr.inl:111:3: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:38:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_mat.hpp:47:44: note: ‘glm::tmat2x2’ - template struct tmat2x2; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:111:12: error: expected primary-expression before ‘,’ token - tmat2x2 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:111:17: error: expected primary-expression before ‘const’ - tmat2x2 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:119:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:122:3: error: ‘vtk::glm::value_ptr’ declared as an ‘inline’ variable - tmat2x2 & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:122:3: error: template declaration of ‘T* vtk::glm::value_ptr’ -/usr/include/glm/gtc/type_ptr.inl:122:3: error: ‘tmat2x2’ was not declared in this scope -/usr/include/glm/gtc/type_ptr.inl:122:3: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:38:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_mat.hpp:47:44: note: ‘glm::tmat2x2’ - template struct tmat2x2; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:122:12: error: expected primary-expression before ‘,’ token - tmat2x2 & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:122:19: error: ‘mat’ was not declared in this scope - tmat2x2 & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:130:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:133:3: error: ‘vtk::glm::value_ptr’ declared as an ‘inline’ variable - tmat3x3 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:133:3: error: template declaration of ‘const T* vtk::glm::value_ptr’ -/usr/include/glm/gtc/type_ptr.inl:133:3: error: ‘tmat3x3’ was not declared in this scope -/usr/include/glm/gtc/type_ptr.inl:133:3: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:38:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_mat.hpp:51:44: note: ‘glm::tmat3x3’ - template struct tmat3x3; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:133:12: error: expected primary-expression before ‘,’ token - tmat3x3 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:133:17: error: expected primary-expression before ‘const’ - tmat3x3 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:141:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:144:3: error: ‘vtk::glm::value_ptr’ declared as an ‘inline’ variable - tmat3x3 & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:144:3: error: template declaration of ‘T* vtk::glm::value_ptr’ -/usr/include/glm/gtc/type_ptr.inl:144:3: error: ‘tmat3x3’ was not declared in this scope -/usr/include/glm/gtc/type_ptr.inl:144:3: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:38:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_mat.hpp:51:44: note: ‘glm::tmat3x3’ - template struct tmat3x3; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:144:12: error: expected primary-expression before ‘,’ token - tmat3x3 & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:144:19: error: ‘mat’ was not declared in this scope - tmat3x3 & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:152:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:155:3: error: ‘vtk::glm::value_ptr’ declared as an ‘inline’ variable - tmat4x4 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:155:3: error: template declaration of ‘const T* vtk::glm::value_ptr’ -/usr/include/glm/gtc/type_ptr.inl:155:3: error: ‘tmat4x4’ was not declared in this scope -/usr/include/glm/gtc/type_ptr.inl:155:3: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:38:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_mat.hpp:55:44: note: ‘glm::tmat4x4’ - template struct tmat4x4; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:155:12: error: expected primary-expression before ‘,’ token - tmat4x4 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:155:17: error: expected primary-expression before ‘const’ - tmat4x4 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:163:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:166:3: error: ‘vtk::glm::value_ptr’ declared as an ‘inline’ variable - tmat4x4 & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:166:3: error: template declaration of ‘T* vtk::glm::value_ptr’ -/usr/include/glm/gtc/type_ptr.inl:166:3: error: ‘tmat4x4’ was not declared in this scope -/usr/include/glm/gtc/type_ptr.inl:166:3: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:38:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_mat.hpp:55:44: note: ‘glm::tmat4x4’ - template struct tmat4x4; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:166:12: error: expected primary-expression before ‘,’ token - tmat4x4 & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:166:19: error: ‘mat’ was not declared in this scope - tmat4x4 & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:174:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:177:3: error: ‘vtk::glm::value_ptr’ declared as an ‘inline’ variable - tmat2x3 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:177:3: error: template declaration of ‘const T* vtk::glm::value_ptr’ -/usr/include/glm/gtc/type_ptr.inl:177:3: error: ‘tmat2x3’ was not declared in this scope -/usr/include/glm/gtc/type_ptr.inl:177:3: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:38:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_mat.hpp:48:44: note: ‘glm::tmat2x3’ - template struct tmat2x3; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:177:12: error: expected primary-expression before ‘,’ token - tmat2x3 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:177:17: error: expected primary-expression before ‘const’ - tmat2x3 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:185:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:188:3: error: ‘vtk::glm::value_ptr’ declared as an ‘inline’ variable - tmat2x3 & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:188:3: error: template declaration of ‘T* vtk::glm::value_ptr’ -/usr/include/glm/gtc/type_ptr.inl:188:3: error: ‘tmat2x3’ was not declared in this scope -/usr/include/glm/gtc/type_ptr.inl:188:3: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:38:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_mat.hpp:48:44: note: ‘glm::tmat2x3’ - template struct tmat2x3; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:188:12: error: expected primary-expression before ‘,’ token - tmat2x3 & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:188:19: error: ‘mat’ was not declared in this scope - tmat2x3 & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:196:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:199:3: error: ‘vtk::glm::value_ptr’ declared as an ‘inline’ variable - tmat3x2 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:199:3: error: template declaration of ‘const T* vtk::glm::value_ptr’ -/usr/include/glm/gtc/type_ptr.inl:199:3: error: ‘tmat3x2’ was not declared in this scope -/usr/include/glm/gtc/type_ptr.inl:199:3: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:38:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_mat.hpp:50:44: note: ‘glm::tmat3x2’ - template struct tmat3x2; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:199:12: error: expected primary-expression before ‘,’ token - tmat3x2 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:199:17: error: expected primary-expression before ‘const’ - tmat3x2 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:207:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:210:3: error: ‘vtk::glm::value_ptr’ declared as an ‘inline’ variable - tmat3x2 & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:210:3: error: template declaration of ‘T* vtk::glm::value_ptr’ -/usr/include/glm/gtc/type_ptr.inl:210:3: error: ‘tmat3x2’ was not declared in this scope -/usr/include/glm/gtc/type_ptr.inl:210:3: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:38:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_mat.hpp:50:44: note: ‘glm::tmat3x2’ - template struct tmat3x2; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:210:12: error: expected primary-expression before ‘,’ token - tmat3x2 & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:210:19: error: ‘mat’ was not declared in this scope - tmat3x2 & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:218:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:221:3: error: ‘vtk::glm::value_ptr’ declared as an ‘inline’ variable - tmat2x4 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:221:3: error: template declaration of ‘const T* vtk::glm::value_ptr’ -/usr/include/glm/gtc/type_ptr.inl:221:3: error: ‘tmat2x4’ was not declared in this scope -/usr/include/glm/gtc/type_ptr.inl:221:3: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:38:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_mat.hpp:49:44: note: ‘glm::tmat2x4’ - template struct tmat2x4; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:221:12: error: expected primary-expression before ‘,’ token - tmat2x4 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:221:17: error: expected primary-expression before ‘const’ - tmat2x4 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:229:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:232:3: error: ‘vtk::glm::value_ptr’ declared as an ‘inline’ variable - tmat2x4 & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:232:3: error: template declaration of ‘T* vtk::glm::value_ptr’ -/usr/include/glm/gtc/type_ptr.inl:232:3: error: ‘tmat2x4’ was not declared in this scope -/usr/include/glm/gtc/type_ptr.inl:232:3: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:38:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_mat.hpp:49:44: note: ‘glm::tmat2x4’ - template struct tmat2x4; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:232:12: error: expected primary-expression before ‘,’ token - tmat2x4 & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:232:19: error: ‘mat’ was not declared in this scope - tmat2x4 & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:240:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:243:3: error: ‘vtk::glm::value_ptr’ declared as an ‘inline’ variable - tmat4x2 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:243:3: error: template declaration of ‘const T* vtk::glm::value_ptr’ -/usr/include/glm/gtc/type_ptr.inl:243:3: error: ‘tmat4x2’ was not declared in this scope -/usr/include/glm/gtc/type_ptr.inl:243:3: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:38:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_mat.hpp:53:44: note: ‘glm::tmat4x2’ - template struct tmat4x2; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:243:12: error: expected primary-expression before ‘,’ token - tmat4x2 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:243:17: error: expected primary-expression before ‘const’ - tmat4x2 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:251:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:254:3: error: ‘vtk::glm::value_ptr’ declared as an ‘inline’ variable - tmat4x2 & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:254:3: error: template declaration of ‘T* vtk::glm::value_ptr’ -/usr/include/glm/gtc/type_ptr.inl:254:3: error: ‘tmat4x2’ was not declared in this scope -/usr/include/glm/gtc/type_ptr.inl:254:3: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:38:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_mat.hpp:53:44: note: ‘glm::tmat4x2’ - template struct tmat4x2; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:254:12: error: expected primary-expression before ‘,’ token - tmat4x2 & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:254:19: error: ‘mat’ was not declared in this scope - tmat4x2 & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:262:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:265:3: error: ‘vtk::glm::value_ptr’ declared as an ‘inline’ variable - tmat3x4 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:265:3: error: template declaration of ‘const T* vtk::glm::value_ptr’ -/usr/include/glm/gtc/type_ptr.inl:265:3: error: ‘tmat3x4’ was not declared in this scope -/usr/include/glm/gtc/type_ptr.inl:265:3: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:38:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_mat.hpp:52:44: note: ‘glm::tmat3x4’ - template struct tmat3x4; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:265:12: error: expected primary-expression before ‘,’ token - tmat3x4 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:265:17: error: expected primary-expression before ‘const’ - tmat3x4 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:273:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:276:3: error: ‘vtk::glm::value_ptr’ declared as an ‘inline’ variable - tmat3x4 & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:276:3: error: template declaration of ‘T* vtk::glm::value_ptr’ -/usr/include/glm/gtc/type_ptr.inl:276:3: error: ‘tmat3x4’ was not declared in this scope -/usr/include/glm/gtc/type_ptr.inl:276:3: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:38:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_mat.hpp:52:44: note: ‘glm::tmat3x4’ - template struct tmat3x4; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:276:12: error: expected primary-expression before ‘,’ token - tmat3x4 & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:276:19: error: ‘mat’ was not declared in this scope - tmat3x4 & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:284:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:287:3: error: ‘vtk::glm::value_ptr’ declared as an ‘inline’ variable - tmat4x3 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:287:3: error: template declaration of ‘const T* vtk::glm::value_ptr’ -/usr/include/glm/gtc/type_ptr.inl:287:3: error: ‘tmat4x3’ was not declared in this scope -/usr/include/glm/gtc/type_ptr.inl:287:3: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:38:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_mat.hpp:54:44: note: ‘glm::tmat4x3’ - template struct tmat4x3; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:287:12: error: expected primary-expression before ‘,’ token - tmat4x3 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:287:17: error: expected primary-expression before ‘const’ - tmat4x3 const & mat - ^ -/usr/include/glm/gtc/type_ptr.inl:295:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:296:35: error: ‘vtk::glm::value_ptr’ declared as an ‘inline’ variable - GLM_FUNC_QUALIFIER T * value_ptr(tmat4x3 & mat) - ^ -/usr/include/glm/gtc/type_ptr.inl:296:35: error: template declaration of ‘T* vtk::glm::value_ptr’ -/usr/include/glm/gtc/type_ptr.inl:296:35: error: ‘tmat4x3’ was not declared in this scope -/usr/include/glm/gtc/type_ptr.inl:296:35: note: suggested alternative: -In file included from /usr/include/glm/fwd.hpp:38:0, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/type_mat.hpp:54:44: note: ‘glm::tmat4x3’ - template struct tmat4x3; - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:296:44: error: expected primary-expression before ‘,’ token - GLM_FUNC_QUALIFIER T * value_ptr(tmat4x3 & mat) - ^ -/usr/include/glm/gtc/type_ptr.inl:296:51: error: ‘mat’ was not declared in this scope - GLM_FUNC_QUALIFIER T * value_ptr(tmat4x3 & mat) - ^ -/usr/include/glm/gtc/type_ptr.inl:303:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:314:23: error: ‘precision’ has not been declared - template - ^ -/usr/include/glm/gtc/type_ptr.inl:326:21: error: ‘tvec2’ does not name a type - GLM_FUNC_QUALIFIER tvec2 make_vec2(T const * const ptr) - ^ -/usr/include/glm/gtc/type_ptr.inl:336:21: error: ‘tvec3’ does not name a type - GLM_FUNC_QUALIFIER tvec3 make_vec3(T const * const ptr) - ^ -/usr/include/glm/gtc/type_ptr.inl:346:21: error: ‘tvec4’ does not name a type - GLM_FUNC_QUALIFIER tvec4 make_vec4(T const * const ptr) - ^ -/usr/include/glm/gtc/type_ptr.inl:356:21: error: ‘tmat2x2’ does not name a type - GLM_FUNC_QUALIFIER tmat2x2 make_mat2x2(T const * const ptr) - ^ -/usr/include/glm/gtc/type_ptr.inl:366:21: error: ‘tmat2x3’ does not name a type - GLM_FUNC_QUALIFIER tmat2x3 make_mat2x3(T const * const ptr) - ^ -/usr/include/glm/gtc/type_ptr.inl:376:21: error: ‘tmat2x4’ does not name a type - GLM_FUNC_QUALIFIER tmat2x4 make_mat2x4(T const * const ptr) - ^ -/usr/include/glm/gtc/type_ptr.inl:386:21: error: ‘tmat3x2’ does not name a type - GLM_FUNC_QUALIFIER tmat3x2 make_mat3x2(T const * const ptr) - ^ -/usr/include/glm/gtc/type_ptr.inl:396:21: error: ‘tmat3x3’ does not name a type - GLM_FUNC_QUALIFIER tmat3x3 make_mat3x3(T const * const ptr) - ^ -/usr/include/glm/gtc/type_ptr.inl:406:21: error: ‘tmat3x4’ does not name a type - GLM_FUNC_QUALIFIER tmat3x4 make_mat3x4(T const * const ptr) - ^ -/usr/include/glm/gtc/type_ptr.inl:416:21: error: ‘tmat4x2’ does not name a type - GLM_FUNC_QUALIFIER tmat4x2 make_mat4x2(T const * const ptr) - ^ -/usr/include/glm/gtc/type_ptr.inl:426:21: error: ‘tmat4x3’ does not name a type - GLM_FUNC_QUALIFIER tmat4x3 make_mat4x3(T const * const ptr) - ^ -/usr/include/glm/gtc/type_ptr.inl:436:21: error: ‘tmat4x4’ does not name a type - GLM_FUNC_QUALIFIER tmat4x4 make_mat4x4(T const * const ptr) - ^ -/usr/include/glm/gtc/type_ptr.inl:446:21: error: ‘tmat2x2’ does not name a type - GLM_FUNC_QUALIFIER tmat2x2 make_mat2(T const * const ptr) - ^ -/usr/include/glm/gtc/type_ptr.inl:454:21: error: ‘tmat3x3’ does not name a type - GLM_FUNC_QUALIFIER tmat3x3 make_mat3(T const * const ptr) - ^ -/usr/include/glm/gtc/type_ptr.inl:462:21: error: ‘tmat4x4’ does not name a type - GLM_FUNC_QUALIFIER tmat4x4 make_mat4(T const * const ptr) - ^ -/usr/include/glm/gtc/type_ptr.inl:470:30: error: ‘defaultp’ was not declared in this scope - GLM_FUNC_QUALIFIER tquat make_quat(T const * const ptr) - ^ -/usr/include/glm/gtc/type_ptr.inl:470:30: note: suggested alternative: -In file included from /usr/include/glm/detail/type_vec.hpp:35:0, - from /usr/include/glm/fwd.hpp:37, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/precision.hpp:42:3: note: ‘defaultp’ - defaultp = highp - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:470:38: error: template argument 2 is invalid - GLM_FUNC_QUALIFIER tquat make_quat(T const * const ptr) - ^ -/usr/include/glm/gtc/type_ptr.inl: In function ‘int vtk::glm::make_quat(const T*)’: -/usr/include/glm/gtc/type_ptr.inl:472:12: error: ‘defaultp’ was not declared in this scope - tquat Result; - ^ -/usr/include/glm/gtc/type_ptr.inl:472:12: note: suggested alternative: -In file included from /usr/include/glm/detail/type_vec.hpp:35:0, - from /usr/include/glm/fwd.hpp:37, - from /usr/include/glm/glm.hpp:90, - from /home/user/dev/voxeltronik/./include/window.h:23, - from /home/user/dev/voxeltronik/./include/game.h:25, - from /home/user/dev/voxeltronik/src/game.cpp:19: -/usr/include/glm/detail/precision.hpp:42:3: note: ‘defaultp’ - defaultp = highp - ^ -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:472:20: error: template argument 2 is invalid - tquat Result; - ^ -/usr/include/glm/gtc/type_ptr.inl:472:28: error: invalid type in declaration before ‘;’ token - tquat Result; - ^ -/usr/include/glm/gtc/type_ptr.inl:473:26: error: no matching function for call to ‘value_ptr(int&)’ - memcpy(value_ptr(Result), ptr, sizeof(tquat)); - ^ -/usr/include/glm/gtc/type_ptr.inl:473:26: note: candidates are: -In file included from /home/user/dev/voxeltronik/src/game.cpp:29:0: -/usr/include/glm/gtc/type_ptr.hpp:93:53: note: template const typename genType::value_type* vtk::glm::value_ptr(const genType&) - GLM_FUNC_DECL typename genType::value_type const * value_ptr(genType const & vec); - ^ -/usr/include/glm/gtc/type_ptr.hpp:93:53: note: template argument deduction/substitution failed: -/usr/include/glm/gtc/type_ptr.hpp: In substitution of ‘template const typename genType::value_type* vtk::glm::value_ptr(const genType&) [with genType = int]’: -/usr/include/glm/gtc/type_ptr.inl:473:26: required from here -/usr/include/glm/gtc/type_ptr.hpp:93:53: error: ‘int’ is not a class, struct, or union type -In file included from /usr/include/glm/gtc/type_ptr.hpp:178:0, - from /home/user/dev/voxeltronik/src/game.cpp:29: -/usr/include/glm/gtc/type_ptr.inl:304:31: note: template const T* vtk::glm::value_ptr(const vtk::glm::tquat&) - GLM_FUNC_QUALIFIER T const * value_ptr - ^ -/usr/include/glm/gtc/type_ptr.inl:304:31: note: template argument deduction/substitution failed: -/usr/include/glm/gtc/type_ptr.inl:473:26: note: mismatched types ‘const vtk::glm::tquat’ and ‘int’ - memcpy(value_ptr(Result), ptr, sizeof(tquat)); - ^ -/usr/include/glm/gtc/type_ptr.inl:315:25: note: template T* vtk::glm::value_ptr(vtk::glm::tquat&) - GLM_FUNC_QUALIFIER T * value_ptr - ^ -/usr/include/glm/gtc/type_ptr.inl:315:25: note: template argument deduction/substitution failed: -/usr/include/glm/gtc/type_ptr.inl:473:26: note: mismatched types ‘vtk::glm::tquat’ and ‘int’ - memcpy(value_ptr(Result), ptr, sizeof(tquat)); - ^ -/usr/include/glm/gtc/type_ptr.inl:473:50: error: the value of ‘defaultp’ is not usable in a constant expression - memcpy(value_ptr(Result), ptr, sizeof(tquat)); - ^ -/usr/include/glm/gtc/type_ptr.inl:472:12: note: ‘defaultp’ was not declared ‘constexpr’ - tquat Result; - ^ -/usr/include/glm/gtc/type_ptr.inl:473:58: error: could not convert template argument ‘defaultp’ to ‘int’ - memcpy(value_ptr(Result), ptr, sizeof(tquat)); - ^ -/home/user/dev/voxeltronik/src/game.cpp: At global scope: -/home/user/dev/voxeltronik/src/game.cpp:33:12: error: invalid use of incomplete type ‘class vtk::vtk::Game’ - Game::Game() { - ^ -In file included from /home/user/dev/voxeltronik/src/game.cpp:23:0: -/home/user/dev/voxeltronik/./include/scene.h:24:7: error: forward declaration of ‘class vtk::vtk::Game’ - class Game; - ^ -/home/user/dev/voxeltronik/src/game.cpp:37:17: error: invalid use of incomplete type ‘class vtk::vtk::Game’ - void Game::init() { - ^ -In file included from /home/user/dev/voxeltronik/src/game.cpp:23:0: -/home/user/dev/voxeltronik/./include/scene.h:24:7: error: forward declaration of ‘class vtk::vtk::Game’ - class Game; - ^ -/home/user/dev/voxeltronik/src/game.cpp:68:18: error: invalid use of incomplete type ‘class vtk::vtk::Game’ - void Game::start() { - ^ -In file included from /home/user/dev/voxeltronik/src/game.cpp:23:0: -/home/user/dev/voxeltronik/./include/scene.h:24:7: error: forward declaration of ‘class vtk::vtk::Game’ - class Game; - ^ -/home/user/dev/voxeltronik/src/game.cpp:74:17: error: invalid use of incomplete type ‘class vtk::vtk::Game’ - void Game::loop() { - ^ -In file included from /home/user/dev/voxeltronik/src/game.cpp:23:0: -/home/user/dev/voxeltronik/./include/scene.h:24:7: error: forward declaration of ‘class vtk::vtk::Game’ - class Game; - ^ -/home/user/dev/voxeltronik/src/game.cpp:95:17: error: invalid use of incomplete type ‘class vtk::vtk::Game’ - void Game::stop() { - ^ -In file included from /home/user/dev/voxeltronik/src/game.cpp:23:0: -/home/user/dev/voxeltronik/./include/scene.h:24:7: error: forward declaration of ‘class vtk::vtk::Game’ - class Game; - ^ -/home/user/dev/voxeltronik/src/game.cpp:99:20: error: invalid use of incomplete type ‘class vtk::vtk::Game’ - void Game::cleanup() { - ^ -In file included from /home/user/dev/voxeltronik/src/game.cpp:23:0: -/home/user/dev/voxeltronik/./include/scene.h:24:7: error: forward declaration of ‘class vtk::vtk::Game’ - class Game; - ^ -/home/user/dev/voxeltronik/src/game.cpp:103:33: error: invalid use of incomplete type ‘class vtk::vtk::Game’ - void Game::setScene(Scene* scene) { - ^ -In file included from /home/user/dev/voxeltronik/src/game.cpp:23:0: -/home/user/dev/voxeltronik/./include/scene.h:24:7: error: forward declaration of ‘class vtk::vtk::Game’ - class Game; - ^ -/home/user/dev/voxeltronik/src/game.cpp:109:34: error: invalid use of incomplete type ‘class vtk::vtk::Game’ - void Game::setConfig(Config* conf) { - ^ -In file included from /home/user/dev/voxeltronik/src/game.cpp:23:0: -/home/user/dev/voxeltronik/./include/scene.h:24:7: error: forward declaration of ‘class vtk::vtk::Game’ - class Game; - ^ -/home/user/dev/voxeltronik/src/game.cpp:113:25: error: invalid use of incomplete type ‘class vtk::vtk::Game’ - Config* Game::getConfig() { - ^ -In file included from /home/user/dev/voxeltronik/src/game.cpp:23:0: -/home/user/dev/voxeltronik/./include/scene.h:24:7: error: forward declaration of ‘class vtk::vtk::Game’ - class Game; - ^ -/home/user/dev/voxeltronik/src/game.cpp:117:2: error: expected ‘}’ at end of input - }; - ^ -make[2]: *** [CMakeFiles/vtk.dir/build.make:183: CMakeFiles/vtk.dir/src/game.cpp.o] Error 1 -make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/vtk.dir/all] Error 2 -make: *** [Makefile:84: all] Error 2 diff --git a/include/graphics/superchunkmesh.h b/include/graphics/superchunkmesh.h new file mode 100644 index 0000000..a20630b --- /dev/null +++ b/include/graphics/superchunkmesh.h @@ -0,0 +1,33 @@ +// A chunk mesh for batching together other chunk meshes to reduce drawcalls +// chunks OR the supermesh but not both. +// To be used to group together chunks (i.e. 8^3 blocks of chunks) +// If rebuild is started when it's already rebuilding in another thread,it will +// restart rebuilding in the original thread. + +#pragma once + +#include +#include + +namespace vtk { + +class ChunkMesh; + +class SuperChunkMesh { +public: + SuperChunkMesh(); + bool addMesh(ChunkMesh* mesh); + void rebuild(); +protected: + typedef struct { + unsigned count; + unsigned instanceCount; + unsigned first; + unsigned baseInstance; + } DrawArraysIndirectCommand; + + std::vector mChunkMeshes; + std::vector mModelMats; +}; + +} diff --git a/src/stb_image.c b/include/stb_image.c similarity index 100% rename from src/stb_image.c rename to include/stb_image.c diff --git a/include/world.h b/include/world.h index 7569df3..66e2d82 100644 --- a/include/world.h +++ b/include/world.h @@ -59,7 +59,6 @@ public: std::unordered_map mChunkMeshes; std::vector chunkUpdateQueue; std::deque mChunkUpdateQueue; - std::vector mChunkGeometryUpdateQueue; unsigned chunkSize; float voxelSize; diff --git a/src/' b/src/' deleted file mode 100644 index 15bf72b..0000000 --- a/src/' +++ /dev/null @@ -1,119 +0,0 @@ -/* - * ===================================================================================== - * - * Filename: game.cpp - * - * Description: Game class source - * - * Version: 1.0 - * Created: 03/23/2014 11:33:25 PM - * Revision: none - * Compiler: gcc - * - * Author: YOUR NAME (), - * Organization: - * - * ===================================================================================== - */ - -#include "game.h" -#include "loadShader.h" -#include "graphics/camera.h" -#include "graphics/glstate.h" -#include "scene.h" - -//SPAGHETTI INCLUDES -#define GLM_FORCE_RADIANS -#include -#include -#include - -#include - -namespace vtk { - -Game::Game() { - activeScene = nullptr; -} - -void Game::init() { - SDL_Init(SDL_INIT_VIDEO); - - SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); - SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4); - SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3); - SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); - - SDL_GL_SetSwapInterval(conf->getValue("graphics.vsync", 0)); - - window.setTitle("OpenGL"); - window.setResolution(conf->getValue("graphics.res.x", 800), - conf->getValue("graphics.res.y", 600)); - window.setFOV(conf->getValue("graphics.fov", 45.0f)); - - window.create(); - - glewExperimental = GL_TRUE; - glewInit(); - - //OpenGL settings - glEnable(GL_DEPTH_TEST); - glDepthFunc(GL_LESS); - glEnable(GL_CULL_FACE); - glCullFace(GL_BACK); - glFrontFace(GL_CW); - - running = false; - gls::setTracking(true); -} - -void Game::start() { - if (activeScene == nullptr) return; - running = true; - loop(); -} - -void Game::loop() { - - - auto lastFrameTime = std::chrono::steady_clock::now(); - - while (running) { - //time - int dTimeMS = SDL_GetTicks() - lastFrameTime; - lastFrameTime = SDL_GetTicks(); - float dTime = (float)dTimeMS / 1000.0f; - - activeScene->update(dTime); - - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - activeScene->draw(); - - SDL_GL_SwapWindow(window.getWindow()); - } - cleanup(); -} - -void Game::stop() { - running = false; -} - -void Game::cleanup() { - SDL_Quit(); -} - -void Game::setScene(Scene* scene) { - activeScene = scene; - scene->link(this); - scene->init(); -} - -void Game::setConfig(Config* conf) { - this->conf = conf; -} - -Config* Game::getConfig() { - return conf; -} - -}; diff --git a/src/graphics/chunkmesh.cpp b/src/graphics/chunkmesh.cpp index afde444..c7fe0b9 100644 --- a/src/graphics/chunkmesh.cpp +++ b/src/graphics/chunkmesh.cpp @@ -11,224 +11,226 @@ namespace vtk { - ChunkMesh::ChunkMesh(World& world, glm::ivec3 chunkPos) : - mLinkedWorld(world), - mLinkedChunkPos(chunkPos), - mLocked(false) - { - glGenBuffers(1, &mGeometryTexVBO); - glGenBuffers(1, &mLightVBO); - - glGenVertexArrays(1, &mVAO); - - glBindVertexArray(mVAO); - - glBindBuffer(GL_ARRAY_BUFFER, mGeometryTexVBO); - - - //vertices - glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 6*sizeof(float), NULL); - glEnableVertexAttribArray(0); - - //tex uv coords - glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 6*sizeof(float), (void*)(3*sizeof(float))); - glEnableVertexAttribArray(1); - } - - void ChunkMesh::rebuildChunkGeometry() { - if (mLocked) return; - mLocked = true; - //get the chunk from position - auto chunk = mLinkedWorld.getChunk(mLinkedChunkPos); - - //temporary until I finish mesh providers - float texUV [] = { - 0.0f, 1.0f, - 1.0f, 1.0f, - 0.0f, 0.0f, - 1.0f, 0.0f, - 0.0f, 0.0f, - 1.0f, 1.0f - }; - float topModel [] = { - //x y z - 0.0f, 1.0f, 0.0f, //tl - 1.0f, 1.0f, 0.0f, //tr - 0.0f, 1.0f, 1.0f, //bl - 1.0f, 1.0f, 1.0f, //br - 0.0f, 1.0f, 1.0f, //bl - 1.0f, 1.0f, 0.0f //tr - }; - float bottomModel [] = { - //x y z u v - 0.0f, 0.0f, 1.0f, //tl - 1.0f, 0.0f, 1.0f, //tr - 0.0f, 0.0f, 0.0f, //bl - 1.0f, 0.0f, 0.0f, //br - 0.0f, 0.0f, 0.0f, //bl - 1.0f, 0.0f, 1.0f //tr - }; - float northModel [] = { - //x y z u v - 0.0f, 1.0f, 1.0f, //tl - 1.0f, 1.0f, 1.0f, //tr - 0.0f, 0.0f, 1.0f, //bl - 1.0f, 0.0f, 1.0f, //br - 0.0f, 0.0f, 1.0f, //bl - 1.0f, 1.0f, 1.0f //tr - }; - float southModel [] = { - //x y z u v - 1.0f, 1.0f, 0.0f, //tl - 0.0f, 1.0f, 0.0f, //tr - 1.0f, 0.0f, 0.0f, //bl - 0.0f, 0.0f, 0.0f, //br - 1.0f, 0.0f, 0.0f, //bl - 0.0f, 1.0f, 0.0f //tr - }; - float eastModel [] = { - //x y z u v - 1.0f, 1.0f, 1.0f, //tl - 1.0f, 1.0f, 0.0f, //tr - 1.0f, 0.0f, 1.0f, //bl - 1.0f, 0.0f, 0.0f, //br - 1.0f, 0.0f, 1.0f, //bl - 1.0f, 1.0f, 0.0f //tr - }; - float westModel [] = { - //x y z u v - 0.0f, 1.0f, 0.0f, //tl - 0.0f, 1.0f, 1.0f, //tr - 0.0f, 0.0f, 0.0f, //bl - 0.0f, 0.0f, 1.0f, //br - 0.0f, 0.0f, 0.0f, //bl - 0.0f, 1.0f, 1.0f //tr - }; - - // geometry format: x,y,z,u,v,i - geometry.clear(); - mFaceCount = 0; - int chunkSize = 16; // TODO: make this not hardcoded - - for (int i = 0; i < chunkSize; ++i) { - for (int j = 0; j < chunkSize; ++j) { - for (int k = 0; k < chunkSize; ++k) { - //for each voxel in the chunk... - // TODO: move this code into a mesh provider system - - //top - if (chunk->isVoxelSolid(i,j,k)) { //check that it's solid - if (!chunk->isVoxelSolid(i, j + 1, k)) { - ++mFaceCount; - for (int l = 0; l < 6; ++l) { - geometry.push_back(topModel[(l * 3)] + (float)i); - geometry.push_back(topModel[(l * 3) + 1] + (float)j); - geometry.push_back(topModel[(l * 3) + 2] + (float)k); - geometry.push_back(texUV[l*2]); - geometry.push_back(texUV[(l*2)+1]); - geometry.push_back(mLinkedWorld.voxelInfo.getTexIndexFromID(2, Face3D::TOP)); - } - } - } - - //bottom - if (chunk->isVoxelSolid(i,j,k)) { //check that it's solid - if (!chunk->isVoxelSolid(i, j - 1, k)) { - ++mFaceCount; - for (int l = 0; l < 6; ++l) { - geometry.push_back(bottomModel[(l * 3)] + (float)i); - geometry.push_back(bottomModel[(l * 3) + 1] + (float)j); - geometry.push_back(bottomModel[(l * 3) + 2] + (float)k); - geometry.push_back(texUV[l*2]); - geometry.push_back(texUV[(l*2)+1]); - geometry.push_back(mLinkedWorld.voxelInfo.getTexIndexFromID(2, Face3D::TOP)); - } - } - } - - //north - if (chunk->isVoxelSolid(i,j,k)) { //check that it's solid - if (!chunk->isVoxelSolid(i, j, k + 1)) { - ++mFaceCount; - for (int l = 0; l < 6; ++l) { - geometry.push_back(northModel[(l * 3)] + (float)i); - geometry.push_back(northModel[(l * 3) + 1] + (float)j); - geometry.push_back(northModel[(l * 3) + 2] + (float)k); - geometry.push_back(texUV[l*2]); - geometry.push_back(texUV[(l*2)+1]); - geometry.push_back(mLinkedWorld.voxelInfo.getTexIndexFromID(2, Face3D::TOP)); - } - } - } - //south - if (chunk->isVoxelSolid(i,j,k)) { //check that it's solid - if (!chunk->isVoxelSolid(i, j, k - 1)) { - ++mFaceCount; - for (int l = 0; l < 6; ++l) { - geometry.push_back(southModel[(l * 3)] + (float)i); - geometry.push_back(southModel[(l * 3) + 1] + (float)j); - geometry.push_back(southModel[(l * 3) + 2] + (float)k); - geometry.push_back(texUV[l*2]); - geometry.push_back(texUV[(l*2)+1]); - geometry.push_back(mLinkedWorld.voxelInfo.getTexIndexFromID(2, Face3D::TOP)); - } - } - } - //east - if (chunk->isVoxelSolid(i,j,k)) { //check that it's solid - if (!chunk->isVoxelSolid(i + 1, j, k)) { - ++mFaceCount; - for (int l = 0; l < 6; ++l) { - geometry.push_back(eastModel[(l * 3)] + (float)i); - geometry.push_back(eastModel[(l * 3) + 1] + (float)j); - geometry.push_back(eastModel[(l * 3) + 2] + (float)k); - geometry.push_back(texUV[l*2]); - geometry.push_back(texUV[(l*2)+1]); - geometry.push_back(mLinkedWorld.voxelInfo.getTexIndexFromID(2, Face3D::TOP)); - } - } - } - - //west - if (chunk->isVoxelSolid(i,j,k)) { //check that it's solid - if (!chunk->isVoxelSolid(i - 1, j, k)) { - ++mFaceCount; - for (int l = 0; l < 6; ++l) { - geometry.push_back(westModel[(l * 3)] + (float)i); - geometry.push_back(westModel[(l * 3) + 1] + (float)j); - geometry.push_back(westModel[(l * 3) + 2] + (float)k); - geometry.push_back(texUV[l*2]); - geometry.push_back(texUV[(l*2)+1]); - geometry.push_back(mLinkedWorld.voxelInfo.getTexIndexFromID(2, Face3D::TOP)); - } - } - } + +ChunkMesh::ChunkMesh(World& world, glm::ivec3 chunkPos) : + mLinkedWorld(world), + mLinkedChunkPos(chunkPos), + mLocked(false) +{ + glGenBuffers(1, &mGeometryTexVBO); + glGenBuffers(1, &mLightVBO); + + glGenVertexArrays(1, &mVAO); + + glBindVertexArray(mVAO); + + glBindBuffer(GL_ARRAY_BUFFER, mGeometryTexVBO); + + + //vertices + glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 6*sizeof(float), NULL); + glEnableVertexAttribArray(0); + + //tex uv coords + glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 6*sizeof(float), (void*)(3*sizeof(float))); + glEnableVertexAttribArray(1); +} + +void ChunkMesh::rebuildChunkGeometry() { + if (mLocked) return; + mLocked = true; + //get the chunk from position + auto chunk = mLinkedWorld.getChunk(mLinkedChunkPos); + + //temporary until I finish mesh providers + float texUV [] = { + 0.0f, 1.0f, + 1.0f, 1.0f, + 0.0f, 0.0f, + 1.0f, 0.0f, + 0.0f, 0.0f, + 1.0f, 1.0f + }; + float topModel [] = { + //x y z + 0.0f, 1.0f, 0.0f, //tl + 1.0f, 1.0f, 0.0f, //tr + 0.0f, 1.0f, 1.0f, //bl + 1.0f, 1.0f, 1.0f, //br + 0.0f, 1.0f, 1.0f, //bl + 1.0f, 1.0f, 0.0f //tr + }; + float bottomModel [] = { + //x y z u v + 0.0f, 0.0f, 1.0f, //tl + 1.0f, 0.0f, 1.0f, //tr + 0.0f, 0.0f, 0.0f, //bl + 1.0f, 0.0f, 0.0f, //br + 0.0f, 0.0f, 0.0f, //bl + 1.0f, 0.0f, 1.0f //tr + }; + float northModel [] = { + //x y z u v + 0.0f, 1.0f, 1.0f, //tl + 1.0f, 1.0f, 1.0f, //tr + 0.0f, 0.0f, 1.0f, //bl + 1.0f, 0.0f, 1.0f, //br + 0.0f, 0.0f, 1.0f, //bl + 1.0f, 1.0f, 1.0f //tr + }; + float southModel [] = { + //x y z u v + 1.0f, 1.0f, 0.0f, //tl + 0.0f, 1.0f, 0.0f, //tr + 1.0f, 0.0f, 0.0f, //bl + 0.0f, 0.0f, 0.0f, //br + 1.0f, 0.0f, 0.0f, //bl + 0.0f, 1.0f, 0.0f //tr + }; + float eastModel [] = { + //x y z u v + 1.0f, 1.0f, 1.0f, //tl + 1.0f, 1.0f, 0.0f, //tr + 1.0f, 0.0f, 1.0f, //bl + 1.0f, 0.0f, 0.0f, //br + 1.0f, 0.0f, 1.0f, //bl + 1.0f, 1.0f, 0.0f //tr + }; + float westModel [] = { + //x y z u v + 0.0f, 1.0f, 0.0f, //tl + 0.0f, 1.0f, 1.0f, //tr + 0.0f, 0.0f, 0.0f, //bl + 0.0f, 0.0f, 1.0f, //br + 0.0f, 0.0f, 0.0f, //bl + 0.0f, 1.0f, 1.0f //tr + }; + + // geometry format: x,y,z,u,v,i + geometry.clear(); + mFaceCount = 0; + int chunkSize = 16; // TODO: make this not hardcoded + + for (int i = 0; i < chunkSize; ++i) { + for (int j = 0; j < chunkSize; ++j) { + for (int k = 0; k < chunkSize; ++k) { + //for each voxel in the chunk... + // TODO: move this code into a mesh provider system + + //top + if (chunk->isVoxelSolid(i,j,k)) { //check that it's solid + if (!chunk->isVoxelSolid(i, j + 1, k)) { + ++mFaceCount; + for (int l = 0; l < 6; ++l) { + geometry.push_back(topModel[(l * 3)] + (float)i); + geometry.push_back(topModel[(l * 3) + 1] + (float)j); + geometry.push_back(topModel[(l * 3) + 2] + (float)k); + geometry.push_back(texUV[l*2]); + geometry.push_back(texUV[(l*2)+1]); + geometry.push_back(mLinkedWorld.voxelInfo.getTexIndexFromID(2, Face3D::TOP)); + } + } + } + + //bottom + if (chunk->isVoxelSolid(i,j,k)) { //check that it's solid + if (!chunk->isVoxelSolid(i, j - 1, k)) { + ++mFaceCount; + for (int l = 0; l < 6; ++l) { + geometry.push_back(bottomModel[(l * 3)] + (float)i); + geometry.push_back(bottomModel[(l * 3) + 1] + (float)j); + geometry.push_back(bottomModel[(l * 3) + 2] + (float)k); + geometry.push_back(texUV[l*2]); + geometry.push_back(texUV[(l*2)+1]); + geometry.push_back(mLinkedWorld.voxelInfo.getTexIndexFromID(2, Face3D::TOP)); + } + } + } + + //north + if (chunk->isVoxelSolid(i,j,k)) { //check that it's solid + if (!chunk->isVoxelSolid(i, j, k + 1)) { + ++mFaceCount; + for (int l = 0; l < 6; ++l) { + geometry.push_back(northModel[(l * 3)] + (float)i); + geometry.push_back(northModel[(l * 3) + 1] + (float)j); + geometry.push_back(northModel[(l * 3) + 2] + (float)k); + geometry.push_back(texUV[l*2]); + geometry.push_back(texUV[(l*2)+1]); + geometry.push_back(mLinkedWorld.voxelInfo.getTexIndexFromID(2, Face3D::TOP)); + } + } + } + //south + if (chunk->isVoxelSolid(i,j,k)) { //check that it's solid + if (!chunk->isVoxelSolid(i, j, k - 1)) { + ++mFaceCount; + for (int l = 0; l < 6; ++l) { + geometry.push_back(southModel[(l * 3)] + (float)i); + geometry.push_back(southModel[(l * 3) + 1] + (float)j); + geometry.push_back(southModel[(l * 3) + 2] + (float)k); + geometry.push_back(texUV[l*2]); + geometry.push_back(texUV[(l*2)+1]); + geometry.push_back(mLinkedWorld.voxelInfo.getTexIndexFromID(2, Face3D::TOP)); + } + } + } + //east + if (chunk->isVoxelSolid(i,j,k)) { //check that it's solid + if (!chunk->isVoxelSolid(i + 1, j, k)) { + ++mFaceCount; + for (int l = 0; l < 6; ++l) { + geometry.push_back(eastModel[(l * 3)] + (float)i); + geometry.push_back(eastModel[(l * 3) + 1] + (float)j); + geometry.push_back(eastModel[(l * 3) + 2] + (float)k); + geometry.push_back(texUV[l*2]); + geometry.push_back(texUV[(l*2)+1]); + geometry.push_back(mLinkedWorld.voxelInfo.getTexIndexFromID(2, Face3D::TOP)); + } + } + } + + //west + if (chunk->isVoxelSolid(i,j,k)) { //check that it's solid + if (!chunk->isVoxelSolid(i - 1, j, k)) { + ++mFaceCount; + for (int l = 0; l < 6; ++l) { + geometry.push_back(westModel[(l * 3)] + (float)i); + geometry.push_back(westModel[(l * 3) + 1] + (float)j); + geometry.push_back(westModel[(l * 3) + 2] + (float)k); + geometry.push_back(texUV[l*2]); + geometry.push_back(texUV[(l*2)+1]); + geometry.push_back(mLinkedWorld.voxelInfo.getTexIndexFromID(2, Face3D::TOP)); + } + } + } + } + } } - } - } - - mUpdated = true; - mLocked = false; - } - - void ChunkMesh::rebuildChunkLighting() { - //this doesn't do anything yet - } - - void ChunkMesh::draw() { - updateGeometry(); - glBindVertexArray(mVAO); - glDrawArrays(GL_TRIANGLES, 0, mGeometryFaceCount * 6); - } - - bool ChunkMesh::updateGeometry() { - if (mUpdated) { - mUpdated = false; - glBindBuffer(GL_ARRAY_BUFFER, mGeometryTexVBO); - glBufferData(GL_ARRAY_BUFFER, sizeof(float) * geometry.size(), geometry.data(), GL_STATIC_DRAW); - mGeometryFaceCount = mFaceCount; - return true; - } - return false; - } + + mUpdated = true; + mLocked = false; +} + +void ChunkMesh::rebuildChunkLighting() { + //this doesn't do anything yet +} + +void ChunkMesh::draw() { + updateGeometry(); + glBindVertexArray(mVAO); + glDrawArrays(GL_TRIANGLES, 0, mGeometryFaceCount * 6); } + +bool ChunkMesh::updateGeometry() { + if (mUpdated) { + mUpdated = false; + glBindBuffer(GL_ARRAY_BUFFER, mGeometryTexVBO); + glBufferData(GL_ARRAY_BUFFER, sizeof(float) * geometry.size(), geometry.data(), GL_STATIC_DRAW); + mGeometryFaceCount = mFaceCount; + return true; + } + return false; +} + +} //namespace vtk diff --git a/src/graphics/superchunkmesh.cpp b/src/graphics/superchunkmesh.cpp new file mode 100644 index 0000000..a2e3b7d --- /dev/null +++ b/src/graphics/superchunkmesh.cpp @@ -0,0 +1,16 @@ +#include "graphics/superchunkmesh.h" + +namespace vtk { + +SuperChunkMesh::SuperChunkMesh() { + +} +bool SuperChunkMesh::addMesh(ChunkMesh* mesh) { + + return true; +} + +} +longFunctionThatDoesStuff(objectWithLongName.x, + objectWithLongName.y, + objectWithLongName.z); diff --git a/src/main.cpp b/src/main.cpp index 65dabee..1010c94 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -15,18 +15,19 @@ int main (int argc, char *argv[]) vtk::LoggerSetup lSetup; lSetup.setup(); spdlog::get("general")->info("Starting Voxeltronik Engine..."); + spdlog::get("general"); - auto conf = new Config; - conf->loadConfigFromFile("res/config.conf"); - conf->addArgumentRule("-w", "graphics.res.x"); - conf->addArgumentRule("-h", "graphics.res.y"); - conf->loadConfigFromArguments(argc, argv); + auto conf = new Config; + conf->loadConfigFromFile("res/config.conf"); + conf->addArgumentRule("-w", "graphics.res.x"); + conf->addArgumentRule("-h", "graphics.res.y"); + conf->loadConfigFromArguments(argc, argv); - vtk::Game game; - game.setConfig(conf); - game.init(); - game.setScene(new vtk::TestScene); - game.start(); + vtk::Game game; + game.setConfig(conf); + game.init(); + game.setScene(new vtk::TestScene); + game.start(); - return 0; + return 0; } diff --git a/src/scenes/testscene.cpp b/src/scenes/testscene.cpp index 2bf8570..86e9570 100644 --- a/src/scenes/testscene.cpp +++ b/src/scenes/testscene.cpp @@ -3,15 +3,15 @@ * * Filename: testscene.cpp * - * Description: + * Description: * * Version: 1.0 * Created: 03/24/2014 11:06:32 PM * Revision: none * Compiler: gcc * - * Author: YOUR NAME (), - * Organization: + * Author: YOUR NAME (), + * Organization: * * ===================================================================================== */ @@ -40,112 +40,112 @@ namespace vtk { void TestScene::init() { - Tileset tiles; - tiles.buildTexture(); - tiles.updateTextureAt(0, "res/stone.png"); - tiles.updateTextureAt(1, "res/dirt.png"); - tiles.updateTextureAt(2, "res/test.png"); + Tileset tiles; + tiles.buildTexture(); + tiles.updateTextureAt(0, "res/stone.png"); + tiles.updateTextureAt(1, "res/dirt.png"); + tiles.updateTextureAt(2, "res/test.png"); - //define vertices - float vertices[] { - -0.01f, 0.01f, 0.0f, - 0.01f, -0.01f, 0.0f, - -0.01f, -0.01f, 0.0f, - -0.01f, 0.01f, 0.0f, - 0.01f, 0.01f, 0.0f, - 0.01f, -0.01f, 0.0f - }; + //define vertices + float vertices[] { + -0.01f, 0.01f, 0.0f, + 0.01f, -0.01f, 0.0f, + -0.01f, -0.01f, 0.0f, + -0.01f, 0.01f, 0.0f, + 0.01f, 0.01f, 0.0f, + 0.01f, -0.01f, 0.0f + }; - glGenBuffers(1, &vertVBO); - glBindBuffer(GL_ARRAY_BUFFER, vertVBO); - glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW); + glGenBuffers(1, &vertVBO); + glBindBuffer(GL_ARRAY_BUFFER, vertVBO); + glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW); - glGenVertexArrays(1, &vao); - glBindVertexArray(vao); - glBindBuffer(GL_ARRAY_BUFFER, vertVBO); - glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, NULL); + glGenVertexArrays(1, &vao); + glBindVertexArray(vao); + glBindBuffer(GL_ARRAY_BUFFER, vertVBO); + glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, NULL); - glEnableVertexAttribArray(0); + glEnableVertexAttribArray(0); - //shaders + //shaders mCursorShader.loadShaderFiles("res/shaders/test.vert.glsl", "res/shaders/test.frag.glsl"); - cursorShaders = LoadShaders("res/shaders/test.vert.glsl", "res/shaders/test.frag.glsl"); - shaders = LoadShaders("res/shaders/voxelvert.vert.glsl", "res/shaders/voxelfrag.frag.glsl"); + cursorShaders = LoadShaders("res/shaders/test.vert.glsl", "res/shaders/test.frag.glsl"); + shaders = LoadShaders("res/shaders/voxelvert.vert.glsl", "res/shaders/voxelfrag.frag.glsl"); - glUseProgram(shaders); + glUseProgram(shaders); - camera.setPosition(glm::vec3(0.0f, 5.0f, 5.0f)); - camera.setAspectRatio(linkedGame->window.getAspect()); + camera.setPosition(glm::vec3(0.0f, 5.0f, 5.0f)); + camera.setAspectRatio(linkedGame->window.getAspect()); - viewMatUni = glGetUniformLocation(shaders, "view"); - projMatUni = glGetUniformLocation(shaders, "proj"); - modelMatUni = glGetUniformLocation(shaders, "model"); - world.modelMatUni = modelMatUni; + viewMatUni = glGetUniformLocation(shaders, "view"); + projMatUni = glGetUniformLocation(shaders, "proj"); + modelMatUni = glGetUniformLocation(shaders, "model"); + world.modelMatUni = modelMatUni; mSkyboxTask = new RenderTask(mSkybox, camera, linkedGame->window); - - glUniformMatrix4fv(viewMatUni, 1, GL_FALSE, glm::value_ptr(camera.getViewMatrix())); - glUniformMatrix4fv(projMatUni, 1, GL_FALSE, glm::value_ptr(linkedGame->window.getProjectionMatrix())); - - //nanovg - vg = nvgCreateGL3(NVG_ANTIALIAS | NVG_STENCIL_STROKES); - nvgCreateFont(vg, "mono", "res/fonts/DejaVuSansMono.ttf"); - - SDL_SetRelativeMouseMode(SDL_TRUE); - sensitivity = linkedGame->getConfig()->getValue("controls.mouse.sensitivity", 5.0f); - - //get config - Config* conf = linkedGame->getConfig(); - - //add actions to handler - handler.setAction("Move Forward", conf->getValue("controls.bindings.movement.forward", "W" )); - handler.setAction("Move Backward", conf->getValue("controls.bindings.movement.backward", "S" )); - handler.setAction("Move Left", conf->getValue("controls.bindings.movement.left", "A" )); - handler.setAction("Move Right", conf->getValue("controls.bindings.movement.right", "D" )); - handler.setAction("Move Up", conf->getValue("controls.bindings.movement.up", "Space" )); - handler.setAction("Move Down", conf->getValue("controls.bindings.movement.down", "Left Ctrl")); - handler.setAction("Place Voxel", conf->getValue("controls.bindings.action.placevoxel", "Mouse Left")); - handler.setAction("Delete Voxel", conf->getValue("controls.bindings.action.delvoxel", "Mouse Right")); - handler.setAction("Select Type 1", conf->getValue("controls.bindings.typesel.type1", "1" )); - handler.setAction("Select Type 2", conf->getValue("controls.bindings.typesel.type2", "2" )); - - //set signals for handler - handler.getEventSignal(SDL_QUIT ).connect(linkedGame); - handler.getEventSignal(SDL_MOUSEMOTION).connect(this); - - world.voxelInfo.setTextureData(1, Face3D::RIGHT, Orientation2D::UP, 0.0f); - world.voxelInfo.setTextureData(1, Face3D::LEFT, Orientation2D::UP, 0.0f); - world.voxelInfo.setTextureData(1, Face3D::TOP, Orientation2D::UP, 0.0f); - world.voxelInfo.setTextureData(1, Face3D::BOTTOM, Orientation2D::UP, 0.0f); - world.voxelInfo.setTextureData(1, Face3D::FRONT, Orientation2D::UP, 0.0f); - world.voxelInfo.setTextureData(1, Face3D::BACK, Orientation2D::UP, 0.0f); - - world.voxelInfo.setTextureData(2, Face3D::RIGHT, Orientation2D::UP, 1.0f); - world.voxelInfo.setTextureData(2, Face3D::LEFT, Orientation2D::UP, 1.0f); - world.voxelInfo.setTextureData(2, Face3D::TOP, Orientation2D::UP, 2.0f); - world.voxelInfo.setTextureData(2, Face3D::BOTTOM, Orientation2D::UP, 1.0f); - world.voxelInfo.setTextureData(2, Face3D::FRONT, Orientation2D::UP, 1.0f); - world.voxelInfo.setTextureData(2, Face3D::BACK, Orientation2D::UP, 1.0f); - - //world.voxelInfo.setTransparent(1, false); - //world.voxelInfo.setTransparent(2, false); - - std::cout << std::endl; - - int chunkCount = 1; - for (int i = 0; i < 8; i++) { - for (int j = 0; j < 8; j++) { - for (int k = 0; k < 8; k++) { - std::cout << "\rGenerating chunks (" << chunkCount << "/" << 8*8*8 << ")" << std::flush; - world.generateChunk(i,j,k); - chunkCount++; - } - } - } - - //world.forceGlobalGeometryUpdate(); - - voxelType = 1; + + glUniformMatrix4fv(viewMatUni, 1, GL_FALSE, glm::value_ptr(camera.getViewMatrix())); + glUniformMatrix4fv(projMatUni, 1, GL_FALSE, glm::value_ptr(linkedGame->window.getProjectionMatrix())); + + //nanovg + vg = nvgCreateGL3(NVG_ANTIALIAS | NVG_STENCIL_STROKES); + nvgCreateFont(vg, "mono", "res/fonts/DejaVuSansMono.ttf"); + + SDL_SetRelativeMouseMode(SDL_TRUE); + sensitivity = linkedGame->getConfig()->getValue("controls.mouse.sensitivity", 5.0f); + + //get config + Config* conf = linkedGame->getConfig(); + + //add actions to handler + handler.setAction("Move Forward", conf->getValue("controls.bindings.movement.forward", "W" )); + handler.setAction("Move Backward", conf->getValue("controls.bindings.movement.backward", "S" )); + handler.setAction("Move Left", conf->getValue("controls.bindings.movement.left", "A" )); + handler.setAction("Move Right", conf->getValue("controls.bindings.movement.right", "D" )); + handler.setAction("Move Up", conf->getValue("controls.bindings.movement.up", "Space" )); + handler.setAction("Move Down", conf->getValue("controls.bindings.movement.down", "Left Ctrl")); + handler.setAction("Place Voxel", conf->getValue("controls.bindings.action.placevoxel", "Mouse Left")); + handler.setAction("Delete Voxel", conf->getValue("controls.bindings.action.delvoxel", "Mouse Right")); + handler.setAction("Select Type 1", conf->getValue("controls.bindings.typesel.type1", "1" )); + handler.setAction("Select Type 2", conf->getValue("controls.bindings.typesel.type2", "2" )); + + //set signals for handler + handler.getEventSignal(SDL_QUIT ).connect(linkedGame); + handler.getEventSignal(SDL_MOUSEMOTION).connect(this); + + world.voxelInfo.setTextureData(1, Face3D::RIGHT, Orientation2D::UP, 0.0f); + world.voxelInfo.setTextureData(1, Face3D::LEFT, Orientation2D::UP, 0.0f); + world.voxelInfo.setTextureData(1, Face3D::TOP, Orientation2D::UP, 0.0f); + world.voxelInfo.setTextureData(1, Face3D::BOTTOM, Orientation2D::UP, 0.0f); + world.voxelInfo.setTextureData(1, Face3D::FRONT, Orientation2D::UP, 0.0f); + world.voxelInfo.setTextureData(1, Face3D::BACK, Orientation2D::UP, 0.0f); + + world.voxelInfo.setTextureData(2, Face3D::RIGHT, Orientation2D::UP, 1.0f); + world.voxelInfo.setTextureData(2, Face3D::LEFT, Orientation2D::UP, 1.0f); + world.voxelInfo.setTextureData(2, Face3D::TOP, Orientation2D::UP, 2.0f); + world.voxelInfo.setTextureData(2, Face3D::BOTTOM, Orientation2D::UP, 1.0f); + world.voxelInfo.setTextureData(2, Face3D::FRONT, Orientation2D::UP, 1.0f); + world.voxelInfo.setTextureData(2, Face3D::BACK, Orientation2D::UP, 1.0f); + + //world.voxelInfo.setTransparent(1, false); + //world.voxelInfo.setTransparent(2, false); + + std::cout << std::endl; + + int chunkCount = 1; + for (int i = 0; i < 64; i++) { + for (int j = 0; j < 8; j++) { + for (int k = 0; k < 64; k++) { + std::cout << "\rGenerating chunks (" << chunkCount << "/" << 8*8*8 << ")" << std::flush; + world.generateChunk(i,j,k); + chunkCount++; + } + } + } + + //world.forceGlobalGeometryUpdate(); + + voxelType = 1; } void TestScene::reInit() { @@ -153,78 +153,78 @@ void TestScene::reInit() { } void TestScene::update(const float& dTime) { - this->dTime = dTime; - camera.update(dTime); - handler.update(); - world.update(); - - mFPS = 1.0f/dTime; - - if (handler.isActionDown("Move Forward" )) camera.moveRelative(glm::vec3 (0.0f, 0.0f, 1.0f) * dTime * 4.0f); - if (handler.isActionDown("Move Backward")) camera.moveRelative(glm::vec3( 0.0f, 0.0f, -1.0f) * dTime * 4.0f); - if (handler.isActionDown("Move Left" )) camera.moveRelative(glm::vec3(-1.0f, 0.0f, 0.0f) * dTime * 4.0f); - if (handler.isActionDown("Move Right" )) camera.moveRelative(glm::vec3( 1.0f, 0.0f, 0.0f) * dTime * 4.0f); - if (handler.isActionDown("Move Up" )) camera.move(glm::vec3( 0.0f, 1.0f, 0.0f) * dTime * 4.0f); - if (handler.isActionDown("Move Down" )) camera.move(glm::vec3( 0.0f, -1.0f, 0.0f) * dTime * 4.0f); - - if (handler.isActionDown("Select Type 1")) voxelType = 1; - if (handler.isActionDown("Select Type 2")) voxelType = 2; - - //place voxel testing - if ((handler.isActionDown("Place Voxel") || handler.isActionDown("Delete Voxel")) && !placeVoxel) { - placeVoxel = true; - //perform a raycast - glm::vec3 hitPos; - glm::vec3 hitNormal; - bool success; - world.voxelMath.rayCast(hitPos, hitNormal, success, camera.getPosition(), camera.getAngleVector(), 10); - if (success) { - std::cout << "Hit voxel at: " << hitPos.x << ", " << hitPos.y << ", " << hitPos.z << std::endl; - if (handler.isActionDown("Place Voxel")) { - world.setVoxelType((int)(hitPos.x + hitNormal.x), (int)(hitPos.y + hitNormal.y), (int)(hitPos.z + hitNormal.z), voxelType, true); - } else { - world.setVoxelType((int)(hitPos.x), (int)(hitPos.y), (int)(hitPos.z), 0, true); - } - } - } else if (!(handler.isActionDown("Place Voxel") || handler.isActionDown("Delete Voxel")) && placeVoxel) { - placeVoxel = false; - } - - //camera.moveRelative(camMovement * dTime); + this->dTime = dTime; + camera.update(dTime); + handler.update(); + world.update(); + + mFPS = 1.0f/dTime; + + if (handler.isActionDown("Move Forward" )) camera.moveRelative(glm::vec3 (0.0f, 0.0f, 1.0f) * dTime * 4.0f); + if (handler.isActionDown("Move Backward")) camera.moveRelative(glm::vec3( 0.0f, 0.0f, -1.0f) * dTime * 4.0f); + if (handler.isActionDown("Move Left" )) camera.moveRelative(glm::vec3(-1.0f, 0.0f, 0.0f) * dTime * 4.0f); + if (handler.isActionDown("Move Right" )) camera.moveRelative(glm::vec3( 1.0f, 0.0f, 0.0f) * dTime * 4.0f); + if (handler.isActionDown("Move Up" )) camera.move(glm::vec3( 0.0f, 1.0f, 0.0f) * dTime * 4.0f); + if (handler.isActionDown("Move Down" )) camera.move(glm::vec3( 0.0f, -1.0f, 0.0f) * dTime * 4.0f); + + if (handler.isActionDown("Select Type 1")) voxelType = 1; + if (handler.isActionDown("Select Type 2")) voxelType = 2; + + //place voxel testing + if ((handler.isActionDown("Place Voxel") || handler.isActionDown("Delete Voxel")) && !placeVoxel) { + placeVoxel = true; + //perform a raycast + glm::vec3 hitPos; + glm::vec3 hitNormal; + bool success; + world.voxelMath.rayCast(hitPos, hitNormal, success, camera.getPosition(), camera.getAngleVector(), 10); + if (success) { + std::cout << "Hit voxel at: " << hitPos.x << ", " << hitPos.y << ", " << hitPos.z << std::endl; + if (handler.isActionDown("Place Voxel")) { + world.setVoxelType((int)(hitPos.x + hitNormal.x), (int)(hitPos.y + hitNormal.y), (int)(hitPos.z + hitNormal.z), voxelType, true); + } else { + world.setVoxelType((int)(hitPos.x), (int)(hitPos.y), (int)(hitPos.z), 0, true); + } + } + } else if (!(handler.isActionDown("Place Voxel") || handler.isActionDown("Delete Voxel")) && placeVoxel) { + placeVoxel = false; + } + + //camera.moveRelative(camMovement * dTime); } void TestScene::draw() { - mSkyboxTask->draw(); - - gls::setShader(shaders); - glUniformMatrix4fv(viewMatUni, 1, GL_FALSE, glm::value_ptr(camera.getViewMatrix())); - world.draw(); - - glDisable(GL_DEPTH_TEST); - mCursorShader.activate(); - glBindVertexArray(vao); - glDrawArrays(GL_TRIANGLES, 0, 6); - - nvgBeginFrame(vg, 1920, 1080, 1); - - nvgFontSize(vg, 14.0f); - nvgFontFace(vg, "mono"); - nvgFillColor(vg, nvgRGBA(0, 0, 0, 190)); - - std::string fpsString = std::to_string(mFPS); - nvgText(vg, 5, 19, fpsString.data(), NULL); - - nvgEndFrame(vg); - glFrontFace(GL_CW); - glEnable(GL_CULL_FACE); - glEnable(GL_DEPTH_TEST); + mSkyboxTask->draw(); + + gls::setShader(shaders); + glUniformMatrix4fv(viewMatUni, 1, GL_FALSE, glm::value_ptr(camera.getViewMatrix())); + world.draw(); + + glDisable(GL_DEPTH_TEST); + mCursorShader.activate(); + glBindVertexArray(vao); + glDrawArrays(GL_TRIANGLES, 0, 6); + + nvgBeginFrame(vg, 1920, 1080, 1); + + nvgFontSize(vg, 14.0f); + nvgFontFace(vg, "mono"); + nvgFillColor(vg, nvgRGBA(0, 0, 0, 190)); + + std::string fpsString = std::to_string(mFPS); + nvgText(vg, 5, 19, fpsString.data(), NULL); + + nvgEndFrame(vg); + glFrontFace(GL_CW); + glEnable(GL_CULL_FACE); + glEnable(GL_DEPTH_TEST); } void TestScene::look() { - int x, y; //mouse change - SDL_GetRelativeMouseState(&x, &y); - camera.rotate((float)x * sensitivity * 0.001f, (float)y * sensitivity * 0.001f); - //camera.rotate((float)x, (float)y); + int x, y; //mouse change + SDL_GetRelativeMouseState(&x, &y); + camera.rotate((float)x * sensitivity * 0.001f, (float)y * sensitivity * 0.001f); + //camera.rotate((float)x, (float)y); } } diff --git a/src/world.cpp b/src/world.cpp index d6690e5..f17ec72 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -3,15 +3,15 @@ * * Filename: world.cpp * - * Description: + * Description: * * Version: 1.0 * Created: 04/03/2014 09:53:00 PM * Revision: none * Compiler: gcc * - * Author: YOUR NAME (), - * Organization: + * Author: YOUR NAME (), + * Organization: * * ===================================================================================== */ @@ -32,208 +32,211 @@ namespace vtk { +{ + asd; +} + World::World() { - chunkSize = 16; - voxelSize = 1.0f; - voxelInfo.linkedWorld = this; - voxelMath.linkedWorld = this; - rebuildThreadActive = false; + chunkSize = 16; + voxelSize = 1.0f; + voxelInfo.linkedWorld = this; + voxelMath.linkedWorld = this; + rebuildThreadActive = false; } bool World::isVoxelSolid(const int& x, const int& y, const int& z) { - auto chunkPos = glm::ivec3(floor((float)x / (float)chunkSize), - floor((float)y / (float)chunkSize), - floor((float)z / (float)chunkSize)); - if (mChunks.find(chunkPos) == mChunks.end()) { //block is in nonexistant chunk - return true; - } - - int relPosX = x - chunkPos.x * chunkSize; - int relPosY = y - chunkPos.y * chunkSize; - int relPosZ = z - chunkPos.z * chunkSize; - - return mChunks[chunkPos]->isVoxelSolid(relPosX, relPosY, relPosZ); + auto chunkPos = glm::ivec3(floor((float)x / (float)chunkSize), + floor((float)y / (float)chunkSize), + floor((float)z / (float)chunkSize)); + if (mChunks.find(chunkPos) == mChunks.end()) { //block is in nonexistant chunk + return true; + } + + int relPosX = x - chunkPos.x * chunkSize; + int relPosY = y - chunkPos.y * chunkSize; + int relPosZ = z - chunkPos.z * chunkSize; + + return mChunks[chunkPos]->isVoxelSolid(relPosX, relPosY, relPosZ); } bool World::setVoxelType(const int& x, const int& y, const int& z, const unsigned& type, const bool& updateChunk) { - auto chunkPos = glm::ivec3(floor((float)x / (float)chunkSize), floor((float)y / (float)chunkSize), floor((float)z / (float)chunkSize)); - if (mChunks.find(chunkPos) == mChunks.end()) { //block is in nonexistant chunk - return false; - } - - int relPosX = x - chunkPos.x * chunkSize; - int relPosY = y - chunkPos.y * chunkSize; - int relPosZ = z - chunkPos.z * chunkSize; - - mChunks[chunkPos]->setVoxelType(relPosX, relPosY, relPosZ, type); - if (updateChunk) queueChunkUpdate(chunkPos, true); - return true; + auto chunkPos = glm::ivec3(floor((float)x / (float)chunkSize), floor((float)y / (float)chunkSize), floor((float)z / (float)chunkSize)); + if (mChunks.find(chunkPos) == mChunks.end()) { //block is in nonexistant chunk + return false; + } + + int relPosX = x - chunkPos.x * chunkSize; + int relPosY = y - chunkPos.y * chunkSize; + int relPosZ = z - chunkPos.z * chunkSize; + + mChunks[chunkPos]->setVoxelType(relPosX, relPosY, relPosZ, type); + if (updateChunk) queueChunkUpdate(chunkPos, true); + return true; } unsigned World::getVoxelType(const glm::ivec3& pos) { - auto chunkPos = glm::ivec3(floor((float)pos.x / (float)chunkSize), - floor((float)pos.y / (float)chunkSize), - floor((float)pos.z / (float)chunkSize)); - if (mChunks.find(chunkPos) == mChunks.end()) { - return 0; - } - - int relPosX = pos.x - chunkPos.x * chunkSize; - int relPosY = pos.y - chunkPos.y * chunkSize; - int relPosZ = pos.z - chunkPos.z * chunkSize; - - return mChunks[chunkPos]->getVoxelType((unsigned)relPosX, (unsigned)relPosY, (unsigned)relPosZ); + auto chunkPos = glm::ivec3(floor((float)pos.x / (float)chunkSize), + floor((float)pos.y / (float)chunkSize), + floor((float)pos.z / (float)chunkSize)); + if (mChunks.find(chunkPos) == mChunks.end()) { + return 0; + } + + int relPosX = pos.x - chunkPos.x * chunkSize; + int relPosY = pos.y - chunkPos.y * chunkSize; + int relPosZ = pos.z - chunkPos.z * chunkSize; + + return mChunks[chunkPos]->getVoxelType((unsigned)relPosX, (unsigned)relPosY, (unsigned)relPosZ); } bool World::makeChunk(const int& x, const int& y, const int& z) { - auto pos = glm::ivec3(x, y, z); + auto pos = glm::ivec3(x, y, z); + + if (mChunks.find(pos) != mChunks.end()) { //chunk already exists + return false; + } - if (mChunks.find(pos) != mChunks.end()) { //chunk already exists - return false; - } + auto newChunk = new Chunk(*this); + mChunks[pos] = newChunk; - auto newChunk = new Chunk(*this); - mChunks[pos] = newChunk; + newChunk->setPos(pos); - newChunk->setPos(pos); + mChunkMeshes.emplace(pos, ChunkMesh(*this, pos)); - mChunkMeshes.emplace(pos, ChunkMesh(*this, pos)); - - return true; + return true; } bool World::generateChunk(const int& x, const int& y, const int& z) { - bool chunkMade = makeChunk(x,y,z); - if (chunkMade) { - terrain.generateChunk(getChunk(glm::ivec3(x,y,z))); - //queue this chunk for geometry update - queueChunkUpdate(x,y,z); - - //queue the neighboring 6 chunks. the queue functions throws them out - // if they don't exist - queueChunkUpdate(x+1,y,z); - queueChunkUpdate(x-1,y,z); - queueChunkUpdate(x,y+1,z); - queueChunkUpdate(x,y-1,z); - queueChunkUpdate(x,y,z+1); - queueChunkUpdate(x,y,z-1); - } - return chunkMade; + bool chunkMade = makeChunk(x,y,z); + if (chunkMade) { + terrain.generateChunk(getChunk(glm::ivec3(x,y,z))); + //queue this chunk for geometry update + queueChunkUpdate(x,y,z); + + //queue the neighboring 6 chunks. the queue functions throws them out + // if they don't exist + queueChunkUpdate(x+1,y,z); + queueChunkUpdate(x-1,y,z); + queueChunkUpdate(x,y+1,z); + queueChunkUpdate(x,y-1,z); + queueChunkUpdate(x,y,z+1); + queueChunkUpdate(x,y,z-1); + } + return chunkMade; } - Chunk* World::getChunk(const glm::ivec3& pos) { - auto chunk = mChunks.find(pos)->second; - if (chunk) return chunk; - else return nullptr; - } - - void World::queueChunkUpdate(const int& x, const int& y, const int& z, const bool& back) { - queueChunkUpdate(glm::ivec3(x,y,z)); +Chunk* World::getChunk(const glm::ivec3& pos) { + auto chunk = mChunks.find(pos)->second; + if (chunk) return chunk; + else return nullptr; +} + +void World::queueChunkUpdate(const int& x, const int& y, const int& z, const bool& back) { + queueChunkUpdate(glm::ivec3(x,y,z)); } - void World::queueChunkUpdate(const glm::ivec3& pos, const bool& back) { - if (mChunks.find(pos) == mChunks.end()) return; //chunk doesn't exist - for (auto& i : mChunkUpdateQueue) { - if (i == pos) return; //chunk is already in queue, we don't need to update multiple times - } - - if (back) { - mChunkUpdateQueue.push_back(pos); - } else { - mChunkUpdateQueue.push_front(pos); - } +void World::queueChunkUpdate(const glm::ivec3& pos, const bool& back) { + if (mChunks.find(pos) == mChunks.end()) return; //chunk doesn't exist + for (auto& i : mChunkUpdateQueue) { + if (i == pos) return; //chunk is already in queue, we don't need to update multiple times + } + + if (back) { + mChunkUpdateQueue.push_back(pos); + } else { + mChunkUpdateQueue.push_front(pos); + } } void World::draw() { - /* - for (auto& i : chunks) { - glm::mat4 modelMat = glm::translate(glm::mat4(), glm::vec3( - (float)i.second->getPos().x * 16, - (float)i.second->getPos().y * 16, - (float)i.second->getPos().z * 16 - )); - - glUniformMatrix4fv(modelMatUni, 1, GL_FALSE, glm::value_ptr(modelMat)); - i.second->renderer.drawChunk(); - } - */ - for (auto& i : mChunkMeshes) { - glm::mat4 modelMat = glm::translate(glm::mat4(), glm::vec3( - (float)i.first.x * 16, - (float)i.first.y * 16, - (float)i.first.z * 16 - )); - - glUniformMatrix4fv(modelMatUni, 1, GL_FALSE, glm::value_ptr(modelMat)); - i.second.draw(); - } + /* + for (auto& i : chunks) { + glm::mat4 modelMat = glm::translate(glm::mat4(), glm::vec3( + (float)i.second->getPos().x * 16, + (float)i.second->getPos().y * 16, + (float)i.second->getPos().z * 16 + )); + + glUniformMatrix4fv(modelMatUni, 1, GL_FALSE, glm::value_ptr(modelMat)); + i.second->renderer.drawChunk(); + } + */ + for (auto& i : mChunkMeshes) { + glm::mat4 modelMat = glm::translate(glm::mat4(), glm::vec3((float)i.first.x * 16, + (float)i.first.y * 16, + (float)i.first.z * 16 + )); + + glUniformMatrix4fv(modelMatUni, 1, GL_FALSE, glm::value_ptr(modelMat)); + i.second.draw(); + } } void World::update() { - if (!rebuildThreadActive && !mChunkUpdateQueue.empty( )) { - auto updatefunc = [&]() { - while (!mChunkUpdateQueue.empty()) { - auto& pos = mChunkUpdateQueue.back(); - auto& mesh = mChunkMeshes.find(pos)->second; - mChunkUpdateQueue.pop_back(); - mesh.rebuildChunkGeometry(); - } - rebuildThreadActive = false; - }; - - rebuildThreadActive = true; - std::thread(updatefunc).detach(); - - } - /* - while (!chunkUpdateQueue.empty()) { - auto chunk = chunks[chunkUpdateQueue.back()]; - chunkUpdateQueue.pop_back(); - std::thread(&ChunkRenderer::updateGeometry, &chunk->renderer).detach(); - auto& pos = chunkUpdateQueue.back(); - auto posVec = glm::ivec3(std::get<0>(pos), std::get<1>(pos), std::get<2>(pos)); - auto& mesh = mChunkMeshes.find(posVec)->second; - chunkUpdateQueue.pop_back(); - //mesh.rebuildChunkGeometry(); - std::thread(&ChunkMesh::rebuildChunkGeometry, &mesh).detach(); - mChunkGeometryUpdateQueue.push_back(posVec); - } - - for (auto& i : chunks) { - i.second->renderer.updateVertexData(); - } - - auto it = mChunkGeometryUpdateQueue.begin(); - while (it != mChunkGeometryUpdateQueue.end()) { - if (mChunkMeshes.find(*it)->second.updateGeometry()) { - std::cout << "updated chunk " << it->x << "," << it->y << "," << it->z; - mChunkGeometryUpdateQueue.erase(it); - } - else ++it; - } - */ + if (!rebuildThreadActive && !mChunkUpdateQueue.empty( )) { + auto updatefunc = [&]() { + while (!mChunkUpdateQueue.empty()) { + auto& pos = mChunkUpdateQueue.back(); + auto& mesh = mChunkMeshes.find(pos)->second; + mChunkUpdateQueue.pop_back(); + mesh.rebuildChunkGeometry(); + } + rebuildThreadActive = false; + }; + + rebuildThreadActive = true; + std::thread(updatefunc).detach(); + + } + /* + while (!chunkUpdateQueue.empty()) { + auto chunk = chunks[chunkUpdateQueue.back()]; + chunkUpdateQueue.pop_back(); + std::thread(&ChunkRenderer::updateGeometry, &chunk->renderer).detach(); + auto& pos = chunkUpdateQueue.back(); + auto posVec = glm::ivec3(std::get<0>(pos), std::get<1>(pos), std::get<2>(pos)); + auto& mesh = mChunkMeshes.find(posVec)->second; + chunkUpdateQueue.pop_back(); + //mesh.rebuildChunkGeometry(); + std::thread(&ChunkMesh::rebuildChunkGeometry, &mesh).detach(); + mChunkGeometryUpdateQueue.push_back(posVec); + } + + for (auto& i : chunks) { + i.second->renderer.updateVertexData(); + } + + auto it = mChunkGeometryUpdateQueue.begin(); + while (it != mChunkGeometryUpdateQueue.end()) { + if (mChunkMeshes.find(*it)->second.updateGeometry()) { + std::cout << "updated chunk " << it->x << "," << it->y << "," << it->z; + mChunkGeometryUpdateQueue.erase(it); + } + else ++it; + } + */ } void World::forceGlobalGeometryUpdate() { - int chunkCount = 1; - /* - for (auto& i : chunks) { - std::cout << "\rUpdating chunk geometry (" << chunkCount << "/" << chunks.size() << ")" << std::flush; - i.second->renderer.updateGeometry(); - chunkCount++; - //i.second->renderer.updateVertexData(); - } - */ - chunkCount = 1; - for (auto& i : mChunkMeshes) { - std::cout << "\rUpdating chunk geometry, but better (" << chunkCount << "/" << mChunkMeshes.size() << ")" << std::flush; - i.second.rebuildChunkGeometry(); - i.second.updateGeometry(); - ++chunkCount; - } + int chunkCount = 1; + /* + for (auto& i : chunks) { + std::cout << "\rUpdating chunk geometry (" << chunkCount << "/" << chunks.size() << ")" << std::flush; + i.second->renderer.updateGeometry(); + chunkCount++; + //i.second->renderer.updateVertexData(); + } + */ + chunkCount = 1; + for (auto& i : mChunkMeshes) { + std::cout << "\rUpdating chunk geometry, but better (" << chunkCount << "/" << mChunkMeshes.size() << ")" << std::flush; + i.second.rebuildChunkGeometry(); + i.second.updateGeometry(); + ++chunkCount; + } } }