aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--3rdparty/buildfile1
-rw-r--r--3rdparty/glad/CMakeLists.txt10
-rw-r--r--3rdparty/glfw/CMakeLists.txt9
-rw-r--r--3rdparty/glm/CMakeLists.txt6
-rw-r--r--3rdparty/glm/source/.appveyor.yml92
-rw-r--r--3rdparty/glm/source/.gitignore61
-rw-r--r--3rdparty/glm/source/.travis.yml388
-rw-r--r--3rdparty/glm/source/CMakeLists.txt45
-rw-r--r--3rdparty/glm/source/cmake/cmake_uninstall.cmake.in21
-rw-r--r--3rdparty/glm/source/glm/CMakeLists.txt78
-rw-r--r--3rdparty/glm/source/manual.md2430
-rw-r--r--3rdparty/glm/source/readme.md1231
-rw-r--r--3rdparty/glm/source/test/CMakeLists.txt246
-rw-r--r--3rdparty/glm/source/test/bug/CMakeLists.txt1
-rw-r--r--3rdparty/glm/source/test/bug/bug_ms_vec_static.cpp31
-rw-r--r--3rdparty/glm/source/test/cmake/CMakeLists.txt8
-rw-r--r--3rdparty/glm/source/test/cmake/test_find_glm.cpp22
-rw-r--r--3rdparty/glm/source/test/core/CMakeLists.txt52
-rw-r--r--3rdparty/glm/source/test/core/core_cpp_constexpr.cpp750
-rw-r--r--3rdparty/glm/source/test/core/core_cpp_defaulted_ctor.cpp145
-rw-r--r--3rdparty/glm/source/test/core/core_force_aligned_gentypes.cpp10
-rw-r--r--3rdparty/glm/source/test/core/core_force_arch_unknown.cpp14
-rw-r--r--3rdparty/glm/source/test/core/core_force_compiler_unknown.cpp14
-rw-r--r--3rdparty/glm/source/test/core/core_force_ctor_init.cpp139
-rw-r--r--3rdparty/glm/source/test/core/core_force_cxx03.cpp14
-rw-r--r--3rdparty/glm/source/test/core/core_force_cxx98.cpp14
-rw-r--r--3rdparty/glm/source/test/core/core_force_cxx_unknown.cpp14
-rw-r--r--3rdparty/glm/source/test/core/core_force_depth_zero_to_one.cpp12
-rw-r--r--3rdparty/glm/source/test/core/core_force_explicit_ctor.cpp17
-rw-r--r--3rdparty/glm/source/test/core/core_force_inline.cpp12
-rw-r--r--3rdparty/glm/source/test/core/core_force_left_handed.cpp12
-rw-r--r--3rdparty/glm/source/test/core/core_force_platform_unknown.cpp14
-rw-r--r--3rdparty/glm/source/test/core/core_force_pure.cpp434
-rw-r--r--3rdparty/glm/source/test/core/core_force_quat_xyzw.cpp13
-rw-r--r--3rdparty/glm/source/test/core/core_force_size_t_length.cpp12
-rw-r--r--3rdparty/glm/source/test/core/core_force_unrestricted_gentype.cpp12
-rw-r--r--3rdparty/glm/source/test/core/core_force_xyzw_only.cpp58
-rw-r--r--3rdparty/glm/source/test/core/core_func_common.cpp1349
-rw-r--r--3rdparty/glm/source/test/core/core_func_exponential.cpp185
-rw-r--r--3rdparty/glm/source/test/core/core_func_geometric.cpp200
-rw-r--r--3rdparty/glm/source/test/core/core_func_integer.cpp1556
-rw-r--r--3rdparty/glm/source/test/core/core_func_integer_bit_count.cpp291
-rw-r--r--3rdparty/glm/source/test/core/core_func_integer_find_lsb.cpp416
-rw-r--r--3rdparty/glm/source/test/core/core_func_integer_find_msb.cpp440
-rw-r--r--3rdparty/glm/source/test/core/core_func_matrix.cpp312
-rw-r--r--3rdparty/glm/source/test/core/core_func_noise.cpp7
-rw-r--r--3rdparty/glm/source/test/core/core_func_packing.cpp156
-rw-r--r--3rdparty/glm/source/test/core/core_func_swizzle.cpp164
-rw-r--r--3rdparty/glm/source/test/core/core_func_trigonometric.cpp10
-rw-r--r--3rdparty/glm/source/test/core/core_func_vector_relational.cpp180
-rw-r--r--3rdparty/glm/source/test/core/core_setup_force_cxx98.cpp12
-rw-r--r--3rdparty/glm/source/test/core/core_setup_force_size_t_length.cpp22
-rw-r--r--3rdparty/glm/source/test/core/core_setup_message.cpp230
-rw-r--r--3rdparty/glm/source/test/core/core_setup_platform_unknown.cpp21
-rw-r--r--3rdparty/glm/source/test/core/core_setup_precision.cpp58
-rw-r--r--3rdparty/glm/source/test/core/core_type_aligned.cpp92
-rw-r--r--3rdparty/glm/source/test/core/core_type_cast.cpp146
-rw-r--r--3rdparty/glm/source/test/core/core_type_ctor.cpp351
-rw-r--r--3rdparty/glm/source/test/core/core_type_int.cpp26
-rw-r--r--3rdparty/glm/source/test/core/core_type_length.cpp78
-rw-r--r--3rdparty/glm/source/test/core/core_type_mat2x2.cpp177
-rw-r--r--3rdparty/glm/source/test/core/core_type_mat2x3.cpp142
-rw-r--r--3rdparty/glm/source/test/core/core_type_mat2x4.cpp147
-rw-r--r--3rdparty/glm/source/test/core/core_type_mat3x2.cpp148
-rw-r--r--3rdparty/glm/source/test/core/core_type_mat3x3.cpp197
-rw-r--r--3rdparty/glm/source/test/core/core_type_mat3x4.cpp149
-rw-r--r--3rdparty/glm/source/test/core/core_type_mat4x2.cpp151
-rw-r--r--3rdparty/glm/source/test/core/core_type_mat4x3.cpp152
-rw-r--r--3rdparty/glm/source/test/core/core_type_mat4x4.cpp218
-rw-r--r--3rdparty/glm/source/test/core/core_type_vec1.cpp169
-rw-r--r--3rdparty/glm/source/test/core/core_type_vec2.cpp392
-rw-r--r--3rdparty/glm/source/test/core/core_type_vec3.cpp628
-rw-r--r--3rdparty/glm/source/test/core/core_type_vec4.cpp850
-rw-r--r--3rdparty/glm/source/test/ext/CMakeLists.txt55
-rw-r--r--3rdparty/glm/source/test/ext/ext_matrix_clip_space.cpp13
-rw-r--r--3rdparty/glm/source/test/ext/ext_matrix_common.cpp53
-rw-r--r--3rdparty/glm/source/test/ext/ext_matrix_int2x2_sized.cpp28
-rw-r--r--3rdparty/glm/source/test/ext/ext_matrix_int2x3_sized.cpp28
-rw-r--r--3rdparty/glm/source/test/ext/ext_matrix_int2x4_sized.cpp28
-rw-r--r--3rdparty/glm/source/test/ext/ext_matrix_int3x2_sized.cpp28
-rw-r--r--3rdparty/glm/source/test/ext/ext_matrix_int3x3_sized.cpp28
-rw-r--r--3rdparty/glm/source/test/ext/ext_matrix_int3x4_sized.cpp28
-rw-r--r--3rdparty/glm/source/test/ext/ext_matrix_int4x2_sized.cpp28
-rw-r--r--3rdparty/glm/source/test/ext/ext_matrix_int4x3_sized.cpp28
-rw-r--r--3rdparty/glm/source/test/ext/ext_matrix_int4x4_sized.cpp28
-rw-r--r--3rdparty/glm/source/test/ext/ext_matrix_integer.cpp237
-rw-r--r--3rdparty/glm/source/test/ext/ext_matrix_projection.cpp13
-rw-r--r--3rdparty/glm/source/test/ext/ext_matrix_relational.cpp163
-rw-r--r--3rdparty/glm/source/test/ext/ext_matrix_transform.cpp61
-rw-r--r--3rdparty/glm/source/test/ext/ext_matrix_uint2x2_sized.cpp28
-rw-r--r--3rdparty/glm/source/test/ext/ext_matrix_uint2x3_sized.cpp28
-rw-r--r--3rdparty/glm/source/test/ext/ext_matrix_uint2x4_sized.cpp28
-rw-r--r--3rdparty/glm/source/test/ext/ext_matrix_uint3x2_sized.cpp28
-rw-r--r--3rdparty/glm/source/test/ext/ext_matrix_uint3x3_sized.cpp28
-rw-r--r--3rdparty/glm/source/test/ext/ext_matrix_uint3x4_sized.cpp28
-rw-r--r--3rdparty/glm/source/test/ext/ext_matrix_uint4x2_sized.cpp28
-rw-r--r--3rdparty/glm/source/test/ext/ext_matrix_uint4x3_sized.cpp28
-rw-r--r--3rdparty/glm/source/test/ext/ext_matrix_uint4x4_sized.cpp28
-rw-r--r--3rdparty/glm/source/test/ext/ext_quaternion_common.cpp61
-rw-r--r--3rdparty/glm/source/test/ext/ext_quaternion_exponential.cpp87
-rw-r--r--3rdparty/glm/source/test/ext/ext_quaternion_geometric.cpp88
-rw-r--r--3rdparty/glm/source/test/ext/ext_quaternion_relational.cpp51
-rw-r--r--3rdparty/glm/source/test/ext/ext_quaternion_transform.cpp45
-rw-r--r--3rdparty/glm/source/test/ext/ext_quaternion_trigonometric.cpp40
-rw-r--r--3rdparty/glm/source/test/ext/ext_quaternion_type.cpp113
-rw-r--r--3rdparty/glm/source/test/ext/ext_scalar_common.cpp360
-rw-r--r--3rdparty/glm/source/test/ext/ext_scalar_constants.cpp36
-rw-r--r--3rdparty/glm/source/test/ext/ext_scalar_int_sized.cpp43
-rw-r--r--3rdparty/glm/source/test/ext/ext_scalar_integer.cpp686
-rw-r--r--3rdparty/glm/source/test/ext/ext_scalar_packing.cpp28
-rw-r--r--3rdparty/glm/source/test/ext/ext_scalar_reciprocal.cpp171
-rw-r--r--3rdparty/glm/source/test/ext/ext_scalar_relational.cpp106
-rw-r--r--3rdparty/glm/source/test/ext/ext_scalar_uint_sized.cpp43
-rw-r--r--3rdparty/glm/source/test/ext/ext_scalar_ulp.cpp96
-rw-r--r--3rdparty/glm/source/test/ext/ext_vec1.cpp157
-rw-r--r--3rdparty/glm/source/test/ext/ext_vector_bool1.cpp104
-rw-r--r--3rdparty/glm/source/test/ext/ext_vector_common.cpp365
-rw-r--r--3rdparty/glm/source/test/ext/ext_vector_iec559.cpp166
-rw-r--r--3rdparty/glm/source/test/ext/ext_vector_int1_sized.cpp41
-rw-r--r--3rdparty/glm/source/test/ext/ext_vector_int2_sized.cpp41
-rw-r--r--3rdparty/glm/source/test/ext/ext_vector_int3_sized.cpp41
-rw-r--r--3rdparty/glm/source/test/ext/ext_vector_int4_sized.cpp41
-rw-r--r--3rdparty/glm/source/test/ext/ext_vector_integer.cpp547
-rw-r--r--3rdparty/glm/source/test/ext/ext_vector_integer_sized.cpp216
-rw-r--r--3rdparty/glm/source/test/ext/ext_vector_packing.cpp58
-rw-r--r--3rdparty/glm/source/test/ext/ext_vector_reciprocal.cpp186
-rw-r--r--3rdparty/glm/source/test/ext/ext_vector_relational.cpp205
-rw-r--r--3rdparty/glm/source/test/ext/ext_vector_uint1_sized.cpp41
-rw-r--r--3rdparty/glm/source/test/ext/ext_vector_uint2_sized.cpp41
-rw-r--r--3rdparty/glm/source/test/ext/ext_vector_uint3_sized.cpp41
-rw-r--r--3rdparty/glm/source/test/ext/ext_vector_uint4_sized.cpp41
-rw-r--r--3rdparty/glm/source/test/ext/ext_vector_ulp.cpp99
-rw-r--r--3rdparty/glm/source/test/glm.cppcheck6
-rw-r--r--3rdparty/glm/source/test/gtc/CMakeLists.txt20
-rw-r--r--3rdparty/glm/source/test/gtc/gtc_bitfield.cpp936
-rw-r--r--3rdparty/glm/source/test/gtc/gtc_color_space.cpp78
-rw-r--r--3rdparty/glm/source/test/gtc/gtc_constants.cpp30
-rw-r--r--3rdparty/glm/source/test/gtc/gtc_epsilon.cpp78
-rw-r--r--3rdparty/glm/source/test/gtc/gtc_integer.cpp233
-rw-r--r--3rdparty/glm/source/test/gtc/gtc_matrix_access.cpp383
-rw-r--r--3rdparty/glm/source/test/gtc/gtc_matrix_integer.cpp8
-rw-r--r--3rdparty/glm/source/test/gtc/gtc_matrix_inverse.cpp51
-rw-r--r--3rdparty/glm/source/test/gtc/gtc_matrix_transform.cpp55
-rw-r--r--3rdparty/glm/source/test/gtc/gtc_noise.cpp86
-rw-r--r--3rdparty/glm/source/test/gtc/gtc_packing.cpp878
-rw-r--r--3rdparty/glm/source/test/gtc/gtc_quaternion.cpp345
-rw-r--r--3rdparty/glm/source/test/gtc/gtc_random.cpp381
-rw-r--r--3rdparty/glm/source/test/gtc/gtc_reciprocal.cpp8
-rw-r--r--3rdparty/glm/source/test/gtc/gtc_round.cpp458
-rw-r--r--3rdparty/glm/source/test/gtc/gtc_type_aligned.cpp181
-rw-r--r--3rdparty/glm/source/test/gtc/gtc_type_precision.cpp1041
-rw-r--r--3rdparty/glm/source/test/gtc/gtc_type_ptr.cpp335
-rw-r--r--3rdparty/glm/source/test/gtc/gtc_ulp.cpp99
-rw-r--r--3rdparty/glm/source/test/gtc/gtc_user_defined_types.cpp30
-rw-r--r--3rdparty/glm/source/test/gtc/gtc_vec1.cpp8
-rw-r--r--3rdparty/glm/source/test/gtx/CMakeLists.txt59
-rw-r--r--3rdparty/glm/source/test/gtx/gtx.cpp8
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_associated_min_max.cpp10
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_closest_point.cpp9
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_color_encoding.cpp51
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_color_space.cpp20
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_color_space_YCoCg.cpp9
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_common.cpp161
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_compatibility.cpp19
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_component_wise.cpp116
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_dual_quaternion.cpp205
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_easing.cpp65
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_euler_angle.cpp539
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_extend.cpp9
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_extended_min_max.cpp101
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_extented_min_max.cpp39
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_exterior_product.cpp14
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_fast_exponential.cpp9
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_fast_square_root.cpp45
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_fast_trigonometry.cpp564
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_functions.cpp36
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_gradient_paint.cpp34
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_handed_coordinate_space.cpp9
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_int_10_10_10_2.cpp18
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_integer.cpp108
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_intersect.cpp88
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_io.cpp186
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_load.cpp124
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_log_base.cpp54
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_matrix_cross_product.cpp9
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_matrix_decompose.cpp19
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_matrix_factorisation.cpp105
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_matrix_interpolation.cpp122
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_matrix_major_storage.cpp9
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_matrix_operation.cpp86
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_matrix_query.cpp66
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_matrix_transform_2d.cpp9
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_mixed_product.cpp18
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_norm.cpp81
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_normal.cpp9
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_normalize_dot.cpp9
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_number_precision.cpp9
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_optimum_pow.cpp9
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_orthonormalize.cpp9
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_pca.cpp724
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_perpendicular.cpp9
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_polar_coordinates.cpp9
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_projection.cpp9
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_quaternion.cpp107
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_random.cpp99
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_range.cpp83
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_rotate_normalized_axis.cpp9
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_rotate_vector.cpp77
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_scalar_multiplication.cpp37
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_scalar_relational.cpp174
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_simd_mat4.cpp324
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_simd_vec4.cpp71
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_spline.cpp100
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_string_cast.cpp155
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_texture.cpp22
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_type_aligned.cpp114
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_type_trait.cpp13
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_vec_swizzle.cpp11
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_vector_angle.cpp59
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_vector_query.cpp82
-rw-r--r--3rdparty/glm/source/test/gtx/gtx_wrap.cpp191
-rw-r--r--3rdparty/glm/source/test/perf/CMakeLists.txt6
-rw-r--r--3rdparty/glm/source/test/perf/perf_matrix_div.cpp153
-rw-r--r--3rdparty/glm/source/test/perf/perf_matrix_inverse.cpp150
-rw-r--r--3rdparty/glm/source/test/perf/perf_matrix_mul.cpp154
-rw-r--r--3rdparty/glm/source/test/perf/perf_matrix_mul_vector.cpp154
-rw-r--r--3rdparty/glm/source/test/perf/perf_matrix_transpose.cpp150
-rw-r--r--3rdparty/glm/source/test/perf/perf_vector_mul_matrix.cpp154
-rw-r--r--3rdparty/glm/source/util/autoexp.txt28
-rw-r--r--3rdparty/glm/source/util/autoexp.vc2010.dat3896
-rw-r--r--3rdparty/glm/source/util/usertype.dat407
-rw-r--r--3rdparty/imgui/CMakeLists.txt14
-rw-r--r--3rdparty/imguicolortextedit/CMakeLists.txt13
-rw-r--r--3rdparty/tracy/CMakeLists.txt2
-rw-r--r--CMakeLists.txt244
-rw-r--r--build/bootstrap.build7
-rw-r--r--build/root.build15
-rw-r--r--buildfile1
-rw-r--r--cmake/Exceptions.cmake31
-rw-r--r--cmake/RTTI.cmake31
-rw-r--r--cmake/Win32Subsystem.cmake31
-rw-r--r--conanfile.txt15
-rw-r--r--ignore.conf6
-rw-r--r--manifest10
-rw-r--r--repositories.manifest6
-rw-r--r--source/10-common/buildfile1
-rw-r--r--source/20-codegen-compiler/buildfile1
-rw-r--r--source/20-codegen-runtime/buildfile1
-rw-r--r--source/30-game/buildfile0
-rw-r--r--source/buildfile1
250 files changed, 48 insertions, 38967 deletions
diff --git a/3rdparty/buildfile b/3rdparty/buildfile
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/3rdparty/buildfile
@@ -0,0 +1 @@
+
diff --git a/3rdparty/glad/CMakeLists.txt b/3rdparty/glad/CMakeLists.txt
deleted file mode 100644
index 30b9424..0000000
--- a/3rdparty/glad/CMakeLists.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-add_library(glad
- include/glad/glad.h
- src/glad.c
-)
-target_include_directories(glad PUBLIC include)
-
-set_target_properties(glad
-PROPERTIES
- UNITY_BUILD OFF
-)
diff --git a/3rdparty/glfw/CMakeLists.txt b/3rdparty/glfw/CMakeLists.txt
deleted file mode 100644
index a9e8c9a..0000000
--- a/3rdparty/glfw/CMakeLists.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
-set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
-set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
-add_subdirectory(source)
-
-set_target_properties(glfw
-PROPERTIES
- UNITY_BUILD OFF
-)
diff --git a/3rdparty/glm/CMakeLists.txt b/3rdparty/glm/CMakeLists.txt
deleted file mode 100644
index 4ba97e3..0000000
--- a/3rdparty/glm/CMakeLists.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-add_subdirectory(source)
-
-set_target_properties(glm
-PROPERTIES
- UNITY_BUILD OFF
-)
diff --git a/3rdparty/glm/source/.appveyor.yml b/3rdparty/glm/source/.appveyor.yml
deleted file mode 100644
index 5ce6028..0000000
--- a/3rdparty/glm/source/.appveyor.yml
+++ /dev/null
@@ -1,92 +0,0 @@
-shallow_clone: true
-
-platform:
- - x86
- - x64
-
-configuration:
- - Debug
- - Release
-
-image:
- - Visual Studio 2013
- - Visual Studio 2015
- - Visual Studio 2017
- - Visual Studio 2019
-
-environment:
- matrix:
- - GLM_ARGUMENTS: -DGLM_TEST_FORCE_PURE=ON
- - GLM_ARGUMENTS: -DGLM_TEST_ENABLE_SIMD_SSE2=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON
- - GLM_ARGUMENTS: -DGLM_TEST_ENABLE_SIMD_AVX=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON
- - GLM_ARGUMENTS: -DGLM_TEST_ENABLE_SIMD_AVX=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_CXX_14=ON
- - GLM_ARGUMENTS: -DGLM_TEST_ENABLE_SIMD_AVX=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_CXX_17=ON
-
-matrix:
- exclude:
- - image: Visual Studio 2013
- GLM_ARGUMENTS: -DGLM_TEST_ENABLE_SIMD_AVX=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON
- - image: Visual Studio 2013
- GLM_ARGUMENTS: -DGLM_TEST_ENABLE_SIMD_AVX=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_CXX_14=ON
- - image: Visual Studio 2013
- GLM_ARGUMENTS: -DGLM_TEST_ENABLE_SIMD_AVX=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_CXX_17=ON
- - image: Visual Studio 2013
- configuration: Debug
- - image: Visual Studio 2015
- GLM_ARGUMENTS: -DGLM_TEST_ENABLE_SIMD_SSE2=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON
- - image: Visual Studio 2015
- GLM_ARGUMENTS: -DGLM_TEST_ENABLE_SIMD_AVX=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_CXX_14=ON
- - image: Visual Studio 2015
- GLM_ARGUMENTS: -DGLM_TEST_ENABLE_SIMD_AVX=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_CXX_17=ON
- - image: Visual Studio 2015
- platform: x86
- - image: Visual Studio 2015
- configuration: Debug
- - image: Visual Studio 2017
- platform: x86
- - image: Visual Studio 2017
- configuration: Debug
- - image: Visual Studio 2019
- platform: x64
-
-branches:
- only:
- - master
-
-before_build:
- - ps: |
- mkdir build
- cd build
-
- if ("$env:APPVEYOR_JOB_NAME" -match "Image: Visual Studio 2013") {
- $env:generator="Visual Studio 12 2013"
- }
- if ("$env:APPVEYOR_JOB_NAME" -match "Image: Visual Studio 2015") {
- $env:generator="Visual Studio 14 2015"
- }
- if ("$env:APPVEYOR_JOB_NAME" -match "Image: Visual Studio 2017") {
- $env:generator="Visual Studio 15 2017"
- }
- if ("$env:APPVEYOR_JOB_NAME" -match "Image: Visual Studio 2019") {
- $env:generator="Visual Studio 16 2019"
- }
- if ($env:PLATFORM -eq "x64") {
- $env:generator="$env:generator Win64"
- }
- echo generator="$env:generator"
- cmake .. -G "$env:generator" -DCMAKE_INSTALL_PREFIX="$env:APPVEYOR_BUILD_FOLDER/install" -DGLM_QUIET=ON -DGLM_TEST_ENABLE=ON "$env:GLM_ARGUMENTS"
-
-build_script:
- - cmake --build . --parallel --config %CONFIGURATION% -- /m /v:minimal
- - cmake --build . --target install --parallel --config %CONFIGURATION% -- /m /v:minimal
-
-test_script:
- - ctest --parallel 4 --verbose -C %CONFIGURATION%
- - cd ..
- - ps: |
- mkdir build_test_cmake
- cd build_test_cmake
- cmake ..\test\cmake\ -G "$env:generator" -DCMAKE_PREFIX_PATH="$env:APPVEYOR_BUILD_FOLDER/install"
- - cmake --build . --parallel --config %CONFIGURATION% -- /m /v:minimal
-
-deploy: off
diff --git a/3rdparty/glm/source/.gitignore b/3rdparty/glm/source/.gitignore
deleted file mode 100644
index 9dbd6d8..0000000
--- a/3rdparty/glm/source/.gitignore
+++ /dev/null
@@ -1,61 +0,0 @@
-# Compiled Object files
-*.slo
-*.lo
-*.o
-*.obj
-
-# Precompiled Headers
-*.gch
-*.pch
-
-# Compiled Dynamic libraries
-*.so
-*.dylib
-*.dll
-
-# Fortran module files
-*.mod
-
-# Compiled Static libraries
-*.lai
-*.la
-*.a
-*.lib
-
-# Executables
-*.exe
-*.out
-*.app
-
-# CMake
-CMakeCache.txt
-CMakeFiles
-cmake_install.cmake
-install_manifest.txt
-*.cmake
-!glmConfig.cmake
-!glmConfig-version.cmake
-# ^ May need to add future .cmake files as exceptions
-
-# Test logs
-Testing/*
-
-# Test input
-test/gtc/*.dds
-
-# Project Files
-Makefile
-*.cbp
-*.user
-
-# Misc.
-*.log
-
-# local build(s)
-build*
-
-/.vs
-/.vscode
-/CMakeSettings.json
-.DS_Store
-*.swp
diff --git a/3rdparty/glm/source/.travis.yml b/3rdparty/glm/source/.travis.yml
deleted file mode 100644
index 1660ec0..0000000
--- a/3rdparty/glm/source/.travis.yml
+++ /dev/null
@@ -1,388 +0,0 @@
-language: cpp
-
-branches:
- only:
- - master
- - stable
-
-jobs:
- include:
- - name: "Xcode 7.3 C++98 pure release"
- os: osx
- osx_image: xcode7.3
- env:
- - MATRIX_EVAL=""
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_FORCE_PURE=ON"
-
- - name: "Xcode 7.3 C++98 sse2 release"
- os: osx
- osx_image: xcode7.3
- env:
- - MATRIX_EVAL=""
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE2=ON"
-
- - name: "Xcode 7.3 C++98 ms release"
- os: osx
- osx_image: xcode7.3
- env:
- - MATRIX_EVAL=""
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON"
-
- - name: "XCode 7.3 C++11 pure release"
- os: osx
- osx_image: xcode7.3
- env:
- - MATRIX_EVAL=""
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_FORCE_PURE=ON"
-
- - name: "XCode 7.3 C++11 sse2 release"
- os: osx
- osx_image: xcode7.3
- env:
- - MATRIX_EVAL=""
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON"
-
- - name: "XCode 10.3 C++11 sse2 release"
- os: osx
- osx_image: xcode10.3
- env:
- - MATRIX_EVAL=""
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON"
-
- - name: "XCode 12.2 C++11 sse2 release"
- os: osx
- osx_image: xcode12.2
- env:
- - MATRIX_EVAL=""
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "XCode 12.2 C++11 sse2 debug"
- os: osx
- osx_image: xcode12.2
- env:
- - MATRIX_EVAL=""
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "XCode 12.2 C++11 avx debug"
- os: osx
- osx_image: xcode12.2
- env:
- - MATRIX_EVAL=""
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "XCode 12.2 C++14 avx debug"
- os: osx
- osx_image: xcode12.2
- env:
- - MATRIX_EVAL=""
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "XCode 12.2 C++14 pure debug"
- os: osx
- osx_image: xcode12.2
- env:
- - MATRIX_EVAL=""
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_FORCE_PURE=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "XCode 12.2 C++17 pure debug"
- os: osx
- osx_image: xcode12.2
- env:
- - MATRIX_EVAL=""
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_FORCE_PURE=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "XCode 12.2 C++17 sse2 debug"
- os: osx
- osx_image: xcode12.2
- env:
- - MATRIX_EVAL=""
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE2=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "XCode 12.2 C++17 sse2 release"
- os: osx
- osx_image: xcode12.2
- env:
- - MATRIX_EVAL=""
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE2=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "XCode 12.2 C++17 avx release"
- os: osx
- osx_image: xcode12.2
- env:
- - MATRIX_EVAL=""
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "GCC 4.9 C++98 pure release"
- os: linux
- dist: Xenial
- addons:
- apt:
- sources:
- - ubuntu-toolchain-r-test
- packages:
- - g++-4.9
- env:
- - MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_FORCE_PURE=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "GCC 4.9 C++98 pure debug"
- os: linux
- dist: Xenial
- addons:
- apt:
- sources:
- - ubuntu-toolchain-r-test
- packages:
- - g++-4.9
- env:
- - MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_FORCE_PURE=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "GCC 4.9 C++98 ms debug"
- os: linux
- dist: Xenial
- addons:
- apt:
- sources:
- - ubuntu-toolchain-r-test
- packages:
- - g++-4.9
- env:
- - MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "GCC 4.9 C++11 ms debug"
- os: linux
- dist: Xenial
- addons:
- apt:
- sources:
- - ubuntu-toolchain-r-test
- packages:
- - g++-4.9
- env:
- - MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "GCC 4.9 C++11 pure debug"
- os: linux
- dist: Xenial
- addons:
- apt:
- sources:
- - ubuntu-toolchain-r-test
- packages:
- - g++-4.9
- env:
- - MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_FORCE_PURE=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "GCC 6 C++14 pure debug"
- os: linux
- dist: bionic
- addons:
- apt:
- sources:
- - ubuntu-toolchain-r-test
- packages:
- - g++-6
- env:
- - MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "GCC 6 C++14 ms debug"
- os: linux
- dist: bionic
- addons:
- apt:
- sources:
- - ubuntu-toolchain-r-test
- packages:
- - g++-6
- env:
- - MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "GCC 7 C++17 ms debug"
- os: linux
- dist: bionic
- addons:
- apt:
- sources:
- - ubuntu-toolchain-r-test
- packages:
- - g++-7
- env:
- - MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "GCC 7 C++17 pure debug"
- os: linux
- dist: bionic
- addons:
- apt:
- sources:
- - ubuntu-toolchain-r-test
- packages:
- - g++-7
- env:
- - MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "GCC 10 C++17 pure debug"
- os: linux
- dist: bionic
- addons:
- apt:
- sources:
- - ubuntu-toolchain-r-test
- packages:
- - g++-10
- env:
- - MATRIX_EVAL="CC=gcc-10 && CXX=g++-10"
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "GCC 10 C++17 pure release"
- os: linux
- dist: bionic
- addons:
- apt:
- sources:
- - ubuntu-toolchain-r-test
- packages:
- - g++-10
- env:
- - MATRIX_EVAL="CC=gcc-10 && CXX=g++-10"
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "Clang C++14 pure release"
- os: linux
- dist: Xenial
- env:
- - MATRIX_EVAL="CC=clang && CXX=clang++"
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "Clang C++14 pure debug"
- os: linux
- dist: Xenial
- env:
- - MATRIX_EVAL="CC=clang && CXX=clang++"
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "Clang C++14 sse2 debug"
- os: linux
- dist: Xenial
- env:
- - MATRIX_EVAL="CC=clang && CXX=clang++"
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE2=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "Clang C++14 sse2 debug"
- os: linux
- dist: focal
- env:
- - MATRIX_EVAL="CC=clang && CXX=clang++"
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE2=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "Clang C++17 sse2 debug"
- os: linux
- dist: focal
- env:
- - MATRIX_EVAL="CC=clang && CXX=clang++"
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE2=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "Clang C++17 avx2 debug"
- os: linux
- dist: focal
- env:
- - MATRIX_EVAL="CC=clang && CXX=clang++"
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX2=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "Clang C++17 pure debug"
- os: linux
- dist: focal
- env:
- - MATRIX_EVAL="CC=clang && CXX=clang++"
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
- - name: "Clang C++17 pure release"
- os: linux
- dist: focal
- env:
- - MATRIX_EVAL="CC=clang && CXX=clang++"
- - CMAKE_BUILD_ENV="-DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON"
- - CTEST_ENV="--parallel 4 --output-on-failure"
- - CMAKE_ENV="--parallel"
-
-before_script:
- - cmake --version
- - eval "${MATRIX_EVAL}"
-
-script:
- - ${CC} --version
- - mkdir ./build
- - cd ./build
- - cmake -DCMAKE_INSTALL_PREFIX=$TRAVIS_BUILD_DIR/install -DCMAKE_CXX_COMPILER=$COMPILER ${CMAKE_BUILD_ENV} ..
- - cmake --build . ${CMAKE_ENV}
- - ctest ${CTEST_ENV}
- - cmake --build . --target install ${CMAKE_ENV}
- - cd $TRAVIS_BUILD_DIR
- - mkdir ./build_test_cmake
- - cd ./build_test_cmake
- - cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -DCMAKE_PREFIX_PATH=$TRAVIS_BUILD_DIR/install
- - cmake --build .
-
-
diff --git a/3rdparty/glm/source/CMakeLists.txt b/3rdparty/glm/source/CMakeLists.txt
deleted file mode 100644
index b7641a2..0000000
--- a/3rdparty/glm/source/CMakeLists.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
-cmake_policy(VERSION 3.2)
-
-
-file(READ "glm/detail/setup.hpp" GLM_SETUP_FILE)
-string(REGEX MATCH "#define[ ]+GLM_VERSION_MAJOR[ ]+([0-9]+)" _ ${GLM_SETUP_FILE})
-set(GLM_VERSION_MAJOR "${CMAKE_MATCH_1}")
-string(REGEX MATCH "#define[ ]+GLM_VERSION_MINOR[ ]+([0-9]+)" _ ${GLM_SETUP_FILE})
-set(GLM_VERSION_MINOR "${CMAKE_MATCH_1}")
-string(REGEX MATCH "#define[ ]+GLM_VERSION_PATCH[ ]+([0-9]+)" _ ${GLM_SETUP_FILE})
-set(GLM_VERSION_PATCH "${CMAKE_MATCH_1}")
-string(REGEX MATCH "#define[ ]+GLM_VERSION_REVISION[ ]+([0-9]+)" _ ${GLM_SETUP_FILE})
-set(GLM_VERSION_REVISION "${CMAKE_MATCH_1}")
-
-set(GLM_VERSION ${GLM_VERSION_MAJOR}.${GLM_VERSION_MINOR}.${GLM_VERSION_PATCH}.${GLM_VERSION_REVISION})
-project(glm VERSION ${GLM_VERSION} LANGUAGES CXX)
-message(STATUS "GLM: Version " ${GLM_VERSION})
-
-add_subdirectory(glm)
-add_library(glm::glm ALIAS glm)
-
-if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
-
- include(CPack)
- install(DIRECTORY glm DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} PATTERN "CMakeLists.txt" EXCLUDE)
- install(EXPORT glm FILE glmConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/glm NAMESPACE glm::)
- include(CMakePackageConfigHelpers)
- write_basic_package_version_file("glmConfigVersion.cmake" COMPATIBILITY AnyNewerVersion)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/glm)
-
- include(CTest)
- if(BUILD_TESTING)
- add_subdirectory(test)
- endif()
-
-endif(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
-
-if (NOT TARGET uninstall)
-configure_file(cmake/cmake_uninstall.cmake.in
- cmake_uninstall.cmake IMMEDIATE @ONLY)
-
-add_custom_target(uninstall
- "${CMAKE_COMMAND}" -P
- "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake")
-endif()
diff --git a/3rdparty/glm/source/cmake/cmake_uninstall.cmake.in b/3rdparty/glm/source/cmake/cmake_uninstall.cmake.in
deleted file mode 100644
index c2d34d4..0000000
--- a/3rdparty/glm/source/cmake/cmake_uninstall.cmake.in
+++ /dev/null
@@ -1,21 +0,0 @@
-if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
- message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt")
-endif()
-
-file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
-string(REGEX REPLACE "\n" ";" files "${files}")
-foreach(file ${files})
- message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
- if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
- exec_program(
- "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
- OUTPUT_VARIABLE rm_out
- RETURN_VALUE rm_retval
- )
- if(NOT "${rm_retval}" STREQUAL 0)
- message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
- endif()
- else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
- message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
- endif()
-endforeach()
diff --git a/3rdparty/glm/source/glm/CMakeLists.txt b/3rdparty/glm/source/glm/CMakeLists.txt
deleted file mode 100644
index 2d5cff2..0000000
--- a/3rdparty/glm/source/glm/CMakeLists.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-file(GLOB ROOT_SOURCE *.cpp)
-file(GLOB ROOT_INLINE *.inl)
-file(GLOB ROOT_HEADER *.hpp)
-file(GLOB ROOT_TEXT ../*.txt)
-file(GLOB ROOT_MD ../*.md)
-file(GLOB ROOT_NAT ../util/glm.natvis)
-
-file(GLOB_RECURSE CORE_SOURCE ./detail/*.cpp)
-file(GLOB_RECURSE CORE_INLINE ./detail/*.inl)
-file(GLOB_RECURSE CORE_HEADER ./detail/*.hpp)
-
-file(GLOB_RECURSE EXT_SOURCE ./ext/*.cpp)
-file(GLOB_RECURSE EXT_INLINE ./ext/*.inl)
-file(GLOB_RECURSE EXT_HEADER ./ext/*.hpp)
-
-file(GLOB_RECURSE GTC_SOURCE ./gtc/*.cpp)
-file(GLOB_RECURSE GTC_INLINE ./gtc/*.inl)
-file(GLOB_RECURSE GTC_HEADER ./gtc/*.hpp)
-
-file(GLOB_RECURSE GTX_SOURCE ./gtx/*.cpp)
-file(GLOB_RECURSE GTX_INLINE ./gtx/*.inl)
-file(GLOB_RECURSE GTX_HEADER ./gtx/*.hpp)
-
-file(GLOB_RECURSE SIMD_SOURCE ./simd/*.cpp)
-file(GLOB_RECURSE SIMD_INLINE ./simd/*.inl)
-file(GLOB_RECURSE SIMD_HEADER ./simd/*.h)
-
-source_group("Text Files" FILES ${ROOT_TEXT} ${ROOT_MD})
-source_group("Core Files" FILES ${CORE_SOURCE})
-source_group("Core Files" FILES ${CORE_INLINE})
-source_group("Core Files" FILES ${CORE_HEADER})
-source_group("EXT Files" FILES ${EXT_SOURCE})
-source_group("EXT Files" FILES ${EXT_INLINE})
-source_group("EXT Files" FILES ${EXT_HEADER})
-source_group("GTC Files" FILES ${GTC_SOURCE})
-source_group("GTC Files" FILES ${GTC_INLINE})
-source_group("GTC Files" FILES ${GTC_HEADER})
-source_group("GTX Files" FILES ${GTX_SOURCE})
-source_group("GTX Files" FILES ${GTX_INLINE})
-source_group("GTX Files" FILES ${GTX_HEADER})
-source_group("SIMD Files" FILES ${SIMD_SOURCE})
-source_group("SIMD Files" FILES ${SIMD_INLINE})
-source_group("SIMD Files" FILES ${SIMD_HEADER})
-
-add_library(glm INTERFACE)
-
-include(GNUInstallDirs)
-
-target_include_directories(glm INTERFACE
- $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
-)
-
-install(TARGETS glm EXPORT glm)
-
-if(BUILD_STATIC_LIBS)
-add_library(glm_static STATIC ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT}
- ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER}
- ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER}
- ${EXT_SOURCE} ${EXT_INLINE} ${EXT_HEADER}
- ${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER}
- ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER}
- ${SIMD_SOURCE} ${SIMD_INLINE} ${SIMD_HEADER})
- target_link_libraries(glm_static PUBLIC glm)
- add_library(glm::glm_static ALIAS glm_static)
-endif()
-
-if(BUILD_SHARED_LIBS)
-add_library(glm_shared SHARED ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT}
- ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER}
- ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER}
- ${EXT_SOURCE} ${EXT_INLINE} ${EXT_HEADER}
- ${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER}
- ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER}
- ${SIMD_SOURCE} ${SIMD_INLINE} ${SIMD_HEADER})
- target_link_libraries(glm_shared PUBLIC glm)
- add_library(glm::glm_shared ALIAS glm_shared)
-endif()
diff --git a/3rdparty/glm/source/manual.md b/3rdparty/glm/source/manual.md
deleted file mode 100644
index f98c24b..0000000
--- a/3rdparty/glm/source/manual.md
+++ /dev/null
@@ -1,2430 +0,0 @@
-![Alt](./doc/manual/logo-mini.png "GLM Logo")
-
-# GLM 0.9.9 Manual
-
-![Alt](./doc/manual/g-truc.png "G-Truc Logo")
-
----
-<div style="page-break-after: always;"> </div>
-
-## Table of Contents
-+ [0. Licenses](#section0)
-+ [1. Getting started](#section1)
-+ [1.1. Using global headers](#section1_1)
-+ [1.2. Using separated headers](#section1_2)
-+ [1.3. Using extension headers](#section1_3)
-+ [1.4. Dependencies](#section1_4)
-+ [1.5. Finding GLM with CMake](#section1_5)
-+ [2. Preprocessor configurations](#section2)
-+ [2.1. GLM\_FORCE\_MESSAGES: Platform auto detection and default configuration](#section2_1)
-+ [2.2. GLM\_FORCE\_PLATFORM\_UNKNOWN: Force GLM to no detect the build platform](#section2_2)
-+ [2.3. GLM\_FORCE\_COMPILER\_UNKNOWN: Force GLM to no detect the C++ compiler](#section2_3)
-+ [2.4. GLM\_FORCE\_ARCH\_UNKNOWN: Force GLM to no detect the build architecture](#section2_4)
-+ [2.5. GLM\_FORCE\_CXX\_UNKNOWN: Force GLM to no detect the C++ standard](#section2_5)
-+ [2.6. GLM\_FORCE\_CXX**: C++ language detection](#section2_6)
-+ [2.7. GLM\_FORCE\_EXPLICIT\_CTOR: Requiring explicit conversions](#section2_7)
-+ [2.8. GLM\_FORCE\_INLINE: Force inline](#section2_8)
-+ [2.9. GLM\_FORCE\_ALIGNED\_GENTYPES: Force GLM to enable aligned types](#section2_9)
-+ [2.10. GLM\_FORCE\_DEFAULT\_ALIGNED\_GENTYPES: Force GLM to use aligned types by default](#section2_10)
-+ [2.11. GLM\_FORCE\_INTRINSICS: Using SIMD optimizations](#section2_11)
-+ [2.12. GLM\_FORCE\_PRECISION\_**: Default precision](#section2_12)
-+ [2.13. GLM\_FORCE\_SINGLE\_ONLY: Removed explicit 64-bits floating point types](#section2_13)
-+ [2.14. GLM\_FORCE\_SWIZZLE: Enable swizzle operators](#section2_14)
-+ [2.15. GLM\_FORCE\_XYZW\_ONLY: Only exposes x, y, z and w components](#section2_15)
-+ [2.16. GLM\_FORCE\_LEFT\_HANDED: Force left handed coordinate system](#section2_16)
-+ [2.17. GLM\_FORCE\_DEPTH\_ZERO\_TO\_ONE: Force the use of a clip space between 0 to 1](#section2_17)
-+ [2.18. GLM\_FORCE\_SIZE\_T\_LENGTH: Vector and matrix static size type](#section2_18)
-+ [2.19. GLM\_FORCE\_UNRESTRICTED\_GENTYPE: Removing genType restriction](#section2_19)
-+ [2.20. GLM\_FORCE\_SILENT\_WARNINGS: Silent C++ warnings from language extensions](#section2_20)
-+ [2.21. GLM\_FORCE\_QUAT\_DATA\_WXYZ: Force GLM to store quat data as w,x,y,z instead of x,y,z,w](#section2_21)
-+ [3. Stable extensions](#section3)
-+ [3.1. Scalar types](#section3_1)
-+ [3.2. Scalar functions](#section3_2)
-+ [3.3. Vector types](#section3_3)
-+ [3.4. Vector types with precision qualifiers](#section3_4)
-+ [3.5. Vector functions](#section3_5)
-+ [3.6. Matrix types](#section3_6)
-+ [3.7. Matrix types with precision qualifiers](#section3_7)
-+ [3.8. Matrix functions](#section3_8)
-+ [3.9. Quaternion types](#section3_9)
-+ [3.10. Quaternion types with precision qualifiers](#section3_10)
-+ [3.11. Quaternion functions](#section3_11)
-+ [4. Recommended extensions](#section4)
-+ [4.1. GLM_GTC_bitfield](#section4_1)
-+ [4.2. GLM_GTC_color_space](#section4_2)
-+ [4.3. GLM_GTC_constants](#section4_3)
-+ [4.4. GLM_GTC_epsilon](#section4_4)
-+ [4.5. GLM_GTC_integer](#section4_5)
-+ [4.6. GLM_GTC_matrix_access](#section4_6)
-+ [4.7. GLM_GTC_matrix_integer](#section4_7)
-+ [4.8. GLM_GTC_matrix_inverse](#section4_8)
-+ [4.9. GLM_GTC_matrix_transform](#section4_9)
-+ [4.10. GLM_GTC_noise](#section4_10)
-+ [4.11. GLM_GTC_packing](#section4_11)
-+ [4.12. GLM_GTC_quaternion](#section4_12)
-+ [4.13. GLM_GTC_random](#section4_13)
-+ [4.14. GLM_GTC_reciprocal](#section4_14)
-+ [4.15. GLM_GTC_round](#section4_15)
-+ [4.16. GLM_GTC_type_alignment](#section4_16)
-+ [4.17. GLM_GTC_type_precision](#section4_17)
-+ [4.18. GLM_GTC_type_ptr](#section4_18)
-+ [4.19. GLM_GTC_ulp](#section4_19)
-+ [4.20. GLM_GTC_vec1](#section4_20)
-+ [5. OpenGL interoperability](#section5)
-+ [5.1. GLM Replacements for deprecated OpenGL functions](#section5_1)
-+ [5.2. GLM Replacements for GLU functions](#section5_2)
-+ [6. Known issues](#section6)
-+ [6.1. Not function](#section6_1)
-+ [6.2. Precision qualifiers support](#section6_2)
-+ [7. FAQ](#section7)
-+ [7.1 Why GLM follows GLSL specification and conventions?](#section7_1)
-+ [7.2. Does GLM run GLSL programs?](#section7_2)
-+ [7.3. Does a GLSL compiler build GLM codes?](#section7_3)
-+ [7.4. Should I use ‘GTX’ extensions?](#section7_4)
-+ [7.5. Where can I ask my questions?](#section7_5)
-+ [7.6. Where can I find the documentation of extensions?](#section7_6)
-+ [7.7. Should I use 'using namespace glm;'?](#section7_7)
-+ [7.8. Is GLM fast?](#section7_8)
-+ [7.9. When I build with Visual C++ with /w4 warning level, I have warnings...](#section7_9)
-+ [7.10. Why some GLM functions can crash because of division by zero?](#section7_10)
-+ [7.11. What unit for angles us used in GLM?](#section7_11)
-+ [7.12. Windows headers cause build errors...](#section7_12)
-+ [7.13. Constant expressions support](#section7_13)
-+ [8. Code samples](#section8)
-+ [8.1. Compute a triangle normal](#section8_1)
-+ [8.2. Matrix transform](#section8_2)
-+ [8.3. Vector types](#section8_3)
-+ [8.4. Lighting](#section8_4)
-+ [9. Contributing to GLM](#section9)
-+ [9.1. Submitting bug reports](#section9_1)
-+ [9.2. Contributing to GLM with pull request](#section9_2)
-+ [9.3. Coding style](#section9_3)
-+ [10. References](#section10)
-+ [10.1. OpenGL specifications](#section10_1)
-+ [10.2. External links](#section10_2)
-+ [10.3. Projects using GLM](#section10_3)
-+ [10.4. Tutorials using GLM](#section10_4)
-+ [10.5. Equivalent for other languages](#section10_5)
-+ [10.6. Alternatives to GLM](#section10_6)
-+ [10.7. Acknowledgements](#section10_7)
-
----
-<div style="page-break-after: always;"> </div>
-
-## <a name="section0"></a> Licenses
-
-### The Happy Bunny License (Modified MIT License)
-
-Copyright (c) 2005 - G-Truc Creation
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-Restrictions: By making use of the Software for military purposes, you
-choose to make a Bunny unhappy.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-![](./doc/manual/frontpage1.png)
-
-### The MIT License
-
-Copyright (c) 2005 - G-Truc Creation
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-![](./doc/manual/frontpage2.png)
-
----
-<div style="page-break-after: always;"> </div>
-
-## <a name="section1"></a> 1. Getting started
-### <a name="section1_1"></a> 1.1. Using global headers
-
-GLM is a header-only library, and thus does not need to be compiled. We can use GLM's implementation of GLSL's mathematics functionality by including the `<glm/glm.hpp>` header:
-
-```cpp
-#include <glm/glm.hpp>
-```
-
-To extend the feature set supported by GLM and keeping the library as close to GLSL as possible, new features are implemented as extensions that can be included thought a separated header:
-```cpp
-// Include all GLM core / GLSL features
-#include <glm/glm.hpp> // vec2, vec3, mat4, radians
-
-// Include all GLM extensions
-#include <glm/ext.hpp> // perspective, translate, rotate
-
-glm::mat4 transform(glm::vec2 const& Orientation, glm::vec3 const& Translate, glm::vec3 const& Up)
-{
- glm::mat4 Proj = glm::perspective(glm::radians(45.f), 1.33f, 0.1f, 10.f);
- glm::mat4 ViewTranslate = glm::translate(glm::mat4(1.f), Translate);
- glm::mat4 ViewRotateX = glm::rotate(ViewTranslate, Orientation.y, Up);
- glm::mat4 View = glm::rotate(ViewRotateX, Orientation.x, Up);
- glm::mat4 Model = glm::mat4(1.0f);
- return Proj * View * Model;
-}
-```
-
-*Note: Including `<glm/glm.hpp>` and `<glm/ext.hpp>` is convenient but pull a lot of code which will significantly increase build time, particularly if these files are included in all source files. We may prefer to use the approaches describe in the two following sections to keep the project build fast.*
-
-### <a name="section1_2"></a> 1.2. Using separated headers
-
-GLM relies on C++ templates heavily, and may significantly increase compilation times for projects that use it. Hence, user projects could only include the features they actually use. Following is the list of all the core features, based on GLSL specification, headers:
-```cpp
-#include <glm/vec2.hpp> // vec2, bvec2, dvec2, ivec2 and uvec2
-#include <glm/vec3.hpp> // vec3, bvec3, dvec3, ivec3 and uvec3
-#include <glm/vec4.hpp> // vec4, bvec4, dvec4, ivec4 and uvec4
-#include <glm/mat2x2.hpp> // mat2, dmat2
-#include <glm/mat2x3.hpp> // mat2x3, dmat2x3
-#include <glm/mat2x4.hpp> // mat2x4, dmat2x4
-#include <glm/mat3x2.hpp> // mat3x2, dmat3x2
-#include <glm/mat3x3.hpp> // mat3, dmat3
-#include <glm/mat3x4.hpp> // mat3x4, dmat2
-#include <glm/mat4x2.hpp> // mat4x2, dmat4x2
-#include <glm/mat4x3.hpp> // mat4x3, dmat4x3
-#include <glm/mat4x4.hpp> // mat4, dmat4
-#include <glm/common.hpp> // all the GLSL common functions: abs, min, mix, isnan, fma, etc.
-#include <glm/exponential.hpp> // all the GLSL exponential functions: pow, log, exp2, sqrt, etc.
-#include <glm/geometric.hpp> // all the GLSL geometry functions: dot, cross, reflect, etc.
-#include <glm/integer.hpp> // all the GLSL integer functions: findMSB, bitfieldExtract, etc.
-#include <glm/matrix.hpp> // all the GLSL matrix functions: transpose, inverse, etc.
-#include <glm/packing.hpp> // all the GLSL packing functions: packUnorm4x8, unpackHalf2x16, etc.
-#include <glm/trigonometric.hpp> // all the GLSL trigonometric functions: radians, cos, asin, etc.
-#include <glm/vector_relational.hpp> // all the GLSL vector relational functions: equal, less, etc.
-```
-
-The following is a code sample using separated core headers and an extension:
-```cpp
-// Include GLM core features
-#include <glm/vec2.hpp> // vec2
-#include <glm/vec3.hpp> // vec3
-#include <glm/mat4x4.hpp> // mat4
-#include <glm/trigonometric.hpp> //radians
-
-// Include GLM extension
-#include <glm/ext/matrix_transform.hpp> // perspective, translate, rotate
-
-glm::mat4 transform(glm::vec2 const& Orientation, glm::vec3 const& Translate, glm::vec3 const& Up)
-{
- glm::mat4 Proj = glm::perspective(glm::radians(45.f), 1.33f, 0.1f, 10.f);
- glm::mat4 ViewTranslate = glm::translate(glm::mat4(1.f), Translate);
- glm::mat4 ViewRotateX = glm::rotate(ViewTranslate, Orientation.y, Up);
- glm::mat4 View = glm::rotate(ViewRotateX, Orientation.x, Up);
- glm::mat4 Model = glm::mat4(1.0f);
- return Proj * View * Model;
-}
-```
-
-### <a name="section1_3"></a> 1.3. Using extension headers
-
-Using GLM through split headers to minimize the project build time:
-```cpp
-// Include GLM vector extensions:
-#include <glm/ext/vector_float2.hpp> // vec2
-#include <glm/ext/vector_float3.hpp> // vec3
-#include <glm/ext/vector_trigonometric.hpp> // radians
-
-// Include GLM matrix extensions:
-#include <glm/ext/matrix_float4x4.hpp> // mat4
-#include <glm/ext/matrix_transform.hpp> // perspective, translate, rotate
-
-glm::mat4 transform(glm::vec2 const& Orientation, glm::vec3 const& Translate, glm::vec3 const& Up)
-{
- glm::mat4 Proj = glm::perspective(glm::radians(45.f), 1.33f, 0.1f, 10.f);
- glm::mat4 ViewTranslate = glm::translate(glm::mat4(1.f), Translate);
- glm::mat4 ViewRotateX = glm::rotate(ViewTranslate, Orientation.y, Up);
- glm::mat4 View = glm::rotate(ViewRotateX, Orientation.x, Up);
- glm::mat4 Model = glm::mat4(1.0f);
- return Proj * View * Model;
-}
-```
-
-### <a name="section1_4"></a> 1.4. Dependencies
-
-GLM does not depend on external libraries or headers such as `<GL/gl.h>`, [`<GL/glcorearb.h>`](http://www.opengl.org/registry/api/GL/glcorearb.h), `<GLES3/gl3.h>`, `<GL/glu.h>`, or `<windows.h>`.
-
-### <a name="section1_5"></a> 1.5. Finding GLM with CMake
-
-When installed, GLM provides the CMake package configuration files `glmConfig.cmake` and `glmConfigVersion.cmake`.
-
-To use these configurations files, you may need to set the `glm_DIR` variable to the directory containing the configuration files `<installation prefix>/lib/cmake/glm/`.
-
-Use the `find_package` CMake command to load the configurations into your project. Lastly, either link your executable against the `glm::glm` target or add `${GLM_INCLUDE_DIRS}` to your target's include directories:
-
-```cmake
-set(glm_DIR <installation prefix>/lib/cmake/glm) # if necessary
-find_package(glm REQUIRED)
-target_link_libraries(<your executable> glm::glm)
-```
-
-To use GLM as a submodule in a project instead, use `add_subdirectory` to expose the same target, or add the directory to your target's
-
-```cmake
-add_subdirectory(glm)
-target_link_libraries(<your executable> glm::glm)
-# or
-target_include_directories(<your executable> glm)
-```
-
----
-<div style="page-break-after: always;"> </div>
-
-## <a name="section2"></a> 2. Preprocessor configurations
-
-### <a name="section2_1"></a> 2.1. GLM\_FORCE\_MESSAGES: Platform auto detection and default configuration
-
-When included, GLM will first automatically detect the compiler used, the C++ standard supported, the compiler arguments used to configure itself matching the build environment.
-
-For example, if the compiler arguments request AVX code generation, GLM will rely on its code path providing AVX optimizations when available.
-
-We can change GLM configuration using specific C++ preprocessor defines that must be declared before including any GLM headers.
-
-Using `GLM_FORCE_MESSAGES`, GLM will report the configuration as part of the build log.
-
-```cpp
-#define GLM_FORCE_MESSAGES // Or defined when building (e.g. -DGLM_FORCE_SWIZZLE)
-#include <glm/glm.hpp>
-```
-
-Example of configuration log generated by `GLM_FORCE_MESSAGES`:
-```cpp
-GLM: version 0.9.9.1
-GLM: C++ 17 with extensions
-GLM: Clang compiler detected
-GLM: x86 64 bits with AVX instruction set build target
-GLM: Linux platform detected
-GLM: GLM_FORCE_SWIZZLE is undefined. swizzling functions or operators are disabled.
-GLM: GLM_FORCE_SIZE_T_LENGTH is undefined. .length() returns a glm::length_t, a typedef of int following GLSL.
-GLM: GLM_FORCE_UNRESTRICTED_GENTYPE is undefined. Follows strictly GLSL on valid function genTypes.
-GLM: GLM_FORCE_DEPTH_ZERO_TO_ONE is undefined. Using negative one to one depth clip space.
-GLM: GLM_FORCE_LEFT_HANDED is undefined. Using right handed coordinate system.
-```
-
-The following subsections describe each configurations and defines.
-
-### <a name="section2_2"></a> 2.2. GLM\_FORCE\_PLATFORM\_UNKNOWN: Force GLM to no detect the build platform
-
-`GLM_FORCE_PLATFORM_UNKNOWN` prevents GLM from detecting the build platform.
-
-### <a name="section2_3"></a> 2.3. GLM\_FORCE\_COMPILER\_UNKNOWN: Force GLM to no detect the C++ compiler
-
-`GLM_FORCE_COMPILER_UNKNOWN` prevents GLM from detecting the C++ compiler.
-
-### <a name="section2_4"></a> 2.4. GLM\_FORCE\_ARCH\_UNKNOWN: Force GLM to no detect the build architecture
-
-`GLM_FORCE_ARCH_UNKNOWN` prevents GLM from detecting the build target architecture.
-
-### <a name="section2_5"></a> 2.5. GLM\_FORCE\_CXX\_UNKNOWN: Force GLM to no detect the C++ standard
-
-`GLM_FORCE_CSS_UNKNOWN` prevents GLM from detecting the C++ compiler standard support.
-
-### <a name="section2_6"></a> 2.6. GLM\_FORCE\_CXX**: C++ language detection
-
-GLM will automatically take advantage of compilers’ language extensions when enabled. To increase cross platform compatibility and to avoid compiler extensions, a programmer can define `GLM_FORCE_CXX98` before
-any inclusion of `<glm/glm.hpp>` to restrict the language feature set C++98:
-
-```cpp
-#define GLM_FORCE_CXX98
-#include <glm/glm.hpp>
-```
-
-For C++11, C++14, and C++17 equivalent defines are available:
-* `GLM_FORCE_CXX11`
-* `GLM_FORCE_CXX14`
-* `GLM_FORCE_CXX17`
-
-```cpp
-#define GLM_FORCE_CXX11
-#include <glm/glm.hpp>
-
-// If the compiler doesn’t support C++11, compiler errors will happen.
-```
-
-`GLM_FORCE_CXX17` overrides `GLM_FORCE_CXX14`; `GLM_FORCE_CXX14` overrides `GLM_FORCE_CXX11`; and `GLM_FORCE_CXX11` overrides `GLM_FORCE_CXX98` defines.
-
-### <a name="section2_7"></a> 2.7. GLM\_FORCE\_EXPLICIT\_CTOR: Requiring explicit conversions
-
-GLSL supports implicit conversions of vector and matrix types. For example, an ivec4 can be implicitly converted into `vec4`.
-
-Often, this behaviour is not desirable but following the spirit of the library, this is the default behavior in GLM. However, GLM 0.9.6 introduced the define `GLM_FORCE_EXPLICIT_CTOR` to require explicit conversion for GLM types.
-
-```cpp
-#include <glm/glm.hpp>
-
-void foo()
-{
- glm::ivec4 a;
- ...
-
- glm::vec4 b(a); // Explicit conversion, OK
- glm::vec4 c = a; // Implicit conversion, OK
- ...
-}
-```
-
-With `GLM_FORCE_EXPLICIT_CTOR` define, implicit conversions are not allowed:
-
-```cpp
-#define GLM_FORCE_EXPLICIT_CTOR
-#include <glm/glm.hpp>
-
-void foo()
-{
- glm::ivec4 a;
- {
- glm::vec4 b(a); // Explicit conversion, OK
- glm::vec4 c = a; // Implicit conversion, ERROR
- ...
-}
-```
-
-### <a name="section2_8"></a> 2.8. GLM\_FORCE\_INLINE: Force inline
-
-To push further the software performance, a programmer can define `GLM_FORCE_INLINE` before any inclusion of `<glm/glm.hpp>` to force the compiler to inline GLM code.
-
-```cpp
-#define GLM_FORCE_INLINE
-#include <glm/glm.hpp>
-```
-
-### <a name="section2_9"></a> 2.9. GLM\_FORCE\_ALIGNED\_GENTYPES: Force GLM to enable aligned types
-
-Every object type has the property called alignment requirement, which is an integer value (of type `std::size_t`, always a power of 2) representing the number of bytes between successive addresses at which objects of this type can be allocated. The alignment requirement of a type can be queried with alignof or `std::alignment_of`. The pointer alignment function `std::align` can be used to obtain a suitably-aligned pointer within some buffer, and `std::aligned_storage` can be used to obtain suitably-aligned storage.
-
-Each object type imposes its alignment requirement on every object of that type; stricter alignment (with larger alignment requirement) can be requested using C++11 `alignas`.
-
-In order to satisfy alignment requirements of all non-static members of a class, padding may be inserted after some of its members.
-
-GLM supports both packed and aligned types. Packed types allow filling data structure without inserting extra padding. Aligned GLM types align addresses based on the size of the value type of a GLM type.
-
-```cpp
-#define GLM_FORCE_ALIGNED_GENTYPES
-#include <glm/glm.hpp>
-#include <glm/gtc/type_aligned.hpp>
-
-typedef glm::aligned_vec4 vec4a;
-typedef glm::packed_vec4 vec4p;
-```
-
-### <a name="section2_10"></a> 2.10. GLM\_FORCE\_DEFAULT\_ALIGNED\_GENTYPES: Force GLM to use aligned types by default
-
-GLM allows using aligned types by default for vector types using `GLM_FORCE_DEFAULT_ALIGNED_GENTYPES`:
-
-```cpp
-#define GLM_FORCE_DEFAULT_ALIGNED_GENTYPES
-#include <glm/glm.hpp>
-
-struct MyStruct
-{
- glm::vec4 a;
- float b;
- glm::vec3 c;
-};
-
-void foo()
-{
- printf("MyStruct requires memory padding: %d bytes\n", sizeof(MyStruct));
-}
-
->>> MyStruct requires memory padding: 48 bytes
-```
-
-```cpp
-#include <glm/glm.hpp>
-
-struct MyStruct
-{
- glm::vec4 a;
- float b;
- glm::vec3 c;
-};
-
-void foo()
-{
- printf("MyStruct is tightly packed: %d bytes\n", sizeof(MyStruct));
-}
-
->>> MyStruct is tightly packed: 32 bytes
-```
-
-*Note: GLM SIMD optimizations require the use of aligned types*
-
-### <a name="section2_11"></a> 2.11. GLM\_FORCE\_INTRINSICS: Using SIMD optimizations
-
-GLM provides some SIMD optimizations based on [compiler intrinsics](https://msdn.microsoft.com/en-us/library/26td21ds.aspx).
-These optimizations will be automatically thanks to compiler arguments when `GLM_FORCE_INTRINSICS` is defined before including GLM files.
-For example, if a program is compiled with Visual Studio using `/arch:AVX`, GLM will detect this argument and generate code using AVX instructions automatically when available.
-
-It’s possible to avoid the instruction set detection by forcing the use of a specific instruction set with one of the fallowing define:
-`GLM_FORCE_SSE2`, `GLM_FORCE_SSE3`, `GLM_FORCE_SSSE3`, `GLM_FORCE_SSE41`, `GLM_FORCE_SSE42`, `GLM_FORCE_AVX`, `GLM_FORCE_AVX2` or `GLM_FORCE_AVX512`.
-
-The use of intrinsic functions by GLM implementation can be avoided using the define `GLM_FORCE_PURE` before any inclusion of GLM headers. This can be particularly useful if we want to rely on C++14 `constexpr`.
-
-```cpp
-#define GLM_FORCE_PURE
-#include <glm/glm.hpp>
-
-static_assert(glm::vec4::length() == 4, "Using GLM C++ 14 constexpr support for compile time tests");
-
-// GLM code will be compiled using pure C++ code without any intrinsics
-```
-
-```cpp
-#define GLM_FORCE_SIMD_AVX2
-#include <glm/glm.hpp>
-
-// If the compiler doesn’t support AVX2 instrinsics, compiler errors will happen.
-```
-
-Additionally, GLM provides a low level SIMD API in glm/simd directory for users who are really interested in writing fast algorithms.
-
-### <a name="section2_12"></a> 2.12. GLM\_FORCE\_PRECISION\_**: Default precision
-
-C++ does not provide a way to implement GLSL default precision selection (as defined in GLSL 4.10 specification section 4.5.3) with GLSL-like syntax.
-
-```glsl
-precision mediump int;
-precision highp float;
-```
-
-To use the default precision functionality, GLM provides some defines that need to added before any include of `glm.hpp`:
-
-```cpp
-#define GLM_FORCE_PRECISION_MEDIUMP_INT
-#define GLM_FORCE_PRECISION_HIGHP_FLOAT
-#include <glm/glm.hpp>
-```
-
-Available defines for floating point types (`glm::vec\*`, `glm::mat\*`):
-
-* `GLM_FORCE_PRECISION_LOWP_FLOAT`: Low precision
-* `GLM_FORCE_PRECISION_MEDIUMP_FLOAT`: Medium precision
-* `GLM_FORCE_PRECISION_HIGHP_FLOAT`: High precision (default)
-
-Available defines for floating point types (`glm::dvec\*`, `glm::dmat\*`):
-
-* `GLM_FORCE_PRECISION_LOWP_DOUBLE`: Low precision
-* `GLM_FORCE_PRECISION_MEDIUMP_DOUBLE`: Medium precision
-* `GLM_FORCE_PRECISION_HIGHP_DOUBLE`: High precision (default)
-
-Available defines for signed integer types (`glm::ivec\*`):
-
-* `GLM_FORCE_PRECISION_LOWP_INT`: Low precision
-* `GLM_FORCE_PRECISION_MEDIUMP_INT`: Medium precision
-* `GLM_FORCE_PRECISION_HIGHP_INT`: High precision (default)
-
-Available defines for unsigned integer types (`glm::uvec\*`):
-
-* `GLM_FORCE_PRECISION_LOWP_UINT`: Low precision
-* `GLM_FORCE_PRECISION_MEDIUMP_UINT`: Medium precision
-* `GLM_FORCE_PRECISION_HIGHP_UINT`: High precision (default)
-
-### <a name="section2_13"></a> 2.13. GLM\_FORCE\_SINGLE\_ONLY: Removed explicit 64-bits floating point types
-
-Some platforms (Dreamcast) doesn't support double precision floating point values. To compile on such platforms, GCC has the `--m4-single-only` build argument. When defining `GLM_FORCE_SINGLE_ONLY` before including GLM headers, GLM releases the requirement of double precision floating point values support. Effectivement, all the float64 types are no longer defined and double behaves like float.
-
-### <a name="section2_14"></a> 2.14. GLM\_FORCE\_SWIZZLE: Enable swizzle operators
-
-Shader languages like GLSL often feature so-called swizzle expressions, which may be used to freely select and arrange a vector's components. For example, `variable.x`, `variable.xzy` and `variable.zxyy` respectively form a scalar, a 3D vector and a 4D vector. The result of a swizzle expression in GLSL can be either an R-value or an L-value. Swizzle expressions can be written with characters from exactly one of `xyzw` (usually for positions), `rgba` (usually for colors), and `stpq` (usually for texture coordinates).
-
-```glsl
-vec4 A;
-vec2 B;
-
-B.yx = A.wy;
-B = A.xx;
-vec3 C = A.bgr;
-vec3 D = B.rsz; // Invalid, won't compile
-```
-
-GLM supports some of this functionality. Swizzling can be enabled by defining `GLM_FORCE_SWIZZLE`.
-
-*Note: Enabling swizzle expressions will massively increase the size of your binaries and the time it takes to compile them!*
-
-GLM has two levels of swizzling support described in the following subsections.
-
-#### 2.14.1. Swizzle functions for standard C++ 98
-
-When compiling GLM as C++98, R-value swizzle expressions are simulated through member functions of each vector type.
-
-```cpp
-#define GLM_FORCE_SWIZZLE // Or defined when building (e.g. -DGLM_FORCE_SWIZZLE)
-#include <glm/glm.hpp>
-
-void foo()
-{
- glm::vec4 const ColorRGBA = glm::vec4(1.0f, 0.5f, 0.0f, 1.0f);
- glm::vec3 const ColorBGR = ColorRGBA.bgr();
-
- glm::vec3 const PositionA = glm::vec3(1.0f, 0.5f, 0.0f);
- glm::vec3 const PositionB = PositionXYZ.xyz() * 2.0f;
-
- glm::vec2 const TexcoordST = glm::vec2(1.0f, 0.5f);
- glm::vec4 const TexcoordSTPQ = TexcoordST.stst();
-}
-```
-
-Swizzle operators return a **copy** of the component values, and thus *can't* be used as L-values to change a vector's values.
-
-```cpp
-#define GLM_FORCE_SWIZZLE
-#include <glm/glm.hpp>
-
-void foo()
-{
- glm::vec3 const A = glm::vec3(1.0f, 0.5f, 0.0f);
-
- // No compiler error, but A is not modified.
- // An anonymous copy is being modified (and then discarded).
- A.bgr() = glm::vec3(2.0f, 1.5f, 1.0f); // A is not modified!
-}
-```
-
-#### 2.14.2. Swizzle operations for C++ 98 with language extensions
-
-Visual C++, GCC and Clang support, as a _non-standard language extension_, anonymous `struct`s as `union` members. This permits a powerful swizzling implementation that both allows L-value swizzle expressions and GLSL-like syntax. To use this feature, the language extension must be enabled by a supporting compiler and `GLM_FORCE_SWIZZLE` must be `#define`d.
-
-```cpp
-#define GLM_FORCE_SWIZZLE
-#include <glm/glm.hpp>
-
-// Only guaranteed to work with Visual C++!
-// Some compilers that support Microsoft extensions may compile this.
-void foo()
-{
- glm::vec4 ColorRGBA = glm::vec4(1.0f, 0.5f, 0.0f, 1.0f);
-
- // l-value:
- glm::vec4 ColorBGRA = ColorRGBA.bgra;
-
- // r-value:
- ColorRGBA.bgra = ColorRGBA;
-
- // Both l-value and r-value
- ColorRGBA.bgra = ColorRGBA.rgba;
-}
-```
-
-This version returns implementation-specific objects that _implicitly convert_ to their respective vector types. As a consequence of this design, these extra types **can't be directly used** as C++ function arguments; they must be converted through constructors or `operator()`.
-
-```cpp
-#define GLM_FORCE_SWIZZLE
-#include <glm/glm.hpp>
-
-using namespace glm;
-
-void foo()
-{
- vec4 Color = vec4(1.0f, 0.5f, 0.0f, 1.0f);
-
- // Generates compiler errors. Color.rgba is not a vector type.
- vec4 ClampedA = clamp(Color.rgba, 0.f, 1.f); // ERROR
-
- // Explicit conversion through a constructor
- vec4 ClampedB = clamp(vec4(Color.rgba), 0.f, 1.f); // OK
-
- // Explicit conversion through operator()
- vec4 ClampedC = clamp(Color.rgba(), 0.f, 1.f); // OK
-}
-```
-
-*Note: The implementation has a caveat: Swizzle operator types must be different on both size of the equal operator or the operation will fail. There is no known fix for this issue to date*
-
-### <a name="section2_15"></a> 2.15. GLM\_FORCE\_XYZW\_ONLY: Only exposes x, y, z and w components
-
-Following GLSL specifications, GLM supports three sets of components to access vector types member: x, y, z, w; r, g, b, a; and s, t, p, q.
-Also, this is making vector component very expressive in the code, it may make debugging vector types a little cubersom as the debuggers will typically display three time the values for each compoenents due to the existence of the three sets.
-
-To simplify vector types, GLM allows exposing only x, y, z and w components thanks to `GLM_FORCE_XYZW_ONLY` define.
-
-### <a name="section2_16"></a> 2.16. GLM\_FORCE\_LEFT\_HANDED: Force left handed coordinate system
-
-By default, OpenGL is using a right handed coordinate system. However, others APIs such as Direct3D have done different choice and relies on the left handed coordinate system.
-
-GLM allows switching the coordinate system to left handed by defining `GLM_FORCE_LEFT_HANDED`.
-
-### <a name="section2_17"></a> 2.17. GLM\_FORCE\_DEPTH\_ZERO\_TO\_ONE: Force the use of a clip space between 0 to 1
-
-By default, OpenGL is using a -1 to 1 clip space in Z-axis. However, others APIs such as Direct3D relies on a clip space between 0 to 1 in Z-axis.
-
-GLM allows switching the clip space in Z-axis to 0 to 1 by defining `GLM_FORCE_DEPTH_ZERO_TO_ONE`.
-
-### <a name="section2_18"></a> 2.18. GLM\_FORCE\_SIZE\_T\_LENGTH: Vector and matrix static size
-
-GLSL supports the member function .length() for all vector and matrix types.
-
-```cpp
-#include <glm/glm.hpp>
-
-void foo(vec4 const& v)
-{
- int Length = v.length();
- ...
-}
-```
-
-This function returns an `int` however this function typically interacts with STL `size_t` based code. GLM provides `GLM_FORCE_SIZE_T_LENGTH` pre-processor configuration so that member functions `length()` return a `size_t`.
-
-Additionally, GLM defines the type `glm::length_t` to identify `length()` returned type, independently from `GLM_FORCE_SIZE_T_LENGTH`.
-
-```cpp
-#define GLM_FORCE_SIZE_T_LENGTH
-#include <glm/glm.hpp>
-
-void foo(vec4 const& v)
-{
- glm::length_t Length = v.length();
- ...
-}
-```
-
-### <a name="section2_19"></a> 2.19. GLM\_FORCE\_UNRESTRICTED\_GENTYPE: Removing genType restriction
-
-GLSL has restrictions on types supported by certain functions that may appear excessive.
-By default, GLM follows the GLSL specification as accurately as possible however it's possible to relax these rules using `GLM_FORCE_UNRESTRICTED_GENTYPE` define.
-
-```cpp
-#include <glm/glm.hpp>
-
-float average(float const A, float const B)
-{
- return glm::mix(A, B, 0.5f); // By default glm::mix only supports floating-point types
-}
-```
-
-By defining GLM\_FORCE\_UNRESTRICTED\_GENTYPE, we allow using integer types:
-
-```cpp
-#define GLM_FORCE_UNRESTRICTED_GENTYPE
-#include <glm/glm.hpp>
-
-int average(int const A, int const B)
-{
- return glm::mix(A, B, 0.5f); // integers are ok thanks to GLM_FORCE_UNRESTRICTED_GENTYPE
-}
-```
-
-### <a name="section2_20"></a> 2.20. GLM\_FORCE\_SILENT\_WARNINGS: Silent C++ warnings from language extensions
-
-When using /W4 on Visual C++ or -Wpedantic on GCC, for example, the compilers will generate warnings for using C++ language extensions (/Za with Visual C++) such as anonymous struct.
-GLM relies on anonymous structs for swizzle operators and aligned vector types. To silent those warnings define `GLM_FORCE_SILENT_WARNINGS` before including GLM headers.
-
-
-### <a name="section2_21"></a> 2.21. GLM\_FORCE\_QUAT\_DATA\_WXYZ: Force GLM to store quat data as w,x,y,z instead of x,y,z,w
-
-By default GLM store quaternion components with the x, y, z, w order. `GLM_FORCE_QUAT_DATA_WXYZ` allows switching the quaternion data storage to the w, x, y, z order.
-
----
-<div style="page-break-after: always;"> </div>
-
-## <a name="section3"></a> 3. Stable extensions
-
-### <a name="section3_1"></a> 3.1. Scalar types
-
-#### 3.1.1. GLM_EXT_scalar_int_sized
-
-This extension exposes sized and signed integer types.
-
-Include `<glm/ext/scalar_int_sized.hpp>` to use these features.
-
-#### 3.1.2. GLM_EXT_scalar_uint_sized
-
-This extension exposes sized and unsigned integer types.
-
-```cpp
-#include <glm/ext/scalar_common.hpp>
-
-glm::uint64 pack(glm::uint32 A, glm::uint16 B, glm::uint8 C, glm::uint8 D)
-{
- glm::uint64 ShiftA = 0;
- glm::uint64 ShiftB = sizeof(glm::uint32) * 8;
- glm::uint64 ShiftC = (sizeof(glm::uint32) + sizeof(glm::uint16)) * 8;
- glm::uint64 ShiftD = (sizeof(glm::uint32) + sizeof(glm::uint16) + sizeof(glm::uint8)) * 8;
- return (glm::uint64(A) << ShiftA) | (glm::uint64(B) << ShiftB) | (glm::uint64(C) << ShiftC) | (glm::uint64(D) << ShiftD);
-}
-```
-
-Include `<glm/ext/scalar_uint_sized.hpp>` to use these features.
-
-### <a name="section3_2"></a> 3.2. Scalar functions
-
-#### 3.2.1. GLM_EXT_scalar_common
-
-This extension exposes support for `min` and `max` functions taking more than two scalar arguments. Also, it adds `fmin` and `fmax` variants which prevents `NaN` propagation.
-
-```cpp
-#include <glm/ext/scalar_common.hpp>
-
-float positiveMax(float const a, float const b)
-{
- return glm::fmax(a, b, 0.0f);
-}
-```
-
-Include `<glm/ext/scalar_common.hpp>` to use these features.
-
-#### 3.2.2. GLM_EXT_scalar_relational
-
-This extension exposes `equal` and `notEqual` scalar variants which takes an epsilon argument.
-
-```cpp
-#include <glm/ext/scalar_relational.hpp>
-
-bool epsilonEqual(float const a, float const b)
-{
- float const CustomEpsilon = 0.0001f;
- return glm::equal(a, b, CustomEpsilon);
-}
-```
-
-Include `<glm/ext/scalar_relational.hpp>` to use these features.
-
-#### 3.2.3. GLM_EXT_scalar_constants
-
-This extension exposes useful constants such as `epsilon` and `pi`.
-
-```cpp
-#include <glm/ext/scalar_constants.hpp>
-
-float circumference(float const Diameter)
-{
- return glm::pi<float>() * Diameter;
-}
-```
-
-```cpp
-#include <glm/common.hpp> // abs
-#include <glm/ext/scalar_constants.hpp> // epsilon
-
-bool equalULP1(float const a, float const b)
-{
- return glm::abs(a - b) <= glm::epsilon<float>();
-}
-```
-
-Include `<glm/ext/scalar_constants.hpp>` to use these features.
-
-#### 3.2.4. GLM_EXT_scalar_ulp
-
-This extension exposes function that measure of accuracy in numeric calculations.
-
-```cpp
-#include <glm/ext/scalar_ulp.hpp>
-
-bool test_ulp(float x)
-{
- float const a = glm::next_float(x); // return a float a ULP away from the float argument.
- return float_distance(a, x) == 1; // check both float are a single ULP away.
-}
-```
-
-Include `<glm/ext/scalar_ulp.hpp>` to use these features.
-
-### <a name="section3_3"></a> 3.3. Vector types
-
-#### 3.3.1. GLM_EXT_vector_float1
-
-This extension exposes single-precision floating point vector with 1 component: `vec1`.
-
-Include `<glm/ext/vector_float1.hpp>` to use these features.
-
-#### 3.3.2. GLM_EXT_vector_float2
-
-This extension exposes single-precision floating point vector with 2 components: `vec2`.
-
-Include `<glm/ext/vector_float2.hpp>` to use these features.
-
-#### 3.3.3. GLM_EXT_vector_float3
-
-This extension exposes single-precision floating point vector with 3 components: `vec3`.
-
-Include `<glm/ext/vector_float3.hpp>` to use these features.
-
-#### 3.3.4. GLM_EXT_vector_float4
-
-This extension exposes single-precision floating point vector with 4 components: `vec4`.
-
-Include `<glm/ext/vector_float4.hpp>` to use these features.
-
-#### 3.3.5. GLM_EXT_vector_double1
-
-This extension exposes double-precision floating point vector with 1 component: `dvec1`.
-
-Include `<glm/ext/vector_double1.hpp>` to use these features.
-
-#### 3.3.6. GLM_EXT_vector_double2
-
-This extension exposes double-precision floating point vector with 2 components: `dvec2`.
-
-Include `<glm/ext/vector_double2.hpp>` to use these features.
-
-#### 3.3.7. GLM_EXT_vector_double3
-
-This extension exposes double-precision floating point vector with 3 components: `dvec3`.
-
-Include `<glm/ext/vector_double3.hpp>` to use these features.
-
-#### 3.3.8. GLM_EXT_vector_double4
-
-This extension exposes double-precision floating point vector with 4 components: `dvec4`.
-
-Include `<glm/ext/vector_double4.hpp>` to use these features.
-
-#### 3.3.9. GLM_EXT_vector_int1
-
-This extension exposes signed integer vector with 1 component: `ivec1`.
-
-Include `<glm/ext/vector_int1.hpp>` to use these features.
-
-#### 3.3.10. GLM_EXT_vector_int2
-
-This extension exposes signed integer vector with 2 components: `ivec2`.
-
-Include `<glm/ext/vector_int2.hpp>` to use these features.
-
-#### 3.3.11. GLM_EXT_vector_int3
-
-This extension exposes signed integer vector with 3 components: `ivec3`.
-
-Include `<glm/ext/vector_int3.hpp>` to use these features.
-
-#### 3.3.12. GLM_EXT_vector_int4
-
-This extension exposes signed integer vector with 4 components: `ivec4`.
-
-Include `<glm/ext/vector_int4.hpp>` to use these features.
-
-#### 3.3.13. GLM_EXT_vector_int1
-
-This extension exposes unsigned integer vector with 1 component: `uvec1`.
-
-Include `<glm/ext/vector_uint1.hpp>` to use these features.
-
-#### 3.3.14. GLM_EXT_vector_uint2
-
-This extension exposes unsigned integer vector with 2 components: `uvec2`.
-
-Include `<glm/ext/vector_uint2.hpp>` to use these features.
-
-#### 3.3.15. GLM_EXT_vector_uint3
-
-This extension exposes unsigned integer vector with 3 components: `uvec3`.
-
-Include `<glm/ext/vector_uint3.hpp>` to use these features.
-
-#### 3.3.16. GLM_EXT_vector_uint4
-
-This extension exposes unsigned integer vector with 4 components: `uvec4`.
-
-Include `<glm/ext/vector_uint4.hpp>` to use these features.
-
-#### 3.3.17. GLM_EXT_vector_bool1
-
-This extension exposes boolean vector with 1 component: `bvec1`.
-
-Include `<glm/ext/vector_bool1.hpp>` to use these features.
-
-#### 3.3.18. GLM_EXT_vector_bool2
-
-This extension exposes boolean vector with 2 components: `bvec2`.
-
-Include `<glm/ext/vector_bool2.hpp>` to use these features.
-
-#### 3.3.19. GLM_EXT_vector_bool3
-
-This extension exposes boolean vector with 3 components: `bvec3`.
-
-Include `<glm/ext/vector_bool3.hpp>` to use these features.
-
-#### 3.3.20. GLM_EXT_vector_bool4
-
-This extension exposes boolean vector with 4 components: `bvec4`.
-
-Include `<glm/ext/vector_bool4.hpp>` to use these features.
-
-### <a name="section3_4"></a> 3.4. Vector types with precision qualifiers
-
-#### 3.4.1. GLM_EXT_vector_float1_precision
-
-This extension exposes single-precision floating point vector with 1 component using various precision in term of ULPs: `lowp_vec1`, `mediump_vec1` and `highp_vec1`.
-
-Include `<glm/ext/vector_float1_precision.hpp>` to use these features.
-
-#### 3.4.2. GLM_EXT_vector_float2_precision
-
-This extension exposes single-precision floating point vector with 2 components using various precision in term of ULPs: `lowp_vec2`, `mediump_vec2` and `highp_vec2`.
-
-Include `<glm/ext/vector_float2_precision.hpp>` to use these features.
-
-#### 3.4.3. GLM_EXT_vector_float3_precision
-
-This extension exposes single-precision floating point vector with 3 components using various precision in term of ULPs: `lowp_vec3`, `mediump_vec3` and `highp_vec3`.
-
-Include `<glm/ext/vector_float3_precision.hpp>` to use these features.
-
-#### 3.4.4. GLM_EXT_vector_float4_precision
-
-This extension exposes single-precision floating point vector with 4 components using various precision in term of ULPs: `lowp_vec4`, `mediump_vec4` and `highp_vec4`.
-
-Include `<glm/ext/vector_float4_precision.hpp>` to use these features.
-
-#### 3.4.5. GLM_EXT_vector_double1_precision
-
-This extension exposes double-precision floating point vector with 1 component using various precision in term of ULPs: `lowp_dvec1`, `mediump_dvec1` and `highp_dvec1`.
-
-Include `<glm/ext/vector_double1_precision.hpp>` to use these features.
-
-#### 3.4.6. GLM_EXT_vector_double2_precision
-
-This extension exposes double-precision floating point vector with 2 components using various precision in term of ULPs: `lowp_dvec2`, `mediump_dvec2` and `highp_dvec2`.
-
-Include `<glm/ext/vector_double2_precision.hpp>` to use these features.
-
-#### 3.4.7. GLM_EXT_vector_double3_precision
-
-This extension exposes double-precision floating point vector with 3 components using various precision in term of ULPs: `lowp_dvec3`, `mediump_dvec3` and `highp_dvec3`.
-
-Include `<glm/ext/vector_double3_precision.hpp>` to use these features.
-
-#### 3.4.8. GLM_EXT_vector_double4_precision
-
-This extension exposes double-precision floating point vector with 4 components using various precision in term of ULPs: `lowp_dvec4`, `mediump_dvec4` and `highp_dvec4`.
-
-Include `<glm/ext/vector_double4_precision.hpp>` to use these features.
-
-### <a name="section3_4"></a> 3.5. Vector functions
-
-#### 3.5.1. GLM_EXT_vector_common
-
-This extension exposes support for `min` and `max` functions taking more than two vector arguments. Also, it adds `fmin` and `fmax` variants which prevents `NaN` propagation.
-
-```cpp
-#include <glm/ext/vector_float2.hpp> // vec2
-#include <glm/ext/vector_common.hpp> // fmax
-
-float positiveMax(float const a, float const b)
-{
- return glm::fmax(a, b, 0.0f);
-}
-```
-
-Include `<glm/ext/vector_common.hpp>` to use these features.
-
-#### 3.5.2. GLM_EXT_vector_relational
-
-This extension exposes `equal` and `notEqual` vector variants which takes an epsilon argument.
-
-```cpp
-#include <glm/ext/vector_float2.hpp> // vec2
-#include <glm/ext/vector_relational.hpp> // equal, all
-
-bool epsilonEqual(glm::vec2 const& A, glm::vec2 const& B)
-{
- float const CustomEpsilon = 0.0001f;
- return glm::all(glm::equal(A, B, CustomEpsilon));
-}
-```
-
-Include `<glm/ext/vector_relational.hpp>` to use these features.
-
-#### 3.5.3. GLM_EXT_vector_ulp
-
-This extension exposes function that measure of accuracy in numeric calculations.
-
-```cpp
-#include <glm/ext/vector_ulp.hpp>
-#include <glm/ext/vector_float4.hpp>
-#include <glm/ext/vector_int4.hpp>
-
-bool test_ulp(glm::vec4 const& x)
-{
- glm::vec4 const a = glm::next_float(x); // return a float a ULP away from the float argument.
- return glm::all(float_distance(a, x) == glm::ivec4(1)); // check both float are a single ULP away.
-}
-```
-
-Include `<glm/ext/vector_ulp.hpp>` to use these features.
-
-### <a name="section3_6"></a> 3.6. Matrix types
-
-#### 3.6.1. GLM_EXT_matrix_float2x2
-
-This extension exposes single-precision floating point vector with 2 columns by 2 rows: `mat2x2`.
-
-Include `<glm/ext/matrix_float2x2.hpp>` to use these features.
-
-#### 3.6.2. GLM_EXT_matrix_float2x3
-
-This extension exposes single-precision floating point vector with 2 columns by 3 rows: `mat2x3`.
-
-Include `<glm/ext/matrix_float2x3.hpp>` to use these features.
-
-#### 3.6.3. GLM_EXT_matrix_float2x4
-
-This extension exposes single-precision floating point vector with 2 columns by 4 rows: `mat2x4`.
-
-Include `<glm/ext/matrix_float2x4.hpp>` to use these features.
-
-#### 3.6.4. GLM_EXT_matrix_float3x2
-
-This extension exposes single-precision floating point vector with 3 columns by 2 rows: `mat3x2`.
-
-Include `<glm/ext/matrix_float3x2.hpp>` to use these features.
-
-#### 3.6.5. GLM_EXT_matrix_float3x3
-
-This extension exposes single-precision floating point vector with 3 columns by 3 rows: `mat3x3`.
-
-Include `<glm/ext/matrix_float3x3.hpp>` to use these features.
-
-#### 3.6.6. GLM_EXT_matrix_float3x4
-
-This extension exposes single-precision floating point vector with 3 columns by 4 rows: `mat3x4`.
-
-Include `<glm/ext/matrix_float3x4.hpp>` to use these features.
-
-#### 3.6.7. GLM_EXT_matrix_float4x2
-
-This extension exposes single-precision floating point vector with 4 columns by 2 rows: `mat4x2`.
-
-Include `<glm/ext/matrix_float4x2.hpp>` to use these features.
-
-#### 3.6.8. GLM_EXT_matrix_float4x3
-
-This extension exposes single-precision floating point vector with 4 columns by 3 rows: `mat4x3`.
-
-Include `<glm/ext/matrix_float4x3.hpp>` to use these features.
-
-#### 3.6.9. GLM_EXT_matrix_float4x4
-
-This extension exposes single-precision floating point vector with 4 columns by 4 rows: `mat4x4`.
-
-Include `<glm/ext/matrix_float4x4.hpp>` to use these features.
-
-#### 3.6.10. GLM_EXT_matrix_double2x2
-
-This extension exposes double-precision floating point vector with 2 columns by 2 rows: `dmat2x2`.
-
-Include `<glm/ext/matrix_double2x2.hpp>` to use these features.
-
-#### 3.6.11. GLM_EXT_matrix_double2x3
-
-This extension exposes double-precision floating point vector with 2 columns by 3 rows: `dmat2x3`.
-
-Include `<glm/ext/matrix_double2x3.hpp>` to use these features.
-
-#### 3.6.12. GLM_EXT_matrix_double2x4
-
-This extension exposes double-precision floating point vector with 2 columns by 4 rows: `dmat2x4`.
-
-Include `<glm/ext/matrix_double2x4.hpp>` to use these features.
-
-#### 3.6.13. GLM_EXT_matrix_double3x2
-
-This extension exposes double-precision floating point vector with 3 columns by 2 rows: `dmat3x2`.
-
-Include `<glm/ext/matrix_double3x2.hpp>` to use these features.
-
-#### 3.6.14. GLM_EXT_matrix_double3x3
-
-This extension exposes double-precision floating point vector with 3 columns by 3 rows: `dmat3x3`.
-
-Include `<glm/ext/matrix_double3x3.hpp>` to use these features.
-
-#### 3.6.15. GLM_EXT_matrix_double3x4
-
-This extension exposes double-precision floating point vector with 3 columns by 4 rows: `dmat3x4`.
-
-Include `<glm/ext/matrix_double3x4.hpp>` to use these features.
-
-#### 3.6.16. GLM_EXT_matrix_double4x2
-
-This extension exposes double-precision floating point vector with 4 columns by 2 rows: `dmat4x2`.
-
-Include `<glm/ext/matrix_double4x2.hpp>` to use these features.
-
-#### 3.6.17. GLM_EXT_matrix_double4x3
-
-This extension exposes double-precision floating point vector with 4 columns by 3 rows: `dmat4x3`.
-
-Include `<glm/ext/matrix_double4x3.hpp>` to use these features.
-
-#### 3.6.18. GLM_EXT_matrix_double4x4
-
-This extension exposes double-precision floating point vector with 4 columns by 4 rows: `dmat4x4`.
-
-Include `<glm/ext/matrix_double4x4.hpp>` to use these features.
-
-### <a name="section3_7"></a> 3.7. Matrix types with precision qualifiers
-
-#### 3.7.1. GLM_EXT_matrix_float2x2_precision
-
-This extension exposes single-precision floating point vector with 2 columns by 2 rows using various precision in term of ULPs: `lowp_mat2x2`, `mediump_mat2x2` and `highp_mat2x2`.
-
-Include `<glm/ext/matrix_float2x2_precision.hpp>` to use these features.
-
-#### 3.7.2. GLM_EXT_matrix_float2x3_precision
-
-This extension exposes single-precision floating point vector with 2 columns by 3 rows using various precision in term of ULPs: `lowp_mat2x3`, `mediump_mat2x3` and `highp_mat2x3`.
-
-Include `<glm/ext/matrix_float2x3_precision.hpp>` to use these features.
-
-#### 3.7.3. GLM_EXT_matrix_float2x4_precision
-
-This extension exposes single-precision floating point vector with 2 columns by 4 rows using various precision in term of ULPs: `lowp_mat2x4`, `mediump_mat2x4` and `highp_mat2x4`.
-
-Include `<glm/ext/matrix_float2x4_precision.hpp>` to use these features.
-
-#### 3.7.4. GLM_EXT_matrix_float3x2_precision
-
-This extension exposes single-precision floating point vector with 3 columns by 2 rows using various precision in term of ULPs: `lowp_mat3x2`, `mediump_mat3x2` and `highp_mat3x2`.
-
-Include `<glm/ext/matrix_float3x2_precision.hpp>` to use these features.
-
-#### 3.7.5. GLM_EXT_matrix_float3x3_precision
-
-This extension exposes single-precision floating point vector with 3 columns by 3 rows using various precision in term of ULPs: `lowp_mat3x3`, `mediump_mat3x3` and `highp_mat3x3`.
-
-Include `<glm/ext/matrix_float3x3_precision.hpp>` to use these features.
-
-#### 3.7.6. GLM_EXT_matrix_float3x4_precision
-
-This extension exposes single-precision floating point vector with 3 columns by 4 rows using various precision in term of ULPs: `lowp_mat3x4`, `mediump_mat3x4` and `highp_mat3x4`.
-
-Include `<glm/ext/matrix_float3x4_precision.hpp>` to use these features.
-
-#### 3.7.7. GLM_EXT_matrix_float4x2_precision
-
-This extension exposes single-precision floating point vector with 4 columns by 2 rows using various precision in term of ULPs: `lowp_mat4x2`, `mediump_mat4x2` and `highp_mat4x2`.
-
-Include `<glm/ext/matrix_float4x2_precision.hpp>` to use these features.
-
-#### 3.7.8. GLM_EXT_matrix_float4x3_precision
-
-This extension exposes single-precision floating point vector with 4 columns by 3 rows using various precision in term of ULPs: `lowp_mat4x3`, `mediump_mat4x3` and `highp_mat4x3`.
-
-Include `<glm/ext/matrix_float4x3_precision.hpp>` to use these features.
-
-#### 3.7.9. GLM_EXT_matrix_float4x4_precision
-
-This extension exposes single-precision floating point vector with 4 columns by 4 rows using various precision in term of ULPs: `lowp_mat4x4`, `mediump_mat4x4` and `highp_mat4x4`.
-
-Include `<glm/ext/matrix_float4x4_precision.hpp>` to use these features.
-
-#### 3.7.10. GLM_EXT_matrix_double2x2_precision
-
-This extension exposes double-precision floating point vector with 2 columns by 2 rows using various precision in term of ULPs: `lowp_dmat2x2`, `mediump_dmat2x2` and `highp_dmat2x2`.
-
-Include `<glm/ext/matrix_double2x2_precision.hpp>` to use these features.
-
-#### 3.7.11. GLM_EXT_matrix_double2x3_precision
-
-This extension exposes double-precision floating point vector with 2 columns by 3 rows using various precision in term of ULPs: `lowp_dmat2x3`, `mediump_dmat2x3` and `highp_dmat2x3`.
-
-Include `<glm/ext/matrix_double2x3_precision.hpp>` to use these features.
-
-#### 3.7.12. GLM_EXT_matrix_double2x4_precision
-
-This extension exposes double-precision floating point vector with 2 columns by 4 rows using various precision in term of ULPs: `lowp_dmat2x4`, `mediump_dmat2x4` and `highp_dmat2x4`.
-
-Include `<glm/ext/matrix_double2x4_precision.hpp>` to use these features.
-
-#### 3.7.13. GLM_EXT_matrix_double3x2_precision
-
-This extension exposes double-precision floating point vector with 3 columns by 2 rows using various precision in term of ULPs: `lowp_dmat3x2`, `mediump_dmat3x2` and `highp_dmat3x2`.
-
-Include `<glm/ext/matrix_double3x2_precision.hpp>` to use these features.
-
-#### 3.7.14. GLM_EXT_matrix_double3x3_precision
-
-This extension exposes double-precision floating point vector with 3 columns by 3 rows using various precision in term of ULPs: `lowp_dmat3x3`, `mediump_dmat3x3` and `highp_dmat3x3`.
-
-Include `<glm/ext/matrix_double3x3_precision.hpp>` to use these features.
-
-#### 3.7.15. GLM_EXT_matrix_double3x4_precision
-
-This extension exposes double-precision floating point vector with 3 columns by 4 rows using various precision in term of ULPs: `lowp_dmat3x4`, `mediump_dmat3x4` and `highp_dmat3x4`.
-
-Include `<glm/ext/matrix_double3x4_precision.hpp>` to use these features.
-
-#### 3.7.16. GLM_EXT_matrix_double4x2_precision
-
-This extension exposes double-precision floating point vector with 4 columns by 2 rows using various precision in term of ULPs: `lowp_dmat4x2`, `mediump_dmat4x2` and `highp_dmat4x2`.
-
-Include `<glm/ext/matrix_double4x2_precision.hpp>` to use these features.
-
-#### 3.7.17. GLM_EXT_matrix_double4x3_precision
-
-This extension exposes double-precision floating point vector with 4 columns by 3 rows using various precision in term of ULPs: `lowp_dmat4x3`, `mediump_dmat4x3` and `highp_dmat4x3`.
-
-Include `<glm/ext/matrix_double4x3_precision.hpp>` to use these features.
-
-#### 3.7.18. GLM_EXT_matrix_double4x4_precision
-
-This extension exposes double-precision floating point vector with 4 columns by 4 rows using various precision in term of ULPs: `lowp_dmat4x4`, `mediump_dmat4x4` and `highp_dmat4x4`.
-
-Include `<glm/ext/matrix_double4x4_precision.hpp>` to use these features.
-
-### <a name="section3_8"></a> 3.8. Matrix functions
-
-#### 3.8.1. GLM_EXT_matrix_relational
-
-This extension exposes `equal` and `notEqual` matrix variants which takes an optional epsilon argument.
-
-```cpp
-#include <glm/ext/vector_bool4.hpp> // bvec4
-#include <glm/ext/matrix_float4x4.hpp> // mat4
-#include <glm/ext/matrix_relational.hpp> // equal, all
-
-bool epsilonEqual(glm::mat4 const& A, glm::mat4 const& B)
-{
- float const CustomEpsilon = 0.0001f;
- glm::bvec4 const ColumnEqual = glm::equal(A, B, CustomEpsilon); // Evaluation per column
- return glm::all(ColumnEqual);
-}
-```
-
-Include `<glm/ext/matrix_relational.hpp>` to use these features.
-
-#### 3.8.2. GLM_EXT_matrix_transform
-
-This extension exposes matrix transformation functions: `translate`, `rotate` and `scale`.
-
-```cpp
-#include <glm/ext/vector_float2.hpp> // vec2
-#include <glm/ext/vector_float3.hpp> // vec3
-#include <glm/ext/matrix_float4x4.hpp> // mat4x4
-#include <glm/ext/matrix_transform.hpp> // translate, rotate, scale, identity
-
-glm::mat4 computeModelViewMatrix(float Translate, glm::vec2 const & Rotate)
-{
- glm::mat4 View = glm::translate(glm::identity(), glm::vec3(0.0f, 0.0f, -Translate));
- View = glm::rotate(View, Rotate.y, glm::vec3(-1.0f, 0.0f, 0.0f));
- View = glm::rotate(View, Rotate.x, glm::vec3(0.0f, 1.0f, 0.0f));
- glm::mat4 Model = glm::scale(glm::identity(), glm::vec3(0.5f));
- return View * Model;
-}
-```
-
-Include `<glm/ext/matrix_transform.hpp>` to use these features.
-
-#### 3.8.3. GLM_EXT_matrix_clip_space
-
-This extension exposes functions to transform scenes into the clip space.
-
-```cpp
-#include <glm/ext/matrix_float4x4.hpp> // mat4x4
-#include <glm/ext/matrix_clip_space.hpp> // perspective
-#include <glm/trigonometric.hpp> // radians
-
-glm::mat4 computeProjection(float Width, float Height)
-{
- return glm::perspective(glm::radians(45.0f), Width / Height, 0.1f, 100.f);
-}
-```
-
-Include `<glm/ext/matrix_clip_space.hpp>` to use these features.
-
-#### 3.8.4. GLM_EXT_matrix_projection
-
-This extension exposes functions to map object coordinates into window coordinates and reverse
-
-Include `<glm/ext/matrix_projection.hpp>` to use these features.
-
-### <a name="section3_9"></a> 3.9. Quaternion types
-
-#### 3.9.1. GLM_EXT_quaternion_float
-
-This extension exposes single-precision floating point quaternion: `quat`.
-
-Include `<glm/ext/quaternion_float.hpp>` to use these features.
-
-#### 3.9.2. GLM_EXT_quaternion_double
-
-This extension exposes double-precision floating point quaternion: `dquat`.
-
-Include `<glm/ext/quaternion_double.hpp>` to use these features.
-
-### <a name="section3_10"></a> 3.10. Quaternion types with precision qualifiers
-
-#### 3.10.1. GLM_EXT_quaternion_float_precision
-
-This extension exposes single-precision floating point quaternion using various precision in term of ULPs: `lowp_quat`, `mediump_quat` and `highp_quat`.
-
-Include `<glm/ext/quaternion_float_precision.hpp>` to use these features.
-
-#### 3.10.2. GLM_EXT_quaternion_double_precision
-
-This extension exposes double-precision floating point quaternion using various precision in term of ULPs: `lowp_dquat`, `mediump_dquat` and `highp_dquat`.
-
-Include `<glm/ext/quaternion_double_precision.hpp>` to use these features.
-
-### <a name="section3_11"></a> 3.11. Quaternion functions
-
-#### 3.11.1. GLM_EXT_quaternion_common
-
-This extension exposes common quaternion functions such as `slerp`, `conjugate` and `inverse`.
-
-Include `<glm/ext/quaternion_common.hpp>` to use these features.
-
-#### 3.11.2. GLM_EXT_quaternion_geometric
-
-This extension exposes geometric quaternion functions such as `length`, `normalize`, `dot` and `cross`.
-
-Include `<glm/ext/quaternion_geometric.hpp>` to use these features.
-
-#### 3.11.3. GLM_EXT_quaternion_trigonometric
-
-This extension exposes trigonometric quaternion functions such as `angle` and `axis`.
-
-Include `<glm/ext/quaternion_trigonometric.hpp>` to use these features.
-
-#### 3.11.4. GLM_EXT_quaternion_exponential
-
-This extensions expose exponential functions for quaternions such as `exp`, `log`, `pow` and `sqrt`.
-
-Include `<glm/ext/quaternion_exponential.hpp>` to use these features.
-
-#### 3.11.5. GLM_EXT_quaternion_relational
-
-This extension exposes relational functions to compare quaternions.
-
-Include `<glm/ext/quaternion_relational.hpp>` to use these features.
-
-#### 3.11.6. GLM_EXT_quaternion_transform
-
-This extension exposes functions to transform objects.
-
-Include `<glm/ext/quaternion_transform.hpp>` to use these features.
-
----
-<div style="page-break-after: always;"> </div>
-
-## <a name="section4"></a> 4. Recommended extensions
-
-GLM extends the core GLSL feature set with extensions. These extensions include: quaternion, transformation, spline, matrix inverse, color spaces, etc.
-
-To include an extension, we only need to include the dedicated header file. Once included, the features are added to the GLM namespace.
-
-```cpp
-#include <glm/glm.hpp>
-#include <glm/gtc/matrix_transform.hpp>
-
-int foo()
-{
- glm::vec4 Position = glm::vec4(glm:: vec3(0.0f), 1.0f);
- glm::mat4 Model = glm::translate(glm::mat4(1.0f), glm::vec3(1.0f));
-
- glm::vec4 Transformed = Model * Position;
- ...
-
- return 0;
-}
-```
-
-When an extension is included, all the dependent core functionalities and extensions will be included as well.
-
-### <a name="section4_1"></a> 4.1. GLM_GTC_bitfield
-
-Fast bitfield operations on scalar and vector variables.
-
-`<glm/gtc/bitfield.hpp>` need to be included to use these features.
-
-### <a name="section4_2"></a> 4.2. GLM_GTC_color_space
-
-Conversion between linear RGB and sRGB color spaces.
-
-`<glm/gtc/color_space.hpp>` need to be included to use these features.
-
-### <a name="section4_3"></a> 4.3. GLM_GTC_constants
-
-Provide a list of built-in constants.
-
-`<glm/gtc/constants.hpp>` need to be included to use these features.
-
-### <a name="section4_4"></a> 4.4. GLM\_GTC\_epsilon
-
-Approximate equality comparisons for floating-point numbers, possibly with a user-defined epsilon.
-
-`<glm/gtc/epsilon.hpp>` need to be included to use these features.
-
-### <a name="section4_5"></a> 4.5. GLM\_GTC\_integer
-
-Integer variants of core GLM functions.
-
-`<glm/gtc/integer.hpp>` need to be included to use these features.
-
-### <a name="section4_6"></a> 4.6. GLM\_GTC\_matrix\_access
-
-Functions to conveniently access the individual rows or columns of a matrix.
-
-`<glm/gtc/matrix_access.hpp>` need to be included to use these features.
-
-### <a name="section4_7"></a> 4.7. GLM\_GTC\_matrix\_integer
-
-Integer matrix types similar to the core floating-point matrices. Some operations (such as inverse and determinant) are not supported.
-
-`<glm/gtc/matrix_integer.hpp>` need to be included to use these features.
-
-### <a name="section4_8"></a> 4.8. GLM\_GTC\_matrix\_inverse
-
-Additional matrix inverse functions.
-
-`<glm/gtc/matrix_inverse.hpp>` need to be included to use these features.
-
-### <a name="section4_9"></a> 4.9. GLM\_GTC\_matrix\_transform
-
-Matrix transformation functions that follow the OpenGL fixed-function conventions.
-
-For example, the `lookAt` function generates a transformation matrix that projects world coordinates into eye coordinates suitable for projection matrices (e.g. `perspective`, `ortho`). See the OpenGL compatibility specifications for more information about the layout of these generated matrices.
-
-The matrices generated by this extension use standard OpenGL fixed-function conventions. For example, the `lookAt` function generates a transform from world space into the specific eye space that the
-projective matrix functions (`perspective`, `ortho`, etc) are designed to expect. The OpenGL compatibility specifications define the particular layout of this eye space.
-
-`<glm/gtc/matrix_transform.hpp>` need to be included to use these features.
-
-### <a name="section4_10"></a> 4.10. GLM\_GTC\_noise
-
-Define 2D, 3D and 4D procedural noise functions.
-
-<`glm/gtc/noise.hpp>` need to be included to use these features.
-
-![](/doc/manual/noise-simplex1.jpg)
-
-Figure 4.10.1: glm::simplex(glm::vec2(x / 16.f, y / 16.f));
-
-![](/doc/manual/noise-simplex2.jpg)
-
-Figure 4.10.2: glm::simplex(glm::vec3(x / 16.f, y / 16.f, 0.5f));
-
-![](/doc/manual/noise-simplex3.jpg)
-
-Figure 4.10.3: glm::simplex(glm::vec4(x / 16.f, y / 16.f, 0.5f, 0.5f));
-
-![](/doc/manual/noise-perlin1.jpg)
-
-Figure 4.10.4: glm::perlin(glm::vec2(x / 16.f, y / 16.f));
-
-![](/doc/manual/noise-perlin2.jpg)
-
-Figure 4.10.5: glm::perlin(glm::vec3(x / 16.f, y / 16.f, 0.5f));
-
-![](/doc/manual/noise-perlin3.jpg)
-
-Figure 4.10.6: glm::perlin(glm::vec4(x / 16.f, y / 16.f, 0.5f, 0.5f)));
-
-![](/doc/manual/noise-perlin4.png)
-
-Figure 4.10.7: glm::perlin(glm::vec2(x / 16.f, y / 16.f), glm::vec2(2.0f));
-
-![](/doc/manual/noise-perlin5.png)
-
-Figure 4.10.8: glm::perlin(glm::vec3(x / 16.f, y / 16.f, 0.5f), glm::vec3(2.0f));
-
-![](/doc/manual/noise-perlin6.png)
-
-Figure 4.10.9: glm::perlin(glm::vec4(x / 16.f, y / 16.f, glm::vec2(0.5f)), glm::vec4(2.0f));
-
-### <a name="section4_11"></a> 4.11. GLM\_GTC\_packing
-
-Convert scalar and vector types to and from packed formats, saving space at the cost of precision. However, packing a value into a format that it was previously unpacked from is guaranteed to be lossless.
-
-`<glm/gtc/packing.hpp>` need to be included to use these features.
-
-### <a name="section4_12"></a> 4.12. GLM\_GTC\_quaternion
-
-Quaternions and operations upon thereof.
-
-`<glm/gtc/quaternion.hpp>` need to be included to use these features.
-
-### <a name="section4_13"></a> 4.13. GLM\_GTC\_random
-
-Probability distributions in up to four dimensions.
-
-`<glm/gtc/random.hpp>` need to be included to use these features.
-
-![](/doc/manual/random-linearrand.png)
-
-Figure 4.13.1: glm::vec4(glm::linearRand(glm::vec2(-1), glm::vec2(1)), 0, 1);
-
-![](/doc/manual/random-circularrand.png)
-
-Figure 4.13.2: glm::vec4(glm::circularRand(1.0f), 0, 1);
-
-![](/doc/manual/random-sphericalrand.png)
-
-Figure 4.13.3: glm::vec4(glm::sphericalRand(1.0f), 1);
-
-![](/doc/manual/random-diskrand.png)
-
-Figure 4.13.4: glm::vec4(glm::diskRand(1.0f), 0, 1);
-
-![](/doc/manual/random-ballrand.png)
-
-Figure 4.13.5: glm::vec4(glm::ballRand(1.0f), 1);
-
-![](/doc/manual/random-gaussrand.png)
-
-Figure 4.13.6: glm::vec4(glm::gaussRand(glm::vec3(0), glm::vec3(1)), 1);
-
-### <a name="section4_14"></a> 4.14. GLM\_GTC\_reciprocal
-
-Reciprocal trigonometric functions (e.g. secant, cosecant, tangent).
-
-`<glm/gtc/reciprocal.hpp>` need to be included to use the features of this extension.
-
-### <a name="section4_15"></a> 4.15. GLM\_GTC\_round
-
-Various rounding operations and common special cases thereof.
-
-`<glm/gtc/round.hpp>` need to be included to use the features of this extension.
-
-### <a name="section4_16"></a> 4.16. GLM\_GTC\_type\_aligned
-
-Aligned vector types.
-
-`<glm/gtc/type_aligned.hpp>` need to be included to use the features of this extension.
-
-### <a name="section4_17"></a> 4.17. GLM\_GTC\_type\_precision
-
-Vector and matrix types with defined precisions, e.g. `i8vec4`, which is a 4D vector of signed 8-bit integers.
-
-`<glm/gtc/type\_precision.hpp>` need to be included to use the features of this extension.
-
-### <a name="section4_18"></a> 4.18. GLM\_GTC\_type\_ptr
-
-Facilitate interactions between pointers to basic types (e.g. `float*`) and GLM types (e.g. `mat4`).
-
-This extension defines an overloaded function, `glm::value_ptr`, which returns a pointer to the memory layout of any GLM vector or matrix (`vec3`, `mat4`, etc.). Matrix types store their values in column-major order. This is useful for uploading data to matrices or for copying data to buffer objects.
-
-```cpp
-// GLM_GTC_type_ptr provides a safe solution:
-#include <glm/glm.hpp>
-#include <glm/gtc/type_ptr.hpp>
-
-void foo()
-{
- glm::vec4 v(0.0f);
- glm::mat4 m(1.0f);
- ...
- glVertex3fv(glm::value_ptr(v))
- glLoadMatrixfv(glm::value_ptr(m));
-}
-
-// Another solution, this one inspired by the STL:
-#include <glm/glm.hpp>
-
-void foo()
-{
- glm::vec4 v(0.0f);
- glm::mat4 m(1.0f);
- ...
- glVertex3fv(&v[0]);
- glLoadMatrixfv(&m[0][0]);
-}
-```
-
-*Note: It would be possible to implement [`glVertex3fv`](http://www.opengl.org/sdk/docs/man2/xhtml/glVertex.xml)(glm::vec3(0)) in C++ with the appropriate cast operator that would result as an
-implicit cast in this example. However cast operators may produce programs running with unexpected behaviours without build error or any form of notification. *
-
-`<glm/gtc/type_ptr.hpp>` need to be included to use these features.
-
-### <a name="section4_19"></a> 4.19. GLM\_GTC\_ulp
-
-Measure a function's accuracy given a reference implementation of it. This extension works on floating-point data and provides results in [ULP](http://ljk.imag.fr/membres/Carine.Lucas/TPScilab/JMMuller/ulp-toms.pdf).
-
-`<glm/gtc/ulp.hpp>` need to be included to use these features.
-
-### <a name="section4_20"></a> 4.20. GLM\_GTC\_vec1
-
-Add \*vec1 types.
-
-`<glm/gtc/vec1.hpp>` need to be included to use these features.
-
----
-<div style="page-break-after: always;"> </div>
-
-## <a name="section5"></a> 5. OpenGL interoperability
-
-### <a name="section5_1"></a> 5.1. GLM replacements for deprecated OpenGL functions
-
-OpenGL 3.1 specification has deprecated some features that have been removed from OpenGL 3.2 core profile specification. GLM provides some replacement functions.
-
-[***glRotate{f, d}:***](https://www.opengl.org/sdk/docs/man2/xhtml/glRotate.xml)
-
-```cpp
-glm::mat4 glm::rotate(glm::mat4 const& m, float angle, glm::vec3 const& axis);
-glm::dmat4 glm::rotate(glm::dmat4 const& m, double angle, glm::dvec3 const& axis);
-```
-
-From `GLM_GTC_matrix_transform` extension: &lt;glm/gtc/matrix\_transform.hpp&gt;
-
-[***glScale{f, d}:***](http://www.opengl.org/sdk/docs/man2/xhtml/glScale.xml)
-
-```cpp
-glm::mat4 glm::scale(glm::mat4 const& m, glm::vec3 const& factors);
-glm::dmat4 glm::scale(glm::dmat4 const& m, glm::dvec3 const& factors);
-```
-
-From `GLM_GTC_matrix_transform` extension: &lt;glm/gtc/matrix\_transform.hpp&gt;
-
-[***glTranslate{f, d}:***](https://www.opengl.org/sdk/docs/man2/xhtml/glTranslate.xml)
-
-```cpp
-glm::mat4 glm::translate(glm::mat4 const& m, glm::vec3 const& translation);
-glm::dmat4 glm::translate(glm::dmat4 const& m, glm::dvec3 const& translation);
-```
-
-From `GLM_GTC_matrix_transform` extension: &lt;glm/gtc/matrix\_transform.hpp&gt;
-
-[***glLoadIdentity:***](https://www.opengl.org/sdk/docs/man2/xhtml/glLoadIdentity.xml)
-
-```cpp
-glm::mat4(1.0) or glm::mat4();
-glm::dmat4(1.0) or glm::dmat4();
-```
-
-From GLM core library: `<glm/glm.hpp>`
-
-[***glMultMatrix{f, d}:***](https://www.opengl.org/sdk/docs/man2/xhtml/glMultMatrix.xml)
-
-```cpp
-glm::mat4() * glm::mat4();
-glm::dmat4() * glm::dmat4();
-```
-
-From GLM core library: `<glm/glm.hpp>`
-
-[***glLoadTransposeMatrix{f, d}:***](https://www.opengl.org/sdk/docs/man2/xhtml/glLoadTransposeMatrix.xml)
-
-```cpp
-glm::transpose(glm::mat4());
-glm::transpose(glm::dmat4());
-```
-
-From GLM core library: `<glm/glm.hpp>`
-
-[***glMultTransposeMatrix{f, d}:***](https://www.opengl.org/sdk/docs/man2/xhtml/glMultTransposeMatrix.xml)
-
-```cpp
-glm::mat4() * glm::transpose(glm::mat4());
-glm::dmat4() * glm::transpose(glm::dmat4());
-```
-
-From GLM core library: `<glm/glm.hpp>`
-
-[***glFrustum:***](http://www.opengl.org/sdk/docs/man2/xhtml/glFrustum.xml)
-
-```cpp
-glm::mat4 glm::frustum(float left, float right, float bottom, float top, float zNear, float zFar);
-glm::dmat4 glm::frustum(double left, double right, double bottom, double top, double zNear, double zFar);
-```
-
-From `GLM_GTC_matrix_transform` extension: `<glm/gtc/matrix_transform.hpp>`
-
-[***glOrtho:***](https://www.opengl.org/sdk/docs/man2/xhtml/glOrtho.xml)
-
-```cpp
-glm::mat4 glm::ortho(float left, float right, float bottom, float top, float zNear, float zFar);
-glm::dmat4 glm::ortho(double left, double right, double bottom, double top, double zNear, double zFar);
-```
-
-From `GLM_GTC_matrix_transform` extension: `<glm/gtc/matrix_transform.hpp>`
-
-### <a name="section5_2"></a> 5.2. GLM replacements for GLU functions
-
-[***gluLookAt:***](https://www.opengl.org/sdk/docs/man2/xhtml/gluLookAt.xml)
-
-```cpp
-glm::mat4 glm::lookAt(glm::vec3 const& eye, glm::vec3 const& center, glm::vec3 const& up);
-glm::dmat4 glm::lookAt(glm::dvec3 const& eye, glm::dvec3 const& center, glm::dvec3 const& up);
-```
-
-From `GLM_GTC_matrix_transform` extension: `<glm/gtc/matrix_transform.hpp>`
-
-[***gluOrtho2D:***](https://www.opengl.org/sdk/docs/man2/xhtml/gluOrtho2D.xml)
-
-```cpp
-glm::mat4 glm::ortho(float left, float right, float bottom, float top);
-glm::dmat4 glm::ortho(double left, double right, double bottom, double top);
-```
-
-From `GLM_GTC_matrix_transform` extension: `<glm/gtc/matrix_transform.hpp>`
-
-[***gluPerspective:***](https://www.opengl.org/sdk/docs/man2/xhtml/gluPerspective.xml)
-
-```cpp
-glm::mat4 perspective(float fovy, float aspect, float zNear, float zFar);
-glm::dmat4 perspective(double fovy, double aspect, double zNear, double zFar);
-```
-
-Note that in GLM, fovy is expressed in radians, not degrees.
-
-From `GLM_GTC_matrix_transform` extension: `<glm/gtc/matrix_transform.hpp>`
-
-[***gluPickMatrix:***](https://www.opengl.org/sdk/docs/man2/xhtml/gluPickMatrix.xml)
-
-```cpp
-glm::mat4 pickMatrix(glm::vec2 const& center, glm::vec2 const& delta, glm::ivec4 const& viewport);
-glm::dmat4 pickMatrix(glm::dvec2 const& center, glm::dvec2 const& delta, glm::ivec4 const& viewport);
-```
-
-From `GLM_GTC_matrix_transform` extension: `<glm/gtc/matrix_transform.hpp>`
-
-[***gluProject:***](http://www.opengl.org/sdk/docs/man2/xhtml/gluProject.xml)
-
-```cpp
-glm::vec3 project(glm::vec3 const& obj, glm::mat4 const& model, glm::mat4 const& proj, glm::ivec4 const& viewport);
-glm::dvec3 project(glm::dvec3 const& obj, glm::dmat4 const& model, glm::dmat4 const& proj, glm::ivec4 const& viewport);
-```
-
-From `GLM_GTC_matrix_transform` extension: `<glm/gtc/matrix_transform.hpp>`
-
-[***gluUnProject:***](https://www.opengl.org/sdk/docs/man2/xhtml/gluUnProject.xml)
-
-```cpp
-glm::vec3 unProject(glm::vec3 const& win, glm::mat4 const& model, glm::mat4 const& proj, glm::ivec4 const& viewport);
-glm::dvec3 unProject(glm::dvec3 const& win, glm::dmat4 const& model, glm::dmat4 const& proj, glm::ivec4 const& viewport);
-```
-
-From `GLM_GTC_matrix_transform` extension: `<glm/gtc/matrix_transform.hpp>`
-
----
-<div style="page-break-after: always;"> </div>
-
-## <a name="section6"></a> 6. Known issues
-
-This section reports GLSL features that GLM can't accurately emulate due to language restrictions.
-
-### <a name="section6_1"></a> 6.1. not function
-
-The GLSL function 'not' is a keyword in C++. To prevent name collisions and ensure a consistent API, the name `not\_` (note the underscore) is used instead.
-
-### <a name="section6_2"></a> 6.2. Precision qualifiers support
-
-GLM supports GLSL precision qualifiers through prefixes instead of qualifiers. For example, GLM exposes \verb|lowp_vec4|, \verb|mediump_vec4| and \verb|highp_vec4| as variations of \verb|vec4|.
-
-Similarly to GLSL, GLM precision qualifiers are used to trade precision of operations in term of [ULPs](http://en.wikipedia.org/wiki/Unit_in_the_last_place) for better performance. By default, all the types use high precision.
-
-```cpp
-// Using precision qualifier in GLSL:
-
-ivec3 foo(in vec4 v)
-{
- highp vec4 a = v;
- mediump vec4 b = a;
- lowp ivec3 c = ivec3(b);
- return c;
-}
-
-// Using precision qualifier in GLM:
-
-#include <glm/glm.hpp>
-
-ivec3 foo(const vec4 & v)
-{
- highp_vec4 a = v;
- medium_vec4 b = a;
- lowp_ivec3 c = glm::ivec3(b);
- return c;
-}
-```
-
----
-<div style="page-break-after: always;"> </div>
-
-## <a name="section7"></a> 7. FAQ
-
-### <a name="section7_1"></a> 7.1 Why GLM follows GLSL specification and conventions?
-
-Following GLSL conventions is a really strict policy of GLM. It has been designed following the idea that everyone does its own math library with his own conventions. The idea is that brilliant developers (the OpenGL ARB) worked together and agreed to make GLSL. Following GLSL conventions
-is a way to find consensus. Moreover, basically when a developer knows GLSL, he knows GLM.
-
-### <a name="section7_2"></a> 7.2. Does GLM run GLSL program?
-
-No, GLM is a C++ implementation of a subset of GLSL.
-
-### <a name="section7_3"></a> 7.3. Does a GLSL compiler build GLM codes?
-
-No, this is not what GLM attends to do.
-
-### <a name="section7_4"></a> 7.4. Should I use ‘GTX’ extensions?
-
-GTX extensions are qualified to be experimental extensions. In GLM this means that these extensions might change from version to version without any restriction. In practice, it doesn’t really change except time to
-time. GTC extensions are stabled, tested and perfectly reliable in time. Many GTX extensions extend GTC extensions and provide a way to explore features and implementations and APIs and then are promoted to GTC
-extensions. This is fairly the way OpenGL features are developed; through extensions.
-
-Stating with GLM 0.9.9, to use experimental extensions, an application must define GLM_ENABLE_EXPERIMENTAL.
-
-### <a name="section7_5"></a> 7.5. Where can I ask my questions?
-
-A good place is [stackoverflow](http://stackoverflow.com/search?q=GLM) using the GLM tag.
-
-### <a name="section7_6"></a> 7.6. Where can I find the documentation of extensions?
-
-The Doxygen generated documentation includes a complete list of all extensions available. Explore this [*API documentation*](http://glm.g-truc.net/html/index.html) to get a complete
-view of all GLM capabilities!
-
-### <a name="section7_7"></a> 7.7. Should I use ‘using namespace glm;’?
-
-NO! Chances are that if using namespace glm; is called, especially in a header file, name collisions will happen as GLM is based on GLSL which uses common tokens for types and functions. Avoiding using namespace
-glm; will a higher compatibility with third party library and SDKs.
-
-### <a name="section7_8"></a> 7.8. Is GLM fast?
-
-GLM is mainly designed to be convenient and that's why it is written against the GLSL specification.
-
-Following the Pareto principle where 20% of the code consumes 80% of the execution time, GLM operates perfectly on the 80% of the code that consumes 20% of the performances. Furthermore, thanks to the lowp,
-mediump and highp qualifiers, GLM provides approximations which trade precision for performance. Finally, GLM can automatically produce SIMD optimized code for functions of its implementation.
-
-However, on performance critical code paths, we should expect that dedicated algorithms should be written to reach peak performance.
-
-### <a name="section7_9"></a> 7.9. When I build with Visual C++ with /W4 warning level, I have warnings...
-
-You should not have any warnings even in `/W4` mode. However, if you expect such level for your code, then you should ask for the same level to the compiler by at least disabling the Visual C++ language extensions
-(`/Za`) which generates warnings when used. If these extensions are enabled, then GLM will take advantage of them and the compiler will generate warnings.
-
-### <a name="section7_10"></a> 7.10. Why some GLM functions can crash because of division by zero?
-
-GLM functions crashing is the result of a domain error. Such behavior follows the precedent set by C and C++'s standard library. For example, it’s a domain error to pass a null vector (all zeroes) to glm::normalize function, or to pass a negative number into std::sqrt.
-
-### <a name="section7_11"></a> 7.11. What unit for angles is used in GLM?
-
-GLSL is using radians but GLU is using degrees to express angles. This has caused GLM to use inconsistent units for angles. Starting with GLM 0.9.6, all GLM functions are using radians. For more information, follow
-the [link](http://www.g-truc.net/post-0693.html#menu).
-
-### <a name="section7_12"></a> 7.12. Windows headers cause build errors...
-
-Some Windows headers define min and max as macros which may cause compatibility with third party libraries such as GLM.
-It is highly recommended to [`define NOMINMAX`](http://stackoverflow.com/questions/4913922/possible-problems-with-nominmax-on-visual-c) before including Windows headers to workaround this issue.
-To workaround the incompatibility with these macros, GLM will systematically undef these macros if they are defined.
-
-### <a name="section7_13"></a> 7.13. Constant expressions support
-
-GLM has some C++ <a href="http://en.cppreference.com/w/cpp/language/constexpr">constant expressions</a> support. However, GLM automatically detects the use of SIMD instruction sets through compiler arguments to populate its implementation with SIMD intrinsics.
-Unfortunately, GCC and Clang doesn't support SIMD instrinsics as constant expressions. To allow constant expressions on all vectors and matrices types, define `GLM_FORCE_PURE` before including GLM headers.
-
----
-<div style="page-break-after: always;"> </div>
-
-## <a name="section8"></a> 8. Code samples
-
-This series of samples only shows various GLM features without consideration of any sort.
-
-### <a name="section8_1"></a> 8.1. Compute a triangle normal
-
-```cpp
-#include <glm/glm.hpp> // vec3 normalize cross
-
-glm::vec3 computeNormal(glm::vec3 const& a, glm::vec3 const& b, glm::vec3 const& c)
-{
- return glm::normalize(glm::cross(c - a, b - a));
-}
-
-// A much faster but less accurate alternative:
-#include <glm/glm.hpp> // vec3 cross
-#include <glm/gtx/fast_square_root.hpp> // fastNormalize
-
-glm::vec3 computeNormal(glm::vec3 const& a, glm::vec3 const& b, glm::vec3 const& c)
-{
- return glm::fastNormalize(glm::cross(c - a, b - a));
-}
-```
-
-### <a name="section8_2"></a> 8.2. Matrix transform
-
-```cpp
-#include <glm/glm.hpp> // vec3, vec4, ivec4, mat4
-#include <glm/gtc/matrix_transform.hpp> // translate, rotate, scale, perspective
-#include <glm/gtc/type_ptr.hpp> // value_ptr
-
-void setUniformMVP(GLuint Location, glm::vec3 const& Translate, glm::vec3 const& Rotate)
-{
- glm::mat4 Projection = glm::perspective(45.0f, 4.0f / 3.0f, 0.1f, 100.f);
- glm::mat4 ViewTranslate = glm::translate(
- glm::mat4(1.0f), Translate);
- glm::mat4 ViewRotateX = glm::rotate(
- ViewTranslate, Rotate.y, glm::vec3(-1.0f, 0.0f, 0.0f));
- glm::mat4 View = glm::rotate(ViewRotateX,
- Rotate.x, glm::vec3(0.0f, 1.0f, 0.0f));
- glm::mat4 Model = glm::scale(
- glm::mat4(1.0f), glm::vec3(0.5f));
- glm::mat4 MVP = Projection * View * Model;
- glUniformMatrix4fv(Location, 1, GL_FALSE, glm::value_ptr(MVP));
-}
-```
-
-### <a name="section8_3"></a> 8.3. Vector types
-
-```cpp
-#include <glm/glm.hpp> // vec2
-#include <glm/gtc/type_precision.hpp> // hvec2, i8vec2, i32vec2
-
-std::size_t const VertexCount = 4;
-
-// Float quad geometry
-std::size_t const PositionSizeF32 = VertexCount * sizeof(glm::vec2);
-glm::vec2 const PositionDataF32[VertexCount] =
-{
- glm::vec2(-1.0f,-1.0f),
- glm::vec2( 1.0f,-1.0f),
- glm::vec2( 1.0f, 1.0f),
- glm::vec2(-1.0f, 1.0f)
-};
-
-// Half-float quad geometry
-std::size_t const PositionSizeF16 = VertexCount * sizeof(glm::hvec2);
-glm::hvec2 const PositionDataF16[VertexCount] =
-{
- glm::hvec2(-1.0f, -1.0f),
- glm::hvec2( 1.0f, -1.0f),
- glm::hvec2( 1.0f, 1.0f),
- glm::hvec2(-1.0f, 1.0f)
-};
-
-// 8 bits signed integer quad geometry
-std::size_t const PositionSizeI8 = VertexCount * sizeof(glm::i8vec2);
-glm::i8vec2 const PositionDataI8[VertexCount] =
-{
- glm::i8vec2(-1,-1),
- glm::i8vec2( 1,-1),
- glm::i8vec2( 1, 1),
- glm::i8vec2(-1, 1)
-};
-
-// 32 bits signed integer quad geometry
-std::size_t const PositionSizeI32 = VertexCount * sizeof(glm::i32vec2);
-glm::i32vec2 const PositionDataI32[VertexCount] =
-{
- glm::i32vec2(-1,-1),
- glm::i32vec2( 1,-1),
- glm::i32vec2( 1, 1),
- glm::i32vec2(-1, 1)
-};
-```
-
-### <a name="section8_4"></a> 8.4. Lighting
-
-```cpp
-#include <glm/glm.hpp> // vec3 normalize reflect dot pow
-#include <glm/gtc/random.hpp> // ballRand
-
-// vecRand3, generate a random and equiprobable normalized vec3
-glm::vec3 lighting(intersection const& Intersection, material const& Material, light const& Light, glm::vec3 const& View)
-{
- glm::vec3 Color = glm::vec3(0.0f);
- glm::vec3 LightVertor = glm::normalize(
- Light.position() - Intersection.globalPosition() +
- glm::ballRand(0.0f, Light.inaccuracy());
-
- if(!shadow(Intersection.globalPosition(), Light.position(), LightVertor))
- {
- float Diffuse = glm::dot(Intersection.normal(), LightVector);
- if(Diffuse &lt;= 0.0f)
- return Color;
-
- if(Material.isDiffuse())
- Color += Light.color() * Material.diffuse() * Diffuse;
-
- if(Material.isSpecular())
- {
- glm::vec3 Reflect = glm::reflect(-LightVector, Intersection.normal());
- float Dot = glm::dot(Reflect, View);
- float Base = Dot &gt; 0.0f ? Dot : 0.0f;
- float Specular = glm::pow(Base, Material.exponent());
- Color += Material.specular() \* Specular;
- }
- }
-
- return Color;
-}
-```
-
----
-<div style="page-break-after: always;"> </div>
-
-## <a name="section9"></a> 9. Contributing to GLM
-
-### <a name="section9_1"></a> 9.1. Submitting bug reports
-
-Bug should be reported on Github using the [issue page](https://github.com/g-truc/glm/issues).
-
-A minimal code to reproduce the issue will help.
-
-Additional, bugs can be configuration specific. We can report the configuration by defining `GLM_FORCE_MESSAGES` before including GLM headers then build and copy paste the build messages GLM will output.
-
-```cpp
-#define GLM_FORCE_MESSAGES
-#include <glm/glm.hpp>
-```
-
-An example of build messages generated by GLM:
-```
-GLM: 0.9.9.1
-GLM: C++ 17 with extensions
-GLM: GCC compiler detected"
-GLM: x86 64 bits with AVX instruction set build target
-GLM: Linux platform detected
-GLM: GLM_FORCE_SWIZZLE is undefined. swizzling functions or operators are disabled.
-GLM: GLM_FORCE_SIZE_T_LENGTH is undefined. .length() returns a glm::length_t, a typedef of int following GLSL.
-GLM: GLM_FORCE_UNRESTRICTED_GENTYPE is undefined. Follows strictly GLSL on valid function genTypes.
-GLM: GLM_FORCE_DEPTH_ZERO_TO_ONE is undefined. Using negative one to one depth clip space.
-GLM: GLM_FORCE_LEFT_HANDED is undefined. Using right handed coordinate system.
-```
-
-### <a name="section9_2"></a> 9.2. Contributing to GLM with pull request
-
-This tutorial will show us how to successfully contribute a bug-fix to GLM using GitHub's Pull Request workflow.
-
-We will be typing git commands in the Terminal. Mac and Linux users may have git pre-installed. You can download git from [here](http://git-scm.com/downloads).
-
-The tutorial assumes you have some basic understanding of git concepts - repositories, branches, commits, etc. Explaining it all from scratch is beyond the scope of this tutorial. Some good links to learn git basics are: [Link 1](http://git-scm.com/book/en/Getting-Started-Git-Basics), [Link 2](https://www.atlassian.com/git/tutorial/git-basics)
-
-#### Step 1: Setup our GLM Fork
-
-We will make our changes in our own copy of the GLM sitory. On the GLM GitHub repo and we press the Fork button.
-We need to download a copy of our fork to our local machine. In the terminal, type:
-
-```
->>> git clone <our-repository-fork-git-url>
-```
-
-This will clone our fork repository into the current folder.
-
-We can find our repository git url on the Github reposotory page. The url looks like this: `https://github.com/<our-username>/<repository-name>.git`
-
-#### Step 2: Synchronizing our fork
-
-We can use the following command to add `upstream` (original project repository) as a remote repository so that we can fetch the latest GLM commits into our branch and keep our forked copy is synchronized.
-
-```
->>> git remote add upstream https://github.com/processing/processing.git
-```
-
-To synchronize our fork to the latest commit in the GLM repository, we can use the following command:
-
-```
->>> git fetch upstream
-```
-
-Then, we can merge the remote master branch to our current branch:
-
-```
->>> git merge upstream/master
-```
-
-Now our local copy of our fork has been synchronized. However, the fork's copy is not updated on GitHub's servers yet. To do that, use:
-
-```
->>> git push origin master
-```
-
-#### Step 3: Modifying our GLM Fork
-
-Our fork is now setup and we are ready to modify GLM to fix a bug.
-
-It's a good practice to make changes in our fork in a separate branch than the master branch because we can submit only one pull request per branch.
-
-Before creating a new branch, it's best to synchronize our fork and then create a new branch from the latest master branch.
-
-If we are not on the master branch, we should switch to it using:
-```
->>> git checkout master
-```
-
-To create a new branch called `bugifx`, we use:
-```
-git branch bugfix
-```
-
-Once the code changes for the fix is done, we need to commit the changes:
-```
->>> git commit -m "Resolve the issue that caused problem with a specific fix #432"
-```
-
-The commit message should be as specific as possible and finished by the bug number in the [GLM GitHub issue page](https://github.com/g-truc/glm/issues)
-
-Finally, we need to push our changes in our branch to our GitHub fork using:
-```
->>> git push origin bugfix
-```
-
-Some things to keep in mind for a pull request:
-* Keep it minimal: Try to make the minimum required changes to fix the issue. If we have added any debugging code, we should remove it.
-* A fix at a time: The pull request should deal with one issue at a time only, unless two issue are so interlinked they must be fixed together.
-* Write a test: GLM is largely unit tests. Unit tests are in `glm/test` directory. We should also add tests for the fixes we provide to ensure future regression doesn't happen.
-* No whitespace changes: Avoid unnecessary formatting or whitespace changes in other parts of the code. Be careful with auto-format options in the code editor which can cause wide scale formatting changes.
-* Follow [GLM Code Style](#section9_3) for consistency.
-* Tests passes: Make sure GLM build and tests don't fail because of the changes.
-
-#### Step 4: Submitting a Pull Request
-
-We need to submit a pull request from the `bugfix` branch to GLM's master branch.
-
-On the fork github page, we can click on the *Pull Request* button. Then we can describe our pull request. Finally we press *Send Pull Request*.
-
-Please be patient and give them some time to go through it.
-
-The pull request review may suggest additional changes. So we can make those changes in our branch, and push those changes to our fork repository. Our pull request will always include the latest changes in our branch on GitHub, so we don't need to resubmit the pull request.
-
-Once your changes have been accepted, a project maintainer will merge our pull request.
-
-We are grateful to the users for their time and effort in contributing fixes.
-
-### <a name="section9_3"></a> 9.3. Coding style
-
-#### Indentation
-
-Always tabs. Never spaces.
-
-#### Spacing
-
-No space after if. Use if(blah) not if (blah). Example if/else block:
-
-```cpp
-if(blah)
-{
- // yes like this
-}
-else
-{
- // something besides
-}
-```
-
-Single line if blocks:
-```cpp
-if(blah)
- // yes like this
-else
- // something besides
-```
-
-No spaces inside parens:
-```cpp
-if (blah) // No
-if( blah ) // No
-if ( blah ) // No
-if(blah) // Yes
-```
-
-Use spaces before/after commas:
-```cpp
-someFunction(apple,bear,cat); // No
-someFunction(apple, bear, cat); // Yes
-```
-
-Use spaces before/after use of `+, -, *, /, %, >>, <<, |, &, ^, ||, &&` operators:
-```cpp
-vec4 v = a + b;
-```
-
-#### Blank lines
-
-One blank line after the function blocks.
-
-#### Comments
-
-Always one space after the // in single line comments
-
-One space before // at the end of a line (that has code as well)
-
-Try to use // comments inside functions, to make it easier to remove a whole block via /* */
-
-#### Cases
-
-```cpp
-#define GLM_MY_DEFINE 76
-
-class myClass
-{};
-
-myClass const MyClass;
-
-namespace glm{ // glm namespace is for public code
-namespace detail // glm::detail namespace is for implementation detail
-{
- float myFunction(vec2 const& V)
- {
- return V.x + V.y;
- }
-
- float myFunction(vec2 const* const V)
- {
- return V->x + V->y;
- }
-}//namespace detail
-}//namespace glm
-```
-
----
-<div style="page-break-after: always;"> </div>
-
-## <a name="section10"></a> 10. References
-
-### <a name="section10_1"></a> 10.1. OpenGL specifications
-
-* OpenGL 4.3 core specification
-* [GLSL 4.30 specification](http://www.opengl.org/registry/doc/GLSLangSpec.4.30.7.diff.pdf)
-![](media/image21.png){width="2.859722222222222in" height="1.6083333333333334in"}- [*GLU 1.3 specification*](http://www.opengl.org/documentation/specs/glu/glu1_3.pdf)
-
-### <a name="section10_2"></a> 10.2. External links
-
-* [GLM on stackoverflow](http://stackoverflow.com/search?q=GLM)
-
-### <a name="section10_3"></a> 10.3. Projects using GLM
-
-***[Leo’s Fortune](http://www.leosfortune.com/)***
-
-Leo’s Fortune is a platform adventure game where you hunt down the cunning and mysterious thief that stole your gold. Available on PS4, Xbox One, PC, Mac, iOS and Android.
-
-Beautifully hand-crafted levels bring the story of Leo to life in this epic adventure.
-
-“I just returned home to find all my gold has been stolen! For some devious purpose, the thief has dropped pieces of my gold like breadcrumbs through the woods.”
-
-“Despite this pickle of a trap, I am left with no choice but to follow the trail.”
-
-“Whatever lies ahead, I must recover my fortune.” -Leopold
-
-![](/doc/manual/references-leosfortune.jpeg)
-
-![](/doc/manual/references-leosfortune2.jpg)
-
-[***OpenGL 4.0 Shading Language Cookbook***](http://www.packtpub.com/opengl-4-0-shading-language-cookbook/book?tag=rk/opengl4-abr1/0811)
-
-A set of recipes that demonstrates a wide of techniques for producing high-quality, real-time 3D graphics with GLSL 4.0, such as:
-
-* Using GLSL 4.0 to implement lighting and shading techniques.
-* Using the new features of GLSL 4.0 including tessellation and geometry shaders.
-* Using textures in GLSL as part of a wide variety of techniques from basic texture mapping to deferred shading.
-
-Simple, easy-to-follow examples with GLSL source code are provided, as well as a basic description of the theory behind each technique.
-
-![](/doc/manual/references-glsl4book.jpg)
-
-[***Outerra***](http://outerra.com/)
-
-A 3D planetary engine for seamless planet rendering from space down to the surface. Can use arbitrary resolution of elevation data, refining it to centimetre resolution using fractal algorithms.
-
-![](/doc/manual/references-outerra1.jpg)
-
-![](/doc/manual/references-outerra2.jpg)
-
-![](/doc/manual/references-outerra3.jpg)
-
-![](/doc/manual/references-outerra4.jpg)
-
-[***Falcor***](https://github.com/NVIDIA/Falcor)
-
-Real-time rendering research framework by NVIDIA.
-
-[***Cinder***](https://libcinder.org/)
-
-Cinder is a free and open source library for professional-quality creative coding in C++.
-
-Cinder is a C++ library for programming with aesthetic intent - the sort of development often called creative coding. This includes domains like graphics, audio, video, and computational geometry. Cinder is cross-platform, with official support for OS X, Windows, iOS, and WinRT.
-
-Cinder is production-proven, powerful enough to be the primary tool for professionals, but still suitable for learning and experimentation. Cinder is released under the [2-Clause BSD License](http://opensource.org/licenses/BSD-2-Clause).
-
-![](/doc/manual/references-cinder.png)
-
-[***opencloth***](https://github.com/mmmovania/opencloth/)
-
-A collection of source codes implementing cloth simulation algorithms in OpenGL.
-
-Simple, easy-to-follow examples with GLSL source code, as well as a basic description of the theory behind each technique.
-
-![](/doc/manual/references-opencloth1.png)
-
-![](/doc/manual/references-opencloth3.png)
-
-[***LibreOffice***](https://www.libreoffice.org/)
-
-LibreOffice includes several applications that make it the most powerful Free and Open Source office suite on the market.
-
-[***Are you using GLM in a project?***](mailto:[email protected])
-
-### <a name="section10_4"></a> 10.4. Tutorials using GLM
-
-* [Sascha Willems' Vulkan examples](https://github.com/SaschaWillems/Vulkan), Examples and demos for the new Vulkan API
-* [VKTS](https://github.com/McNopper/Vulkan) Vulkan examples using VulKan ToolS (VKTS)
-* [*The OpenGL Samples Pack*](http://www.g-truc.net/project-0026.html#menu), samples that show how to set up all the different new features
-* [*Learning Modern 3D Graphics programming*](http://www.arcsynthesis.org/gltut/), a great OpenGL tutorial using GLM by Jason L. McKesson
-* [*Morten Nobel-Jørgensen’s*](http://blog.nobel-joergensen.com/2011/04/02/glm-brilliant-math-library-for-opengl/) review and use an [*OpenGL renderer*](https://github.com/mortennobel/RenderE)
-* [*Swiftless’ OpenGL tutorial*](http://www.swiftless.com/opengltuts.html) using GLM by Donald Urquhart
-* [*Rastergrid*](http://rastergrid.com/blog/), many technical articles with companion programs using GLM by Daniel Rákos\
-* [*OpenGL Tutorial*](http://www.opengl-tutorial.org), tutorials for OpenGL 3.1 and later
-* [*OpenGL Programming on Wikibooks*](http://en.wikibooks.org/wiki/OpenGL_Programming): For beginners who are discovering OpenGL.
-* [*3D Game Engine Programming*](http://3dgep.com/): Learning the latest 3D Game Engine Programming techniques.
-* [Game Tutorials](http://www.gametutorials.com/opengl-4-matrices-and-glm/), graphics and game programming.
-* [open.gl](https://open.gl/), OpenGL tutorial
-* [c-jump](http://www.c-jump.com/bcc/common/Talk3/Math/GLM/GLM.html), GLM tutorial
-* [Learn OpenGL](http://learnopengl.com/), OpenGL tutorial
-* [***Are you using GLM in a tutorial?***](mailto:[email protected])
-
-### <a name="section10_5"></a> 10.5. Equivalent for other languages
-
-* [*cglm*](https://github.com/recp/cglm): OpenGL Mathematics (glm) for C.
-* [*GlmSharp*](https://github.com/Philip-Trettner/GlmSharp): Open-source semi-generated GLM-flavored math library for .NET/C\#.
-* [glm-js](https://github.com/humbletim/glm-js): JavaScript adaptation of the OpenGL Mathematics (GLM) C++ library interfaces
-* [JVM OpenGL Mathematics (GLM)](https://github.com/kotlin-graphics/glm): written in Kotlin, Java compatible
-* [JGLM](https://github.com/jroyalty/jglm) - Java OpenGL Mathematics Library
-* [SwiftGL Math Library](https://github.com/SwiftGL/Math/blob/master/Sources/glm.swift) GLM for Swift
-* [glm-go](https://github.com/jbowtie/glm-go): Simple linear algebra library similar in spirit to GLM
-* [openll](https://github.com/Polkm/openll): Lua bindings for OpenGL, GLM, GLFW, OpenAL, SOIL and PhysicsFS
-* [glm-rs](https://github.com/dche/glm-rs): GLSL mathematics for Rust programming language
-* [glmpython](https://github.com/Queatz/glmpython): GLM math library for Python
-
-### <a name="section10_6"></a> 10.6. Alternatives to GLM
-
-* [*CML*](http://cmldev.net/): The CML (Configurable Math Library) is a free C++ math library for games and graphics.
-* [*Eigen*](http://eigen.tuxfamily.org/): A more heavy weight math library for general linear algebra in C++.
-* [*glhlib*](http://glhlib.sourceforge.net/): A much more than glu C library.
-* Are you using or developing an alternative library to GLM?
-
-### <a name="section10_7"></a> 10.7. Acknowledgements
-
-GLM is developed and maintained by [*Christophe Riccio*](http://www.g-truc.net) but many contributors have made this project what it is.
-
-Special thanks to:
-* Ashima Arts and Stefan Gustavson for their work on [*webgl-noise*](https://github.com/ashima/webgl-noise) which has been used for GLM noises implementation.
-* [*Arthur Winters*](http://athile.net/library/wiki/index.php?title=Athile_Technologies) for the C++11 and Visual C++ swizzle operators implementation and tests.
-* Joshua Smith and Christoph Schied for the discussions and the experiments around the swizzle operators implementation issues.
-* Guillaume Chevallereau for providing and maintaining the [*nightlight build system*](http://my.cdash.org/index.php?project=GLM).
-* Ghenadii Ursachi for GLM\_GTX\_matrix\_interpolation implementation.
-* Mathieu Roumillac for providing some implementation ideas.
-* [*Grant James*](http://www.zeuscmd.com/) for the implementation of all combination of none-squared matrix products.
-* Jesse Talavera-Greenberg for his work on the manual amount other things.
-* All the GLM users that have report bugs and hence help GLM to become a great library!
diff --git a/3rdparty/glm/source/readme.md b/3rdparty/glm/source/readme.md
deleted file mode 100644
index 55b9678..0000000
--- a/3rdparty/glm/source/readme.md
+++ /dev/null
@@ -1,1231 +0,0 @@
-![glm](/doc/manual/logo-mini.png)
-
-[OpenGL Mathematics](http://glm.g-truc.net/) (*GLM*) is a header only C++ mathematics library for graphics software based on the [OpenGL Shading Language (GLSL) specifications](https://www.opengl.org/registry/doc/GLSLangSpec.4.50.diff.pdf).
-
-*GLM* provides classes and functions designed and implemented with the same naming conventions and functionality than *GLSL* so that anyone who knows *GLSL*, can use *GLM* as well in C++.
-
-This project isn't limited to *GLSL* features. An extension system, based on the *GLSL* extension conventions, provides extended capabilities: matrix transformations, quaternions, data packing, random numbers, noise, etc...
-
-This library works perfectly with *[OpenGL](https://www.opengl.org)* but it also ensures interoperability with other third party libraries and SDK. It is a good candidate for software rendering (raytracing / rasterisation), image processing, physics simulations and any development context that requires a simple and convenient mathematics library.
-
-*GLM* is written in C++98 but can take advantage of C++11 when supported by the compiler. It is a platform independent library with no dependence and it officially supports the following compilers:
-- [*GCC*](http://gcc.gnu.org/) 4.7 and higher
-- [*Intel C++ Compose*](https://software.intel.com/en-us/intel-compilers) XE 2013 and higher
-- [*Clang*](http://llvm.org/) 3.4 and higher
-- [*Apple Clang 6.0*](https://developer.apple.com/library/mac/documentation/CompilerTools/Conceptual/LLVMCompilerOverview/index.html) and higher
-- [*Visual C++*](http://www.visualstudio.com/) 2013 and higher
-- [*CUDA*](https://developer.nvidia.com/about-cuda) 9.0 and higher (experimental)
-- [*SYCL*](https://www.khronos.org/sycl/) (experimental: only [ComputeCpp](https://codeplay.com/products/computesuite/computecpp) implementation has been tested).
-- Any C++11 compiler
-
-For more information about *GLM*, please have a look at the [manual](manual.md) and the [API reference documentation](http://glm.g-truc.net/0.9.8/api/index.html).
-The source code and the documentation are licensed under either the [Happy Bunny License (Modified MIT) or the MIT License](manual.md#section0).
-
-Thanks for contributing to the project by [submitting pull requests](https://github.com/g-truc/glm/pulls).
-
-```cpp
-#include <glm/vec3.hpp> // glm::vec3
-#include <glm/vec4.hpp> // glm::vec4
-#include <glm/mat4x4.hpp> // glm::mat4
-#include <glm/ext/matrix_transform.hpp> // glm::translate, glm::rotate, glm::scale
-#include <glm/ext/matrix_clip_space.hpp> // glm::perspective
-#include <glm/ext/scalar_constants.hpp> // glm::pi
-
-glm::mat4 camera(float Translate, glm::vec2 const& Rotate)
-{
- glm::mat4 Projection = glm::perspective(glm::pi<float>() * 0.25f, 4.0f / 3.0f, 0.1f, 100.f);
- glm::mat4 View = glm::translate(glm::mat4(1.0f), glm::vec3(0.0f, 0.0f, -Translate));
- View = glm::rotate(View, Rotate.y, glm::vec3(-1.0f, 0.0f, 0.0f));
- View = glm::rotate(View, Rotate.x, glm::vec3(0.0f, 1.0f, 0.0f));
- glm::mat4 Model = glm::scale(glm::mat4(1.0f), glm::vec3(0.5f));
- return Projection * View * Model;
-}
-```
-
-## [Lastest release](https://github.com/g-truc/glm/releases/latest)
-
-## Project Health
-
-| Service | System | Compiler | Status |
-| ------- | ------ | -------- | ------ |
-| [Travis CI](https://travis-ci.org/g-truc/glm)| MacOSX, Linux 64 bits | Clang 3.6, Clang 5.0, GCC 4.9, GCC 7.3 | [![Travis CI](https://travis-ci.org/g-truc/glm.svg?branch=master)](https://travis-ci.org/g-truc/glm)
-| [AppVeyor](https://ci.appveyor.com/project/Groovounet/glm)| Windows 32 and 64 | Visual Studio 2013, Visual Studio 2015, Visual Studio 2017 | [![AppVeyor](https://ci.appveyor.com/api/projects/status/32r7s2skrgm9ubva?svg=true)](https://ci.appveyor.com/project/Groovounet/glm)
-
-## Release notes
-
-### [GLM 0.9.9.9](https://github.com/g-truc/glm/releases/tag/0.9.9.9) - 2020-XX-XX
-#### Features:
-- Added *GLM_EXT_scalar_reciprocal* with tests
-- Added *GLM_EXT_vector_reciprocal* with tests
-- Added `glm::iround` and `glm::uround` to *GLM_EXT_scalar_common* and *GLM_EXT_vector_common*
-- Added *GLM_EXT_matrix_integer* with tests
-
-#### Improvements:
-- Added `constexpr` qualifier for `cross` product #1040
-- Added `constexpr` qualifier for `dot` product #1040
-
-#### Fixes:
-- Fixed incorrect assertion for `glm::min` and `glm::max` #1009
-- Fixed quaternion orientation in `glm::decompose` #1012
-- Fixed singularity in quaternion to euler angle roll conversion #1019
-- Fixed `quat` `glm::pow` handling of small magnitude quaternions #1022
-- Fixed `glm::fastNormalize` build error #1033
-- Fixed `glm::isMultiple` build error #1034
-- Fixed `glm::adjugate` calculation #1035
-- Fixed `glm::angle` discards the sign of result for angles in range (2*pi-1, 2*pi) #1038
-- Removed ban on using `glm::string_cast` with *CUDA* host code #1041
-
-### [GLM 0.9.9.8](https://github.com/g-truc/glm/releases/tag/0.9.9.8) - 2020-04-13
-#### Features:
-- Added *GLM_EXT_vector_intX* and *GLM_EXT_vector_uintX* extensions
-- Added *GLM_EXT_matrix_intX* and *GLM_EXT_matrix_uintX* extensions
-
-#### Improvements:
-- Added `glm::clamp`, `glm::repeat`, `glm::mirrorClamp` and `glm::mirrorRepeat` function to `GLM_EXT_scalar_commond` and `GLM_EXT_vector_commond` extensions with tests
-
-#### Fixes:
-- Fixed unnecessary warnings from `matrix_projection.inl` #995
-- Fixed quaternion `glm::slerp` overload which interpolates with extra spins #996
-- Fixed for `glm::length` using arch64 #992
-- Fixed singularity check for `glm::quatLookAt` #770
-
-### [GLM 0.9.9.7](https://github.com/g-truc/glm/releases/tag/0.9.9.7) - 2020-01-05
-#### Improvements:
-- Improved *Neon* support with more functions optimized #950
-- Added *CMake* *GLM* interface #963
-- Added `glm::fma` implementation based on `std::fma` #969
-- Added missing quat constexpr #955
-- Added `GLM_FORCE_QUAT_DATA_WXYZ` to store quat data as w,x,y,z instead of x,y,z,w #983
-
-#### Fixes:
-- Fixed equal *ULP* variation when using negative sign #965
-- Fixed for intersection ray/plane and added related tests #953
-- Fixed ARM 64bit detection #949
-- Fixed *GLM_EXT_matrix_clip_space* warnings #980
-- Fixed Wimplicit-int-float-conversion warnings with clang 10+ #986
-- Fixed *GLM_EXT_matrix_clip_space* `perspectiveFov`
-
-### [GLM 0.9.9.6](https://github.com/g-truc/glm/releases/tag/0.9.9.6) - 2019-09-08
-#### Features:
-- Added *Neon* support #945
-- Added *SYCL* support #914
-- Added *GLM_EXT_scalar_integer* extension with power of two and multiple scalar functions
-- Added *GLM_EXT_vector_integer* extension with power of two and multiple vector functions
-
-#### Improvements:
-- Added *Visual C++ 2019* detection
-- Added *Visual C++ 2017* 15.8 and 15.9 detection
-- Added missing genType check for `glm::bitCount` and `glm::bitfieldReverse` #893
-
-#### Fixes:
-- Fixed for g++6 where -std=c++1z sets __cplusplus to 201500 instead of 201402 #921
-- Fixed hash hashes qua instead of tquat #919
-- Fixed `.natvis` as structs renamed #915
-- Fixed `glm::ldexp` and `glm::frexp` declaration #895
-- Fixed missing const to quaternion conversion operators #890
-- Fixed *GLM_EXT_scalar_ulp* and *GLM_EXT_vector_ulp* API coding style
-- Fixed quaternion componant order: `w, {x, y, z}` #916
-- Fixed `GLM_HAS_CXX11_STL` broken on Clang with Linux #926
-- Fixed *Clang* or *GCC* build due to wrong `GLM_HAS_IF_CONSTEXPR` definition #907
-- Fixed *CUDA* 9 build #910
-
-#### Deprecation:
- - Removed CMake install and uninstall scripts
-
-### [GLM 0.9.9.5](https://github.com/g-truc/glm/releases/tag/0.9.9.5) - 2019-04-01
-#### Fixes:
-- Fixed build errors when defining `GLM_ENABLE_EXPERIMENTAL` #884 #883
-- Fixed `if constexpr` warning #887
-- Fixed missing declarations for `glm::frexp` and `glm::ldexp` #886
-
-### [GLM 0.9.9.4](https://github.com/g-truc/glm/releases/tag/0.9.9.4) - 2019-03-19
-#### Features:
-- Added `glm::mix` implementation for matrices in *GLM_EXT_matrix_common/ #842
-- Added *CMake* `BUILD_SHARED_LIBS` and `BUILD_STATIC_LIBS` build options #871
-
-#### Improvements:
-- Added GLM_FORCE_INTRINSICS to enable SIMD instruction code path. By default, it's disabled allowing constexpr support by default. #865
-- Optimized inverseTransform #867
-
-#### Fixes:
-- Fixed in `glm::mat4x3` conversion #829
-- Fixed `constexpr` issue on GCC #832 #865
-- Fixed `glm::mix` implementation to improve GLSL conformance #866
-- Fixed `glm::int8` being defined as unsigned char with some compiler #839
-- Fixed `glm::vec1` include #856
-- Ignore `.vscode` #848
-
-### [GLM 0.9.9.3](https://github.com/g-truc/glm/releases/tag/0.9.9.3) - 2018-10-31
-#### Features:
-- Added `glm::equal` and `glm::notEqual` overload with max ULPs parameters for scalar numbers #121
-- Added `GLM_FORCE_SILENT_WARNINGS` to silent *GLM* warnings when using language extensions but using W4 or Wpedantic warnings #814 #775
-- Added adjugate functions to `GLM_GTX_matrix_operation` #151
-- Added `GLM_FORCE_ALIGNED_GENTYPES` to enable aligned types and SIMD instruction are not enabled. This disable `constexpr` #816
-
-#### Improvements:
-- Added constant time ULP distance between float #121
-- Added `GLM_FORCE_SILENT_WARNINGS` to suppress *GLM* warnings #822
-
-#### Fixes:
-- Fixed `glm::simplex` noise build with double #734
-- Fixed `glm::bitfieldInsert` according to GLSL spec #818
-- Fixed `glm::refract` for negative 'k' #808
-
-### [GLM 0.9.9.2](https://github.com/g-truc/glm/releases/tag/0.9.9.2) - 2018-09-14
-#### Fixes:
-- Fixed `GLM_FORCE_CXX**` section in the manual
-- Fixed default initialization with vector and quaternion types using `GLM_FORCE_CTOR_INIT` #812
-
-### [GLM 0.9.9.1](https://github.com/g-truc/glm/releases/tag/0.9.9.1) - 2018-09-03
-#### Features:
-- Added `bitfieldDeinterleave` to *GLM_GTC_bitfield*
-- Added missing `glm::equal` and `glm::notEqual` with epsilon for quaternion types to *GLM_GTC_quaternion*
-- Added *GLM_EXT_matrix_relational*: `glm::equal` and `glm::notEqual` with epsilon for matrix types
-- Added missing aligned matrix types to *GLM_GTC_type_aligned*
-- Added C++17 detection
-- Added *Visual C++* language standard version detection
-- Added PDF manual build from markdown
-
-#### Improvements:
-- Added a section to the manual for contributing to *GLM*
-- Refactor manual, lists all configuration defines
-- Added missing `glm::vec1` based constructors
-- Redesigned constexpr support which excludes both SIMD and `constexpr` #783
-- Added detection of *Visual C++ 2017* toolsets
-- Added identity functions #765
-- Splitted headers into EXT extensions to improve compilation time #670
-- Added separated performance tests
-- Clarified refract valid range of the indices of refraction, between -1 and 1 inclusively #806
-
-#### Fixes:
-- Fixed SIMD detection on *Clang* and *GCC*
-- Fixed build problems due to `std::printf` and `std::clock_t` #778
-- Fixed int mod
-- Anonymous unions require C++ language extensions
-- Fixed `glm::ortho` #790
-- Fixed *Visual C++* 2013 warnings in vector relational code #782
-- Fixed *ICC* build errors with constexpr #704
-- Fixed defaulted operator= and constructors #791
-- Fixed invalid conversion from int scalar with vec4 constructor when using SSE instruction
-- Fixed infinite loop in random functions when using negative radius values using an assert #739
-
-### [GLM 0.9.9.0](https://github.com/g-truc/glm/releases/tag/0.9.9.0) - 2018-05-22
-#### Features:
-- Added *RGBM* encoding in *GLM_GTC_packing* #420
-- Added *GLM_GTX_color_encoding* extension
-- Added *GLM_GTX_vec_swizzle*, faster compile time swizzling then swizzle operator #558
-- Added *GLM_GTX_exterior_product* with a `vec2` `glm::cross` implementation #621
-- Added *GLM_GTX_matrix_factorisation* to factor matrices in various forms #654
-- Added [`GLM_ENABLE_EXPERIMENTAL`](manual.md#section7_4) to enable experimental features.
-- Added packing functions for integer vectors #639
-- Added conan packaging configuration #643 #641
-- Added `glm::quatLookAt` to *GLM_GTX_quaternion* #659
-- Added `glm::fmin`, `glm::fmax` and `glm::fclamp` to *GLM_GTX_extended_min_max* #372
-- Added *GLM_EXT_vector_relational*: extend `glm::equal` and `glm::notEqual` to take an epsilon argument
-- Added *GLM_EXT_vector_relational*: `glm::openBounded` and `glm::closeBounded`
-- Added *GLM_EXT_vec1*: `*vec1` types
-- Added *GLM_GTX_texture*: `levels` function
-- Added spearate functions to use both nagative one and zero near clip plans #680
-- Added `GLM_FORCE_SINGLE_ONLY` to use *GLM* on platforms that don't support double #627
-- Added *GLM_GTX_easing* for interpolation functions #761
-
-#### Improvements:
-- No more default initialization of vector, matrix and quaternion types
-- Added lowp variant of GTC_color_space convertLinearToSRGB #419
-- Replaced the manual by a markdown version #458
-- Improved API documentation #668
-- Optimized GTC_packing implementation
-- Optimized GTC_noise functions
-- Optimized GTC_color_space HSV to RGB conversions
-- Optimised GTX_color_space_YCoCg YCoCgR conversions
-- Optimized GTX_matrix_interpolation axisAngle function
-- Added FAQ 12: Windows headers cause build errors... #557
-- Removed GCC shadow warnings #595
-- Added error for including of different versions of GLM #619
-- Added GLM_FORCE_IGNORE_VERSION to ignore error caused by including different version of GLM #619
-- Reduced warnings when using very strict compilation flags #646
-- length() member functions are constexpr #657
-- Added support of -Weverything with Clang #646
-- Improved exponential function test coverage
-- Enabled warnings as error with Clang unit tests
-- Conan package is an external repository: https://github.com/bincrafters/conan-glm
-- Clarify quat_cast documentation, applying on pure rotation matrices #759
-
-#### Fixes:
-- Removed doxygen references to *GLM_GTC_half_float* which was removed in 0.9.4
-- Fixed `glm::decompose` #448
-- Fixed `glm::intersectRayTriangle` #6
-- Fixed dual quaternion != operator #629
-- Fixed usused variable warning in *GLM_GTX_spline* #618
-- Fixed references to `GLM_FORCE_RADIANS` which was removed #642
-- Fixed `glm::fastInverseSqrt` to use fast inverse square #640
-- Fixed `glm::axisAngle` NaN #638
-- Fixed integer pow from *GLM_GTX_integer* with null exponent #658
-- Fixed `quat` `normalize` build error #656
-- Fixed *Visual C++ 2017.2* warning regarding `__has_feature` definision #655
-- Fixed documentation warnings
-- Fixed `GLM_HAS_OPENMP` when *OpenMP* is not enabled
-- Fixed Better follow GLSL `min` and `max` specification #372
-- Fixed quaternion constructor from two vectors special cases #469
-- Fixed `glm::to_string` on quaternions wrong components order #681
-- Fixed `glm::acsch` #698
-- Fixed `glm::isnan` on *CUDA* #727
-
-#### Deprecation:
-- Requires *Visual Studio 2013*, *GCC 4.7*, *Clang 3.4*, *Cuda 7*, *ICC 2013* or a C++11 compiler
-- Removed *GLM_GTX_simd_vec4* extension
-- Removed *GLM_GTX_simd_mat4* extension
-- Removed *GLM_GTX_simd_quat* extension
-- Removed `GLM_SWIZZLE`, use `GLM_FORCE_SWIZZLE` instead
-- Removed `GLM_MESSAGES`, use `GLM_FORCE_MESSAGES` instead
-- Removed `GLM_DEPTH_ZERO_TO_ONE`, use `GLM_FORCE_DEPTH_ZERO_TO_ONE` instead
-- Removed `GLM_LEFT_HANDED`, use `GLM_FORCE_LEFT_HANDED` instead
-- Removed `GLM_FORCE_NO_CTOR_INIT`
-- Removed `glm::uninitialize`
-
----
-### [GLM 0.9.8.5](https://github.com/g-truc/glm/releases/tag/0.9.8.5) - 2017-08-16
-#### Features:
-- Added *Conan* package support #647
-
-#### Fixes:
-- Fixed *Clang* version detection from source #608
-- Fixed `glm::packF3x9_E1x5` exponent packing #614
-- Fixed build error `min` and `max` specializations with integer #616
-- Fixed `simd_mat4` build error #652
-
----
-### [GLM 0.9.8.4](https://github.com/g-truc/glm/releases/tag/0.9.8.4) - 2017-01-22
-#### Fixes:
-- Fixed *GLM_GTC_packing* test failing on *GCC* x86 due to denorms #212 #577
-- Fixed `POPCNT` optimization build in *Clang* #512
-- Fixed `glm::intersectRayPlane` returns true in parallel case #578
-- Fixed *GCC* 6.2 compiler warnings #580
-- Fixed *GLM_GTX_matrix_decompose* `glm::decompose` #582 #448
-- Fixed *GCC* 4.5 and older build #566
-- Fixed *Visual C++* internal error when declaring a global vec type with siwzzle expression enabled #594
-- Fixed `GLM_FORCE_CXX11` with Clang and libstlc++ which wasn't using C++11 STL features. #604
-
----
-### [GLM 0.9.8.3](https://github.com/g-truc/glm/releases/tag/0.9.8.3) - 2016-11-12
-#### Improvements:
-- Broader support of `GLM_FORCE_UNRESTRICTED_GENTYPE` #378
-
-#### Fixes:
-- Fixed Android build error with C++11 compiler but C++98 STL #284 #564
-- Fixed *GLM_GTX_transform2* shear* functions #403
-- Fixed interaction between `GLM_FORCE_UNRESTRICTED_GENTYPE` and `glm::ortho` function #568
-- Fixed `glm::bitCount` with AVX on 32 bit builds #567
-- Fixed *CMake* `find_package` with version specification #572 #573
-
----
-### [GLM 0.9.8.2](https://github.com/g-truc/glm/releases/tag/0.9.8.2) - 2016-11-01
-#### Improvements:
-- Added *Visual C++* 15 detection
-- Added *Clang* 4.0 detection
-- Added warning messages when using `GLM_FORCE_CXX**` but the compiler
- is known to not fully support the requested C++ version #555
-- Refactored `GLM_COMPILER_VC` values
-- Made quat, vec, mat type component `length()` static #565
-
-#### Fixes:
-- Fixed *Visual C++* `constexpr` build error #555, #556
-
----
-### [GLM 0.9.8.1](https://github.com/g-truc/glm/releases/tag/0.9.8.1) - 2016-09-25
-#### Improvements:
-- Optimized quaternion `glm::log` function #554
-
-#### Fixes:
-- Fixed *GCC* warning filtering, replaced -pedantic by -Wpedantic
-- Fixed SIMD faceforward bug. #549
-- Fixed *GCC* 4.8 with C++11 compilation option #550
-- Fixed *Visual Studio* aligned type W4 warning #548
-- Fixed packing/unpacking function fixed for 5_6_5 and 5_5_5_1 #552
-
----
-### [GLM 0.9.8.0](https://github.com/g-truc/glm/releases/tag/0.9.8.0) - 2016-09-11
-#### Features:
-- Added right and left handed projection and clip control support #447 #415 #119
-- Added `glm::compNormalize` and `glm::compScale` functions to *GLM_GTX_component_wise*
-- Added `glm::packF3x9_E1x5` and `glm::unpackF3x9_E1x5` to *GLM_GTC_packing* for RGB9E5 #416
-- Added `(un)packHalf` to *GLM_GTC_packing*
-- Added `(un)packUnorm` and `(un)packSnorm` to *GLM_GTC_packing*
-- Added 16bit pack and unpack to *GLM_GTC_packing*
-- Added 8bit pack and unpack to *GLM_GTC_packing*
-- Added missing `bvec*` && and || operators
-- Added `glm::iround` and `glm::uround` to *GLM_GTC_integer*, fast round on positive values
-- Added raw SIMD API
-- Added 'aligned' qualifiers
-- Added *GLM_GTC_type_aligned* with aligned *vec* types
-- Added *GLM_GTC_functions* extension
-- Added quaternion version of `glm::isnan` and `glm::isinf` #521
-- Added `glm::lowestBitValue` to *GLM_GTX_bit* #536
-- Added `GLM_FORCE_UNRESTRICTED_GENTYPE` allowing non basic `genType` #543
-
-#### Improvements:
-- Improved SIMD and swizzle operators interactions with *GCC* and *Clang* #474
-- Improved *GLM_GTC_random* `linearRand` documentation
-- Improved *GLM_GTC_reciprocal* documentation
-- Improved `GLM_FORCE_EXPLICIT_CTOR` coverage #481
-- Improved *OpenMP* support detection for *Clang*, *GCC*, *ICC* and *VC*
-- Improved *GLM_GTX_wrap* for SIMD friendliness
-- Added `constexpr` for `*vec*`, `*mat*`, `*quat*` and `*dual_quat*` types #493
-- Added *NEON* instruction set detection
-- Added *MIPS* CPUs detection
-- Added *PowerPC* CPUs detection
-- Use *Cuda* built-in function for abs function implementation with Cuda compiler
-- Factorized `GLM_COMPILER_LLVM` and `GLM_COMPILER_APPLE_CLANG` into `GLM_COMPILER_CLANG`
-- No more warnings for use of long long
-- Added more information to build messages
-
-#### Fixes:
-- Fixed *GLM_GTX_extended_min_max* filename typo #386
-- Fixed `glm::intersectRayTriangle` to not do any unintentional backface culling
-- Fixed long long warnings when using C++98 on *GCC* and *Clang* #482
-- Fixed sign with signed integer function on non-x86 architecture
-- Fixed strict aliasing warnings #473
-- Fixed missing `glm::vec1` overload to `glm::length2` and `glm::distance2` functions #431
-- Fixed *GLM* test '/fp:fast' and '/Za' command-line options are incompatible
-- Fixed quaterion to mat3 cast function `glm::mat3_cast` from *GLM_GTC_quaternion* #542
-- Fixed *GLM_GTX_io* for *Cuda* #547 #546
-
-#### Deprecation:
-- Removed `GLM_FORCE_SIZE_FUNC` define
-- Deprecated *GLM_GTX_simd_vec4* extension
-- Deprecated *GLM_GTX_simd_mat4* extension
-- Deprecated *GLM_GTX_simd_quat* extension
-- Deprecated `GLM_SWIZZLE`, use `GLM_FORCE_SWIZZLE` instead
-- Deprecated `GLM_MESSAGES`, use `GLM_FORCE_MESSAGES` instead
-
----
-### [GLM 0.9.7.6](https://github.com/g-truc/glm/releases/tag/0.9.7.6) - 2016-07-16
-#### Improvements:
-- Added pkg-config file #509
-- Updated list of compiler versions detected
-- Improved C++ 11 STL detection #523
-
-#### Fixes:
-- Fixed STL for C++11 detection on ICC #510
-- Fixed missing vec1 overload to length2 and distance2 functions #431
-- Fixed long long warnings when using C++98 on GCC and Clang #482
-- Fixed scalar reciprocal functions (GTC_reciprocal) #520
-
----
-### [GLM 0.9.7.5](https://github.com/g-truc/glm/releases/tag/0.9.7.5) - 2016-05-24
-#### Improvements:
-- Added Visual C++ Clang toolset detection
-
-#### Fixes:
-- Fixed uaddCarry warning #497
-- Fixed roundPowerOfTwo and floorPowerOfTwo #503
-- Fixed Visual C++ SIMD instruction set automatic detection in 64 bits
-- Fixed to_string when used with GLM_FORCE_INLINE #506
-- Fixed GLM_FORCE_INLINE with binary vec4 operators
-- Fixed GTX_extended_min_max filename typo #386
-- Fixed intersectRayTriangle to not do any unintentional backface culling
-
----
-### [GLM 0.9.7.4](https://github.com/g-truc/glm/releases/tag/0.9.7.4) - 2016-03-19
-#### Fixes:
-- Fixed asinh and atanh warning with C++98 STL #484
-- Fixed polar coordinates function latitude #485
-- Fixed outerProduct defintions and operator signatures for mat2x4 and vec4 #475
-- Fixed eulerAngles precision error, returns NaN #451
-- Fixed undefined reference errors #489
-- Fixed missing GLM_PLATFORM_CYGWIN declaration #495
-- Fixed various undefined reference errors #490
-
----
-### [GLM 0.9.7.3](https://github.com/g-truc/glm/releases/tag/0.9.7.3) - 2016-02-21
-#### Improvements:
-- Added AVX512 detection
-
-#### Fixes:
-- Fixed CMake policy warning
-- Fixed GCC 6.0 detection #477
-- Fixed Clang build on Windows #479
-- Fixed 64 bits constants warnings on GCC #463
-
----
-### [GLM 0.9.7.2](https://github.com/g-truc/glm/releases/tag/0.9.7.2) - 2016-01-03
-#### Fixes:
-- Fixed GTC_round floorMultiple/ceilMultiple #412
-- Fixed GTC_packing unpackUnorm3x10_1x2 #414
-- Fixed GTC_matrix_inverse affineInverse #192
-- Fixed ICC on Linux build errors #449
-- Fixed ldexp and frexp compilation errors
-- Fixed "Declaration shadows a field" warning #468
-- Fixed 'GLM_COMPILER_VC2005 is not defined' warning #468
-- Fixed various 'X is not defined' warnings #468
-- Fixed missing unary + operator #435
-- Fixed Cygwin build errors when using C++11 #405
-
----
-### [GLM 0.9.7.1](https://github.com/g-truc/glm/releases/tag/0.9.7.1) - 2015-09-07
-#### Improvements:
-- Improved constexpr for constant functions coverage #198
-- Added to_string for quat and dual_quat in GTX_string_cast #375
-- Improved overall execution time of unit tests #396
-
-#### Fixes:
-- Fixed strict alignment warnings #235 #370
-- Fixed link errors on compilers not supported default function #377
-- Fixed compilation warnings in vec4
-- Fixed non-identity quaternions for equal vectors #234
-- Fixed excessive GTX_fast_trigonometry execution time #396
-- Fixed Visual Studio 2015 'hides class member' warnings #394
-- Fixed builtin bitscan never being used #392
-- Removed unused func_noise.* files #398
-
----
-### [GLM 0.9.7.0](https://github.com/g-truc/glm/releases/tag/0.9.7.0) - 2015-08-02
-#### Features:
-- Added GTC_color_space: convertLinearToSRGB and convertSRGBToLinear functions
-- Added 'fmod' overload to GTX_common with tests #308
-- Left handed perspective and lookAt functions #314
-- Added functions eulerAngleXYZ and extractEulerAngleXYZ #311
-- Added <glm/gtx/hash.hpp> to perform std::hash on GLM types #320 #367
-- Added <glm/gtx/wrap.hpp> for texcoord wrapping
-- Added static components and precision members to all vector and quat types #350
-- Added .gitignore #349
-- Added support of defaulted functions to GLM types, to use them in unions #366
-
-#### Improvements:
-- Changed usage of __has_include to support Intel compiler #307
-- Specialized integer implementation of YCoCg-R #310
-- Don't show status message in 'FindGLM' if 'QUIET' option is set. #317
-- Added master branch continuous integration service on Linux 64 #332
-- Clarified manual regarding angle unit in GLM, added FAQ 11 #326
-- Updated list of compiler versions
-
-#### Fixes:
-- Fixed default precision for quat and dual_quat type #312
-- Fixed (u)int64 MSB/LSB handling on BE archs #306
-- Fixed multi-line comment warning in g++. #315
-- Fixed specifier removal by 'std::make_pair<>' #333
-- Fixed perspective fovy argument documentation #327
-- Removed -m64 causing build issues on Linux 32 #331
-- Fixed isfinite with C++98 compilers #343
-- Fixed Intel compiler build error on Linux #354
-- Fixed use of libstdc++ with Clang #351
-- Fixed quaternion pow #346
-- Fixed decompose warnings #373
-- Fixed matrix conversions #371
-
-#### Deprecation:
-- Removed integer specification for 'mod' in GTC_integer #308
-- Removed GTX_multiple, replaced by GTC_round
-
----
-### [GLM 0.9.6.3](https://github.com/g-truc/glm/releases/tag/0.9.6.3) - 2015-02-15
-- Fixed Android doesn't have C++ 11 STL #284
-
----
-### [GLM 0.9.6.2](https://github.com/g-truc/glm/releases/tag/0.9.6.2) - 2015-02-15
-#### Features:
-- Added display of GLM version with other GLM_MESSAGES
-- Added ARM instruction set detection
-
-#### Improvements:
-- Removed assert for perspective with zFar < zNear #298
-- Added Visual Studio natvis support for vec1, quat and dualqual types
-- Cleaned up C++11 feature detections
-- Clarify GLM licensing
-
-#### Fixes:
-- Fixed faceforward build #289
-- Fixed conflict with Xlib #define True 1 #293
-- Fixed decompose function VS2010 templating issues #294
-- Fixed mat4x3 = mat2x3 * mat4x2 operator #297
-- Fixed warnings in F2x11_1x10 packing function in GTC_packing #295
-- Fixed Visual Studio natvis support for vec4 #288
-- Fixed GTC_packing *pack*norm*x* build and added tests #292
-- Disabled GTX_scalar_multiplication for GCC, failing to build tests #242
-- Fixed Visual C++ 2015 constexpr errors: Disabled only partial support
-- Fixed functions not inlined with Clang #302
-- Fixed memory corruption (undefined behaviour) #303
-
----
-### [GLM 0.9.6.1](https://github.com/g-truc/glm/releases/tag/0.9.6.1) - 2014-12-10
-#### Features:
-- Added GLM_LANG_CXX14_FLAG and GLM_LANG_CXX1Z_FLAG language feature flags
-- Added C++14 detection
-
-#### Improvements:
-- Clean up GLM_MESSAGES compilation log to report only detected capabilities
-
-#### Fixes:
-- Fixed scalar uaddCarry build error with Cuda #276
-- Fixed C++11 explicit conversion operators detection #282
-- Fixed missing explicit conversion when using integer log2 with *vec1 types
-- Fixed 64 bits integer GTX_string_cast to_string on VC 32 bit compiler
-- Fixed Android build issue, STL C++11 is not supported by the NDK #284
-- Fixed unsupported _BitScanForward64 and _BitScanReverse64 in VC10
-- Fixed Visual C++ 32 bit build #283
-- Fixed GLM_FORCE_SIZE_FUNC pragma message
-- Fixed C++98 only build
-- Fixed conflict between GTX_compatibility and GTC_quaternion #286
-- Fixed C++ language restriction using GLM_FORCE_CXX**
-
----
-### [GLM 0.9.6.0](https://github.com/g-truc/glm/releases/tag/0.9.6.0) - 2014-11-30
-#### Features:
-- Exposed template vector and matrix types in 'glm' namespace #239, #244
-- Added GTX_scalar_multiplication for C++ 11 compiler only #242
-- Added GTX_range for C++ 11 compiler only #240
-- Added closestPointOnLine function for tvec2 to GTX_closest_point #238
-- Added GTC_vec1 extension, *vec1 support to *vec* types
-- Updated GTX_associated_min_max with vec1 support
-- Added support of precision and integers to linearRand #230
-- Added Integer types support to GTX_string_cast #249
-- Added vec3 slerp #237
-- Added GTX_common with isdenomal #223
-- Added GLM_FORCE_SIZE_FUNC to replace .length() by .size() #245
-- Added GLM_FORCE_NO_CTOR_INIT
-- Added 'uninitialize' to explicitly not initialize a GLM type
-- Added GTC_bitfield extension, promoted GTX_bit
-- Added GTC_integer extension, promoted GTX_bit and GTX_integer
-- Added GTC_round extension, promoted GTX_bit
-- Added GLM_FORCE_EXPLICIT_CTOR to require explicit type conversions #269
-- Added GTX_type_aligned for aligned vector, matrix and quaternion types
-
-#### Improvements:
-- Rely on C++11 to implement isinf and isnan
-- Removed GLM_FORCE_CUDA, Cuda is implicitly detected
-- Separated Apple Clang and LLVM compiler detection
-- Used pragma once
-- Undetected C++ compiler automatically compile with GLM_FORCE_CXX98 and
- GLM_FORCE_PURE
-- Added not function (from GLSL specification) on VC12
-- Optimized bitfieldReverse and bitCount functions
-- Optimized findLSB and findMSB functions.
-- Optimized matrix-vector multiple performance with Cuda #257, #258
-- Reduced integer type redifinitions #233
-- Rewrited of GTX_fast_trigonometry #264 #265
-- Made types trivially copyable #263
-- Removed <iostream> in GLM tests
-- Used std features within GLM without redeclaring
-- Optimized cot function #272
-- Optimized sign function #272
-- Added explicit cast from quat to mat3 and mat4 #275
-
-#### Fixes:
-- Fixed std::nextafter not supported with C++11 on Android #217
-- Fixed missing value_type for dual quaternion
-- Fixed return type of dual quaternion length
-- Fixed infinite loop in isfinite function with GCC #221
-- Fixed Visual Studio 14 compiler warnings
-- Fixed implicit conversion from another tvec2 type to another tvec2 #241
-- Fixed lack of consistency of quat and dualquat constructors
-- Fixed uaddCarray #253
-- Fixed float comparison warnings #270
-
-#### Deprecation:
-- Requires Visual Studio 2010, GCC 4.2, Apple Clang 4.0, LLVM 3.0, Cuda 4, ICC 2013 or a C++98 compiler
-- Removed degrees for function parameters
-- Removed GLM_FORCE_RADIANS, active by default
-- Removed VC 2005 / 8 and 2008 / 9 support
-- Removed GCC 3.4 to 4.3 support
-- Removed LLVM GCC support
-- Removed LLVM 2.6 to 3.1 support
-- Removed CUDA 3.0 to 3.2 support
-
----
-### [GLM 0.9.5.4 - 2014-06-21](https://github.com/g-truc/glm/releases/tag/0.9.5.4)
-- Fixed non-utf8 character #196
-- Added FindGLM install for CMake #189
-- Fixed GTX_color_space - saturation #195
-- Fixed glm::isinf and glm::isnan for with Android NDK 9d #191
-- Fixed builtin GLM_ARCH_SSE4 #204
-- Optimized Quaternion vector rotation #205
-- Fixed missing doxygen @endcond tag #211
-- Fixed instruction set detection with Clang #158
-- Fixed orientate3 function #207
-- Fixed lerp when cosTheta is close to 1 in quaternion slerp #210
-- Added GTX_io for io with <iostream> #144
-- Fixed fastDistance ambiguity #215
-- Fixed tweakedInfinitePerspective #208 and added user-defined epsilon to
- tweakedInfinitePerspective
-- Fixed std::copy and std::vector with GLM types #214
-- Fixed strict aliasing issues #212, #152
-- Fixed std::nextafter not supported with C++11 on Android #213
-- Fixed corner cases in exp and log functions for quaternions #199
-
----
-### GLM 0.9.5.3 - 2014-04-02
-- Added instruction set auto detection with Visual C++ using _M_IX86_FP - /arch
- compiler argument
-- Fixed GTX_raw_data code dependency
-- Fixed GCC instruction set detection
-- Added GLM_GTX_matrix_transform_2d extension (#178, #176)
-- Fixed CUDA issues (#169, #168, #183, #182)
-- Added support for all extensions but GTX_string_cast to CUDA
-- Fixed strict aliasing warnings in GCC 4.8.1 / Android NDK 9c (#152)
-- Fixed missing bitfieldInterleave definisions
-- Fixed usubBorrow (#171)
-- Fixed eulerAngle*** not consistent for right-handed coordinate system (#173)
-- Added full tests for eulerAngle*** functions (#173)
-- Added workaround for a CUDA compiler bug (#186, #185)
-
----
-### GLM 0.9.5.2 - 2014-02-08
-- Fixed initializer list ambiguity (#159, #160)
-- Fixed warnings with the Android NDK 9c
-- Fixed non power of two matrix products
-- Fixed mix function link error
-- Fixed SSE code included in GLM tests on "pure" platforms
-- Fixed undefined reference to fastInverseSqrt (#161)
-- Fixed GLM_FORCE_RADIANS with <glm/ext.hpp> build error (#165)
-- Fix dot product clamp range for vector angle functions. (#163)
-- Tentative fix for strict aliasing warning in GCC 4.8.1 / Android NDK 9c (#152)
-- Fixed GLM_GTC_constants description brief (#162)
-
----
-### GLM 0.9.5.1 - 2014-01-11
-- Fixed angle and orientedAngle that sometimes return NaN values (#145)
-- Deprecated degrees for function parameters and display a message
-- Added possible static_cast conversion of GLM types (#72)
-- Fixed error 'inverse' is not a member of 'glm' from glm::unProject (#146)
-- Fixed mismatch between some declarations and definitions
-- Fixed inverse link error when using namespace glm; (#147)
-- Optimized matrix inverse and division code (#149)
-- Added intersectRayPlane function (#153)
-- Fixed outerProduct return type (#155)
-
----
-### GLM 0.9.5.0 - 2013-12-25
-- Added forward declarations (glm/fwd.hpp) for faster compilations
-- Added per feature headers
-- Minimized GLM internal dependencies
-- Improved Intel Compiler detection
-- Added bitfieldInterleave and _mm_bit_interleave_si128 functions
-- Added GTX_scalar_relational
-- Added GTX_dual_quaternion
-- Added rotation function to GTX_quaternion (#22)
-- Added precision variation of each type
-- Added quaternion comparison functions
-- Fixed GTX_multiple for negative value
-- Removed GTX_ocl_type extension
-- Fixed post increment and decrement operators
-- Fixed perspective with zNear == 0 (#71)
-- Removed l-value swizzle operators
-- Cleaned up compiler detection code for unsupported compilers
-- Replaced C cast by C++ casts
-- Fixed .length() that should return a int and not a size_t
-- Added GLM_FORCE_SIZE_T_LENGTH and glm::length_t
-- Removed unnecessary conversions
-- Optimized packing and unpacking functions
-- Removed the normalization of the up argument of lookAt function (#114)
-- Added low precision specializations of inversesqrt
-- Fixed ldexp and frexp implementations
-- Increased assert coverage
-- Increased static_assert coverage
-- Replaced GLM traits by STL traits when possible
-- Allowed including individual core feature
-- Increased unit tests completness
-- Added creating of a quaternion from two vectors
-- Added C++11 initializer lists
-- Fixed umulExtended and imulExtended implementations for vector types (#76)
-- Fixed CUDA coverage for GTC extensions
-- Added GTX_io extension
-- Improved GLM messages enabled when defining GLM_MESSAGES
-- Hidden matrix _inverse function implementation detail into private section
-
----
-### [GLM 0.9.4.6](https://github.com/g-truc/glm/releases/tag/0.9.4.6) - 2013-09-20
-- Fixed detection to select the last known compiler if newer version #106
-- Fixed is_int and is_uint code duplication with GCC and C++11 #107
-- Fixed test suite build while using Clang in C++11 mode
-- Added c++1y mode support in CMake test suite
-- Removed ms extension mode to CMake when no using Visual C++
-- Added pedantic mode to CMake test suite for Clang and GCC
-- Added use of GCC frontend on Unix for ICC and Visual C++ fronted on Windows
- for ICC
-- Added compilation errors for unsupported compiler versions
-- Fixed glm::orientation with GLM_FORCE_RADIANS defined #112
-- Fixed const ref issue on assignment operator taking a scalar parameter #116
-- Fixed glm::eulerAngleY implementation #117
-
----
-### GLM 0.9.4.5 - 2013-08-12
-- Fixed CUDA support
-- Fixed inclusion of intrinsics in "pure" mode #92
-- Fixed language detection on GCC when the C++0x mode isn't enabled #95
-- Fixed issue #97: register is deprecated in C++11
-- Fixed issue #96: CUDA issues
-- Added Windows CE detection #92
-- Added missing value_ptr for quaternions #99
-
----
-### GLM 0.9.4.4 - 2013-05-29
-- Fixed slerp when costheta is close to 1 #65
-- Fixed mat4x2 value_type constructor #70
-- Fixed glm.natvis for Visual C++ 12 #82
-- Added assert in inversesqrt to detect division by zero #61
-- Fixed missing swizzle operators #86
-- Fixed CUDA warnings #86
-- Fixed GLM natvis for VC11 #82
-- Fixed GLM_GTX_multiple with negative values #79
-- Fixed glm::perspective when zNear is zero #71
-
----
-### GLM 0.9.4.3 - 2013-03-20
-- Detected qualifier for Clang
-- Fixed C++11 mode for GCC, couldn't be enabled without MS extensions
-- Fixed squad, intermediate and exp quaternion functions
-- Fixed GTX_polar_coordinates euclidean function, takes a vec2 instead of a vec3
-- Clarify the license applying on the manual
-- Added a docx copy of the manual
-- Fixed GLM_GTX_matrix_interpolation
-- Fixed isnan and isinf on Android with Clang
-- Autodetected C++ version using __cplusplus value
-- Fixed mix for bool and bvec* third parameter
-
----
-### GLM 0.9.4.2 - 2013-02-14
-- Fixed compAdd from GTX_component_wise
-- Fixed SIMD support for Intel compiler on Windows
-- Fixed isnan and isinf for CUDA compiler
-- Fixed GLM_FORCE_RADIANS on glm::perspective
-- Fixed GCC warnings
-- Fixed packDouble2x32 on Xcode
-- Fixed mix for vec4 SSE implementation
-- Fixed 0x2013 dash character in comments that cause issue in Windows
- Japanese mode
-- Fixed documentation warnings
-- Fixed CUDA warnings
-
----
-### GLM 0.9.4.1 - 2012-12-22
-- Improved half support: -0.0 case and implicit conversions
-- Fixed Intel Composer Compiler support on Linux
-- Fixed interaction between quaternion and euler angles
-- Fixed GTC_constants build
-- Fixed GTX_multiple
-- Fixed quat slerp using mix function when cosTheta close to 1
-- Improved fvec4SIMD and fmat4x4SIMD implementations
-- Fixed assert messages
-- Added slerp and lerp quaternion functions and tests
-
----
-### GLM 0.9.4.0 - 2012-11-18
-- Added Intel Composer Compiler support
-- Promoted GTC_espilon extension
-- Promoted GTC_ulp extension
-- Removed GLM website from the source repository
-- Added GLM_FORCE_RADIANS so that all functions takes radians for arguments
-- Fixed detection of Clang and LLVM GCC on MacOS X
-- Added debugger visualizers for Visual C++ 2012
-- Requires Visual Studio 2005, GCC 4.2, Clang 2.6, Cuda 3, ICC 2013 or a C++98 compiler
-
----
-### [GLM 0.9.3.4](https://github.com/g-truc/glm/releases/tag/0.9.3.4) - 2012-06-30
-- Added SSE4 and AVX2 detection.
-- Removed VIRTREV_xstream and the incompatibility generated with GCC
-- Fixed C++11 compiler option for GCC
-- Removed MS language extension option for GCC (not fonctionnal)
-- Fixed bitfieldExtract for vector types
-- Fixed warnings
-- Fixed SSE includes
-
----
-### GLM 0.9.3.3 - 2012-05-10
-- Fixed isinf and isnan
-- Improved compatibility with Intel compiler
-- Added CMake test build options: SIMD, C++11, fast math and MS land ext
-- Fixed SIMD mat4 test on GCC
-- Fixed perspectiveFov implementation
-- Fixed matrixCompMult for none-square matrices
-- Fixed namespace issue on stream operators
-- Fixed various warnings
-- Added VC11 support
-
----
-### GLM 0.9.3.2 - 2012-03-15
-- Fixed doxygen documentation
-- Fixed Clang version detection
-- Fixed simd mat4 /= operator
-
----
-### GLM 0.9.3.1 - 2012-01-25
-- Fixed platform detection
-- Fixed warnings
-- Removed detail code from Doxygen doc
-
----
-### GLM 0.9.3.0 - 2012-01-09
-- Added CPP Check project
-- Fixed conflict with Windows headers
-- Fixed isinf implementation
-- Fixed Boost conflict
-- Fixed warnings
-
----
-### GLM 0.9.3.B - 2011-12-12
-- Added support for Chrone Native Client
-- Added epsilon constant
-- Removed value_size function from vector types
-- Fixed roundEven on GCC
-- Improved API documentation
-- Fixed modf implementation
-- Fixed step function accuracy
-- Fixed outerProduct
-
----
-### GLM 0.9.3.A - 2011-11-11
-- Improved doxygen documentation
-- Added new swizzle operators for C++11 compilers
-- Added new swizzle operators declared as functions
-- Added GLSL 4.20 length for vector and matrix types
-- Promoted GLM_GTC_noise extension: simplex, perlin, periodic noise functions
-- Promoted GLM_GTC_random extension: linear, gaussian and various random number
-generation distribution
-- Added GLM_GTX_constants: provides useful constants
-- Added extension versioning
-- Removed many unused namespaces
-- Fixed half based type contructors
-- Added GLSL core noise functions
-
----
-### [GLM 0.9.2.7](https://github.com/g-truc/glm/releases/tag/0.9.2.7) - 2011-10-24
-- Added more swizzling constructors
-- Added missing none-squared matrix products
-
----
-### [GLM 0.9.2.6](https://github.com/g-truc/glm/releases/tag/0.9.2.6) - 2011-10-01
-- Fixed half based type build on old GCC
-- Fixed /W4 warnings on Visual C++
-- Fixed some missing l-value swizzle operators
-
----
-### GLM 0.9.2.5 - 2011-09-20
-- Fixed floatBitToXint functions
-- Fixed pack and unpack functions
-- Fixed round functions
-
----
-### GLM 0.9.2.4 - 2011-09-03
-- Fixed extensions bugs
-
----
-### GLM 0.9.2.3 - 2011-06-08
-- Fixed build issues
-
----
-### GLM 0.9.2.2 - 2011-06-02
-- Expend matrix constructors flexibility
-- Improved quaternion implementation
-- Fixed many warnings across platforms and compilers
-
----
-### GLM 0.9.2.1 - 2011-05-24
-- Automatically detect CUDA support
-- Improved compiler detection
-- Fixed errors and warnings in VC with C++ extensions disabled
-- Fixed and tested GLM_GTX_vector_angle
-- Fixed and tested GLM_GTX_rotate_vector
-
----
-### GLM 0.9.2.0 - 2011-05-09
-- Added CUDA support
-- Added CTest test suite
-- Added GLM_GTX_ulp extension
-- Added GLM_GTX_noise extension
-- Added GLM_GTX_matrix_interpolation extension
-- Updated quaternion slerp interpolation
-
----
-### [GLM 0.9.1.3](https://github.com/g-truc/glm/releases/tag/0.9.1.3) - 2011-05-07
-- Fixed bugs
-
----
-### GLM 0.9.1.2 - 2011-04-15
-- Fixed bugs
-
----
-### GLM 0.9.1.1 - 2011-03-17
-- Fixed bugs
-
----
-### GLM 0.9.1.0 - 2011-03-03
-- Fixed bugs
-
----
-### GLM 0.9.1.B - 2011-02-13
-- Updated API documentation
-- Improved SIMD implementation
-- Fixed Linux build
-
----
-### [GLM 0.9.0.8](https://github.com/g-truc/glm/releases/tag/0.9.0.8) - 2011-02-13
-- Added quaternion product operator.
-- Clarify that GLM is a header only library.
-
----
-### GLM 0.9.1.A - 2011-01-31
-- Added SIMD support
-- Added new swizzle functions
-- Improved static assert error message with C++0x static_assert
-- New setup system
-- Reduced branching
-- Fixed trunc implementation
-
----
-### [GLM 0.9.0.7](https://github.com/g-truc/glm/releases/tag/0.9.0.7) - 2011-01-30
-- Added GLSL 4.10 packing functions
-- Added == and != operators for every types.
-
----
-### GLM 0.9.0.6 - 2010-12-21
-- Many matrices bugs fixed
-
----
-### GLM 0.9.0.5 - 2010-11-01
-- Improved Clang support
-- Fixed bugs
-
----
-### GLM 0.9.0.4 - 2010-10-04
-- Added autoexp for GLM
-- Fixed bugs
-
----
-### GLM 0.9.0.3 - 2010-08-26
-- Fixed non-squared matrix operators
-
----
-### GLM 0.9.0.2 - 2010-07-08
-- Added GLM_GTX_int_10_10_10_2
-- Fixed bugs
-
----
-### GLM 0.9.0.1 - 2010-06-21
-- Fixed extensions errors
-
----
-### GLM 0.9.0.0 - 2010-05-25
-- Objective-C support
-- Fixed warnings
-- Updated documentation
-
----
-### GLM 0.9.B.2 - 2010-04-30
-- Git transition
-- Removed experimental code from releases
-- Fixed bugs
-
----
-### GLM 0.9.B.1 - 2010-04-03
-- Based on GLSL 4.00 specification
-- Added the new core functions
-- Added some implicit conversion support
-
----
-### GLM 0.9.A.2 - 2010-02-20
-- Improved some possible errors messages
-- Improved declarations and definitions match
-
----
-### GLM 0.9.A.1 - 2010-02-09
-- Removed deprecated features
-- Internal redesign
-
----
-### GLM 0.8.4.4 final - 2010-01-25
-- Fixed warnings
-
----
-### GLM 0.8.4.3 final - 2009-11-16
-- Fixed Half float arithmetic
-- Fixed setup defines
-
----
-### GLM 0.8.4.2 final - 2009-10-19
-- Fixed Half float adds
-
----
-### GLM 0.8.4.1 final - 2009-10-05
-- Updated documentation
-- Fixed MacOS X build
-
----
-### GLM 0.8.4.0 final - 2009-09-16
-- Added GCC 4.4 and VC2010 support
-- Added matrix optimizations
-
----
-### GLM 0.8.3.5 final - 2009-08-11
-- Fixed bugs
-
----
-### GLM 0.8.3.4 final - 2009-08-10
-- Updated GLM according GLSL 1.5 spec
-- Fixed bugs
-
----
-### GLM 0.8.3.3 final - 2009-06-25
-- Fixed bugs
-
----
-### GLM 0.8.3.2 final - 2009-06-04
-- Added GLM_GTC_quaternion
-- Added GLM_GTC_type_precision
-
----
-### GLM 0.8.3.1 final - 2009-05-21
-- Fixed old extension system.
-
----
-### GLM 0.8.3.0 final - 2009-05-06
-- Added stable extensions.
-- Added new extension system.
-
----
-### GLM 0.8.2.3 final - 2009-04-01
-- Fixed bugs.
-
----
-### GLM 0.8.2.2 final - 2009-02-24
-- Fixed bugs.
-
----
-### GLM 0.8.2.1 final - 2009-02-13
-- Fixed bugs.
-
----
-### GLM 0.8.2 final - 2009-01-21
-- Fixed bugs.
-
----
-### GLM 0.8.1 final - 2008-10-30
-- Fixed bugs.
-
----
-### GLM 0.8.0 final - 2008-10-23
-- New method to use extension.
-
----
-### GLM 0.8.0 beta3 - 2008-10-10
-- Added CMake support for GLM tests.
-
----
-### GLM 0.8.0 beta2 - 2008-10-04
-- Improved half scalars and vectors support.
-
----
-### GLM 0.8.0 beta1 - 2008-09-26
-- Improved GLSL conformance
-- Added GLSL 1.30 support
-- Improved API documentation
-
----
-### GLM 0.7.6 final - 2008-08-08
-- Improved C++ standard comformance
-- Added Static assert for types checking
-
----
-### GLM 0.7.5 final - 2008-07-05
-- Added build message system with Visual Studio
-- Pedantic build with GCC
-
----
-### GLM 0.7.4 final - 2008-06-01
-- Added external dependencies system.
-
----
-### GLM 0.7.3 final - 2008-05-24
-- Fixed bugs
-- Added new extension group
-
----
-### GLM 0.7.2 final - 2008-04-27
-- Updated documentation
-- Added preprocessor options
-
----
-### GLM 0.7.1 final - 2008-03-24
-- Disabled half on GCC
-- Fixed extensions
-
----
-### GLM 0.7.0 final - 2008-03-22
-- Changed to MIT license
-- Added new documentation
-
----
-### GLM 0.6.4 - 2007-12-10
-- Fixed swizzle operators
-
----
-### GLM 0.6.3 - 2007-11-05
-- Fixed type data accesses
-- Fixed 3DSMax sdk conflict
-
----
-### GLM 0.6.2 - 2007-10-08
-- Fixed extension
-
----
-### GLM 0.6.1 - 2007-10-07
-- Fixed a namespace error
-- Added extensions
-
----
-### GLM 0.6.0 : 2007-09-16
-- Added new extension namespace mecanium
-- Added Automatic compiler detection
-
----
-### GLM 0.5.1 - 2007-02-19
-- Fixed swizzle operators
-
----
-### GLM 0.5.0 - 2007-01-06
-- Upgrated to GLSL 1.2
-- Added swizzle operators
-- Added setup settings
-
----
-### GLM 0.4.1 - 2006-05-22
-- Added OpenGL examples
-
----
-### GLM 0.4.0 - 2006-05-17
-- Added missing operators to vec* and mat*
-- Added first GLSL 1.2 features
-- Fixed windows.h before glm.h when windows.h required
-
----
-### GLM 0.3.2 - 2006-04-21
-- Fixed texcoord components access.
-- Fixed mat4 and imat4 division operators.
-
----
-### GLM 0.3.1 - 2006-03-28
-- Added GCC 4.0 support under MacOS X.
-- Added GCC 4.0 and 4.1 support under Linux.
-- Added code optimisations.
-
----
-### GLM 0.3 - 2006-02-19
-- Improved GLSL type conversion and construction compliance.
-- Added experimental extensions.
-- Added Doxygen Documentation.
-- Added code optimisations.
-- Fixed bugs.
-
----
-### GLM 0.2 - 2005-05-05
-- Improve adaptative from GLSL.
-- Add experimental extensions based on OpenGL extension process.
-- Fixe bugs.
-
----
-### GLM 0.1 - 2005-02-21
-- Add vec2, vec3, vec4 GLSL types
-- Add ivec2, ivec3, ivec4 GLSL types
-- Add bvec2, bvec3, bvec4 GLSL types
-- Add mat2, mat3, mat4 GLSL types
-- Add almost all functions
-
diff --git a/3rdparty/glm/source/test/CMakeLists.txt b/3rdparty/glm/source/test/CMakeLists.txt
deleted file mode 100644
index e7f85f1..0000000
--- a/3rdparty/glm/source/test/CMakeLists.txt
+++ /dev/null
@@ -1,246 +0,0 @@
-option(GLM_QUIET "No CMake Message" OFF)
-option(BUILD_SHARED_LIBS "Build shared library" ON)
-option(BUILD_STATIC_LIBS "Build static library" ON)
-option(GLM_TEST_ENABLE_CXX_98 "Enable C++ 98" OFF)
-option(GLM_TEST_ENABLE_CXX_11 "Enable C++ 11" OFF)
-option(GLM_TEST_ENABLE_CXX_14 "Enable C++ 14" OFF)
-option(GLM_TEST_ENABLE_CXX_17 "Enable C++ 17" OFF)
-option(GLM_TEST_ENABLE_CXX_20 "Enable C++ 20" OFF)
-
-set(CMAKE_CXX_STANDARD_REQUIRED ON)
-
-if(GLM_TEST_ENABLE_CXX_20)
- set(CMAKE_CXX_STANDARD 20)
- add_definitions(-DGLM_FORCE_CXX2A)
- if(NOT GLM_QUIET)
- message(STATUS "GLM: Build with C++20 features")
- endif()
-
-elseif(GLM_TEST_ENABLE_CXX_17)
- set(CMAKE_CXX_STANDARD 17)
- add_definitions(-DGLM_FORCE_CXX17)
- if(NOT GLM_QUIET)
- message(STATUS "GLM: Build with C++17 features")
- endif()
-
-elseif(GLM_TEST_ENABLE_CXX_14)
- set(CMAKE_CXX_STANDARD 14)
- add_definitions(-DGLM_FORCE_CXX14)
- if(NOT GLM_QUIET)
- message(STATUS "GLM: Build with C++14 features")
- endif()
-
-elseif(GLM_TEST_ENABLE_CXX_11)
- set(CMAKE_CXX_STANDARD 11)
- add_definitions(-DGLM_FORCE_CXX11)
- if(NOT GLM_QUIET)
- message(STATUS "GLM: Build with C++11 features")
- endif()
-
-elseif(GLM_TEST_ENABLE_CXX_98)
- set(CMAKE_CXX_STANDARD 98)
- add_definitions(-DGLM_FORCE_CXX98)
- if(NOT GLM_QUIET)
- message(STATUS "GLM: Build with C++98 features")
- endif()
-endif()
-
-option(GLM_TEST_ENABLE_LANG_EXTENSIONS "Enable language extensions" OFF)
-
-option(GLM_DISABLE_AUTO_DETECTION "Enable language extensions" OFF)
-
-if(GLM_DISABLE_AUTO_DETECTION)
- add_definitions(-DGLM_FORCE_PLATFORM_UNKNOWN -DGLM_FORCE_COMPILER_UNKNOWN -DGLM_FORCE_ARCH_UNKNOWN -DGLM_FORCE_CXX_UNKNOWN)
-endif()
-
-if(GLM_TEST_ENABLE_LANG_EXTENSIONS)
- set(CMAKE_CXX_EXTENSIONS ON)
- if((CMAKE_CXX_COMPILER_ID MATCHES "Clang") OR (CMAKE_CXX_COMPILER_ID MATCHES "GNU"))
- add_compile_options(-fms-extensions)
- endif()
- message(STATUS "GLM: Build with C++ language extensions")
-else()
- set(CMAKE_CXX_EXTENSIONS OFF)
- if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
- add_compile_options(/Za)
- if(MSVC15)
- add_compile_options(/permissive-)
- endif()
- endif()
-endif()
-
-option(GLM_TEST_ENABLE_FAST_MATH "Enable fast math optimizations" OFF)
-if(GLM_TEST_ENABLE_FAST_MATH)
- if(NOT GLM_QUIET)
- message(STATUS "GLM: Build with fast math optimizations")
- endif()
-
- if((CMAKE_CXX_COMPILER_ID MATCHES "Clang") OR (CMAKE_CXX_COMPILER_ID MATCHES "GNU"))
- add_compile_options(-ffast-math)
-
- elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
- add_compile_options(/fp:fast)
- endif()
-else()
- if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
- add_compile_options(/fp:precise)
- endif()
-endif()
-
-option(GLM_TEST_ENABLE "Build unit tests" ON)
-option(GLM_TEST_ENABLE_SIMD_SSE2 "Enable SSE2 optimizations" OFF)
-option(GLM_TEST_ENABLE_SIMD_SSE3 "Enable SSE3 optimizations" OFF)
-option(GLM_TEST_ENABLE_SIMD_SSSE3 "Enable SSSE3 optimizations" OFF)
-option(GLM_TEST_ENABLE_SIMD_SSE4_1 "Enable SSE 4.1 optimizations" OFF)
-option(GLM_TEST_ENABLE_SIMD_SSE4_2 "Enable SSE 4.2 optimizations" OFF)
-option(GLM_TEST_ENABLE_SIMD_AVX "Enable AVX optimizations" OFF)
-option(GLM_TEST_ENABLE_SIMD_AVX2 "Enable AVX2 optimizations" OFF)
-option(GLM_TEST_FORCE_PURE "Force 'pure' instructions" OFF)
-
-if(GLM_TEST_FORCE_PURE)
- add_definitions(-DGLM_FORCE_PURE)
-
- if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
- add_compile_options(-mfpmath=387)
- endif()
- message(STATUS "GLM: No SIMD instruction set")
-
-elseif(GLM_TEST_ENABLE_SIMD_AVX2)
- add_definitions(-DGLM_FORCE_INTRINSICS)
-
- if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
- add_compile_options(-mavx2)
- elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
- add_compile_options(/QxAVX2)
- elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
- add_compile_options(/arch:AVX2)
- endif()
- message(STATUS "GLM: AVX2 instruction set")
-
-elseif(GLM_TEST_ENABLE_SIMD_AVX)
- add_definitions(-DGLM_FORCE_INTRINSICS)
-
- if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
- add_compile_options(-mavx)
- elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
- add_compile_options(/QxAVX)
- elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
- add_compile_options(/arch:AVX)
- endif()
- message(STATUS "GLM: AVX instruction set")
-
-elseif(GLM_TEST_ENABLE_SIMD_SSE4_2)
- add_definitions(-DGLM_FORCE_INTRINSICS)
-
- if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
- add_compile_options(-msse4.2)
- elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
- add_compile_options(/QxSSE4.2)
- elseif((CMAKE_CXX_COMPILER_ID MATCHES "MSVC") AND NOT CMAKE_CL_64)
- add_compile_options(/arch:SSE2) # VC doesn't support SSE4.2
- endif()
- message(STATUS "GLM: SSE4.2 instruction set")
-
-elseif(GLM_TEST_ENABLE_SIMD_SSE4_1)
- add_definitions(-DGLM_FORCE_INTRINSICS)
-
- if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
- add_compile_options(-msse4.1)
- elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
- add_compile_options(/QxSSE4.1)
- elseif((CMAKE_CXX_COMPILER_ID MATCHES "MSVC") AND NOT CMAKE_CL_64)
- add_compile_options(/arch:SSE2) # VC doesn't support SSE4.1
- endif()
- message(STATUS "GLM: SSE4.1 instruction set")
-
-elseif(GLM_TEST_ENABLE_SIMD_SSSE3)
- add_definitions(-DGLM_FORCE_INTRINSICS)
-
- if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
- add_compile_options(-mssse3)
- elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
- add_compile_options(/QxSSSE3)
- elseif((CMAKE_CXX_COMPILER_ID MATCHES "MSVC") AND NOT CMAKE_CL_64)
- add_compile_options(/arch:SSE2) # VC doesn't support SSSE3
- endif()
- message(STATUS "GLM: SSSE3 instruction set")
-
-elseif(GLM_TEST_ENABLE_SIMD_SSE3)
- add_definitions(-DGLM_FORCE_INTRINSICS)
-
- if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
- add_compile_options(-msse3)
- elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
- add_compile_options(/QxSSE3)
- elseif((CMAKE_CXX_COMPILER_ID MATCHES "MSVC") AND NOT CMAKE_CL_64)
- add_compile_options(/arch:SSE2) # VC doesn't support SSE3
- endif()
- message(STATUS "GLM: SSE3 instruction set")
-
-elseif(GLM_TEST_ENABLE_SIMD_SSE2)
- add_definitions(-DGLM_FORCE_INTRINSICS)
-
- if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
- add_compile_options(-msse2)
- elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
- add_compile_options(/QxSSE2)
- elseif((CMAKE_CXX_COMPILER_ID MATCHES "MSVC") AND NOT CMAKE_CL_64)
- add_compile_options(/arch:SSE2)
- endif()
- message(STATUS "GLM: SSE2 instruction set")
-endif()
-
-# Compiler and default options
-
-if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- if(NOT GLM_QUIET)
- message("GLM: Clang - ${CMAKE_CXX_COMPILER_ID} compiler")
- endif()
-
- add_compile_options(-Werror -Weverything)
- add_compile_options(-Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-c++11-long-long -Wno-padded -Wno-gnu-anonymous-struct -Wno-nested-anon-types)
- add_compile_options(-Wno-undefined-reinterpret-cast -Wno-sign-conversion -Wno-unused-variable -Wno-missing-prototypes -Wno-unreachable-code -Wno-missing-variable-declarations -Wno-sign-compare -Wno-global-constructors -Wno-unused-macros -Wno-format-nonliteral)
-
-elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
- if(NOT GLM_QUIET)
- message("GLM: GCC - ${CMAKE_CXX_COMPILER_ID} compiler")
- endif()
-
- add_compile_options(-O2)
- add_compile_options(-Wno-long-long)
-
-elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
- if(NOT GLM_QUIET)
- message("GLM: Intel - ${CMAKE_CXX_COMPILER_ID} compiler")
- endif()
-
-elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
- if(NOT GLM_QUIET)
- message("GLM: Visual C++ - ${CMAKE_CXX_COMPILER_ID} compiler")
- endif()
-
- add_compile_options(/W4 /WX)
- add_compile_options(/wd4309 /wd4324 /wd4389 /wd4127 /wd4267 /wd4146 /wd4201 /wd4464 /wd4514 /wd4701 /wd4820 /wd4365)
- add_definitions(-D_CRT_SECURE_NO_WARNINGS)
-endif()
-
-function(glmCreateTestGTC NAME)
- set(SAMPLE_NAME test-${NAME})
- add_executable(${SAMPLE_NAME} ${NAME}.cpp)
-
- add_test(
- NAME ${SAMPLE_NAME}
- COMMAND $<TARGET_FILE:${SAMPLE_NAME}> )
- target_link_libraries(${SAMPLE_NAME} PRIVATE glm::glm)
-endfunction()
-
-if(GLM_TEST_ENABLE)
- add_subdirectory(bug)
- add_subdirectory(core)
- add_subdirectory(ext)
- add_subdirectory(gtc)
- add_subdirectory(gtx)
- add_subdirectory(perf)
-endif()
-
-
diff --git a/3rdparty/glm/source/test/bug/CMakeLists.txt b/3rdparty/glm/source/test/bug/CMakeLists.txt
deleted file mode 100644
index 26e8569..0000000
--- a/3rdparty/glm/source/test/bug/CMakeLists.txt
+++ /dev/null
@@ -1 +0,0 @@
-glmCreateTestGTC(bug_ms_vec_static)
diff --git a/3rdparty/glm/source/test/bug/bug_ms_vec_static.cpp b/3rdparty/glm/source/test/bug/bug_ms_vec_static.cpp
deleted file mode 100644
index 7f44e40..0000000
--- a/3rdparty/glm/source/test/bug/bug_ms_vec_static.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-#include <glm/glm.hpp>
-
-#if GLM_CONFIG_ANONYMOUS_STRUCT == GLM_ENABLE
-struct vec2;
-
-struct _swizzle
-{
- char _buffer[1];
-};
-
-struct vec2
-{
- GLM_CONSTEXPR vec2() :
- x(0), y(0)
- {}
-
- union
- {
- struct { float x, y; };
- struct { _swizzle xx; };
- };
-};
-#endif
-
-// Visual C++ has a bug generating the error: fatal error C1001: An internal error has occurred in the compiler.
-// vec2 Bar;
-
-int main()
-{
- return 0;
-}
diff --git a/3rdparty/glm/source/test/cmake/CMakeLists.txt b/3rdparty/glm/source/test/cmake/CMakeLists.txt
deleted file mode 100644
index 5bc11ef..0000000
--- a/3rdparty/glm/source/test/cmake/CMakeLists.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
-project(test_find_glm)
-
-find_package(glm REQUIRED)
-
-add_executable(test_find_glm test_find_glm.cpp)
-target_link_libraries(test_find_glm glm::glm)
-
diff --git a/3rdparty/glm/source/test/cmake/test_find_glm.cpp b/3rdparty/glm/source/test/cmake/test_find_glm.cpp
deleted file mode 100644
index 361b977..0000000
--- a/3rdparty/glm/source/test/cmake/test_find_glm.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-#include <iostream>
-#include <glm/glm.hpp>
-#include <glm/ext.hpp>
-
-glm::mat4 camera(float Translate, glm::vec2 const& Rotate)
-{
- glm::mat4 Projection = glm::perspective(glm::pi<float>() * 0.25f, 4.0f / 3.0f, 0.1f, 100.f);
- glm::mat4 View = glm::translate(glm::mat4(1.0f), glm::vec3(0.0f, 0.0f, -Translate));
- View = glm::rotate(View, Rotate.y, glm::vec3(-1.0f, 0.0f, 0.0f));
- View = glm::rotate(View, Rotate.x, glm::vec3(0.0f, 1.0f, 0.0f));
- glm::mat4 Model = glm::scale(glm::mat4(1.0f), glm::vec3(0.5f));
- return Projection * View * Model;
-}
-
-int main()
-{
- const glm::mat4 m = camera(1.f, glm::vec2(1.f, 0.5f));
- std::cout << "matrix diagonal: " << m[0][0] << ", "
- << m[1][1] << ", " << m[2][2] << ", " << m[3][3] << "\n";
- return 0;
-}
-
diff --git a/3rdparty/glm/source/test/core/CMakeLists.txt b/3rdparty/glm/source/test/core/CMakeLists.txt
deleted file mode 100644
index 6cd57b1..0000000
--- a/3rdparty/glm/source/test/core/CMakeLists.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-glmCreateTestGTC(core_cpp_constexpr)
-glmCreateTestGTC(core_cpp_defaulted_ctor)
-glmCreateTestGTC(core_force_aligned_gentypes)
-glmCreateTestGTC(core_force_ctor_init)
-glmCreateTestGTC(core_force_cxx03)
-glmCreateTestGTC(core_force_cxx98)
-glmCreateTestGTC(core_force_arch_unknown)
-glmCreateTestGTC(core_force_compiler_unknown)
-glmCreateTestGTC(core_force_cxx_unknown)
-glmCreateTestGTC(core_force_explicit_ctor)
-glmCreateTestGTC(core_force_inline)
-glmCreateTestGTC(core_force_platform_unknown)
-glmCreateTestGTC(core_force_pure)
-glmCreateTestGTC(core_force_unrestricted_gentype)
-glmCreateTestGTC(core_force_xyzw_only)
-glmCreateTestGTC(core_force_quat_xyzw)
-glmCreateTestGTC(core_type_aligned)
-glmCreateTestGTC(core_type_cast)
-glmCreateTestGTC(core_type_ctor)
-glmCreateTestGTC(core_type_int)
-glmCreateTestGTC(core_type_length)
-glmCreateTestGTC(core_type_mat2x2)
-glmCreateTestGTC(core_type_mat2x3)
-glmCreateTestGTC(core_type_mat2x4)
-glmCreateTestGTC(core_type_mat3x2)
-glmCreateTestGTC(core_type_mat3x3)
-glmCreateTestGTC(core_type_mat3x4)
-glmCreateTestGTC(core_type_mat4x2)
-glmCreateTestGTC(core_type_mat4x3)
-glmCreateTestGTC(core_type_mat4x4)
-glmCreateTestGTC(core_type_vec1)
-glmCreateTestGTC(core_type_vec2)
-glmCreateTestGTC(core_type_vec3)
-glmCreateTestGTC(core_type_vec4)
-glmCreateTestGTC(core_func_common)
-glmCreateTestGTC(core_func_exponential)
-glmCreateTestGTC(core_func_geometric)
-glmCreateTestGTC(core_func_integer)
-glmCreateTestGTC(core_func_integer_bit_count)
-glmCreateTestGTC(core_func_integer_find_lsb)
-glmCreateTestGTC(core_func_integer_find_msb)
-glmCreateTestGTC(core_func_matrix)
-glmCreateTestGTC(core_func_noise)
-glmCreateTestGTC(core_func_packing)
-glmCreateTestGTC(core_func_trigonometric)
-glmCreateTestGTC(core_func_vector_relational)
-glmCreateTestGTC(core_func_swizzle)
-glmCreateTestGTC(core_setup_force_cxx98)
-glmCreateTestGTC(core_setup_force_size_t_length)
-glmCreateTestGTC(core_setup_message)
-glmCreateTestGTC(core_setup_platform_unknown)
-glmCreateTestGTC(core_setup_precision)
diff --git a/3rdparty/glm/source/test/core/core_cpp_constexpr.cpp b/3rdparty/glm/source/test/core/core_cpp_constexpr.cpp
deleted file mode 100644
index 3dc0a92..0000000
--- a/3rdparty/glm/source/test/core/core_cpp_constexpr.cpp
+++ /dev/null
@@ -1,750 +0,0 @@
-#include <glm/glm.hpp>
-
-#if GLM_CONFIG_CONSTEXP == GLM_ENABLE
-
-#include <glm/gtc/constants.hpp>
-#include <glm/gtc/quaternion.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/vector_int1.hpp>
-#include <glm/ext/vector_bool1.hpp>
-#include <glm/ext/vector_bool4.hpp>
-#include <glm/ext/vector_float1.hpp>
-#include <glm/vector_relational.hpp>
-
-static int test_vec1()
-{
- int Error = 0;
-
- {
- constexpr glm::bvec1 B(true);
- constexpr bool A = glm::all(B);
- static_assert(A, "GLM: Failed constexpr");
-
- constexpr glm::bvec1 D(true);
- constexpr bool C = glm::any(D);
- static_assert(C, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::bvec2 C(true);
- constexpr glm::bvec2 B(true);
- static_assert(glm::any(glm::equal(C, B)), "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec1 O(glm::ivec1(1));
- static_assert(glm::ivec1(1) == O, "GLM: Failed constexpr");
-
- constexpr glm::ivec1 P(1);
- static_assert(glm::ivec1(1) == P, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec1 L(glm::ivec2(1, 2));
- static_assert(glm::ivec1(1) == L, "GLM: Failed constexpr");
-
- constexpr glm::ivec1 M(glm::ivec3(1, 2, 3));
- static_assert(glm::ivec1(1) == M, "GLM: Failed constexpr");
-
- constexpr glm::ivec1 N(glm::ivec4(1, 2, 3, 4));
- static_assert(glm::ivec1(1) == N, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec1 A(1);
- static_assert(A[0] == 1, "GLM: Failed constexpr");
- static_assert(glm::vec1(1.0f).x > 0.0f, "GLM: Failed constexpr");
- static_assert(glm::vec1::length() == 1, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::bvec1 A1(true);
- constexpr glm::bvec1 A2(true);
- constexpr glm::bvec1 B1(false);
- constexpr glm::bvec1 B2(false);
- static_assert(A1 == A2 && B1 == B2, "GLM: Failed constexpr");
- static_assert(A1 == A2 || B1 == B2, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec1 A(1);
- constexpr glm::ivec1 B = A + 1;
- constexpr glm::ivec1 C(3);
- static_assert(A + B == C, "GLM: Failed constexpr");
-
- constexpr glm::ivec1 D = +A;
- static_assert(D == A, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec1 A(3);
- constexpr glm::ivec1 B = A - 1;
- constexpr glm::ivec1 C(1);
- static_assert(A - B == C, "GLM: Failed constexpr");
-
- constexpr glm::ivec1 D = -A;
- static_assert(-D == A, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec1 A(3);
- constexpr glm::ivec1 B = A * 1;
- static_assert(A == B, "GLM: Failed constexpr");
-
- constexpr glm::ivec1 C(1);
- static_assert(B * C == A, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec1 A(3);
- constexpr glm::ivec1 B = A / 1;
- static_assert(A == B, "GLM: Failed constexpr");
-
- constexpr glm::ivec1 C(1);
- static_assert(B / C == A, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec1 A(3);
- constexpr glm::ivec1 B = A % 2;
- constexpr glm::ivec1 C(1);
- static_assert(B == C, "GLM: Failed constexpr");
-
- constexpr glm::ivec1 D(2);
- static_assert(A % D == C, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec1 A(1);
- constexpr glm::ivec1 B = A & 1;
- static_assert(A == B, "GLM: Failed constexpr");
-
- constexpr glm::ivec1 C(1);
- static_assert(A == (A & C), "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec1 A(1);
- constexpr glm::ivec1 B = A | 1;
- static_assert(A == B, "GLM: Failed constexpr");
-
- constexpr glm::ivec1 C(1);
- static_assert(A == (A | C), "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec1 A(1);
- constexpr glm::ivec1 B = A ^ 0;
- static_assert(A == B, "GLM: Failed constexpr");
-
- constexpr glm::ivec1 C(0);
- static_assert(A == (A ^ C), "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec1 A(1);
- constexpr glm::ivec1 B = A << 1;
- static_assert(B == glm::ivec1(2), "GLM: Failed constexpr");
-
- constexpr glm::ivec1 C(1);
- static_assert(B == (A << C), "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec1 A(2);
- constexpr glm::ivec1 B = A >> 1;
- static_assert(B == glm::ivec1(1), "GLM: Failed constexpr");
-
- constexpr glm::ivec1 C(1);
- static_assert(B == A >> C, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec1 A(~0);
- constexpr glm::ivec1 B = ~A;
- static_assert(A == ~B, "GLM: Failed constexpr");
- }
-
- return Error;
-}
-
-static int test_vec2()
-{
- int Error = 0;
-
- {
- constexpr glm::bvec2 B(true);
- constexpr bool A = glm::all(B);
- static_assert(A, "GLM: Failed constexpr");
-
- constexpr glm::bvec2 D(true, false);
- constexpr bool C = glm::any(D);
- static_assert(C, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::bvec2 C(true);
- constexpr glm::bvec2 B(true, false);
- static_assert(glm::any(glm::equal(C, B)), "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec2 O(glm::ivec1(1));
- static_assert(glm::ivec2(1) == O, "GLM: Failed constexpr");
-
- constexpr glm::ivec2 A(1);
- static_assert(glm::ivec2(1) == A, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec2 F(glm::ivec1(1), glm::ivec1(2));
- static_assert(glm::ivec2(1, 2) == F, "GLM: Failed constexpr");
-
- constexpr glm::ivec2 G(1, glm::ivec1(2));
- static_assert(glm::ivec2(1, 2) == G, "GLM: Failed constexpr");
-
- constexpr glm::ivec2 H(glm::ivec1(1), 2);
- static_assert(glm::ivec2(1, 2) == H, "GLM: Failed constexpr");
-
- constexpr glm::ivec2 I(1, 2);
- static_assert(glm::ivec2(1, 2) == I, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec2 L(glm::ivec2(1, 2));
- static_assert(glm::ivec2(1, 2) == L, "GLM: Failed constexpr");
-
- constexpr glm::ivec2 M(glm::ivec3(1, 2, 3));
- static_assert(glm::ivec2(1, 2) == M, "GLM: Failed constexpr");
-
- constexpr glm::ivec2 N(glm::ivec4(1, 2, 3, 4));
- static_assert(glm::ivec2(1, 2) == N, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec2 A(1);
- static_assert(A[0] == 1, "GLM: Failed constexpr");
- static_assert(glm::vec2(1.0f).x > 0.0f, "GLM: Failed constexpr");
- static_assert(glm::vec2(1.0f, -1.0f).x > 0.0f, "GLM: Failed constexpr");
- static_assert(glm::vec2(1.0f, -1.0f).y < 0.0f, "GLM: Failed constexpr");
- static_assert(glm::vec2::length() == 2, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::bvec2 A1(true);
- constexpr glm::bvec2 A2(true);
- constexpr glm::bvec2 B1(false);
- constexpr glm::bvec2 B2(false);
- static_assert(A1 == A2 && B1 == B2, "GLM: Failed constexpr");
- static_assert(A1 == A2 || B1 == B2, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec2 A(1);
- constexpr glm::ivec2 B = A + 1;
- constexpr glm::ivec2 C(3);
- static_assert(A + B == C, "GLM: Failed constexpr");
-
- constexpr glm::ivec2 D = +A;
- static_assert(D == A, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec2 A(3);
- constexpr glm::ivec2 B = A - 1;
- constexpr glm::ivec2 C(1);
- static_assert(A - B == C, "GLM: Failed constexpr");
-
- constexpr glm::ivec2 D = -A;
- static_assert(-D == A, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec2 A(3);
- constexpr glm::ivec2 B = A * 1;
- static_assert(A == B, "GLM: Failed constexpr");
-
- constexpr glm::ivec2 C(1);
- static_assert(B * C == A, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec2 A(3);
- constexpr glm::ivec2 B = A / 1;
- static_assert(A == B, "GLM: Failed constexpr");
-
- constexpr glm::ivec2 C(1);
- static_assert(B / C == A, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec2 A(3);
- constexpr glm::ivec2 B = A % 2;
- constexpr glm::ivec2 C(1);
- static_assert(B == C, "GLM: Failed constexpr");
-
- constexpr glm::ivec1 D(2);
- static_assert(A % D == C, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec2 A(1);
- constexpr glm::ivec2 B = A & 1;
- static_assert(A == B, "GLM: Failed constexpr");
-
- constexpr glm::ivec1 C(1);
- static_assert(A == (A & C), "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec2 A(1);
- constexpr glm::ivec2 B = A | 1;
- static_assert(A == B, "GLM: Failed constexpr");
-
- constexpr glm::ivec1 C(1);
- static_assert(A == (A | C), "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec2 A(1);
- constexpr glm::ivec2 B = A ^ 0;
- static_assert(A == B, "GLM: Failed constexpr");
-
- constexpr glm::ivec1 C(0);
- static_assert(A == (A ^ C), "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec2 A(1);
- constexpr glm::ivec2 B = A << 1;
- static_assert(B == glm::ivec2(2), "GLM: Failed constexpr");
-
- constexpr glm::ivec1 C(1);
- static_assert(B == (A << C), "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec2 A(2);
- constexpr glm::ivec2 B = A >> 1;
- static_assert(B == glm::ivec2(1), "GLM: Failed constexpr");
-
- constexpr glm::ivec1 C(1);
- static_assert(B == A >> C, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec2 A(~0);
- constexpr glm::ivec2 B = ~A;
- static_assert(A == ~B, "GLM: Failed constexpr");
- }
-
- return Error;
-}
-
-static int test_vec3()
-{
- int Error = 0;
-
- {
- constexpr glm::bvec3 B(true);
- constexpr bool A = glm::all(B);
- static_assert(A, "GLM: Failed constexpr");
-
- constexpr glm::bvec3 D(true, false, true);
- constexpr bool C = glm::any(D);
- static_assert(C, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::bvec3 C(true);
- constexpr glm::bvec3 B(true, false, true);
- static_assert(glm::any(glm::equal(C, B)), "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec3 O(glm::ivec1(1));
- static_assert(glm::ivec3(1) == O, "GLM: Failed constexpr");
-
- constexpr glm::ivec3 A(1);
- static_assert(glm::ivec3(1) == A, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec3 B(glm::ivec2(1, 2), 3);
- static_assert(glm::ivec3(1, 2, 3) == B, "GLM: Failed constexpr");
-
- constexpr glm::ivec3 C(1, glm::ivec2(2, 3));
- static_assert(glm::ivec3(1, 2, 3) == C, "GLM: Failed constexpr");
-
- constexpr glm::ivec3 D(glm::ivec1(1), glm::ivec2(2, 3));
- static_assert(glm::ivec3(1, 2, 3) == D, "GLM: Failed constexpr");
-
- constexpr glm::ivec3 E(glm::ivec2(1, 2), glm::ivec1(3));
- static_assert(glm::ivec3(1, 2, 3) == E, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec3 F(glm::ivec1(1), glm::ivec1(2), glm::ivec1(3));
- static_assert(glm::ivec3(1, 2, 3) == F, "GLM: Failed constexpr");
-
- constexpr glm::ivec3 G(1, glm::ivec1(2), glm::ivec1(3));
- static_assert(glm::ivec3(1, 2, 3) == G, "GLM: Failed constexpr");
-
- constexpr glm::ivec3 H(glm::ivec1(1), 2, glm::ivec1(3));
- static_assert(glm::ivec3(1, 2, 3) == H, "GLM: Failed constexpr");
-
- constexpr glm::ivec3 I(1, 2, glm::ivec1(3));
- static_assert(glm::ivec3(1, 2, 3) == I, "GLM: Failed constexpr");
-
- constexpr glm::ivec3 J(glm::ivec1(1), glm::ivec1(2), 3);
- static_assert(glm::ivec3(1, 2, 3) == J, "GLM: Failed constexpr");
-
- constexpr glm::ivec3 K(1, glm::ivec1(2), 3);
- static_assert(glm::ivec3(1, 2, 3) == K, "GLM: Failed constexpr");
-
- constexpr glm::ivec3 L(glm::ivec1(1), 2, 3);
- static_assert(glm::ivec3(1, 2, 3) == L, "GLM: Failed constexpr");
-
- constexpr glm::ivec3 M(1, 2, 3);
- static_assert(glm::ivec3(1, 2, 3) == M, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec3 N(glm::ivec4(1, 2, 3, 4));
- static_assert(glm::ivec3(1, 2, 3) == N, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec3 const A(1);
- static_assert(A[0] == 1, "GLM: Failed constexpr");
- static_assert(glm::vec3(1.0f).x > 0.0f, "GLM: Failed constexpr");
- static_assert(glm::vec3(1.0f, -1.0f, -1.0f).x > 0.0f, "GLM: Failed constexpr");
- static_assert(glm::vec3(1.0f, -1.0f, -1.0f).y < 0.0f, "GLM: Failed constexpr");
- static_assert(glm::vec3::length() == 3, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::bvec3 A1(true);
- constexpr glm::bvec3 A2(true);
- constexpr glm::bvec3 B1(false);
- constexpr glm::bvec3 B2(false);
- static_assert(A1 == A2 && B1 == B2, "GLM: Failed constexpr");
- static_assert(A1 == A2 || B1 == B2, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec3 A(1);
- constexpr glm::ivec3 B = A + 1;
- constexpr glm::ivec3 C(3);
- static_assert(A + B == C, "GLM: Failed constexpr");
-
- constexpr glm::ivec3 D = +A;
- static_assert(D == A, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec3 A(3);
- constexpr glm::ivec3 B = A - 1;
- constexpr glm::ivec3 C(1);
- static_assert(A - B == C, "GLM: Failed constexpr");
-
- constexpr glm::ivec3 D = -A;
- static_assert(-D == A, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec3 A(3);
- constexpr glm::ivec3 B = A * 1;
- static_assert(A == B, "GLM: Failed constexpr");
-
- constexpr glm::ivec3 C(1);
- static_assert(B * C == A, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec3 A(3);
- constexpr glm::ivec3 B = A / 1;
- static_assert(A == B, "GLM: Failed constexpr");
-
- constexpr glm::ivec3 C(1);
- static_assert(B / C == A, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec3 A(3);
- constexpr glm::ivec3 B = A % 2;
- constexpr glm::ivec3 C(1);
- static_assert(B == C, "GLM: Failed constexpr");
-
- constexpr glm::ivec1 D(2);
- static_assert(A % D == C, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec3 A(1);
- constexpr glm::ivec3 B = A & 1;
- static_assert(A == B, "GLM: Failed constexpr");
-
- constexpr glm::ivec1 C(1);
- static_assert(A == (A & C), "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec3 A(1);
- constexpr glm::ivec3 B = A | 1;
- static_assert(A == B, "GLM: Failed constexpr");
-
- constexpr glm::ivec1 C(1);
- static_assert(A == (A | C), "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec3 A(1);
- constexpr glm::ivec3 B = A ^ 0;
- static_assert(A == B, "GLM: Failed constexpr");
-
- constexpr glm::ivec1 C(0);
- static_assert(A == (A ^ C), "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec3 A(1);
- constexpr glm::ivec3 B = A << 1;
- static_assert(B == glm::ivec3(2), "GLM: Failed constexpr");
-
- constexpr glm::ivec1 C(1);
- static_assert(B == (A << C), "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec3 A(2);
- constexpr glm::ivec3 B = A >> 1;
- static_assert(B == glm::ivec3(1), "GLM: Failed constexpr");
-
- constexpr glm::ivec1 C(1);
- static_assert(B == A >> C, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec3 A(~0);
- constexpr glm::ivec3 B = ~A;
- static_assert(A == ~B, "GLM: Failed constexpr");
- }
-
- return Error;
-}
-
-static int test_vec4()
-{
- int Error = 0;
-
- {
- constexpr glm::bvec4 B(true);
- constexpr bool A = glm::all(B);
- static_assert(A, "GLM: Failed constexpr");
-
- constexpr glm::bvec4 D(true, false, true, false);
- constexpr bool C = glm::any(D);
- static_assert(C, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::bvec4 C(true);
- constexpr glm::bvec4 B(true, false, true, false);
- static_assert(glm::any(glm::equal(C, B)), "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec4 O(glm::ivec4(1));
- static_assert(glm::ivec4(1) == O, "GLM: Failed constexpr");
-
- constexpr glm::ivec4 A(1);
- static_assert(glm::ivec4(1) == A, "GLM: Failed constexpr");
-
- constexpr glm::ivec4 N(glm::ivec4(1, 2, 3, 4));
- static_assert(glm::ivec4(1, 2, 3, 4) == N, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec4 A(glm::ivec3(1, 2, 3), 4);
- static_assert(glm::ivec4(1, 2, 3, 4) == A, "GLM: Failed constexpr");
-
- constexpr glm::ivec4 B(glm::ivec2(1, 2), glm::ivec2(3, 4));
- static_assert(glm::ivec4(1, 2, 3, 4) == B, "GLM: Failed constexpr");
-
- constexpr glm::ivec4 C(1, glm::ivec3(2, 3, 4));
- static_assert(glm::ivec4(1, 2, 3, 4) == C, "GLM: Failed constexpr");
-
- constexpr glm::ivec4 D(glm::ivec1(1), glm::ivec2(2, 3), glm::ivec1(4));
- static_assert(glm::ivec4(1, 2, 3, 4) == D, "GLM: Failed constexpr");
-
- constexpr glm::ivec4 E(glm::ivec2(1, 2), glm::ivec1(3), glm::ivec1(4));
- static_assert(glm::ivec4(1, 2, 3, 4) == E, "GLM: Failed constexpr");
-
- constexpr glm::ivec4 F(glm::ivec1(1), glm::ivec1(2), glm::ivec2(3, 4));
- static_assert(glm::ivec4(1, 2, 3, 4) == F, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec4 A(1);
- static_assert(A[0] == 1, "GLM: Failed constexpr");
- static_assert(glm::ivec4(1).x > 0, "GLM: Failed constexpr");
- static_assert(glm::ivec4(1.0f, -1.0f, -1.0f, 1.0f).x > 0, "GLM: Failed constexpr");
- static_assert(glm::ivec4(1.0f, -1.0f, -1.0f, 1.0f).y < 0, "GLM: Failed constexpr");
- static_assert(glm::ivec4::length() == 4, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::bvec4 A1(true);
- constexpr glm::bvec4 A2(true);
- constexpr glm::bvec4 B1(false);
- constexpr glm::bvec4 B2(false);
- static_assert(A1 == A2 && B1 == B2, "GLM: Failed constexpr");
- static_assert(A1 == A2 || B1 == B2, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec4 A(1);
- constexpr glm::ivec4 B = A + 1;
- constexpr glm::ivec4 C(3);
- static_assert(A + B == C, "GLM: Failed constexpr");
-
- constexpr glm::ivec4 D = +A;
- static_assert(D == A, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec4 A(3);
- constexpr glm::ivec4 B = A - 1;
- constexpr glm::ivec4 C(1);
- static_assert(A - B == C, "GLM: Failed constexpr");
-
- constexpr glm::ivec4 D = -A;
- static_assert(-D == A, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec4 A(3);
- constexpr glm::ivec4 B = A * 1;
- static_assert(A == B, "GLM: Failed constexpr");
-
- constexpr glm::ivec4 C(1);
- static_assert(B * C == A, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec4 A(3);
- constexpr glm::ivec4 B = A / 1;
- static_assert(A == B, "GLM: Failed constexpr");
-
- constexpr glm::ivec4 C(1);
- static_assert(B / C == A, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec4 A(3);
- constexpr glm::ivec4 B = A % 2;
- constexpr glm::ivec4 C(1);
- static_assert(B == C, "GLM: Failed constexpr");
-
- constexpr glm::ivec1 D(2);
- static_assert(A % D == C, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec4 A(1);
- constexpr glm::ivec4 B = A & 1;
- static_assert(A == B, "GLM: Failed constexpr");
-
- constexpr glm::ivec1 C(1);
- static_assert(A == (A & C), "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec4 A(1);
- constexpr glm::ivec4 B = A | 1;
- static_assert(A == B, "GLM: Failed constexpr");
-
- constexpr glm::ivec1 C(1);
- static_assert(A == (A | C), "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec4 A(1);
- constexpr glm::ivec4 B = A ^ 0;
- static_assert(A == B, "GLM: Failed constexpr");
-
- constexpr glm::ivec1 C(0);
- static_assert(A == (A ^ C), "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec4 A(1);
- constexpr glm::ivec4 B = A << 1;
- static_assert(B == glm::ivec4(2), "GLM: Failed constexpr");
-
- constexpr glm::ivec1 C(1);
- static_assert(B == (A << C), "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec4 A(2);
- constexpr glm::ivec4 B = A >> 1;
- static_assert(B == glm::ivec4(1), "GLM: Failed constexpr");
-
- constexpr glm::ivec1 C(1);
- static_assert(B == A >> C, "GLM: Failed constexpr");
- }
-
- {
- constexpr glm::ivec4 A(~0);
- constexpr glm::ivec4 B = ~A;
- static_assert(A == ~B, "GLM: Failed constexpr");
- }
-
- return Error;
-}
-
-static int test_quat()
-{
- int Error = 0;
-
- {
- static_assert(glm::quat::length() == 4, "GLM: Failed constexpr");
- static_assert(glm::quat(1.0f, glm::vec3(0.0f)).w > 0.0f, "GLM: Failed constexpr");
- static_assert(glm::quat(1.0f, 0.0f, 0.0f, 0.0f).w > 0.0f, "GLM: Failed constexpr");
-
- glm::quat constexpr Q = glm::identity<glm::quat>();
- static_assert(Q.x - glm::quat(1.0f, glm::vec3(0.0f)).x <= glm::epsilon<float>(), "GLM: Failed constexpr");
- }
-
- return Error;
-}
-
-static int test_mat2x2()
-{
- int Error = 0;
-
- static_assert(glm::mat2x2::length() == 2, "GLM: Failed constexpr");
-
- return Error;
-}
-
-#endif//GLM_CONFIG_CONSTEXP == GLM_ENABLE
-
-int main()
-{
- int Error = 0;
-
-# if GLM_CONFIG_CONSTEXP == GLM_ENABLE
- Error += test_vec1();
- Error += test_vec2();
- Error += test_vec3();
- Error += test_vec4();
- Error += test_quat();
- Error += test_mat2x2();
-# endif//GLM_CONFIG_CONSTEXP == GLM_ENABLE
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_cpp_defaulted_ctor.cpp b/3rdparty/glm/source/test/core/core_cpp_defaulted_ctor.cpp
deleted file mode 100644
index 07afd9c..0000000
--- a/3rdparty/glm/source/test/core/core_cpp_defaulted_ctor.cpp
+++ /dev/null
@@ -1,145 +0,0 @@
-#include <glm/glm.hpp>
-
-#if GLM_CONFIG_DEFAULTED_FUNCTIONS == GLM_ENABLE
-
-#include <glm/gtc/constants.hpp>
-#include <glm/gtc/quaternion.hpp>
-#include <glm/gtc/vec1.hpp>
-#include <glm/ext/matrix_relational.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <cstring>
-
-static int test_vec_memcpy()
-{
- int Error = 0;
-
- {
- glm::ivec1 const A = glm::ivec1(76);
- glm::ivec1 B;
- std::memcpy(&B, &A, sizeof(glm::ivec1));
- Error += B == A ? 0 : 1;
- }
-
- {
- glm::ivec2 const A = glm::ivec2(76);
- glm::ivec2 B;
- std::memcpy(&B, &A, sizeof(glm::ivec2));
- Error += B == A ? 0 : 1;
- }
-
- {
- glm::ivec3 const A = glm::ivec3(76);
- glm::ivec3 B;
- std::memcpy(&B, &A, sizeof(glm::ivec3));
- Error += B == A ? 0 : 1;
- }
-
- {
- glm::ivec4 const A = glm::ivec4(76);
- glm::ivec4 B;
- std::memcpy(&B, &A, sizeof(glm::ivec4));
- Error += B == A ? 0 : 1;
- }
-
- return Error;
-}
-
-static int test_mat_memcpy()
-{
- int Error = 0;
-
- {
- glm::mat2x2 const A = glm::mat2x2(76);
- glm::mat2x2 B;
- std::memcpy(&B, &A, sizeof(glm::mat2x2));
- Error += glm::all(glm::equal(B, A, glm::epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::mat2x3 const A = glm::mat2x3(76);
- glm::mat2x3 B;
- std::memcpy(&B, &A, sizeof(glm::mat2x3));
- Error += glm::all(glm::equal(B, A, glm::epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::mat2x4 const A = glm::mat2x4(76);
- glm::mat2x4 B;
- std::memcpy(&B, &A, sizeof(glm::mat2x4));
- Error += glm::all(glm::equal(B, A, glm::epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::mat3x2 const A = glm::mat3x2(76);
- glm::mat3x2 B;
- std::memcpy(&B, &A, sizeof(glm::mat3x2));
- Error += glm::all(glm::equal(B, A, glm::epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::mat3x3 const A = glm::mat3x3(76);
- glm::mat3x3 B;
- std::memcpy(&B, &A, sizeof(glm::mat3x3));
- Error += glm::all(glm::equal(B, A, glm::epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::mat3x4 const A = glm::mat3x4(76);
- glm::mat3x4 B;
- std::memcpy(&B, &A, sizeof(glm::mat3x4));
- Error += glm::all(glm::equal(B, A, glm::epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::mat4x2 const A = glm::mat4x2(76);
- glm::mat4x2 B;
- std::memcpy(&B, &A, sizeof(glm::mat4x2));
- Error += glm::all(glm::equal(B, A, glm::epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::mat4x3 const A = glm::mat4x3(76);
- glm::mat4x3 B;
- std::memcpy(&B, &A, sizeof(glm::mat4x3));
- Error += glm::all(glm::equal(B, A, glm::epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::mat4x4 const A = glm::mat4x4(76);
- glm::mat4x4 B;
- std::memcpy(&B, &A, sizeof(glm::mat4x4));
- Error += glm::all(glm::equal(B, A, glm::epsilon<float>())) ? 0 : 1;
- }
-
- return Error;
-}
-
-static int test_quat_memcpy()
-{
- int Error = 0;
-
- {
- glm::quat const A = glm::quat(1, 0, 0, 0);
- glm::quat B;
- std::memcpy(&B, &A, sizeof(glm::quat));
- Error += glm::all(glm::equal(B, A, glm::epsilon<float>())) ? 0 : 1;
- }
-
- return Error;
-}
-
-#endif//GLM_CONFIG_DEFAULTED_FUNCTIONS == GLM_ENABLE
-
-int main()
-{
- int Error = 0;
-
-# if GLM_CONFIG_DEFAULTED_FUNCTIONS == GLM_ENABLE
- Error += test_vec_memcpy();
- Error += test_mat_memcpy();
- Error += test_quat_memcpy();
-# endif//GLM_CONFIG_DEFAULTED_FUNCTIONS == GLM_ENABLE
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_force_aligned_gentypes.cpp b/3rdparty/glm/source/test/core/core_force_aligned_gentypes.cpp
deleted file mode 100644
index 70713c4..0000000
--- a/3rdparty/glm/source/test/core/core_force_aligned_gentypes.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <glm/glm.hpp>
-#include <glm/ext.hpp>
-
-int main()
-{
- int Error = 0;
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_force_arch_unknown.cpp b/3rdparty/glm/source/test/core/core_force_arch_unknown.cpp
deleted file mode 100644
index 45b51bf..0000000
--- a/3rdparty/glm/source/test/core/core_force_arch_unknown.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef GLM_FORCE_ARCH_UNKNOWN
-# define GLM_FORCE_ARCH_UNKNOWN
-#endif
-
-#include <glm/glm.hpp>
-#include <glm/ext.hpp>
-
-int main()
-{
- int Error = 0;
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_force_compiler_unknown.cpp b/3rdparty/glm/source/test/core/core_force_compiler_unknown.cpp
deleted file mode 100644
index 44d7fc3..0000000
--- a/3rdparty/glm/source/test/core/core_force_compiler_unknown.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef GLM_FORCE_COMPILER_UNKNOWN
-# define GLM_FORCE_COMPILER_UNKNOWN
-#endif
-
-#include <glm/glm.hpp>
-#include <glm/ext.hpp>
-
-int main()
-{
- int Error = 0;
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_force_ctor_init.cpp b/3rdparty/glm/source/test/core/core_force_ctor_init.cpp
deleted file mode 100644
index 298b7ed..0000000
--- a/3rdparty/glm/source/test/core/core_force_ctor_init.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-#define GLM_FORCE_CTOR_INIT
-
-#include <glm/glm.hpp>
-#include <glm/ext.hpp>
-
-static int test_vec()
-{
- int Error = 0;
-
- glm::vec1 V1;
- Error += glm::all(glm::equal(V1, glm::vec1(0), glm::epsilon<float>())) ? 0 : 1;
-
- glm::dvec1 U1;
- Error += glm::all(glm::equal(U1, glm::dvec1(0), glm::epsilon<double>())) ? 0 : 1;
-
- glm::vec2 V2;
- Error += glm::all(glm::equal(V2, glm::vec2(0, 0), glm::epsilon<float>())) ? 0 : 1;
-
- glm::dvec2 U2;
- Error += glm::all(glm::equal(U2, glm::dvec2(0, 0), glm::epsilon<double>())) ? 0 : 1;
-
- glm::vec3 V3;
- Error += glm::all(glm::equal(V3, glm::vec3(0, 0, 0), glm::epsilon<float>())) ? 0 : 1;
-
- glm::dvec3 U3;
- Error += glm::all(glm::equal(U3, glm::dvec3(0, 0, 0), glm::epsilon<double>())) ? 0 : 1;
-
- glm::vec4 V4;
- Error += glm::all(glm::equal(V4, glm::vec4(0, 0, 0, 0), glm::epsilon<float>())) ? 0 : 1;
-
- glm::dvec4 U4;
- Error += glm::all(glm::equal(U4, glm::dvec4(0, 0, 0, 0), glm::epsilon<double>())) ? 0 : 1;
-
- return Error;
-}
-
-static int test_mat()
-{
- int Error = 0;
-
- {
- glm::mat2x2 F;
- Error += glm::all(glm::equal(F, glm::mat2x2(1), glm::epsilon<float>())) ? 0 : 1;
-
- glm::dmat2x2 D;
- Error += glm::all(glm::equal(D, glm::dmat2x2(1), glm::epsilon<double>())) ? 0 : 1;
- }
-
- {
- glm::mat2x3 F;
- Error += glm::all(glm::equal(F, glm::mat2x3(1), glm::epsilon<float>())) ? 0 : 1;
-
- glm::dmat2x3 D;
- Error += glm::all(glm::equal(D, glm::dmat2x3(1), glm::epsilon<double>())) ? 0 : 1;
- }
-
- {
- glm::mat2x4 F;
- Error += glm::all(glm::equal(F, glm::mat2x4(1), glm::epsilon<float>())) ? 0 : 1;
-
- glm::dmat2x4 D;
- Error += glm::all(glm::equal(D, glm::dmat2x4(1), glm::epsilon<double>())) ? 0 : 1;
- }
-
- {
- glm::mat3x2 F;
- Error += glm::all(glm::equal(F, glm::mat3x2(1), glm::epsilon<float>())) ? 0 : 1;
-
- glm::dmat3x2 D;
- Error += glm::all(glm::equal(D, glm::dmat3x2(1), glm::epsilon<double>())) ? 0 : 1;
- }
-
- {
- glm::mat3x3 F;
- Error += glm::all(glm::equal(F, glm::mat3x3(1), glm::epsilon<float>())) ? 0 : 1;
-
- glm::dmat3x3 D;
- Error += glm::all(glm::equal(D, glm::dmat3x3(1), glm::epsilon<double>())) ? 0 : 1;
- }
-
- {
- glm::mat3x4 F;
- Error += glm::all(glm::equal(F, glm::mat3x4(1), glm::epsilon<float>())) ? 0 : 1;
-
- glm::dmat3x4 D;
- Error += glm::all(glm::equal(D, glm::dmat3x4(1), glm::epsilon<double>())) ? 0 : 1;
- }
-
- {
- glm::mat4x2 F;
- Error += glm::all(glm::equal(F, glm::mat4x2(1), glm::epsilon<float>())) ? 0 : 1;
-
- glm::dmat4x2 D;
- Error += glm::all(glm::equal(D, glm::dmat4x2(1), glm::epsilon<double>())) ? 0 : 1;
- }
-
- {
- glm::mat4x3 F;
- Error += glm::all(glm::equal(F, glm::mat4x3(1), glm::epsilon<float>())) ? 0 : 1;
-
- glm::dmat4x3 D;
- Error += glm::all(glm::equal(D, glm::dmat4x3(1), glm::epsilon<double>())) ? 0 : 1;
- }
-
- {
- glm::mat4x4 F;
- Error += glm::all(glm::equal(F, glm::mat4x4(1), glm::epsilon<float>())) ? 0 : 1;
-
- glm::dmat4x4 D;
- Error += glm::all(glm::equal(D, glm::dmat4x4(1), glm::epsilon<double>())) ? 0 : 1;
- }
-
- return Error;
-}
-
-static int test_qua()
-{
- int Error = 0;
-
- glm::quat F;
- Error += glm::all(glm::equal(F, glm::quat(1, 0, 0, 0), glm::epsilon<float>())) ? 0 : 1;
-
- glm::dquat D;
- Error += glm::all(glm::equal(D, glm::dquat(1, 0, 0, 0), glm::epsilon<double>())) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_vec();
- Error += test_mat();
- Error += test_qua();
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_force_cxx03.cpp b/3rdparty/glm/source/test/core/core_force_cxx03.cpp
deleted file mode 100644
index fc6e9c5..0000000
--- a/3rdparty/glm/source/test/core/core_force_cxx03.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef GLM_FORCE_CXX03
-# define GLM_FORCE_CXX03
-#endif
-
-#include <glm/glm.hpp>
-#include <glm/ext.hpp>
-
-int main()
-{
- int Error = 0;
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_force_cxx98.cpp b/3rdparty/glm/source/test/core/core_force_cxx98.cpp
deleted file mode 100644
index 42a5c25..0000000
--- a/3rdparty/glm/source/test/core/core_force_cxx98.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef GLM_FORCE_CXX98
-# define GLM_FORCE_CXX98
-#endif
-
-#include <glm/glm.hpp>
-#include <glm/ext.hpp>
-
-int main()
-{
- int Error = 0;
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_force_cxx_unknown.cpp b/3rdparty/glm/source/test/core/core_force_cxx_unknown.cpp
deleted file mode 100644
index 62299d6..0000000
--- a/3rdparty/glm/source/test/core/core_force_cxx_unknown.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef GLM_FORCE_CXX_UNKNOWN
-# define GLM_FORCE_CXX_UNKNOWN
-#endif
-
-#include <glm/glm.hpp>
-#include <glm/ext.hpp>
-
-int main()
-{
- int Error = 0;
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_force_depth_zero_to_one.cpp b/3rdparty/glm/source/test/core/core_force_depth_zero_to_one.cpp
deleted file mode 100644
index 23b3615..0000000
--- a/3rdparty/glm/source/test/core/core_force_depth_zero_to_one.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-#define GLM_FORCE_DEPTH_ZERO_TO_ONE
-
-#include <glm/glm.hpp>
-#include <glm/ext.hpp>
-
-int main()
-{
- int Error = 0;
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_force_explicit_ctor.cpp b/3rdparty/glm/source/test/core/core_force_explicit_ctor.cpp
deleted file mode 100644
index 7af5b79..0000000
--- a/3rdparty/glm/source/test/core/core_force_explicit_ctor.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-#define GLM_FORCE_EXPLICIT_CTOR
-
-#include <glm/glm.hpp>
-#include <glm/ext.hpp>
-
-int main()
-{
- int Error = 0;
-
- glm::ivec4 B(1);
- Error += B == glm::ivec4(1) ? 0 : 1;
-
- //glm::vec4 A = B;
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_force_inline.cpp b/3rdparty/glm/source/test/core/core_force_inline.cpp
deleted file mode 100644
index cd23fd9..0000000
--- a/3rdparty/glm/source/test/core/core_force_inline.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-#define GLM_FORCE_INLINE
-
-#include <glm/glm.hpp>
-#include <glm/ext.hpp>
-
-int main()
-{
- int Error = 0;
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_force_left_handed.cpp b/3rdparty/glm/source/test/core/core_force_left_handed.cpp
deleted file mode 100644
index b7ec31b..0000000
--- a/3rdparty/glm/source/test/core/core_force_left_handed.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-#define GLM_FORCE_LEFT_HANDED
-
-#include <glm/glm.hpp>
-#include <glm/ext.hpp>
-
-int main()
-{
- int Error = 0;
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_force_platform_unknown.cpp b/3rdparty/glm/source/test/core/core_force_platform_unknown.cpp
deleted file mode 100644
index fb7fa75..0000000
--- a/3rdparty/glm/source/test/core/core_force_platform_unknown.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef GLM_FORCE_PLATFORM_UNKNOWN
-# define GLM_FORCE_PLATFORM_UNKNOWN
-#endif
-
-#include <glm/glm.hpp>
-#include <glm/ext.hpp>
-
-int main()
-{
- int Error = 0;
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_force_pure.cpp b/3rdparty/glm/source/test/core/core_force_pure.cpp
deleted file mode 100644
index a32a4ed..0000000
--- a/3rdparty/glm/source/test/core/core_force_pure.cpp
+++ /dev/null
@@ -1,434 +0,0 @@
-#ifndef GLM_FORCE_PURE
-# define GLM_FORCE_PURE
-#endif//GLM_FORCE_PURE
-#define GLM_FORCE_DEFAULT_ALIGNED_GENTYPES
-#define GLM_FORCE_SWIZZLE
-#include <glm/ext/vector_relational.hpp>
-#include <glm/vector_relational.hpp>
-#include <glm/vec2.hpp>
-#include <glm/vec3.hpp>
-#include <glm/vec4.hpp>
-#include <ctime>
-#include <vector>
-
-static int test_vec4_ctor()
-{
- int Error = 0;
-
- {
- glm::ivec4 A(1, 2, 3, 4);
- glm::ivec4 B(A);
- Error += glm::all(glm::equal(A, B)) ? 0 : 1;
- }
-
-# if GLM_HAS_TRIVIAL_QUERIES
- // Error += std::is_trivially_default_constructible<glm::vec4>::value ? 0 : 1;
- // Error += std::is_trivially_copy_assignable<glm::vec4>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::vec4>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::dvec4>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::ivec4>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::uvec4>::value ? 0 : 1;
-
- Error += std::is_copy_constructible<glm::vec4>::value ? 0 : 1;
-# endif
-
-#if GLM_HAS_INITIALIZER_LISTS
- {
- glm::vec4 a{ 0, 1, 2, 3 };
- std::vector<glm::vec4> v = {
- {0, 1, 2, 3},
- {4, 5, 6, 7},
- {8, 9, 0, 1}};
- }
-
- {
- glm::dvec4 a{ 0, 1, 2, 3 };
- std::vector<glm::dvec4> v = {
- {0, 1, 2, 3},
- {4, 5, 6, 7},
- {8, 9, 0, 1}};
- }
-#endif
-
-# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
- {
- glm::ivec4 A = glm::vec4(1.0f, 2.0f, 3.0f, 4.0f);
- glm::ivec4 B = A.xyzw;
- glm::ivec4 C(A.xyzw);
- glm::ivec4 D(A.xyzw());
- glm::ivec4 E(A.x, A.yzw);
- glm::ivec4 F(A.x, A.yzw());
- glm::ivec4 G(A.xyz, A.w);
- glm::ivec4 H(A.xyz(), A.w);
- glm::ivec4 I(A.xy, A.zw);
- glm::ivec4 J(A.xy(), A.zw());
- glm::ivec4 K(A.x, A.y, A.zw);
- glm::ivec4 L(A.x, A.yz, A.w);
- glm::ivec4 M(A.xy, A.z, A.w);
-
- Error += glm::all(glm::equal(A, B)) ? 0 : 1;
- Error += glm::all(glm::equal(A, C)) ? 0 : 1;
- Error += glm::all(glm::equal(A, D)) ? 0 : 1;
- Error += glm::all(glm::equal(A, E)) ? 0 : 1;
- Error += glm::all(glm::equal(A, F)) ? 0 : 1;
- Error += glm::all(glm::equal(A, G)) ? 0 : 1;
- Error += glm::all(glm::equal(A, H)) ? 0 : 1;
- Error += glm::all(glm::equal(A, I)) ? 0 : 1;
- Error += glm::all(glm::equal(A, J)) ? 0 : 1;
- Error += glm::all(glm::equal(A, K)) ? 0 : 1;
- Error += glm::all(glm::equal(A, L)) ? 0 : 1;
- Error += glm::all(glm::equal(A, M)) ? 0 : 1;
- }
-# endif
-
-# if GLM_CONFIG_SWIZZLE
- {
- glm::ivec4 A = glm::vec4(1.0f, 2.0f, 3.0f, 4.0f);
- glm::ivec4 B = A.xyzw();
- glm::ivec4 C(A.xyzw());
- glm::ivec4 D(A.xyzw());
- glm::ivec4 E(A.x, A.yzw());
- glm::ivec4 F(A.x, A.yzw());
- glm::ivec4 G(A.xyz(), A.w);
- glm::ivec4 H(A.xyz(), A.w);
- glm::ivec4 I(A.xy(), A.zw());
- glm::ivec4 J(A.xy(), A.zw());
- glm::ivec4 K(A.x, A.y, A.zw());
- glm::ivec4 L(A.x, A.yz(), A.w);
- glm::ivec4 M(A.xy(), A.z, A.w);
-
- Error += glm::all(glm::equal(A, B)) ? 0 : 1;
- Error += glm::all(glm::equal(A, C)) ? 0 : 1;
- Error += glm::all(glm::equal(A, D)) ? 0 : 1;
- Error += glm::all(glm::equal(A, E)) ? 0 : 1;
- Error += glm::all(glm::equal(A, F)) ? 0 : 1;
- Error += glm::all(glm::equal(A, G)) ? 0 : 1;
- Error += glm::all(glm::equal(A, H)) ? 0 : 1;
- Error += glm::all(glm::equal(A, I)) ? 0 : 1;
- Error += glm::all(glm::equal(A, J)) ? 0 : 1;
- Error += glm::all(glm::equal(A, K)) ? 0 : 1;
- Error += glm::all(glm::equal(A, L)) ? 0 : 1;
- Error += glm::all(glm::equal(A, M)) ? 0 : 1;
- }
-# endif//GLM_CONFIG_SWIZZLE
-
- {
- glm::ivec4 A(1);
- glm::ivec4 B(1, 1, 1, 1);
-
- Error += A == B ? 0 : 1;
- }
-
- {
- std::vector<glm::ivec4> Tests;
- Tests.push_back(glm::ivec4(glm::ivec2(1, 2), 3, 4));
- Tests.push_back(glm::ivec4(1, glm::ivec2(2, 3), 4));
- Tests.push_back(glm::ivec4(1, 2, glm::ivec2(3, 4)));
- Tests.push_back(glm::ivec4(glm::ivec3(1, 2, 3), 4));
- Tests.push_back(glm::ivec4(1, glm::ivec3(2, 3, 4)));
- Tests.push_back(glm::ivec4(glm::ivec2(1, 2), glm::ivec2(3, 4)));
- Tests.push_back(glm::ivec4(1, 2, 3, 4));
- Tests.push_back(glm::ivec4(glm::ivec4(1, 2, 3, 4)));
-
- for(std::size_t i = 0; i < Tests.size(); ++i)
- Error += Tests[i] == glm::ivec4(1, 2, 3, 4) ? 0 : 1;
- }
-
- return Error;
-}
-
-static int test_bvec4_ctor()
-{
- int Error = 0;
-
- glm::bvec4 const A(true);
- glm::bvec4 const B(true);
- glm::bvec4 const C(false);
- glm::bvec4 const D = A && B;
- glm::bvec4 const E = A && C;
- glm::bvec4 const F = A || C;
-
- Error += D == glm::bvec4(true) ? 0 : 1;
- Error += E == glm::bvec4(false) ? 0 : 1;
- Error += F == glm::bvec4(true) ? 0 : 1;
-
- bool const G = A == C;
- bool const H = A != C;
-
- Error += !G ? 0 : 1;
- Error += H ? 0 : 1;
-
- return Error;
-}
-
-static int test_vec4_operators()
-{
- int Error = 0;
-
- {
- glm::ivec4 A(1);
- glm::ivec4 B(1);
- bool R = A != B;
- bool S = A == B;
-
- Error += (S && !R) ? 0 : 1;
- }
-
- {
- glm::vec4 const A(1.0f, 2.0f, 3.0f, 4.0f);
- glm::vec4 const B(4.0f, 5.0f, 6.0f, 7.0f);
-
- glm::vec4 const C = A + B;
- Error += glm::all(glm::equal(C, glm::vec4(5, 7, 9, 11), 0.001f)) ? 0 : 1;
-
- glm::vec4 D = B - A;
- Error += glm::all(glm::equal(D, glm::vec4(3, 3, 3, 3), 0.001f)) ? 0 : 1;
-
- glm::vec4 E = A * B;
- Error += glm::all(glm::equal(E, glm::vec4(4, 10, 18, 28), 0.001f)) ? 0 : 1;
-
- glm::vec4 F = B / A;
- Error += glm::all(glm::equal(F, glm::vec4(4, 2.5, 2, 7.0f / 4.0f), 0.001f)) ? 0 : 1;
-
- glm::vec4 G = A + 1.0f;
- Error += glm::all(glm::equal(G, glm::vec4(2, 3, 4, 5), 0.001f)) ? 0 : 1;
-
- glm::vec4 H = B - 1.0f;
- Error += glm::all(glm::equal(H, glm::vec4(3, 4, 5, 6), 0.001f)) ? 0 : 1;
-
- glm::vec4 I = A * 2.0f;
- Error += glm::all(glm::equal(I, glm::vec4(2, 4, 6, 8), 0.001f)) ? 0 : 1;
-
- glm::vec4 J = B / 2.0f;
- Error += glm::all(glm::equal(J, glm::vec4(2, 2.5, 3, 3.5), 0.001f)) ? 0 : 1;
-
- glm::vec4 K = 1.0f + A;
- Error += glm::all(glm::equal(K, glm::vec4(2, 3, 4, 5), 0.001f)) ? 0 : 1;
-
- glm::vec4 L = 1.0f - B;
- Error += glm::all(glm::equal(L, glm::vec4(-3, -4, -5, -6), 0.001f)) ? 0 : 1;
-
- glm::vec4 M = 2.0f * A;
- Error += glm::all(glm::equal(M, glm::vec4(2, 4, 6, 8), 0.001f)) ? 0 : 1;
-
- glm::vec4 const N = 2.0f / B;
- Error += glm::all(glm::equal(N, glm::vec4(0.5, 2.0 / 5.0, 2.0 / 6.0, 2.0 / 7.0), 0.0001f)) ? 0 : 1;
- }
-
- {
- glm::ivec4 A(1.0f, 2.0f, 3.0f, 4.0f);
- glm::ivec4 B(4.0f, 5.0f, 6.0f, 7.0f);
-
- A += B;
- Error += A == glm::ivec4(5, 7, 9, 11) ? 0 : 1;
-
- A += 1;
- Error += A == glm::ivec4(6, 8, 10, 12) ? 0 : 1;
- }
- {
- glm::ivec4 A(1.0f, 2.0f, 3.0f, 4.0f);
- glm::ivec4 B(4.0f, 5.0f, 6.0f, 7.0f);
-
- B -= A;
- Error += B == glm::ivec4(3, 3, 3, 3) ? 0 : 1;
-
- B -= 1;
- Error += B == glm::ivec4(2, 2, 2, 2) ? 0 : 1;
- }
- {
- glm::ivec4 A(1.0f, 2.0f, 3.0f, 4.0f);
- glm::ivec4 B(4.0f, 5.0f, 6.0f, 7.0f);
-
- A *= B;
- Error += A == glm::ivec4(4, 10, 18, 28) ? 0 : 1;
-
- A *= 2;
- Error += A == glm::ivec4(8, 20, 36, 56) ? 0 : 1;
- }
- {
- glm::ivec4 A(1.0f, 2.0f, 3.0f, 4.0f);
- glm::ivec4 B(4.0f, 4.0f, 6.0f, 8.0f);
-
- B /= A;
- Error += B == glm::ivec4(4, 2, 2, 2) ? 0 : 1;
-
- B /= 2;
- Error += B == glm::ivec4(2, 1, 1, 1) ? 0 : 1;
- }
- {
- glm::ivec4 B(2);
-
- B /= B.y;
- Error += B == glm::ivec4(1) ? 0 : 1;
- }
-
- {
- glm::ivec4 A(1.0f, 2.0f, 3.0f, 4.0f);
- glm::ivec4 B = -A;
- Error += B == glm::ivec4(-1.0f, -2.0f, -3.0f, -4.0f) ? 0 : 1;
- }
-
- {
- glm::ivec4 A(1.0f, 2.0f, 3.0f, 4.0f);
- glm::ivec4 B = --A;
- Error += B == glm::ivec4(0.0f, 1.0f, 2.0f, 3.0f) ? 0 : 1;
- }
-
- {
- glm::ivec4 A(1.0f, 2.0f, 3.0f, 4.0f);
- glm::ivec4 B = A--;
- Error += B == glm::ivec4(1.0f, 2.0f, 3.0f, 4.0f) ? 0 : 1;
- Error += A == glm::ivec4(0.0f, 1.0f, 2.0f, 3.0f) ? 0 : 1;
- }
-
- {
- glm::ivec4 A(1.0f, 2.0f, 3.0f, 4.0f);
- glm::ivec4 B = ++A;
- Error += B == glm::ivec4(2.0f, 3.0f, 4.0f, 5.0f) ? 0 : 1;
- }
-
- {
- glm::ivec4 A(1.0f, 2.0f, 3.0f, 4.0f);
- glm::ivec4 B = A++;
- Error += B == glm::ivec4(1.0f, 2.0f, 3.0f, 4.0f) ? 0 : 1;
- Error += A == glm::ivec4(2.0f, 3.0f, 4.0f, 5.0f) ? 0 : 1;
- }
-
- return Error;
-}
-
-static int test_vec4_equal()
-{
- int Error = 0;
-
- {
- glm::uvec4 const A(1, 2, 3, 4);
- glm::uvec4 const B(1, 2, 3, 4);
- Error += A == B ? 0 : 1;
- Error += A != B ? 1 : 0;
- }
-
- {
- glm::ivec4 const A(1, 2, 3, 4);
- glm::ivec4 const B(1, 2, 3, 4);
- Error += A == B ? 0 : 1;
- Error += A != B ? 1 : 0;
- }
-
- return Error;
-}
-
-static int test_vec4_size()
-{
- int Error = 0;
-
- Error += sizeof(glm::vec4) == sizeof(glm::lowp_vec4) ? 0 : 1;
- Error += sizeof(glm::vec4) == sizeof(glm::mediump_vec4) ? 0 : 1;
- Error += sizeof(glm::vec4) == sizeof(glm::highp_vec4) ? 0 : 1;
- Error += 16 == sizeof(glm::mediump_vec4) ? 0 : 1;
- Error += sizeof(glm::dvec4) == sizeof(glm::lowp_dvec4) ? 0 : 1;
- Error += sizeof(glm::dvec4) == sizeof(glm::mediump_dvec4) ? 0 : 1;
- Error += sizeof(glm::dvec4) == sizeof(glm::highp_dvec4) ? 0 : 1;
- Error += 32 == sizeof(glm::highp_dvec4) ? 0 : 1;
- Error += glm::vec4().length() == 4 ? 0 : 1;
- Error += glm::dvec4().length() == 4 ? 0 : 1;
-
- return Error;
-}
-
-static int test_vec4_swizzle_partial()
-{
- int Error = 0;
-
-# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
-
- glm::ivec4 A(1, 2, 3, 4);
-
- {
- glm::ivec4 B(A.xy, A.zw);
- Error += A == B ? 0 : 1;
- }
- {
- glm::ivec4 B(A.xy, 3, 4);
- Error += A == B ? 0 : 1;
- }
- {
- glm::ivec4 B(1, A.yz, 4);
- Error += A == B ? 0 : 1;
- }
- {
- glm::ivec4 B(1, 2, A.zw);
- Error += A == B ? 0 : 1;
- }
-
- {
- glm::ivec4 B(A.xyz, 4);
- Error += A == B ? 0 : 1;
- }
- {
- glm::ivec4 B(1, A.yzw);
- Error += A == B ? 0 : 1;
- }
-# endif
-
- return Error;
-}
-
-static int test_operator_increment()
-{
- int Error(0);
-
- glm::ivec4 v0(1);
- glm::ivec4 v1(v0);
- glm::ivec4 v2(v0);
- glm::ivec4 v3 = ++v1;
- glm::ivec4 v4 = v2++;
-
- Error += glm::all(glm::equal(v0, v4)) ? 0 : 1;
- Error += glm::all(glm::equal(v1, v2)) ? 0 : 1;
- Error += glm::all(glm::equal(v1, v3)) ? 0 : 1;
-
- int i0(1);
- int i1(i0);
- int i2(i0);
- int i3 = ++i1;
- int i4 = i2++;
-
- Error += i0 == i4 ? 0 : 1;
- Error += i1 == i2 ? 0 : 1;
- Error += i1 == i3 ? 0 : 1;
-
- return Error;
-}
-
-static int test_vec4_simd()
-{
- int Error = 0;
-
- glm::vec4 const a(std::clock(), std::clock(), std::clock(), std::clock());
- glm::vec4 const b(std::clock(), std::clock(), std::clock(), std::clock());
-
- glm::vec4 const c(b * a);
- glm::vec4 const d(a + c);
-
- Error += glm::all(glm::greaterThanEqual(d, glm::vec4(0))) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_vec4_ctor();
- Error += test_bvec4_ctor();
- Error += test_vec4_size();
- Error += test_vec4_operators();
- Error += test_vec4_equal();
- Error += test_vec4_swizzle_partial();
- Error += test_vec4_simd();
- Error += test_operator_increment();
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_force_quat_xyzw.cpp b/3rdparty/glm/source/test/core/core_force_quat_xyzw.cpp
deleted file mode 100644
index 7d5281c..0000000
--- a/3rdparty/glm/source/test/core/core_force_quat_xyzw.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-#define GLM_FORCE_QUAT_DATA_XYZW
-#define GLM_FORCE_INLINE
-
-#include <glm/glm.hpp>
-#include <glm/ext.hpp>
-
-int main()
-{
- int Error = 0;
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_force_size_t_length.cpp b/3rdparty/glm/source/test/core/core_force_size_t_length.cpp
deleted file mode 100644
index 19dac89..0000000
--- a/3rdparty/glm/source/test/core/core_force_size_t_length.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-#define GLM_FORCE_SIZE_T_LENGTH
-
-#include <glm/glm.hpp>
-#include <glm/ext.hpp>
-
-int main()
-{
- int Error = 0;
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_force_unrestricted_gentype.cpp b/3rdparty/glm/source/test/core/core_force_unrestricted_gentype.cpp
deleted file mode 100644
index 21d6e52..0000000
--- a/3rdparty/glm/source/test/core/core_force_unrestricted_gentype.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-#define GLM_FORCE_UNRESTRICTED_GENTYPE
-
-#include <glm/glm.hpp>
-#include <glm/ext.hpp>
-
-int main()
-{
- int Error = 0;
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_force_xyzw_only.cpp b/3rdparty/glm/source/test/core/core_force_xyzw_only.cpp
deleted file mode 100644
index d19509d..0000000
--- a/3rdparty/glm/source/test/core/core_force_xyzw_only.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-#define GLM_FORCE_XYZW_ONLY
-
-#include <glm/gtc/constants.hpp>
-#include <glm/gtc/vec1.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/vec2.hpp>
-#include <glm/vec3.hpp>
-#include <glm/vec4.hpp>
-
-static int test_comp()
-{
- int Error = 0;
-
- {
- glm::ivec1 const A(1);
- Error += A.x == 1 ? 0 : 1;
- }
-
- {
- glm::ivec2 const A(1, 2);
- Error += A.x == 1 ? 0 : 1;
- Error += A.y == 2 ? 0 : 1;
- }
-
- {
- glm::ivec3 const A(1, 2, 3);
- Error += A.x == 1 ? 0 : 1;
- Error += A.y == 2 ? 0 : 1;
- Error += A.z == 3 ? 0 : 1;
- }
-
- {
- glm::ivec4 const A(1, 2, 3, 4);
- Error += A.x == 1 ? 0 : 1;
- Error += A.y == 2 ? 0 : 1;
- Error += A.z == 3 ? 0 : 1;
- Error += A.w == 4 ? 0 : 1;
- }
-
- return Error;
-}
-
-static int test_constexpr()
-{
- int Error = 0;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_comp();
- Error += test_constexpr();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/core/core_func_common.cpp b/3rdparty/glm/source/test/core/core_func_common.cpp
deleted file mode 100644
index b8640de..0000000
--- a/3rdparty/glm/source/test/core/core_func_common.cpp
+++ /dev/null
@@ -1,1349 +0,0 @@
-#define GLM_FORCE_EXPLICIT_CTOR
-#include <glm/gtc/constants.hpp>
-#include <glm/gtc/random.hpp>
-#include <glm/gtc/vec1.hpp>
-#include <glm/ext/scalar_relational.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/vector_float1.hpp>
-#include <glm/common.hpp>
-#include <glm/vec4.hpp>
-#include <glm/vec3.hpp>
-#include <glm/vec2.hpp>
-#include <vector>
-#include <cstdio>
-#include <cmath>
-#include <ctime>
-
-// This file has divisions by zero to test isnan
-#if GLM_COMPILER & GLM_COMPILER_VC
-# pragma warning(disable : 4723)
-#endif
-
-namespace floor_
-{
- static int test()
- {
- int Error = 0;
-
- {
- float A = 1.1f;
- float B = glm::floor(A);
- Error += glm::equal(B, 1.f, 0.0001f) ? 0 : 1;
- }
-
- {
- double A = 1.1;
- double B = glm::floor(A);
- Error += glm::equal(B, 1.0, 0.0001) ? 0 : 1;
- }
-
- {
- glm::vec1 A(1.1f);
- glm::vec1 B = glm::floor(A);
-
- Error += glm::all(glm::equal(B, glm::vec1(1.0), 0.0001f)) ? 0 : 1;
- }
-
- {
- glm::dvec1 A(1.1);
- glm::dvec1 B = glm::floor(A);
-
- Error += glm::all(glm::equal(B, glm::dvec1(1.0), 0.0001)) ? 0 : 1;
- }
-
- {
- glm::vec2 A(1.1f);
- glm::vec2 B = glm::floor(A);
-
- Error += glm::all(glm::equal(B, glm::vec2(1.0), 0.0001f)) ? 0 : 1;
- }
-
- {
- glm::dvec2 A(1.1);
- glm::dvec2 B = glm::floor(A);
-
- Error += glm::all(glm::equal(B, glm::dvec2(1.0), 0.0001)) ? 0 : 1;
- }
-
- {
- glm::vec3 A(1.1f);
- glm::vec3 B = glm::floor(A);
-
- Error += glm::all(glm::equal(B, glm::vec3(1.0), 0.0001f)) ? 0 : 1;
- }
-
- {
- glm::dvec3 A(1.1);
- glm::dvec3 B = glm::floor(A);
-
- Error += glm::all(glm::equal(B, glm::dvec3(1.0), 0.0001)) ? 0 : 1;
- }
-
- {
- glm::vec4 A(1.1f);
- glm::vec4 B = glm::floor(A);
-
- Error += glm::all(glm::equal(B, glm::vec4(1.0), 0.0001f)) ? 0 : 1;
- }
-
- {
- glm::dvec4 A(1.1);
- glm::dvec4 B = glm::floor(A);
-
- Error += glm::all(glm::equal(B, glm::dvec4(1.0), 0.0001)) ? 0 : 1;
- }
-
- return Error;
- }
-}//namespace floor
-
-namespace modf_
-{
- static int test()
- {
- int Error(0);
-
- {
- float X(1.5f);
- float I(0.0f);
- float A = glm::modf(X, I);
-
- Error += glm::equal(I, 1.0f, 0.0001f) ? 0 : 1;
- Error += glm::equal(A, 0.5f, 0.0001f) ? 0 : 1;
- }
-
- {
- glm::vec4 X(1.1f, 1.2f, 1.5f, 1.7f);
- glm::vec4 I(0.0f);
- glm::vec4 A = glm::modf(X, I);
-
- Error += glm::ivec4(I) == glm::ivec4(1) ? 0 : 1;
- Error += glm::all(glm::equal(A, glm::vec4(0.1f, 0.2f, 0.5f, 0.7f), 0.00001f)) ? 0 : 1;
- }
-
- {
- glm::dvec4 X(1.1, 1.2, 1.5, 1.7);
- glm::dvec4 I(0.0);
- glm::dvec4 A = glm::modf(X, I);
-
- Error += glm::ivec4(I) == glm::ivec4(1) ? 0 : 1;
- Error += glm::all(glm::equal(A, glm::dvec4(0.1, 0.2, 0.5, 0.7), 0.000000001)) ? 0 : 1;
- }
-
- {
- double X(1.5);
- double I(0.0);
- double A = glm::modf(X, I);
-
- Error += glm::equal(I, 1.0, 0.0001) ? 0 : 1;
- Error += glm::equal(A, 0.5, 0.0001) ? 0 : 1;
- }
-
- return Error;
- }
-}//namespace modf
-
-namespace mod_
-{
- static int test()
- {
- int Error(0);
-
- {
- float A(1.5f);
- float B(1.0f);
- float C = glm::mod(A, B);
-
- Error += glm::equal(C, 0.5f, 0.00001f) ? 0 : 1;
- }
-
- {
- float A(-0.2f);
- float B(1.0f);
- float C = glm::mod(A, B);
-
- Error += glm::equal(C, 0.8f, 0.00001f) ? 0 : 1;
- }
-
- {
- float A(3.0);
- float B(2.0f);
- float C = glm::mod(A, B);
-
- Error += glm::equal(C, 1.0f, 0.00001f) ? 0 : 1;
- }
-
- {
- glm::vec4 A(3.0);
- float B(2.0f);
- glm::vec4 C = glm::mod(A, B);
-
- Error += glm::all(glm::equal(C, glm::vec4(1.0f), 0.00001f)) ? 0 : 1;
- }
-
- {
- glm::vec4 A(3.0);
- glm::vec4 B(2.0f);
- glm::vec4 C = glm::mod(A, B);
-
- Error += glm::all(glm::equal(C, glm::vec4(1.0f), 0.00001f)) ? 0 : 1;
- }
-
- return Error;
- }
-}//namespace mod_
-
-namespace floatBitsToInt
-{
- static int test()
- {
- int Error = 0;
-
- {
- float A = 1.0f;
- int B = glm::floatBitsToInt(A);
- float C = glm::intBitsToFloat(B);
- Error += glm::equal(A, C, 0.0001f) ? 0 : 1;
- }
-
- {
- glm::vec2 A(1.0f, 2.0f);
- glm::ivec2 B = glm::floatBitsToInt(A);
- glm::vec2 C = glm::intBitsToFloat(B);
- Error += glm::all(glm::equal(A, C, 0.0001f)) ? 0 : 1;
- }
-
- {
- glm::vec3 A(1.0f, 2.0f, 3.0f);
- glm::ivec3 B = glm::floatBitsToInt(A);
- glm::vec3 C = glm::intBitsToFloat(B);
- Error += glm::all(glm::equal(A, C, 0.0001f)) ? 0 : 1;
- }
-
- {
- glm::vec4 A(1.0f, 2.0f, 3.0f, 4.0f);
- glm::ivec4 B = glm::floatBitsToInt(A);
- glm::vec4 C = glm::intBitsToFloat(B);
- Error += glm::all(glm::equal(A, C, 0.0001f)) ? 0 : 1;
- }
-
- return Error;
- }
-}//namespace floatBitsToInt
-
-namespace floatBitsToUint
-{
- static int test()
- {
- int Error = 0;
-
- {
- float A = 1.0f;
- glm::uint B = glm::floatBitsToUint(A);
- float C = glm::uintBitsToFloat(B);
- Error += glm::equal(A, C, 0.0001f) ? 0 : 1;
- }
-
- {
- glm::vec2 A(1.0f, 2.0f);
- glm::uvec2 B = glm::floatBitsToUint(A);
- glm::vec2 C = glm::uintBitsToFloat(B);
- Error += glm::all(glm::equal(A, C, 0.0001f)) ? 0 : 1;
- }
-
- {
- glm::vec3 A(1.0f, 2.0f, 3.0f);
- glm::uvec3 B = glm::floatBitsToUint(A);
- glm::vec3 C = glm::uintBitsToFloat(B);
- Error += glm::all(glm::equal(A, C, 0.0001f)) ? 0 : 1;
- }
-
- {
- glm::vec4 A(1.0f, 2.0f, 3.0f, 4.0f);
- glm::uvec4 B = glm::floatBitsToUint(A);
- glm::vec4 C = glm::uintBitsToFloat(B);
- Error += glm::all(glm::equal(A, C, 0.0001f)) ? 0 : 1;
- }
-
- return Error;
- }
-}//namespace floatBitsToUint
-
-namespace min_
-{
- static int test()
- {
- int Error = 0;
-
- glm::vec1 A0 = glm::min(glm::vec1(1), glm::vec1(1));
- bool A1 = glm::all(glm::equal(A0, glm::vec1(1), glm::epsilon<float>()));
- Error += A1 ? 0 : 1;
-
- glm::vec2 B0 = glm::min(glm::vec2(1), glm::vec2(1));
- glm::vec2 B1 = glm::min(glm::vec2(1), 1.0f);
- bool B2 = glm::all(glm::equal(B0, B1, glm::epsilon<float>()));
- Error += B2 ? 0 : 1;
-
- glm::vec3 C0 = glm::min(glm::vec3(1), glm::vec3(1));
- glm::vec3 C1 = glm::min(glm::vec3(1), 1.0f);
- bool C2 = glm::all(glm::equal(C0, C1, glm::epsilon<float>()));
- Error += C2 ? 0 : 1;
-
- glm::vec4 D0 = glm::min(glm::vec4(1), glm::vec4(1));
- glm::vec4 D1 = glm::min(glm::vec4(1), 1.0f);
- bool D2 = glm::all(glm::equal(D0, D1, glm::epsilon<float>()));
- Error += D2 ? 0 : 1;
-
- return Error;
- }
-
- int min_tern(int a, int b)
- {
- return a < b ? a : b;
- }
-
- int min_int(int x, int y)
- {
- return y ^ ((x ^ y) & -(x < y));
- }
-
- static int perf(std::size_t Count)
- {
- std::vector<int> A(Count);
- std::vector<int> B(Count);
-
- std::size_t const InternalCount = 200000;
-
- for(std::size_t i = 0; i < Count; ++i)
- {
- A[i] = glm::linearRand(-1000, 1000);
- B[i] = glm::linearRand(-1000, 1000);
- }
-
- int Error = 0;
-
- glm::int32 SumA = 0;
- {
- std::clock_t Timestamp0 = std::clock();
-
- for (std::size_t j = 0; j < InternalCount; ++j)
- for (std::size_t i = 0; i < Count; ++i)
- SumA += min_tern(A[i], B[i]);
-
- std::clock_t Timestamp1 = std::clock();
-
- std::printf("min_tern Time %d clocks\n", static_cast<int>(Timestamp1 - Timestamp0));
- }
-
- glm::int32 SumB = 0;
- {
- std::clock_t Timestamp0 = std::clock();
-
- for (std::size_t j = 0; j < InternalCount; ++j)
- for (std::size_t i = 0; i < Count; ++i)
- SumB += min_int(A[i], B[i]);
-
- std::clock_t Timestamp1 = std::clock();
-
- std::printf("min_int Time %d clocks\n", static_cast<int>(Timestamp1 - Timestamp0));
- }
-
- Error += SumA == SumB ? 0 : 1;
-
- return Error;
- }
-}//namespace min_
-
-namespace max_
-{
- static int test()
- {
- int Error = 0;
-
- glm::vec1 A0 = glm::max(glm::vec1(1), glm::vec1(1));
- bool A1 = glm::all(glm::equal(A0, glm::vec1(1), glm::epsilon<float>()));
- Error += A1 ? 0 : 1;
-
-
- glm::vec2 B0 = glm::max(glm::vec2(1), glm::vec2(1));
- glm::vec2 B1 = glm::max(glm::vec2(1), 1.0f);
- bool B2 = glm::all(glm::equal(B0, B1, glm::epsilon<float>()));
- Error += B2 ? 0 : 1;
-
- glm::vec3 C0 = glm::max(glm::vec3(1), glm::vec3(1));
- glm::vec3 C1 = glm::max(glm::vec3(1), 1.0f);
- bool C2 = glm::all(glm::equal(C0, C1, glm::epsilon<float>()));
- Error += C2 ? 0 : 1;
-
- glm::vec4 D0 = glm::max(glm::vec4(1), glm::vec4(1));
- glm::vec4 D1 = glm::max(glm::vec4(1), 1.0f);
- bool D2 = glm::all(glm::equal(D0, D1, glm::epsilon<float>()));
- Error += D2 ? 0 : 1;
-
- return Error;
- }
-}//namespace max_
-
-namespace clamp_
-{
- static int test()
- {
- int Error = 0;
-
- return Error;
- }
-}//namespace clamp_
-
-namespace mix_
-{
- template<typename T, typename B>
- struct entry
- {
- T x;
- T y;
- B a;
- T Result;
- };
-
- entry<float, bool> const TestBool[] =
- {
- {0.0f, 1.0f, false, 0.0f},
- {0.0f, 1.0f, true, 1.0f},
- {-1.0f, 1.0f, false, -1.0f},
- {-1.0f, 1.0f, true, 1.0f}
- };
-
- entry<float, float> const TestFloat[] =
- {
- {0.0f, 1.0f, 0.0f, 0.0f},
- {0.0f, 1.0f, 1.0f, 1.0f},
- {-1.0f, 1.0f, 0.0f, -1.0f},
- {-1.0f, 1.0f, 1.0f, 1.0f}
- };
-
- entry<glm::vec2, bool> const TestVec2Bool[] =
- {
- {glm::vec2(0.0f), glm::vec2(1.0f), false, glm::vec2(0.0f)},
- {glm::vec2(0.0f), glm::vec2(1.0f), true, glm::vec2(1.0f)},
- {glm::vec2(-1.0f), glm::vec2(1.0f), false, glm::vec2(-1.0f)},
- {glm::vec2(-1.0f), glm::vec2(1.0f), true, glm::vec2(1.0f)}
- };
-
- entry<glm::vec2, glm::bvec2> const TestBVec2[] =
- {
- {glm::vec2(0.0f), glm::vec2(1.0f), glm::bvec2(false), glm::vec2(0.0f)},
- {glm::vec2(0.0f), glm::vec2(1.0f), glm::bvec2(true), glm::vec2(1.0f)},
- {glm::vec2(-1.0f), glm::vec2(1.0f), glm::bvec2(false), glm::vec2(-1.0f)},
- {glm::vec2(-1.0f), glm::vec2(1.0f), glm::bvec2(true), glm::vec2(1.0f)},
- {glm::vec2(-1.0f), glm::vec2(1.0f), glm::bvec2(true, false), glm::vec2(1.0f, -1.0f)}
- };
-
- entry<glm::vec3, bool> const TestVec3Bool[] =
- {
- {glm::vec3(0.0f), glm::vec3(1.0f), false, glm::vec3(0.0f)},
- {glm::vec3(0.0f), glm::vec3(1.0f), true, glm::vec3(1.0f)},
- {glm::vec3(-1.0f), glm::vec3(1.0f), false, glm::vec3(-1.0f)},
- {glm::vec3(-1.0f), glm::vec3(1.0f), true, glm::vec3(1.0f)}
- };
-
- entry<glm::vec3, glm::bvec3> const TestBVec3[] =
- {
- {glm::vec3(0.0f), glm::vec3(1.0f), glm::bvec3(false), glm::vec3(0.0f)},
- {glm::vec3(0.0f), glm::vec3(1.0f), glm::bvec3(true), glm::vec3(1.0f)},
- {glm::vec3(-1.0f), glm::vec3(1.0f), glm::bvec3(false), glm::vec3(-1.0f)},
- {glm::vec3(-1.0f), glm::vec3(1.0f), glm::bvec3(true), glm::vec3(1.0f)},
- {glm::vec3(1.0f, 2.0f, 3.0f), glm::vec3(4.0f, 5.0f, 6.0f), glm::bvec3(true, false, true), glm::vec3(4.0f, 2.0f, 6.0f)}
- };
-
- entry<glm::vec4, bool> const TestVec4Bool[] =
- {
- {glm::vec4(0.0f), glm::vec4(1.0f), false, glm::vec4(0.0f)},
- {glm::vec4(0.0f), glm::vec4(1.0f), true, glm::vec4(1.0f)},
- {glm::vec4(-1.0f), glm::vec4(1.0f), false, glm::vec4(-1.0f)},
- {glm::vec4(-1.0f), glm::vec4(1.0f), true, glm::vec4(1.0f)}
- };
-
- entry<glm::vec4, glm::bvec4> const TestBVec4[] =
- {
- {glm::vec4(0.0f, 0.0f, 1.0f, 1.0f), glm::vec4(2.0f, 2.0f, 3.0f, 3.0f), glm::bvec4(false, true, false, true), glm::vec4(0.0f, 2.0f, 1.0f, 3.0f)},
- {glm::vec4(0.0f), glm::vec4(1.0f), glm::bvec4(true), glm::vec4(1.0f)},
- {glm::vec4(-1.0f), glm::vec4(1.0f), glm::bvec4(false), glm::vec4(-1.0f)},
- {glm::vec4(-1.0f), glm::vec4(1.0f), glm::bvec4(true), glm::vec4(1.0f)},
- {glm::vec4(1.0f, 2.0f, 3.0f, 4.0f), glm::vec4(5.0f, 6.0f, 7.0f, 8.0f), glm::bvec4(true, false, true, false), glm::vec4(5.0f, 2.0f, 7.0f, 4.0f)}
- };
-
- static int test()
- {
- int Error = 0;
-
- // Float with bool
- {
- for(std::size_t i = 0; i < sizeof(TestBool) / sizeof(entry<float, bool>); ++i)
- {
- float Result = glm::mix(TestBool[i].x, TestBool[i].y, TestBool[i].a);
- Error += glm::equal(Result, TestBool[i].Result, glm::epsilon<float>()) ? 0 : 1;
- }
- }
-
- // Float with float
- {
- for(std::size_t i = 0; i < sizeof(TestFloat) / sizeof(entry<float, float>); ++i)
- {
- float Result = glm::mix(TestFloat[i].x, TestFloat[i].y, TestFloat[i].a);
- Error += glm::equal(Result, TestFloat[i].Result, glm::epsilon<float>()) ? 0 : 1;
- }
- }
-
- // vec2 with bool
- {
- for(std::size_t i = 0; i < sizeof(TestVec2Bool) / sizeof(entry<glm::vec2, bool>); ++i)
- {
- glm::vec2 Result = glm::mix(TestVec2Bool[i].x, TestVec2Bool[i].y, TestVec2Bool[i].a);
- Error += glm::equal(Result.x, TestVec2Bool[i].Result.x, glm::epsilon<float>()) ? 0 : 1;
- Error += glm::equal(Result.y, TestVec2Bool[i].Result.y, glm::epsilon<float>()) ? 0 : 1;
- }
- }
-
- // vec2 with bvec2
- {
- for(std::size_t i = 0; i < sizeof(TestBVec2) / sizeof(entry<glm::vec2, glm::bvec2>); ++i)
- {
- glm::vec2 Result = glm::mix(TestBVec2[i].x, TestBVec2[i].y, TestBVec2[i].a);
- Error += glm::equal(Result.x, TestBVec2[i].Result.x, glm::epsilon<float>()) ? 0 : 1;
- Error += glm::equal(Result.y, TestBVec2[i].Result.y, glm::epsilon<float>()) ? 0 : 1;
- }
- }
-
- // vec3 with bool
- {
- for(std::size_t i = 0; i < sizeof(TestVec3Bool) / sizeof(entry<glm::vec3, bool>); ++i)
- {
- glm::vec3 Result = glm::mix(TestVec3Bool[i].x, TestVec3Bool[i].y, TestVec3Bool[i].a);
- Error += glm::equal(Result.x, TestVec3Bool[i].Result.x, glm::epsilon<float>()) ? 0 : 1;
- Error += glm::equal(Result.y, TestVec3Bool[i].Result.y, glm::epsilon<float>()) ? 0 : 1;
- Error += glm::equal(Result.z, TestVec3Bool[i].Result.z, glm::epsilon<float>()) ? 0 : 1;
- }
- }
-
- // vec3 with bvec3
- {
- for(std::size_t i = 0; i < sizeof(TestBVec3) / sizeof(entry<glm::vec3, glm::bvec3>); ++i)
- {
- glm::vec3 Result = glm::mix(TestBVec3[i].x, TestBVec3[i].y, TestBVec3[i].a);
- Error += glm::equal(Result.x, TestBVec3[i].Result.x, glm::epsilon<float>()) ? 0 : 1;
- Error += glm::equal(Result.y, TestBVec3[i].Result.y, glm::epsilon<float>()) ? 0 : 1;
- Error += glm::equal(Result.z, TestBVec3[i].Result.z, glm::epsilon<float>()) ? 0 : 1;
- }
- }
-
- // vec4 with bool
- {
- for(std::size_t i = 0; i < sizeof(TestVec4Bool) / sizeof(entry<glm::vec4, bool>); ++i)
- {
- glm::vec4 Result = glm::mix(TestVec4Bool[i].x, TestVec4Bool[i].y, TestVec4Bool[i].a);
- Error += glm::equal(Result.x, TestVec4Bool[i].Result.x, glm::epsilon<float>()) ? 0 : 1;
- Error += glm::equal(Result.y, TestVec4Bool[i].Result.y, glm::epsilon<float>()) ? 0 : 1;
- Error += glm::equal(Result.z, TestVec4Bool[i].Result.z, glm::epsilon<float>()) ? 0 : 1;
- Error += glm::equal(Result.w, TestVec4Bool[i].Result.w, glm::epsilon<float>()) ? 0 : 1;
- }
- }
-
- // vec4 with bvec4
- {
- for(std::size_t i = 0; i < sizeof(TestBVec4) / sizeof(entry<glm::vec4, glm::bvec4>); ++i)
- {
- glm::vec4 Result = glm::mix(TestBVec4[i].x, TestBVec4[i].y, TestBVec4[i].a);
- Error += glm::equal(Result.x, TestBVec4[i].Result.x, glm::epsilon<float>()) ? 0 : 1;
- Error += glm::equal(Result.y, TestBVec4[i].Result.y, glm::epsilon<float>()) ? 0 : 1;
- Error += glm::equal(Result.z, TestBVec4[i].Result.z, glm::epsilon<float>()) ? 0 : 1;
- Error += glm::equal(Result.w, TestBVec4[i].Result.w, glm::epsilon<float>()) ? 0 : 1;
- }
- }
-
- return Error;
- }
-}//namespace mix_
-
-namespace step_
-{
- template<typename EDGE, typename VEC>
- struct entry
- {
- EDGE edge;
- VEC x;
- VEC result;
- };
-
- entry<float, glm::vec4> TestVec4Scalar [] =
- {
- { 1.0f, glm::vec4(1.0f, 2.0f, 3.0f, 4.0f), glm::vec4(1.0f) },
- { 0.0f, glm::vec4(1.0f, 2.0f, 3.0f, 4.0f), glm::vec4(1.0f) },
- { 0.0f, glm::vec4(-1.0f, -2.0f, -3.0f, -4.0f), glm::vec4(0.0f) }
- };
-
- entry<glm::vec4, glm::vec4> TestVec4Vector [] =
- {
- { glm::vec4(-1.0f, -2.0f, -3.0f, -4.0f), glm::vec4(-2.0f, -3.0f, -4.0f, -5.0f), glm::vec4(0.0f) },
- { glm::vec4( 0.0f, 1.0f, 2.0f, 3.0f), glm::vec4( 1.0f, 2.0f, 3.0f, 4.0f), glm::vec4(1.0f) },
- { glm::vec4( 2.0f, 3.0f, 4.0f, 5.0f), glm::vec4( 1.0f, 2.0f, 3.0f, 4.0f), glm::vec4(0.0f) },
- { glm::vec4( 0.0f, 1.0f, 2.0f, 3.0f), glm::vec4(-1.0f,-2.0f,-3.0f,-4.0f), glm::vec4(0.0f) }
- };
-
- static int test()
- {
- int Error = 0;
-
- // scalar
- {
- float const Edge = 2.0f;
-
- float const A = glm::step(Edge, 1.0f);
- Error += glm::equal(A, 0.0f, glm::epsilon<float>()) ? 0 : 1;
-
- float const B = glm::step(Edge, 3.0f);
- Error += glm::equal(B, 1.0f, glm::epsilon<float>()) ? 0 : 1;
-
- float const C = glm::step(Edge, 2.0f);
- Error += glm::equal(C, 1.0f, glm::epsilon<float>()) ? 0 : 1;
- }
-
- // vec4 and float
- {
- for (std::size_t i = 0; i < sizeof(TestVec4Scalar) / sizeof(entry<float, glm::vec4>); ++i)
- {
- glm::vec4 Result = glm::step(TestVec4Scalar[i].edge, TestVec4Scalar[i].x);
- Error += glm::all(glm::equal(Result, TestVec4Scalar[i].result, glm::epsilon<float>())) ? 0 : 1;
- }
- }
-
- // vec4 and vec4
- {
- for (std::size_t i = 0; i < sizeof(TestVec4Vector) / sizeof(entry<glm::vec4, glm::vec4>); ++i)
- {
- glm::vec4 Result = glm::step(TestVec4Vector[i].edge, TestVec4Vector[i].x);
- Error += glm::all(glm::equal(Result, TestVec4Vector[i].result, glm::epsilon<float>())) ? 0 : 1;
- }
- }
-
- return Error;
- }
-}//namespace step_
-
-namespace round_
-{
- static int test()
- {
- int Error = 0;
-
- {
- float A = glm::round(0.0f);
- Error += glm::equal(A, 0.0f, glm::epsilon<float>()) ? 0 : 1;
- float B = glm::round(0.5f);
- Error += glm::equal(B, 1.0f, glm::epsilon<float>()) ? 0 : 1;
- float C = glm::round(1.0f);
- Error += glm::equal(C, 1.0f, glm::epsilon<float>()) ? 0 : 1;
- float D = glm::round(0.1f);
- Error += glm::equal(D, 0.0f, glm::epsilon<float>()) ? 0 : 1;
- float E = glm::round(0.9f);
- Error += glm::equal(E, 1.0f, glm::epsilon<float>()) ? 0 : 1;
- float F = glm::round(1.5f);
- Error += glm::equal(F, 2.0f, glm::epsilon<float>()) ? 0 : 1;
- float G = glm::round(1.9f);
- Error += glm::equal(G, 2.0f, glm::epsilon<float>()) ? 0 : 1;
- }
-
- {
- float A = glm::round(-0.0f);
- Error += glm::equal(A, 0.0f, glm::epsilon<float>()) ? 0 : 1;
- float B = glm::round(-0.5f);
- Error += glm::equal(B, -1.0f, glm::epsilon<float>()) ? 0 : 1;
- float C = glm::round(-1.0f);
- Error += glm::equal(C, -1.0f, glm::epsilon<float>()) ? 0 : 1;
- float D = glm::round(-0.1f);
- Error += glm::equal(D, 0.0f, glm::epsilon<float>()) ? 0 : 1;
- float E = glm::round(-0.9f);
- Error += glm::equal(E, -1.0f, glm::epsilon<float>()) ? 0 : 1;
- float F = glm::round(-1.5f);
- Error += glm::equal(F, -2.0f, glm::epsilon<float>()) ? 0 : 1;
- float G = glm::round(-1.9f);
- Error += glm::equal(G, -2.0f, glm::epsilon<float>()) ? 0 : 1;
- }
-
- return Error;
- }
-}//namespace round_
-
-namespace roundEven
-{
- static int test()
- {
- int Error = 0;
-
- {
- float A1 = glm::roundEven(-1.5f);
- Error += glm::equal(A1, -2.0f, 0.0001f) ? 0 : 1;
-
- float A2 = glm::roundEven(1.5f);
- Error += glm::equal(A2, 2.0f, 0.0001f) ? 0 : 1;
-
- float A5 = glm::roundEven(-2.5f);
- Error += glm::equal(A5, -2.0f, 0.0001f) ? 0 : 1;
-
- float A6 = glm::roundEven(2.5f);
- Error += glm::equal(A6, 2.0f, 0.0001f) ? 0 : 1;
-
- float A3 = glm::roundEven(-3.5f);
- Error += glm::equal(A3, -4.0f, 0.0001f) ? 0 : 1;
-
- float A4 = glm::roundEven(3.5f);
- Error += glm::equal(A4, 4.0f, 0.0001f) ? 0 : 1;
-
- float C7 = glm::roundEven(-4.5f);
- Error += glm::equal(C7, -4.0f, 0.0001f) ? 0 : 1;
-
- float C8 = glm::roundEven(4.5f);
- Error += glm::equal(C8, 4.0f, 0.0001f) ? 0 : 1;
-
- float C1 = glm::roundEven(-5.5f);
- Error += glm::equal(C1, -6.0f, 0.0001f) ? 0 : 1;
-
- float C2 = glm::roundEven(5.5f);
- Error += glm::equal(C2, 6.0f, 0.0001f) ? 0 : 1;
-
- float C3 = glm::roundEven(-6.5f);
- Error += glm::equal(C3, -6.0f, 0.0001f) ? 0 : 1;
-
- float C4 = glm::roundEven(6.5f);
- Error += glm::equal(C4, 6.0f, 0.0001f) ? 0 : 1;
-
- float C5 = glm::roundEven(-7.5f);
- Error += glm::equal(C5, -8.0f, 0.0001f) ? 0 : 1;
-
- float C6 = glm::roundEven(7.5f);
- Error += glm::equal(C6, 8.0f, 0.0001f) ? 0 : 1;
-
- Error += 0;
- }
-
- {
- float A7 = glm::roundEven(-2.4f);
- Error += glm::equal(A7, -2.0f, 0.0001f) ? 0 : 1;
-
- float A8 = glm::roundEven(2.4f);
- Error += glm::equal(A8, 2.0f, 0.0001f) ? 0 : 1;
-
- float B1 = glm::roundEven(-2.6f);
- Error += glm::equal(B1, -3.0f, 0.0001f) ? 0 : 1;
-
- float B2 = glm::roundEven(2.6f);
- Error += glm::equal(B2, 3.0f, 0.0001f) ? 0 : 1;
-
- float B3 = glm::roundEven(-2.0f);
- Error += glm::equal(B3, -2.0f, 0.0001f) ? 0 : 1;
-
- float B4 = glm::roundEven(2.0f);
- Error += glm::equal(B4, 2.0f, 0.0001f) ? 0 : 1;
-
- Error += 0;
- }
-
- {
- float A = glm::roundEven(0.0f);
- Error += glm::equal(A, 0.0f, glm::epsilon<float>()) ? 0 : 1;
- float B = glm::roundEven(0.5f);
- Error += glm::equal(B, 0.0f, glm::epsilon<float>()) ? 0 : 1;
- float C = glm::roundEven(1.0f);
- Error += glm::equal(C, 1.0f, glm::epsilon<float>()) ? 0 : 1;
- float D = glm::roundEven(0.1f);
- Error += glm::equal(D, 0.0f, glm::epsilon<float>()) ? 0 : 1;
- float E = glm::roundEven(0.9f);
- Error += glm::equal(E, 1.0f, glm::epsilon<float>()) ? 0 : 1;
- float F = glm::roundEven(1.5f);
- Error += glm::equal(F, 2.0f, glm::epsilon<float>()) ? 0 : 1;
- float G = glm::roundEven(1.9f);
- Error += glm::equal(G, 2.0f, glm::epsilon<float>()) ? 0 : 1;
- }
-
- {
- float A = glm::roundEven(-0.0f);
- Error += glm::equal(A, 0.0f, glm::epsilon<float>()) ? 0 : 1;
- float B = glm::roundEven(-0.5f);
- Error += glm::equal(B, -0.0f, glm::epsilon<float>()) ? 0 : 1;
- float C = glm::roundEven(-1.0f);
- Error += glm::equal(C, -1.0f, glm::epsilon<float>()) ? 0 : 1;
- float D = glm::roundEven(-0.1f);
- Error += glm::equal(D, 0.0f, glm::epsilon<float>()) ? 0 : 1;
- float E = glm::roundEven(-0.9f);
- Error += glm::equal(E, -1.0f, glm::epsilon<float>()) ? 0 : 1;
- float F = glm::roundEven(-1.5f);
- Error += glm::equal(F, -2.0f, glm::epsilon<float>()) ? 0 : 1;
- float G = glm::roundEven(-1.9f);
- Error += glm::equal(G, -2.0f, glm::epsilon<float>()) ? 0 : 1;
- }
-
- {
- float A = glm::roundEven(1.5f);
- Error += glm::equal(A, 2.0f, glm::epsilon<float>()) ? 0 : 1;
- float B = glm::roundEven(2.5f);
- Error += glm::equal(B, 2.0f, glm::epsilon<float>()) ? 0 : 1;
- float C = glm::roundEven(3.5f);
- Error += glm::equal(C, 4.0f, glm::epsilon<float>()) ? 0 : 1;
- float D = glm::roundEven(4.5f);
- Error += glm::equal(D, 4.0f, glm::epsilon<float>()) ? 0 : 1;
- float E = glm::roundEven(5.5f);
- Error += glm::equal(E, 6.0f, glm::epsilon<float>()) ? 0 : 1;
- float F = glm::roundEven(6.5f);
- Error += glm::equal(F, 6.0f, glm::epsilon<float>()) ? 0 : 1;
- float G = glm::roundEven(7.5f);
- Error += glm::equal(G, 8.0f, glm::epsilon<float>()) ? 0 : 1;
- }
-
- {
- float A = glm::roundEven(-1.5f);
- Error += glm::equal(A, -2.0f, glm::epsilon<float>()) ? 0 : 1;
- float B = glm::roundEven(-2.5f);
- Error += glm::equal(B, -2.0f, glm::epsilon<float>()) ? 0 : 1;
- float C = glm::roundEven(-3.5f);
- Error += glm::equal(C, -4.0f, glm::epsilon<float>()) ? 0 : 1;
- float D = glm::roundEven(-4.5f);
- Error += glm::equal(D, -4.0f, glm::epsilon<float>()) ? 0 : 1;
- float E = glm::roundEven(-5.5f);
- Error += glm::equal(E, -6.0f, glm::epsilon<float>()) ? 0 : 1;
- float F = glm::roundEven(-6.5f);
- Error += glm::equal(F, -6.0f, glm::epsilon<float>()) ? 0 : 1;
- float G = glm::roundEven(-7.5f);
- Error += glm::equal(G, -8.0f, glm::epsilon<float>()) ? 0 : 1;
- }
-
- return Error;
- }
-}//namespace roundEven
-
-namespace isnan_
-{
- static int test()
- {
- int Error = 0;
-
- float Zero_f = 0.0;
- double Zero_d = 0.0;
-
- {
- Error += true == glm::isnan(0.0/Zero_d) ? 0 : 1;
- Error += true == glm::any(glm::isnan(glm::dvec2(0.0 / Zero_d))) ? 0 : 1;
- Error += true == glm::any(glm::isnan(glm::dvec3(0.0 / Zero_d))) ? 0 : 1;
- Error += true == glm::any(glm::isnan(glm::dvec4(0.0 / Zero_d))) ? 0 : 1;
- }
-
- {
- Error += true == glm::isnan(0.0f/Zero_f) ? 0 : 1;
- Error += true == glm::any(glm::isnan(glm::vec2(0.0f/Zero_f))) ? 0 : 1;
- Error += true == glm::any(glm::isnan(glm::vec3(0.0f/Zero_f))) ? 0 : 1;
- Error += true == glm::any(glm::isnan(glm::vec4(0.0f/Zero_f))) ? 0 : 1;
- }
-
- return Error;
- }
-}//namespace isnan_
-
-namespace isinf_
-{
- static int test()
- {
- int Error = 0;
-
- float Zero_f = 0.0;
- double Zero_d = 0.0;
-
- {
- Error += true == glm::isinf( 1.0/Zero_d) ? 0 : 1;
- Error += true == glm::isinf(-1.0/Zero_d) ? 0 : 1;
- Error += true == glm::any(glm::isinf(glm::dvec2( 1.0/Zero_d))) ? 0 : 1;
- Error += true == glm::any(glm::isinf(glm::dvec2(-1.0/Zero_d))) ? 0 : 1;
- Error += true == glm::any(glm::isinf(glm::dvec3( 1.0/Zero_d))) ? 0 : 1;
- Error += true == glm::any(glm::isinf(glm::dvec3(-1.0/Zero_d))) ? 0 : 1;
- Error += true == glm::any(glm::isinf(glm::dvec4( 1.0/Zero_d))) ? 0 : 1;
- Error += true == glm::any(glm::isinf(glm::dvec4(-1.0/Zero_d))) ? 0 : 1;
- }
-
- {
- Error += true == glm::isinf( 1.0f/Zero_f) ? 0 : 1;
- Error += true == glm::isinf(-1.0f/Zero_f) ? 0 : 1;
- Error += true == glm::any(glm::isinf(glm::vec2( 1.0f/Zero_f))) ? 0 : 1;
- Error += true == glm::any(glm::isinf(glm::vec2(-1.0f/Zero_f))) ? 0 : 1;
- Error += true == glm::any(glm::isinf(glm::vec3( 1.0f/Zero_f))) ? 0 : 1;
- Error += true == glm::any(glm::isinf(glm::vec3(-1.0f/Zero_f))) ? 0 : 1;
- Error += true == glm::any(glm::isinf(glm::vec4( 1.0f/Zero_f))) ? 0 : 1;
- Error += true == glm::any(glm::isinf(glm::vec4(-1.0f/Zero_f))) ? 0 : 1;
- }
-
- return Error;
- }
-}//namespace isinf_
-
-namespace sign
-{
- template<typename genFIType>
- GLM_FUNC_QUALIFIER genFIType sign_if(genFIType x)
- {
- GLM_STATIC_ASSERT(
- std::numeric_limits<genFIType>::is_iec559 ||
- (std::numeric_limits<genFIType>::is_signed && std::numeric_limits<genFIType>::is_integer), "'sign' only accept signed inputs");
-
- genFIType result;
- if(x > genFIType(0))
- result = genFIType(1);
- else if(x < genFIType(0))
- result = genFIType(-1);
- else
- result = genFIType(0);
- return result;
- }
-
- template<typename genFIType>
- GLM_FUNC_QUALIFIER genFIType sign_alu1(genFIType x)
- {
- GLM_STATIC_ASSERT(
- std::numeric_limits<genFIType>::is_signed && std::numeric_limits<genFIType>::is_integer,
- "'sign' only accept integer inputs");
-
- return (x >> 31) | (static_cast<unsigned>(-x) >> 31);
- }
-
- GLM_FUNC_QUALIFIER int sign_alu2(int x)
- {
- GLM_STATIC_ASSERT(std::numeric_limits<int>::is_signed && std::numeric_limits<int>::is_integer, "'sign' only accept integer inputs");
-
-# if GLM_COMPILER & GLM_COMPILER_VC
-# pragma warning(push)
-# pragma warning(disable : 4146) //cast truncates constant value
-# endif
-
- return -(static_cast<unsigned>(x) >> 31) | (-static_cast<unsigned>(x) >> 31);
-
-# if GLM_COMPILER & GLM_COMPILER_VC
-# pragma warning(pop)
-# endif
- }
-
- template<typename genFIType>
- GLM_FUNC_QUALIFIER genFIType sign_sub(genFIType x)
- {
- GLM_STATIC_ASSERT(
- std::numeric_limits<genFIType>::is_signed && std::numeric_limits<genFIType>::is_integer,
- "'sign' only accept integer inputs");
-
- return (static_cast<unsigned>(-x) >> 31) - (static_cast<unsigned>(x) >> 31);
- }
-
- template<typename genFIType>
- GLM_FUNC_QUALIFIER genFIType sign_cmp(genFIType x)
- {
- GLM_STATIC_ASSERT(
- std::numeric_limits<genFIType>::is_signed && std::numeric_limits<genFIType>::is_integer,
- "'sign' only accept integer inputs");
-
- return (x > 0) - (x < 0);
- }
-
- template<typename genType>
- struct type
- {
- genType Value;
- genType Return;
- };
-
- int test_int32()
- {
- type<glm::int32> const Data[] =
- {
- { std::numeric_limits<glm::int32>::max(), 1},
- { std::numeric_limits<glm::int32>::min(), -1},
- { 0, 0},
- { 1, 1},
- { 2, 1},
- { 3, 1},
- {-1,-1},
- {-2,-1},
- {-3,-1}
- };
-
- int Error = 0;
-
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<glm::int32>); ++i)
- {
- glm::int32 Result = glm::sign(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<glm::int32>); ++i)
- {
- glm::int32 Result = sign_cmp(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<glm::int32>); ++i)
- {
- glm::int32 Result = sign_if(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<glm::int32>); ++i)
- {
- glm::int32 Result = sign_alu1(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<glm::int32>); ++i)
- {
- glm::int32 Result = sign_alu2(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- return Error;
- }
-
- int test_i32vec4()
- {
- type<glm::ivec4> const Data[] =
- {
- {glm::ivec4( 1), glm::ivec4( 1)},
- {glm::ivec4( 0), glm::ivec4( 0)},
- {glm::ivec4( 2), glm::ivec4( 1)},
- {glm::ivec4( 3), glm::ivec4( 1)},
- {glm::ivec4(-1), glm::ivec4(-1)},
- {glm::ivec4(-2), glm::ivec4(-1)},
- {glm::ivec4(-3), glm::ivec4(-1)}
- };
-
- int Error = 0;
-
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<glm::ivec4>); ++i)
- {
- glm::ivec4 Result = glm::sign(Data[i].Value);
- Error += glm::all(glm::equal(Data[i].Return, Result)) ? 0 : 1;
- }
-
- return Error;
- }
-
- int test_f32vec4()
- {
- type<glm::vec4> const Data[] =
- {
- {glm::vec4( 1), glm::vec4( 1)},
- {glm::vec4( 0), glm::vec4( 0)},
- {glm::vec4( 2), glm::vec4( 1)},
- {glm::vec4( 3), glm::vec4( 1)},
- {glm::vec4(-1), glm::vec4(-1)},
- {glm::vec4(-2), glm::vec4(-1)},
- {glm::vec4(-3), glm::vec4(-1)}
- };
-
- int Error = 0;
-
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<glm::vec4>); ++i)
- {
- glm::vec4 Result = glm::sign(Data[i].Value);
- Error += glm::all(glm::equal(Data[i].Return, Result, glm::epsilon<float>())) ? 0 : 1;
- }
-
- return Error;
- }
-
- static int test()
- {
- int Error = 0;
-
- Error += test_int32();
- Error += test_i32vec4();
- Error += test_f32vec4();
-
- return Error;
- }
-
- int perf_rand(std::size_t Samples)
- {
- int Error = 0;
-
- std::size_t const Count = Samples;
- std::vector<glm::int32> Input, Output;
- Input.resize(Count);
- Output.resize(Count);
- for(std::size_t i = 0; i < Count; ++i)
- Input[i] = static_cast<glm::int32>(glm::linearRand(-65536.f, 65536.f));
-
- std::clock_t Timestamp0 = std::clock();
-
- for(std::size_t i = 0; i < Count; ++i)
- Output[i] = sign_cmp(Input[i]);
-
- std::clock_t Timestamp1 = std::clock();
-
- for(std::size_t i = 0; i < Count; ++i)
- Output[i] = sign_if(Input[i]);
-
- std::clock_t Timestamp2 = std::clock();
-
- for(std::size_t i = 0; i < Count; ++i)
- Output[i] = sign_alu1(Input[i]);
-
- std::clock_t Timestamp3 = std::clock();
-
- for(std::size_t i = 0; i < Count; ++i)
- Output[i] = sign_alu2(Input[i]);
-
- std::clock_t Timestamp4 = std::clock();
-
- for(std::size_t i = 0; i < Count; ++i)
- Output[i] = sign_sub(Input[i]);
-
- std::clock_t Timestamp5 = std::clock();
-
- for(std::size_t i = 0; i < Count; ++i)
- Output[i] = glm::sign(Input[i]);
-
- std::clock_t Timestamp6 = std::clock();
-
- std::printf("sign_cmp(rand) Time %d clocks\n", static_cast<int>(Timestamp1 - Timestamp0));
- std::printf("sign_if(rand) Time %d clocks\n", static_cast<int>(Timestamp2 - Timestamp1));
- std::printf("sign_alu1(rand) Time %d clocks\n", static_cast<int>(Timestamp3 - Timestamp2));
- std::printf("sign_alu2(rand) Time %d clocks\n", static_cast<int>(Timestamp4 - Timestamp3));
- std::printf("sign_sub(rand) Time %d clocks\n", static_cast<int>(Timestamp5 - Timestamp4));
- std::printf("glm::sign(rand) Time %d clocks\n", static_cast<int>(Timestamp6 - Timestamp5));
-
- return Error;
- }
-
- int perf_linear(std::size_t Samples)
- {
- int Error = 0;
-
- std::size_t const Count = Samples;
- std::vector<glm::int32> Input, Output;
- Input.resize(Count);
- Output.resize(Count);
- for(std::size_t i = 0; i < Count; ++i)
- Input[i] = static_cast<glm::int32>(i);
-
- std::clock_t Timestamp0 = std::clock();
-
- for(std::size_t i = 0; i < Count; ++i)
- Output[i] = sign_cmp(Input[i]);
-
- std::clock_t Timestamp1 = std::clock();
-
- for(std::size_t i = 0; i < Count; ++i)
- Output[i] = sign_if(Input[i]);
-
- std::clock_t Timestamp2 = std::clock();
-
- for(std::size_t i = 0; i < Count; ++i)
- Output[i] = sign_alu1(Input[i]);
-
- std::clock_t Timestamp3 = std::clock();
-
- for(std::size_t i = 0; i < Count; ++i)
- Output[i] = sign_alu2(Input[i]);
-
- std::clock_t Timestamp4 = std::clock();
-
- for(std::size_t i = 0; i < Count; ++i)
- Output[i] = sign_sub(Input[i]);
-
- std::clock_t Timestamp5 = std::clock();
-
- std::printf("sign_cmp(linear) Time %d clocks\n", static_cast<int>(Timestamp1 - Timestamp0));
- std::printf("sign_if(linear) Time %d clocks\n", static_cast<int>(Timestamp2 - Timestamp1));
- std::printf("sign_alu1(linear) Time %d clocks\n", static_cast<int>(Timestamp3 - Timestamp2));
- std::printf("sign_alu2(linear) Time %d clocks\n", static_cast<int>(Timestamp4 - Timestamp3));
- std::printf("sign_sub(linear) Time %d clocks\n", static_cast<int>(Timestamp5 - Timestamp4));
-
- return Error;
- }
-
- int perf_linear_cal(std::size_t Samples)
- {
- int Error = 0;
-
- glm::int32 const Count = static_cast<glm::int32>(Samples);
-
- std::clock_t Timestamp0 = std::clock();
- glm::int32 Sum = 0;
-
- for(glm::int32 i = 1; i < Count; ++i)
- Sum += sign_cmp(i);
-
- std::clock_t Timestamp1 = std::clock();
-
- for(glm::int32 i = 1; i < Count; ++i)
- Sum += sign_if(i);
-
- std::clock_t Timestamp2 = std::clock();
-
- for(glm::int32 i = 1; i < Count; ++i)
- Sum += sign_alu1(i);
-
- std::clock_t Timestamp3 = std::clock();
-
- for(glm::int32 i = 1; i < Count; ++i)
- Sum += sign_alu2(i);
-
- std::clock_t Timestamp4 = std::clock();
-
- for(glm::int32 i = 1; i < Count; ++i)
- Sum += sign_sub(i);
-
- std::clock_t Timestamp5 = std::clock();
-
- std::printf("Sum %d\n", static_cast<int>(Sum));
-
- std::printf("sign_cmp(linear_cal) Time %d clocks\n", static_cast<int>(Timestamp1 - Timestamp0));
- std::printf("sign_if(linear_cal) Time %d clocks\n", static_cast<int>(Timestamp2 - Timestamp1));
- std::printf("sign_alu1(linear_cal) Time %d clocks\n", static_cast<int>(Timestamp3 - Timestamp2));
- std::printf("sign_alu2(linear_cal) Time %d clocks\n", static_cast<int>(Timestamp4 - Timestamp3));
- std::printf("sign_sub(linear_cal) Time %d clocks\n", static_cast<int>(Timestamp5 - Timestamp4));
-
- return Error;
- }
-
- static int perf(std::size_t Samples)
- {
- int Error(0);
-
- Error += perf_linear_cal(Samples);
- Error += perf_linear(Samples);
- Error += perf_rand(Samples);
-
- return Error;
- }
-}//namespace sign
-
-namespace frexp_
-{
- static int test()
- {
- int Error = 0;
-
- {
- glm::vec1 const x(1024);
- glm::ivec1 exp;
- glm::vec1 A = glm::frexp(x, exp);
- Error += glm::all(glm::equal(A, glm::vec1(0.5), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(exp, glm::ivec1(11))) ? 0 : 1;
- }
-
- {
- glm::vec2 const x(1024, 0.24);
- glm::ivec2 exp;
- glm::vec2 A = glm::frexp(x, exp);
- Error += glm::all(glm::equal(A, glm::vec2(0.5, 0.96), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(exp, glm::ivec2(11, -2))) ? 0 : 1;
- }
-
- {
- glm::vec3 const x(1024, 0.24, 0);
- glm::ivec3 exp;
- glm::vec3 A = glm::frexp(x, exp);
- Error += glm::all(glm::equal(A, glm::vec3(0.5, 0.96, 0.0), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(exp, glm::ivec3(11, -2, 0))) ? 0 : 1;
- }
-
- {
- glm::vec4 const x(1024, 0.24, 0, -1.33);
- glm::ivec4 exp;
- glm::vec4 A = glm::frexp(x, exp);
- Error += glm::all(glm::equal(A, glm::vec4(0.5, 0.96, 0.0, -0.665), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(exp, glm::ivec4(11, -2, 0, 1))) ? 0 : 1;
- }
-
- return Error;
- }
-}//namespace frexp_
-
-namespace ldexp_
-{
- static int test()
- {
- int Error(0);
-
- {
- glm::vec1 A = glm::vec1(0.5);
- glm::ivec1 exp = glm::ivec1(11);
- glm::vec1 x = glm::ldexp(A, exp);
- Error += glm::all(glm::equal(x, glm::vec1(1024),0.00001f)) ? 0 : 1;
- }
-
- {
- glm::vec2 A = glm::vec2(0.5, 0.96);
- glm::ivec2 exp = glm::ivec2(11, -2);
- glm::vec2 x = glm::ldexp(A, exp);
- Error += glm::all(glm::equal(x, glm::vec2(1024, .24),0.00001f)) ? 0 : 1;
- }
-
- {
- glm::vec3 A = glm::vec3(0.5, 0.96, 0.0);
- glm::ivec3 exp = glm::ivec3(11, -2, 0);
- glm::vec3 x = glm::ldexp(A, exp);
- Error += glm::all(glm::equal(x, glm::vec3(1024, .24, 0),0.00001f)) ? 0 : 1;
- }
-
- {
- glm::vec4 A = glm::vec4(0.5, 0.96, 0.0, -0.665);
- glm::ivec4 exp = glm::ivec4(11, -2, 0, 1);
- glm::vec4 x = glm::ldexp(A, exp);
- Error += glm::all(glm::equal(x, glm::vec4(1024, .24, 0, -1.33),0.00001f)) ? 0 : 1;
- }
-
- return Error;
- }
-}//namespace ldexp_
-
-static int test_constexpr()
-{
-#if GLM_HAS_CONSTEXPR
- static_assert(glm::abs(1.0f) > 0.0f, "GLM: Failed constexpr");
- constexpr glm::vec1 const A = glm::abs(glm::vec1(1.0f));
- constexpr glm::vec2 const B = glm::abs(glm::vec2(1.0f));
- constexpr glm::vec3 const C = glm::abs(glm::vec3(1.0f));
- constexpr glm::vec4 const D = glm::abs(glm::vec4(1.0f));
-#endif // GLM_HAS_CONSTEXPR
-
- return 0;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_constexpr();
- Error += sign::test();
- Error += floor_::test();
- Error += mod_::test();
- Error += modf_::test();
- Error += floatBitsToInt::test();
- Error += floatBitsToUint::test();
- Error += mix_::test();
- Error += step_::test();
- Error += max_::test();
- Error += min_::test();
- Error += clamp_::test();
- Error += round_::test();
- Error += roundEven::test();
- Error += isnan_::test();
- Error += isinf_::test();
- Error += frexp_::test();
- Error += ldexp_::test();
-
-# ifdef NDEBUG
- std::size_t Samples = 1000;
-# else
- std::size_t Samples = 1;
-# endif
- Error += sign::perf(Samples);
-
- Error += min_::perf(Samples);
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_func_exponential.cpp b/3rdparty/glm/source/test/core/core_func_exponential.cpp
deleted file mode 100644
index 380cdfb..0000000
--- a/3rdparty/glm/source/test/core/core_func_exponential.cpp
+++ /dev/null
@@ -1,185 +0,0 @@
-#include <glm/gtc/constants.hpp>
-#include <glm/ext/scalar_relational.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/vector_float1.hpp>
-#include <glm/ext/vector_float2.hpp>
-#include <glm/ext/vector_float3.hpp>
-#include <glm/ext/vector_float4.hpp>
-#include <glm/common.hpp>
-#include <glm/exponential.hpp>
-
-static int test_pow()
-{
- int Error(0);
-
- float A = glm::pow(2.f, 2.f);
- Error += glm::equal(A, 4.f, 0.01f) ? 0 : 1;
-
- glm::vec1 B = glm::pow(glm::vec1(2.f), glm::vec1(2.f));
- Error += glm::all(glm::equal(B, glm::vec1(4.f), 0.01f)) ? 0 : 1;
-
- glm::vec2 C = glm::pow(glm::vec2(2.f), glm::vec2(2.f));
- Error += glm::all(glm::equal(C, glm::vec2(4.f), 0.01f)) ? 0 : 1;
-
- glm::vec3 D = glm::pow(glm::vec3(2.f), glm::vec3(2.f));
- Error += glm::all(glm::equal(D, glm::vec3(4.f), 0.01f)) ? 0 : 1;
-
- glm::vec4 E = glm::pow(glm::vec4(2.f), glm::vec4(2.f));
- Error += glm::all(glm::equal(E, glm::vec4(4.f), 0.01f)) ? 0 : 1;
-
- return Error;
-}
-
-static int test_sqrt()
-{
- int Error = 0;
-
- float A = glm::sqrt(4.f);
- Error += glm::equal(A, 2.f, 0.01f) ? 0 : 1;
-
- glm::vec1 B = glm::sqrt(glm::vec1(4.f));
- Error += glm::all(glm::equal(B, glm::vec1(2.f), 0.01f)) ? 0 : 1;
-
- glm::vec2 C = glm::sqrt(glm::vec2(4.f));
- Error += glm::all(glm::equal(C, glm::vec2(2.f), 0.01f)) ? 0 : 1;
-
- glm::vec3 D = glm::sqrt(glm::vec3(4.f));
- Error += glm::all(glm::equal(D, glm::vec3(2.f), 0.01f)) ? 0 : 1;
-
- glm::vec4 E = glm::sqrt(glm::vec4(4.f));
- Error += glm::all(glm::equal(E, glm::vec4(2.f), 0.01f)) ? 0 : 1;
-
- return Error;
-}
-
-static int test_exp()
-{
- int Error = 0;
-
- float A = glm::exp(1.f);
- Error += glm::equal(A, glm::e<float>(), 0.01f) ? 0 : 1;
-
- glm::vec1 B = glm::exp(glm::vec1(1.f));
- Error += glm::all(glm::equal(B, glm::vec1(glm::e<float>()), 0.01f)) ? 0 : 1;
-
- glm::vec2 C = glm::exp(glm::vec2(1.f));
- Error += glm::all(glm::equal(C, glm::vec2(glm::e<float>()), 0.01f)) ? 0 : 1;
-
- glm::vec3 D = glm::exp(glm::vec3(1.f));
- Error += glm::all(glm::equal(D, glm::vec3(glm::e<float>()), 0.01f)) ? 0 : 1;
-
- glm::vec4 E = glm::exp(glm::vec4(1.f));
- Error += glm::all(glm::equal(E, glm::vec4(glm::e<float>()), 0.01f)) ? 0 : 1;
-
- return Error;
-}
-
-static int test_log()
-{
- int Error = 0;
-
- float const A = glm::log(glm::e<float>());
- Error += glm::equal(A, 1.f, 0.01f) ? 0 : 1;
-
- glm::vec1 const B = glm::log(glm::vec1(glm::e<float>()));
- Error += glm::all(glm::equal(B, glm::vec1(1.f), 0.01f)) ? 0 : 1;
-
- glm::vec2 const C = glm::log(glm::vec2(glm::e<float>()));
- Error += glm::all(glm::equal(C, glm::vec2(1.f), 0.01f)) ? 0 : 1;
-
- glm::vec3 const D = glm::log(glm::vec3(glm::e<float>()));
- Error += glm::all(glm::equal(D, glm::vec3(1.f), 0.01f)) ? 0 : 1;
-
- glm::vec4 const E = glm::log(glm::vec4(glm::e<float>()));
- Error += glm::all(glm::equal(E, glm::vec4(1.f), 0.01f)) ? 0 : 1;
-
- return Error;
-}
-
-static int test_exp2()
-{
- int Error = 0;
-
- float A = glm::exp2(4.f);
- Error += glm::equal(A, 16.f, 0.01f) ? 0 : 1;
-
- glm::vec1 B = glm::exp2(glm::vec1(4.f));
- Error += glm::all(glm::equal(B, glm::vec1(16.f), 0.01f)) ? 0 : 1;
-
- glm::vec2 C = glm::exp2(glm::vec2(4.f, 3.f));
- Error += glm::all(glm::equal(C, glm::vec2(16.f, 8.f), 0.01f)) ? 0 : 1;
-
- glm::vec3 D = glm::exp2(glm::vec3(4.f, 3.f, 2.f));
- Error += glm::all(glm::equal(D, glm::vec3(16.f, 8.f, 4.f), 0.01f)) ? 0 : 1;
-
- glm::vec4 E = glm::exp2(glm::vec4(4.f, 3.f, 2.f, 1.f));
- Error += glm::all(glm::equal(E, glm::vec4(16.f, 8.f, 4.f, 2.f), 0.01f)) ? 0 : 1;
-
-# if GLM_HAS_CXX11_STL
- //large exponent
- float F = glm::exp2(23.f);
- Error += glm::equal(F, 8388608.f, 0.01f) ? 0 : 1;
-# endif
-
- return Error;
-}
-
-static int test_log2()
-{
- int Error = 0;
-
- float A = glm::log2(16.f);
- Error += glm::equal(A, 4.f, 0.01f) ? 0 : 1;
-
- glm::vec1 B = glm::log2(glm::vec1(16.f));
- Error += glm::all(glm::equal(B, glm::vec1(4.f), 0.01f)) ? 0 : 1;
-
- glm::vec2 C = glm::log2(glm::vec2(16.f, 8.f));
- Error += glm::all(glm::equal(C, glm::vec2(4.f, 3.f), 0.01f)) ? 0 : 1;
-
- glm::vec3 D = glm::log2(glm::vec3(16.f, 8.f, 4.f));
- Error += glm::all(glm::equal(D, glm::vec3(4.f, 3.f, 2.f), 0.01f)) ? 0 : 1;
-
- glm::vec4 E = glm::log2(glm::vec4(16.f, 8.f, 4.f, 2.f));
- Error += glm::all(glm::equal(E, glm::vec4(4.f, 3.f, 2.f, 1.f), 0.01f)) ? 0 : 1;
-
- return Error;
-}
-
-static int test_inversesqrt()
-{
- int Error = 0;
-
- float A = glm::inversesqrt(16.f) * glm::sqrt(16.f);
- Error += glm::equal(A, 1.f, 0.01f) ? 0 : 1;
-
- glm::vec1 B = glm::inversesqrt(glm::vec1(16.f)) * glm::sqrt(16.f);
- Error += glm::all(glm::equal(B, glm::vec1(1.f), 0.01f)) ? 0 : 1;
-
- glm::vec2 C = glm::inversesqrt(glm::vec2(16.f)) * glm::sqrt(16.f);
- Error += glm::all(glm::equal(C, glm::vec2(1.f), 0.01f)) ? 0 : 1;
-
- glm::vec3 D = glm::inversesqrt(glm::vec3(16.f)) * glm::sqrt(16.f);
- Error += glm::all(glm::equal(D, glm::vec3(1.f), 0.01f)) ? 0 : 1;
-
- glm::vec4 E = glm::inversesqrt(glm::vec4(16.f)) * glm::sqrt(16.f);
- Error += glm::all(glm::equal(E, glm::vec4(1.f), 0.01f)) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_pow();
- Error += test_sqrt();
- Error += test_exp();
- Error += test_log();
- Error += test_exp2();
- Error += test_log2();
- Error += test_inversesqrt();
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_func_geometric.cpp b/3rdparty/glm/source/test/core/core_func_geometric.cpp
deleted file mode 100644
index 7ef9c68..0000000
--- a/3rdparty/glm/source/test/core/core_func_geometric.cpp
+++ /dev/null
@@ -1,200 +0,0 @@
-#include <glm/geometric.hpp>
-#include <glm/trigonometric.hpp>
-#include <glm/ext/scalar_relational.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/vector_float1.hpp>
-#include <glm/ext/vector_float2.hpp>
-#include <glm/ext/vector_float3.hpp>
-#include <glm/ext/vector_float4.hpp>
-#include <glm/ext/vector_double2.hpp>
-#include <glm/ext/vector_double3.hpp>
-#include <glm/ext/vector_double4.hpp>
-#include <limits>
-
-namespace length
-{
- int test()
- {
- float Length1 = glm::length(glm::vec1(1));
- float Length2 = glm::length(glm::vec2(1, 0));
- float Length3 = glm::length(glm::vec3(1, 0, 0));
- float Length4 = glm::length(glm::vec4(1, 0, 0, 0));
-
- int Error = 0;
-
- Error += glm::abs(Length1 - 1.0f) < std::numeric_limits<float>::epsilon() ? 0 : 1;
- Error += glm::abs(Length2 - 1.0f) < std::numeric_limits<float>::epsilon() ? 0 : 1;
- Error += glm::abs(Length3 - 1.0f) < std::numeric_limits<float>::epsilon() ? 0 : 1;
- Error += glm::abs(Length4 - 1.0f) < std::numeric_limits<float>::epsilon() ? 0 : 1;
-
- return Error;
- }
-}//namespace length
-
-namespace distance
-{
- int test()
- {
- float Distance1 = glm::distance(glm::vec1(1), glm::vec1(1));
- float Distance2 = glm::distance(glm::vec2(1, 0), glm::vec2(1, 0));
- float Distance3 = glm::distance(glm::vec3(1, 0, 0), glm::vec3(1, 0, 0));
- float Distance4 = glm::distance(glm::vec4(1, 0, 0, 0), glm::vec4(1, 0, 0, 0));
-
- int Error = 0;
-
- Error += glm::abs(Distance1) < std::numeric_limits<float>::epsilon() ? 0 : 1;
- Error += glm::abs(Distance2) < std::numeric_limits<float>::epsilon() ? 0 : 1;
- Error += glm::abs(Distance3) < std::numeric_limits<float>::epsilon() ? 0 : 1;
- Error += glm::abs(Distance4) < std::numeric_limits<float>::epsilon() ? 0 : 1;
-
- return Error;
- }
-}//namespace distance
-
-namespace dot
-{
- int test()
- {
- float Dot1 = glm::dot(glm::vec1(1), glm::vec1(1));
- float Dot2 = glm::dot(glm::vec2(1), glm::vec2(1));
- float Dot3 = glm::dot(glm::vec3(1), glm::vec3(1));
- float Dot4 = glm::dot(glm::vec4(1), glm::vec4(1));
-
- int Error = 0;
-
- Error += glm::abs(Dot1 - 1.0f) < std::numeric_limits<float>::epsilon() ? 0 : 1;
- Error += glm::abs(Dot2 - 2.0f) < std::numeric_limits<float>::epsilon() ? 0 : 1;
- Error += glm::abs(Dot3 - 3.0f) < std::numeric_limits<float>::epsilon() ? 0 : 1;
- Error += glm::abs(Dot4 - 4.0f) < std::numeric_limits<float>::epsilon() ? 0 : 1;
-
- return Error;
- }
-}//namespace dot
-
-namespace cross
-{
- int test()
- {
- glm::vec3 Cross1 = glm::cross(glm::vec3(1, 0, 0), glm::vec3(0, 1, 0));
- glm::vec3 Cross2 = glm::cross(glm::vec3(0, 1, 0), glm::vec3(1, 0, 0));
-
- int Error = 0;
-
- Error += glm::all(glm::lessThan(glm::abs(Cross1 - glm::vec3(0, 0, 1)), glm::vec3(std::numeric_limits<float>::epsilon()))) ? 0 : 1;
- Error += glm::all(glm::lessThan(glm::abs(Cross2 - glm::vec3(0, 0,-1)), glm::vec3(std::numeric_limits<float>::epsilon()))) ? 0 : 1;
-
- return Error;
- }
-}//namespace cross
-
-namespace normalize
-{
- int test()
- {
- glm::vec3 Normalize1 = glm::normalize(glm::vec3(1, 0, 0));
- glm::vec3 Normalize2 = glm::normalize(glm::vec3(2, 0, 0));
-
- glm::vec3 Normalize3 = glm::normalize(glm::vec3(-0.6, 0.7, -0.5));
-
- glm::vec3 ro = glm::vec3(glm::cos(5.f) * 3.f, 2.f, glm::sin(5.f) * 3.f);
- glm::vec3 w = glm::normalize(glm::vec3(0, -0.2f, 0) - ro);
- glm::vec3 u = glm::normalize(glm::cross(w, glm::vec3(0, 1, 0)));
- glm::vec3 v = glm::cross(u, w);
-
- int Error = 0;
-
- Error += glm::all(glm::lessThan(glm::abs(Normalize1 - glm::vec3(1, 0, 0)), glm::vec3(std::numeric_limits<float>::epsilon()))) ? 0 : 1;
- Error += glm::all(glm::lessThan(glm::abs(Normalize2 - glm::vec3(1, 0, 0)), glm::vec3(std::numeric_limits<float>::epsilon()))) ? 0 : 1;
-
- return Error;
- }
-}//namespace normalize
-
-namespace faceforward
-{
- int test()
- {
- int Error = 0;
-
- {
- glm::vec3 N(0.0f, 0.0f, 1.0f);
- glm::vec3 I(1.0f, 0.0f, 1.0f);
- glm::vec3 Nref(0.0f, 0.0f, 1.0f);
- glm::vec3 F = glm::faceforward(N, I, Nref);
- }
-
- return Error;
- }
-}//namespace faceforward
-
-namespace reflect
-{
- int test()
- {
- int Error = 0;
-
- {
- glm::vec2 A(1.0f,-1.0f);
- glm::vec2 B(0.0f, 1.0f);
- glm::vec2 C = glm::reflect(A, B);
- Error += glm::all(glm::equal(C, glm::vec2(1.0, 1.0), 0.0001f)) ? 0 : 1;
- }
-
- {
- glm::dvec2 A(1.0f,-1.0f);
- glm::dvec2 B(0.0f, 1.0f);
- glm::dvec2 C = glm::reflect(A, B);
- Error += glm::all(glm::equal(C, glm::dvec2(1.0, 1.0), 0.0001)) ? 0 : 1;
- }
-
- return Error;
- }
-}//namespace reflect
-
-namespace refract
-{
- int test()
- {
- int Error = 0;
-
- {
- float A(-1.0f);
- float B(1.0f);
- float C = glm::refract(A, B, 0.5f);
- Error += glm::equal(C, -1.0f, 0.0001f) ? 0 : 1;
- }
-
- {
- glm::vec2 A(0.0f,-1.0f);
- glm::vec2 B(0.0f, 1.0f);
- glm::vec2 C = glm::refract(A, B, 0.5f);
- Error += glm::all(glm::equal(C, glm::vec2(0.0, -1.0), 0.0001f)) ? 0 : 1;
- }
-
- {
- glm::dvec2 A(0.0f,-1.0f);
- glm::dvec2 B(0.0f, 1.0f);
- glm::dvec2 C = glm::refract(A, B, 0.5);
- Error += glm::all(glm::equal(C, glm::dvec2(0.0, -1.0), 0.0001)) ? 0 : 1;
- }
-
- return Error;
- }
-}//namespace refract
-
-int main()
-{
- int Error(0);
-
- Error += length::test();
- Error += distance::test();
- Error += dot::test();
- Error += cross::test();
- Error += normalize::test();
- Error += faceforward::test();
- Error += reflect::test();
- Error += refract::test();
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_func_integer.cpp b/3rdparty/glm/source/test/core/core_func_integer.cpp
deleted file mode 100644
index 95d650c..0000000
--- a/3rdparty/glm/source/test/core/core_func_integer.cpp
+++ /dev/null
@@ -1,1556 +0,0 @@
-#include <glm/integer.hpp>
-#include <glm/vector_relational.hpp>
-#include <glm/ext/vector_int1.hpp>
-#include <glm/ext/vector_int2.hpp>
-#include <glm/ext/vector_int3.hpp>
-#include <glm/ext/vector_int4.hpp>
-#include <glm/ext/vector_uint1.hpp>
-#include <glm/ext/vector_uint2.hpp>
-#include <glm/ext/vector_uint3.hpp>
-#include <glm/ext/vector_uint4.hpp>
-#include <glm/ext/scalar_int_sized.hpp>
-#include <glm/ext/scalar_uint_sized.hpp>
-#include <vector>
-#include <ctime>
-#include <cstdio>
-
-enum result
-{
- SUCCESS,
- FAIL,
- ASSERT,
- STATIC_ASSERT
-};
-
-namespace bitfieldInsert
-{
- template<typename genType>
- struct type
- {
- genType Base;
- genType Insert;
- int Offset;
- int Bits;
- genType Return;
- };
-
- typedef type<glm::uint> typeU32;
-
- typeU32 const Data32[] =
- {
- {0x00000000, 0xffffffff, 0, 32, 0xffffffff},
- {0x00000000, 0xffffffff, 0, 31, 0x7fffffff},
- {0x00000000, 0xffffffff, 0, 0, 0x00000000},
- {0xff000000, 0x000000ff, 8, 8, 0xff00ff00},
- {0xffff0000, 0xffff0000, 16, 16, 0x00000000},
- {0x0000ffff, 0x0000ffff, 16, 16, 0xffffffff}
- };
-
- static int test()
- {
- int Error = 0;
- glm::uint count = sizeof(Data32) / sizeof(typeU32);
-
- for(glm::uint i = 0; i < count; ++i)
- {
- glm::uint Return = glm::bitfieldInsert(
- Data32[i].Base,
- Data32[i].Insert,
- Data32[i].Offset,
- Data32[i].Bits);
-
- Error += Data32[i].Return == Return ? 0 : 1;
- }
-
- return Error;
- }
-}//bitfieldInsert
-
-namespace bitfieldExtract
-{
- template<typename genType>
- struct type
- {
- genType Value;
- int Offset;
- int Bits;
- genType Return;
- result Result;
- };
-
- typedef type<glm::uint> typeU32;
-
- typeU32 const Data32[] =
- {
- {0xffffffff, 0,32, 0xffffffff, SUCCESS},
- {0xffffffff, 8, 0, 0x00000000, SUCCESS},
- {0x00000000, 0,32, 0x00000000, SUCCESS},
- {0x0f0f0f0f, 0,32, 0x0f0f0f0f, SUCCESS},
- {0x00000000, 8, 0, 0x00000000, SUCCESS},
- {0x80000000,31, 1, 0x00000001, SUCCESS},
- {0x7fffffff,31, 1, 0x00000000, SUCCESS},
- {0x00000300, 8, 8, 0x00000003, SUCCESS},
- {0x0000ff00, 8, 8, 0x000000ff, SUCCESS},
- {0xfffffff0, 0, 5, 0x00000010, SUCCESS},
- {0x000000ff, 1, 3, 0x00000007, SUCCESS},
- {0x000000ff, 0, 3, 0x00000007, SUCCESS},
- {0x00000000, 0, 2, 0x00000000, SUCCESS},
- {0xffffffff, 0, 8, 0x000000ff, SUCCESS},
- {0xffff0000,16,16, 0x0000ffff, SUCCESS},
- {0xfffffff0, 0, 8, 0x00000000, FAIL},
- {0xffffffff,16,16, 0x00000000, FAIL},
- //{0xffffffff,32, 1, 0x00000000, ASSERT}, // Throw an assert
- //{0xffffffff, 0,33, 0x00000000, ASSERT}, // Throw an assert
- //{0xffffffff,16,16, 0x00000000, ASSERT}, // Throw an assert
- };
-
- static int test()
- {
- int Error = 0;
-
- glm::uint count = sizeof(Data32) / sizeof(typeU32);
-
- for(glm::uint i = 0; i < count; ++i)
- {
- glm::uint Return = glm::bitfieldExtract(
- Data32[i].Value,
- Data32[i].Offset,
- Data32[i].Bits);
-
- bool Compare = Data32[i].Return == Return;
-
- if(Data32[i].Result == SUCCESS && Compare)
- continue;
- else if(Data32[i].Result == FAIL && !Compare)
- continue;
-
- Error += 1;
- }
-
- return Error;
- }
-}//extractField
-
-namespace bitfieldReverse
-{
-/*
- GLM_FUNC_QUALIFIER unsigned int bitfieldReverseLoop(unsigned int v)
- {
- unsigned int Result(0);
- unsigned int const BitSize = static_cast<unsigned int>(sizeof(unsigned int) * 8);
- for(unsigned int i = 0; i < BitSize; ++i)
- {
- unsigned int const BitSet(v & (static_cast<unsigned int>(1) << i));
- unsigned int const BitFirst(BitSet >> i);
- Result |= BitFirst << (BitSize - 1 - i);
- }
- return Result;
- }
-
- GLM_FUNC_QUALIFIER glm::uint64_t bitfieldReverseLoop(glm::uint64_t v)
- {
- glm::uint64_t Result(0);
- glm::uint64_t const BitSize = static_cast<glm::uint64_t>(sizeof(unsigned int) * 8);
- for(glm::uint64_t i = 0; i < BitSize; ++i)
- {
- glm::uint64_t const BitSet(v & (static_cast<glm::uint64_t>(1) << i));
- glm::uint64_t const BitFirst(BitSet >> i);
- Result |= BitFirst << (BitSize - 1 - i);
- }
- return Result;
- }
-*/
- template<glm::length_t L, typename T, glm::qualifier Q>
- GLM_FUNC_QUALIFIER glm::vec<L, T, Q> bitfieldReverseLoop(glm::vec<L, T, Q> const& v)
- {
- GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'bitfieldReverse' only accept integer values");
-
- glm::vec<L, T, Q> Result(0);
- T const BitSize = static_cast<T>(sizeof(T) * 8);
- for(T i = 0; i < BitSize; ++i)
- {
- glm::vec<L, T, Q> const BitSet(v & (static_cast<T>(1) << i));
- glm::vec<L, T, Q> const BitFirst(BitSet >> i);
- Result |= BitFirst << (BitSize - 1 - i);
- }
- return Result;
- }
-
- template<typename T>
- GLM_FUNC_QUALIFIER T bitfieldReverseLoop(T v)
- {
- return bitfieldReverseLoop(glm::vec<1, T>(v)).x;
- }
-
- GLM_FUNC_QUALIFIER glm::uint32 bitfieldReverseUint32(glm::uint32 x)
- {
- x = (x & 0x55555555) << 1 | (x & 0xAAAAAAAA) >> 1;
- x = (x & 0x33333333) << 2 | (x & 0xCCCCCCCC) >> 2;
- x = (x & 0x0F0F0F0F) << 4 | (x & 0xF0F0F0F0) >> 4;
- x = (x & 0x00FF00FF) << 8 | (x & 0xFF00FF00) >> 8;
- x = (x & 0x0000FFFF) << 16 | (x & 0xFFFF0000) >> 16;
- return x;
- }
-
- GLM_FUNC_QUALIFIER glm::uint64 bitfieldReverseUint64(glm::uint64 x)
- {
- x = (x & 0x5555555555555555) << 1 | (x & 0xAAAAAAAAAAAAAAAA) >> 1;
- x = (x & 0x3333333333333333) << 2 | (x & 0xCCCCCCCCCCCCCCCC) >> 2;
- x = (x & 0x0F0F0F0F0F0F0F0F) << 4 | (x & 0xF0F0F0F0F0F0F0F0) >> 4;
- x = (x & 0x00FF00FF00FF00FF) << 8 | (x & 0xFF00FF00FF00FF00) >> 8;
- x = (x & 0x0000FFFF0000FFFF) << 16 | (x & 0xFFFF0000FFFF0000) >> 16;
- x = (x & 0x00000000FFFFFFFF) << 32 | (x & 0xFFFFFFFF00000000) >> 32;
- return x;
- }
-
- template<bool EXEC = false>
- struct compute_bitfieldReverseStep
- {
- template<glm::length_t L, typename T, glm::qualifier Q>
- GLM_FUNC_QUALIFIER static glm::vec<L, T, Q> call(glm::vec<L, T, Q> const& v, T, T)
- {
- return v;
- }
- };
-
- template<>
- struct compute_bitfieldReverseStep<true>
- {
- template<glm::length_t L, typename T, glm::qualifier Q>
- GLM_FUNC_QUALIFIER static glm::vec<L, T, Q> call(glm::vec<L, T, Q> const& v, T Mask, T Shift)
- {
- return (v & Mask) << Shift | (v & (~Mask)) >> Shift;
- }
- };
-
- template<glm::length_t L, typename T, glm::qualifier Q>
- GLM_FUNC_QUALIFIER glm::vec<L, T, Q> bitfieldReverseOps(glm::vec<L, T, Q> const& v)
- {
- glm::vec<L, T, Q> x(v);
- x = compute_bitfieldReverseStep<sizeof(T) * 8 >= 2>::call(x, static_cast<T>(0x5555555555555555ull), static_cast<T>( 1));
- x = compute_bitfieldReverseStep<sizeof(T) * 8 >= 4>::call(x, static_cast<T>(0x3333333333333333ull), static_cast<T>( 2));
- x = compute_bitfieldReverseStep<sizeof(T) * 8 >= 8>::call(x, static_cast<T>(0x0F0F0F0F0F0F0F0Full), static_cast<T>( 4));
- x = compute_bitfieldReverseStep<sizeof(T) * 8 >= 16>::call(x, static_cast<T>(0x00FF00FF00FF00FFull), static_cast<T>( 8));
- x = compute_bitfieldReverseStep<sizeof(T) * 8 >= 32>::call(x, static_cast<T>(0x0000FFFF0000FFFFull), static_cast<T>(16));
- x = compute_bitfieldReverseStep<sizeof(T) * 8 >= 64>::call(x, static_cast<T>(0x00000000FFFFFFFFull), static_cast<T>(32));
- return x;
- }
-
- template<typename genType>
- GLM_FUNC_QUALIFIER genType bitfieldReverseOps(genType x)
- {
- return bitfieldReverseOps(glm::vec<1, genType, glm::defaultp>(x)).x;
- }
-
- template<typename genType>
- struct type
- {
- genType Value;
- genType Return;
- result Result;
- };
-
- typedef type<glm::uint> typeU32;
-
- typeU32 const Data32[] =
- {
- {0x00000001, 0x80000000, SUCCESS},
- {0x0000000f, 0xf0000000, SUCCESS},
- {0x000000ff, 0xff000000, SUCCESS},
- {0xf0000000, 0x0000000f, SUCCESS},
- {0xff000000, 0x000000ff, SUCCESS},
- {0xffffffff, 0xffffffff, SUCCESS},
- {0x00000000, 0x00000000, SUCCESS}
- };
-
- typedef type<glm::uint64> typeU64;
-
- typeU64 const Data64[] =
- {
- {0x00000000000000ff, 0xff00000000000000, SUCCESS},
- {0x000000000000000f, 0xf000000000000000, SUCCESS},
- {0xf000000000000000, 0x000000000000000f, SUCCESS},
- {0xffffffffffffffff, 0xffffffffffffffff, SUCCESS},
- {0x0000000000000000, 0x0000000000000000, SUCCESS}
- };
-
- static int test32_bitfieldReverse()
- {
- int Error = 0;
- std::size_t const Count = sizeof(Data32) / sizeof(typeU32);
-
- for(std::size_t i = 0; i < Count; ++i)
- {
- glm::uint Return = glm::bitfieldReverse(Data32[i].Value);
-
- bool Compare = Data32[i].Return == Return;
-
- if(Data32[i].Result == SUCCESS)
- Error += Compare ? 0 : 1;
- else
- Error += Compare ? 1 : 0;
- }
-
- return Error;
- }
-
- static int test32_bitfieldReverseLoop()
- {
- int Error = 0;
- std::size_t const Count = sizeof(Data32) / sizeof(typeU32);
-
- for(std::size_t i = 0; i < Count; ++i)
- {
- glm::uint Return = bitfieldReverseLoop(Data32[i].Value);
-
- bool Compare = Data32[i].Return == Return;
-
- if(Data32[i].Result == SUCCESS)
- Error += Compare ? 0 : 1;
- else
- Error += Compare ? 1 : 0;
- }
-
- return Error;
- }
-
- static int test32_bitfieldReverseUint32()
- {
- int Error = 0;
- std::size_t const Count = sizeof(Data32) / sizeof(typeU32);
-
- for(std::size_t i = 0; i < Count; ++i)
- {
- glm::uint Return = bitfieldReverseUint32(Data32[i].Value);
-
- bool Compare = Data32[i].Return == Return;
-
- if(Data32[i].Result == SUCCESS)
- Error += Compare ? 0 : 1;
- else
- Error += Compare ? 1 : 0;
- }
-
- return Error;
- }
-
- static int test32_bitfieldReverseOps()
- {
- int Error = 0;
- std::size_t const Count = sizeof(Data32) / sizeof(typeU32);
-
- for(std::size_t i = 0; i < Count; ++i)
- {
- glm::uint Return = bitfieldReverseOps(Data32[i].Value);
-
- bool Compare = Data32[i].Return == Return;
-
- if(Data32[i].Result == SUCCESS)
- Error += Compare ? 0 : 1;
- else
- Error += Compare ? 1 : 0;
- }
-
- return Error;
- }
-
- static int test64_bitfieldReverse()
- {
- int Error = 0;
- std::size_t const Count = sizeof(Data64) / sizeof(typeU64);
-
- for(std::size_t i = 0; i < Count; ++i)
- {
- glm::uint64 Return = glm::bitfieldReverse(Data64[i].Value);
-
- bool Compare = Data64[i].Return == Return;
-
- if(Data64[i].Result == SUCCESS)
- Error += Compare ? 0 : 1;
- else
- Error += Compare ? 1 : 0;
- }
-
- return Error;
- }
-
- static int test64_bitfieldReverseLoop()
- {
- int Error = 0;
- std::size_t const Count = sizeof(Data64) / sizeof(typeU64);
-
- for(std::size_t i = 0; i < Count; ++i)
- {
- glm::uint64 Return = bitfieldReverseLoop(Data64[i].Value);
-
- bool Compare = Data64[i].Return == Return;
-
- if(Data32[i].Result == SUCCESS)
- Error += Compare ? 0 : 1;
- else
- Error += Compare ? 1 : 0;
- }
-
- return Error;
- }
-
- static int test64_bitfieldReverseUint64()
- {
- int Error = 0;
- std::size_t const Count = sizeof(Data64) / sizeof(typeU64);
-
- for(std::size_t i = 0; i < Count; ++i)
- {
- glm::uint64 Return = bitfieldReverseUint64(Data64[i].Value);
-
- bool Compare = Data64[i].Return == Return;
-
- if(Data64[i].Result == SUCCESS)
- Error += Compare ? 0 : 1;
- else
- Error += Compare ? 1 : 0;
- }
-
- return Error;
- }
-
- static int test64_bitfieldReverseOps()
- {
- int Error = 0;
- std::size_t const Count = sizeof(Data64) / sizeof(typeU64);
-
- for(std::size_t i = 0; i < Count; ++i)
- {
- glm::uint64 Return = bitfieldReverseOps(Data64[i].Value);
-
- bool Compare = Data64[i].Return == Return;
-
- if(Data64[i].Result == SUCCESS)
- Error += Compare ? 0 : 1;
- else
- Error += Compare ? 1 : 0;
- }
-
- return Error;
- }
-
- static int test()
- {
- int Error = 0;
-
- Error += test32_bitfieldReverse();
- Error += test32_bitfieldReverseLoop();
- Error += test32_bitfieldReverseUint32();
- Error += test32_bitfieldReverseOps();
-
- Error += test64_bitfieldReverse();
- Error += test64_bitfieldReverseLoop();
- Error += test64_bitfieldReverseUint64();
- Error += test64_bitfieldReverseOps();
-
- return Error;
- }
-
- static int perf32(glm::uint32 Count)
- {
- int Error = 0;
-
- std::vector<glm::uint32> Data;
- Data.resize(static_cast<std::size_t>(Count));
-
- std::clock_t Timestamps0 = std::clock();
-
- for(glm::uint32 k = 0; k < Count; ++k)
- Data[k] = glm::bitfieldReverse(k);
-
- std::clock_t Timestamps1 = std::clock();
-
- for(glm::uint32 k = 0; k < Count; ++k)
- Data[k] = bitfieldReverseLoop(k);
-
- std::clock_t Timestamps2 = std::clock();
-
- for(glm::uint32 k = 0; k < Count; ++k)
- Data[k] = bitfieldReverseUint32(k);
-
- std::clock_t Timestamps3 = std::clock();
-
- for(glm::uint32 k = 0; k < Count; ++k)
- Data[k] = bitfieldReverseOps(k);
-
- std::clock_t Timestamps4 = std::clock();
-
- std::printf("glm::bitfieldReverse: %d clocks\n", static_cast<int>(Timestamps1 - Timestamps0));
- std::printf("bitfieldReverseLoop: %d clocks\n", static_cast<int>(Timestamps2 - Timestamps1));
- std::printf("bitfieldReverseUint32: %d clocks\n", static_cast<int>(Timestamps3 - Timestamps2));
- std::printf("bitfieldReverseOps: %d clocks\n", static_cast<int>(Timestamps4 - Timestamps3));
-
- return Error;
- }
-
- static int perf64(glm::uint64 Count)
- {
- int Error = 0;
-
- std::vector<glm::uint64> Data;
- Data.resize(static_cast<std::size_t>(Count));
-
- std::clock_t Timestamps0 = std::clock();
-
- for(glm::uint64 k = 0; k < Count; ++k)
- Data[static_cast<std::size_t>(k)] = glm::bitfieldReverse(k);
-
- std::clock_t Timestamps1 = std::clock();
-
- for(glm::uint64 k = 0; k < Count; ++k)
- Data[static_cast<std::size_t>(k)] = bitfieldReverseLoop<glm::uint64>(k);
-
- std::clock_t Timestamps2 = std::clock();
-
- for(glm::uint64 k = 0; k < Count; ++k)
- Data[static_cast<std::size_t>(k)] = bitfieldReverseUint64(k);
-
- std::clock_t Timestamps3 = std::clock();
-
- for(glm::uint64 k = 0; k < Count; ++k)
- Data[static_cast<std::size_t>(k)] = bitfieldReverseOps(k);
-
- std::clock_t Timestamps4 = std::clock();
-
- std::printf("glm::bitfieldReverse - 64: %d clocks\n", static_cast<int>(Timestamps1 - Timestamps0));
- std::printf("bitfieldReverseLoop - 64: %d clocks\n", static_cast<int>(Timestamps2 - Timestamps1));
- std::printf("bitfieldReverseUint - 64: %d clocks\n", static_cast<int>(Timestamps3 - Timestamps2));
- std::printf("bitfieldReverseOps - 64: %d clocks\n", static_cast<int>(Timestamps4 - Timestamps3));
-
- return Error;
- }
-
- static int perf(std::size_t Samples)
- {
- int Error = 0;
-
- Error += perf32(static_cast<glm::uint32>(Samples));
- Error += perf64(static_cast<glm::uint64>(Samples));
-
- return Error;
- }
-}//bitfieldReverse
-
-namespace findMSB
-{
- template<typename genType, typename retType>
- struct type
- {
- genType Value;
- retType Return;
- };
-
-# if GLM_HAS_BITSCAN_WINDOWS
- template<typename genIUType>
- static int findMSB_intrinsic(genIUType Value)
- {
- GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'findMSB' only accept integer values");
-
- if(Value == 0)
- return -1;
-
- unsigned long Result(0);
- _BitScanReverse(&Result, Value);
- return int(Result);
- }
-# endif//GLM_HAS_BITSCAN_WINDOWS
-
-# if GLM_ARCH & GLM_ARCH_AVX && GLM_COMPILER & GLM_COMPILER_VC
- template<typename genIUType>
- static int findMSB_avx(genIUType Value)
- {
- GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'findMSB' only accept integer values");
-
- if(Value == 0)
- return -1;
-
- return int(_tzcnt_u32(Value));
- }
-# endif//GLM_ARCH & GLM_ARCH_AVX && GLM_PLATFORM & GLM_PLATFORM_WINDOWS
-
- template<typename genIUType>
- static int findMSB_095(genIUType Value)
- {
- GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'findMSB' only accept integer values");
-
- if(Value == genIUType(0) || Value == genIUType(-1))
- return -1;
- else if(Value > 0)
- {
- genIUType Bit = genIUType(-1);
- for(genIUType tmp = Value; tmp > 0; tmp >>= 1, ++Bit){}
- return static_cast<int>(Bit);
- }
- else //if(Value < 0)
- {
- int const BitCount(sizeof(genIUType) * 8);
- int MostSignificantBit(-1);
- for(int BitIndex(0); BitIndex < BitCount; ++BitIndex)
- MostSignificantBit = (Value & (1 << BitIndex)) ? MostSignificantBit : BitIndex;
- assert(MostSignificantBit >= 0);
- return MostSignificantBit;
- }
- }
-
- template<typename genIUType>
- static int findMSB_nlz1(genIUType x)
- {
- GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'findMSB' only accept integer values");
-
- if (x == 0)
- return -1;
-
- int n = 0;
- if (x <= 0x0000FFFF) {n = n +16; x = x <<16;}
- if (x <= 0x00FFFFFF) {n = n + 8; x = x << 8;}
- if (x <= 0x0FFFFFFF) {n = n + 4; x = x << 4;}
- if (x <= 0x3FFFFFFF) {n = n + 2; x = x << 2;}
- if (x <= 0x7FFFFFFF) {n = n + 1;}
- return 31 - n;
- }
-
- static int findMSB_nlz2(unsigned int x)
- {
- unsigned int y;
- int n = 32;
-
- y = x >>16; if (y != 0) {n = n -16; x = y;}
- y = x >> 8; if (y != 0) {n = n - 8; x = y;}
- y = x >> 4; if (y != 0) {n = n - 4; x = y;}
- y = x >> 2; if (y != 0) {n = n - 2; x = y;}
- y = x >> 1; if (y != 0) return n - 2;
- return 32 - (n - static_cast<int>(x));
- }
-
- static int findMSB_pop(unsigned int x)
- {
- x = x | (x >> 1);
- x = x | (x >> 2);
- x = x | (x >> 4);
- x = x | (x >> 8);
- x = x | (x >>16);
- return 31 - glm::bitCount(~x);
- }
-
- static int perf_int(std::size_t Count)
- {
- type<int, int> const Data[] =
- {
- {0x00000000, -1},
- {0x00000001, 0},
- {0x00000002, 1},
- {0x00000003, 1},
- {0x00000004, 2},
- {0x00000005, 2},
- {0x00000007, 2},
- {0x00000008, 3},
- {0x00000010, 4},
- {0x00000020, 5},
- {0x00000040, 6},
- {0x00000080, 7},
- {0x00000100, 8},
- {0x00000200, 9},
- {0x00000400, 10},
- {0x00000800, 11},
- {0x00001000, 12},
- {0x00002000, 13},
- {0x00004000, 14},
- {0x00008000, 15},
- {0x00010000, 16},
- {0x00020000, 17},
- {0x00040000, 18},
- {0x00080000, 19},
- {0x00100000, 20},
- {0x00200000, 21},
- {0x00400000, 22},
- {0x00800000, 23},
- {0x01000000, 24},
- {0x02000000, 25},
- {0x04000000, 26},
- {0x08000000, 27},
- {0x10000000, 28},
- {0x20000000, 29},
- {0x40000000, 30}
- };
-
- int Error(0);
-
- std::clock_t Timestamps0 = std::clock();
-
- for(std::size_t k = 0; k < Count; ++k)
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<int, int>); ++i)
- {
- int Result = glm::findMSB(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- std::clock_t Timestamps1 = std::clock();
-
- for(std::size_t k = 0; k < Count; ++k)
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<int, int>); ++i)
- {
- int Result = findMSB_nlz1(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- std::clock_t Timestamps2 = std::clock();
-
- for(std::size_t k = 0; k < Count; ++k)
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<int, int>); ++i)
- {
- int Result = findMSB_nlz2(static_cast<unsigned int>(Data[i].Value));
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- std::clock_t Timestamps3 = std::clock();
-
- for(std::size_t k = 0; k < Count; ++k)
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<int, int>); ++i)
- {
- int Result = findMSB_095(static_cast<unsigned int>(Data[i].Value));
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- std::clock_t Timestamps4 = std::clock();
-
-# if GLM_HAS_BITSCAN_WINDOWS
- for(std::size_t k = 0; k < Count; ++k)
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<int, int>); ++i)
- {
- int Result = findMSB_intrinsic(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-# endif//GLM_HAS_BITSCAN_WINDOWS
-
- std::clock_t Timestamps5 = std::clock();
-
- for(std::size_t k = 0; k < Count; ++k)
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<int, int>); ++i)
- {
- int Result = findMSB_pop(static_cast<unsigned int>(Data[i].Value));
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- std::clock_t Timestamps6 = std::clock();
-
-# if GLM_ARCH & GLM_ARCH_AVX && GLM_COMPILER & GLM_COMPILER_VC
- for(std::size_t k = 0; k < Count; ++k)
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<int, int>); ++i)
- {
- int Result = findMSB_avx(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- std::clock_t Timestamps7 = std::clock();
-# endif
-
- std::printf("glm::findMSB: %d clocks\n", static_cast<int>(Timestamps1 - Timestamps0));
- std::printf("findMSB - nlz1: %d clocks\n", static_cast<int>(Timestamps2 - Timestamps1));
- std::printf("findMSB - nlz2: %d clocks\n", static_cast<int>(Timestamps3 - Timestamps2));
- std::printf("findMSB - 0.9.5: %d clocks\n", static_cast<int>(Timestamps4 - Timestamps3));
-
-# if GLM_HAS_BITSCAN_WINDOWS
- std::printf("findMSB - intrinsics: %d clocks\n", static_cast<int>(Timestamps5 - Timestamps4));
-# endif//GLM_HAS_BITSCAN_WINDOWS
- std::printf("findMSB - pop: %d clocks\n", static_cast<int>(Timestamps6 - Timestamps5));
-
-# if GLM_ARCH & GLM_ARCH_AVX && GLM_COMPILER & GLM_COMPILER_VC
- std::printf("findMSB - avx tzcnt: %d clocks\n", static_cast<int>(Timestamps7 - Timestamps6));
-# endif//GLM_ARCH & GLM_ARCH_AVX && GLM_PLATFORM & GLM_PLATFORM_WINDOWS
-
- return Error;
- }
-
- static int test_ivec4()
- {
- type<glm::ivec4, glm::ivec4> const Data[] =
- {
- {glm::ivec4(0x00000000), glm::ivec4(-1)},
- {glm::ivec4(0x00000001), glm::ivec4( 0)},
- {glm::ivec4(0x00000002), glm::ivec4( 1)},
- {glm::ivec4(0x00000003), glm::ivec4( 1)},
- {glm::ivec4(0x00000004), glm::ivec4( 2)},
- {glm::ivec4(0x00000005), glm::ivec4( 2)},
- {glm::ivec4(0x00000007), glm::ivec4( 2)},
- {glm::ivec4(0x00000008), glm::ivec4( 3)},
- {glm::ivec4(0x00000010), glm::ivec4( 4)},
- {glm::ivec4(0x00000020), glm::ivec4( 5)},
- {glm::ivec4(0x00000040), glm::ivec4( 6)},
- {glm::ivec4(0x00000080), glm::ivec4( 7)},
- {glm::ivec4(0x00000100), glm::ivec4( 8)},
- {glm::ivec4(0x00000200), glm::ivec4( 9)},
- {glm::ivec4(0x00000400), glm::ivec4(10)},
- {glm::ivec4(0x00000800), glm::ivec4(11)},
- {glm::ivec4(0x00001000), glm::ivec4(12)},
- {glm::ivec4(0x00002000), glm::ivec4(13)},
- {glm::ivec4(0x00004000), glm::ivec4(14)},
- {glm::ivec4(0x00008000), glm::ivec4(15)},
- {glm::ivec4(0x00010000), glm::ivec4(16)},
- {glm::ivec4(0x00020000), glm::ivec4(17)},
- {glm::ivec4(0x00040000), glm::ivec4(18)},
- {glm::ivec4(0x00080000), glm::ivec4(19)},
- {glm::ivec4(0x00100000), glm::ivec4(20)},
- {glm::ivec4(0x00200000), glm::ivec4(21)},
- {glm::ivec4(0x00400000), glm::ivec4(22)},
- {glm::ivec4(0x00800000), glm::ivec4(23)},
- {glm::ivec4(0x01000000), glm::ivec4(24)},
- {glm::ivec4(0x02000000), glm::ivec4(25)},
- {glm::ivec4(0x04000000), glm::ivec4(26)},
- {glm::ivec4(0x08000000), glm::ivec4(27)},
- {glm::ivec4(0x10000000), glm::ivec4(28)},
- {glm::ivec4(0x20000000), glm::ivec4(29)},
- {glm::ivec4(0x40000000), glm::ivec4(30)}
- };
-
- int Error(0);
-
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<glm::ivec4, glm::ivec4>); ++i)
- {
- glm::ivec4 Result0 = glm::findMSB(Data[i].Value);
- Error += glm::all(glm::equal(Data[i].Return, Result0)) ? 0 : 1;
- }
-
- return Error;
- }
-
- static int test_int()
- {
- typedef type<glm::uint, int> entry;
-
- entry const Data[] =
- {
- {0x00000000, -1},
- {0x00000001, 0},
- {0x00000002, 1},
- {0x00000003, 1},
- {0x00000004, 2},
- {0x00000005, 2},
- {0x00000007, 2},
- {0x00000008, 3},
- {0x00000010, 4},
- {0x00000020, 5},
- {0x00000040, 6},
- {0x00000080, 7},
- {0x00000100, 8},
- {0x00000200, 9},
- {0x00000400, 10},
- {0x00000800, 11},
- {0x00001000, 12},
- {0x00002000, 13},
- {0x00004000, 14},
- {0x00008000, 15},
- {0x00010000, 16},
- {0x00020000, 17},
- {0x00040000, 18},
- {0x00080000, 19},
- {0x00100000, 20},
- {0x00200000, 21},
- {0x00400000, 22},
- {0x00800000, 23},
- {0x01000000, 24},
- {0x02000000, 25},
- {0x04000000, 26},
- {0x08000000, 27},
- {0x10000000, 28},
- {0x20000000, 29},
- {0x40000000, 30}
- };
-
- int Error(0);
-
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(entry); ++i)
- {
- int Result0 = glm::findMSB(Data[i].Value);
- Error += Data[i].Return == Result0 ? 0 : 1;
- }
-
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(entry); ++i)
- {
- int Result0 = findMSB_nlz1(Data[i].Value);
- Error += Data[i].Return == Result0 ? 0 : 1;
- }
-/*
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(entry); ++i)
- {
- int Result0 = findMSB_nlz2(Data[i].Value);
- Error += Data[i].Return == Result0 ? 0 : 1;
- }
-*/
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(entry); ++i)
- {
- int Result0 = findMSB_095(Data[i].Value);
- Error += Data[i].Return == Result0 ? 0 : 1;
- }
-
-# if GLM_HAS_BITSCAN_WINDOWS
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(entry); ++i)
- {
- int Result0 = findMSB_intrinsic(Data[i].Value);
- Error += Data[i].Return == Result0 ? 0 : 1;
- }
-# endif//GLM_HAS_BITSCAN_WINDOWS
-
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(entry); ++i)
- {
- int Result0 = findMSB_pop(Data[i].Value);
- Error += Data[i].Return == Result0 ? 0 : 1;
- }
-
- return Error;
- }
-
- static int test()
- {
- int Error(0);
-
- Error += test_ivec4();
- Error += test_int();
-
- return Error;
- }
-
- static int perf(std::size_t Samples)
- {
- int Error(0);
-
- Error += perf_int(Samples);
-
- return Error;
- }
-}//findMSB
-
-namespace findLSB
-{
- template<typename genType, typename retType>
- struct type
- {
- genType Value;
- retType Return;
- };
-
- typedef type<int, int> entry;
-
- entry const DataI32[] =
- {
- {0x00000001, 0},
- {0x00000003, 0},
- {0x00000002, 1},
- // {0x80000000, 31}, // Clang generates an error with this
- {0x00010000, 16},
- {0x7FFF0000, 16},
- {0x7F000000, 24},
- {0x7F00FF00, 8},
- {0x00000000, -1}
- };
-
-# if GLM_HAS_BITSCAN_WINDOWS
- template<typename genIUType>
- static int findLSB_intrinsic(genIUType Value)
- {
- GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'findLSB' only accept integer values");
-
- if(Value == 0)
- return -1;
-
- unsigned long Result(0);
- _BitScanForward(&Result, Value);
- return int(Result);
- }
-# endif
-
- template<typename genIUType>
- static int findLSB_095(genIUType Value)
- {
- GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'findLSB' only accept integer values");
- if(Value == 0)
- return -1;
-
- genIUType Bit;
- for(Bit = genIUType(0); !(Value & (1 << Bit)); ++Bit){}
- return Bit;
- }
-
- template<typename genIUType>
- static int findLSB_ntz2(genIUType x)
- {
- if(x == 0)
- return -1;
-
- return glm::bitCount(~x & (x - static_cast<genIUType>(1)));
- }
-
- template<typename genIUType>
- static int findLSB_branchfree(genIUType x)
- {
- bool IsNull(x == 0);
- int const Keep(!IsNull);
- int const Discard(IsNull);
-
- return static_cast<int>(glm::bitCount(~x & (x - static_cast<genIUType>(1)))) * Keep + Discard * -1;
- }
-
- static int test_int()
- {
- int Error(0);
-
- for(std::size_t i = 0; i < sizeof(DataI32) / sizeof(entry); ++i)
- {
- int Result = glm::findLSB(DataI32[i].Value);
- Error += DataI32[i].Return == Result ? 0 : 1;
- }
-
- for(std::size_t i = 0; i < sizeof(DataI32) / sizeof(entry); ++i)
- {
- int Result = findLSB_095(DataI32[i].Value);
- Error += DataI32[i].Return == Result ? 0 : 1;
- }
-
-# if GLM_HAS_BITSCAN_WINDOWS
- for(std::size_t i = 0; i < sizeof(DataI32) / sizeof(entry); ++i)
- {
- int Result = findLSB_intrinsic(DataI32[i].Value);
- Error += DataI32[i].Return == Result ? 0 : 1;
- }
-# endif
-
- for(std::size_t i = 0; i < sizeof(DataI32) / sizeof(entry); ++i)
- {
- int Result = findLSB_ntz2(DataI32[i].Value);
- Error += DataI32[i].Return == Result ? 0 : 1;
- }
-
- for(std::size_t i = 0; i < sizeof(DataI32) / sizeof(entry); ++i)
- {
- int Result = findLSB_branchfree(DataI32[i].Value);
- Error += DataI32[i].Return == Result ? 0 : 1;
- }
-
- return Error;
- }
-
- static int test()
- {
- int Error(0);
-
- Error += test_int();
-
- return Error;
- }
-
- static int perf_int(std::size_t Count)
- {
- int Error(0);
-
- std::clock_t Timestamps0 = std::clock();
-
- for(std::size_t k = 0; k < Count; ++k)
- for(std::size_t i = 0; i < sizeof(DataI32) / sizeof(entry); ++i)
- {
- int Result = glm::findLSB(DataI32[i].Value);
- Error += DataI32[i].Return == Result ? 0 : 1;
- }
-
- std::clock_t Timestamps1 = std::clock();
-
- for(std::size_t k = 0; k < Count; ++k)
- for(std::size_t i = 0; i < sizeof(DataI32) / sizeof(entry); ++i)
- {
- int Result = findLSB_095(DataI32[i].Value);
- Error += DataI32[i].Return == Result ? 0 : 1;
- }
-
- std::clock_t Timestamps2 = std::clock();
-
-# if GLM_HAS_BITSCAN_WINDOWS
- for(std::size_t k = 0; k < Count; ++k)
- for(std::size_t i = 0; i < sizeof(DataI32) / sizeof(entry); ++i)
- {
- int Result = findLSB_intrinsic(DataI32[i].Value);
- Error += DataI32[i].Return == Result ? 0 : 1;
- }
-# endif
-
- std::clock_t Timestamps3 = std::clock();
-
- for(std::size_t k = 0; k < Count; ++k)
- for(std::size_t i = 0; i < sizeof(DataI32) / sizeof(entry); ++i)
- {
- int Result = findLSB_ntz2(DataI32[i].Value);
- Error += DataI32[i].Return == Result ? 0 : 1;
- }
-
- std::clock_t Timestamps4 = std::clock();
-
- for(std::size_t k = 0; k < Count; ++k)
- for(std::size_t i = 0; i < sizeof(DataI32) / sizeof(entry); ++i)
- {
- int Result = findLSB_branchfree(DataI32[i].Value);
- Error += DataI32[i].Return == Result ? 0 : 1;
- }
-
- std::clock_t Timestamps5 = std::clock();
-
- std::printf("glm::findLSB: %d clocks\n", static_cast<int>(Timestamps1 - Timestamps0));
- std::printf("findLSB - 0.9.5: %d clocks\n", static_cast<int>(Timestamps2 - Timestamps1));
-
-# if GLM_HAS_BITSCAN_WINDOWS
- std::printf("findLSB - intrinsics: %d clocks\n", static_cast<int>(Timestamps3 - Timestamps2));
-# endif
-
- std::printf("findLSB - ntz2: %d clocks\n", static_cast<int>(Timestamps4 - Timestamps3));
- std::printf("findLSB - branchfree: %d clocks\n", static_cast<int>(Timestamps5 - Timestamps4));
-
- return Error;
- }
-
- static int perf(std::size_t Samples)
- {
- int Error(0);
-
- Error += perf_int(Samples);
-
- return Error;
- }
-}//findLSB
-
-namespace uaddCarry
-{
- static int test()
- {
- int Error(0);
-
- {
- glm::uint x = std::numeric_limits<glm::uint>::max();
- glm::uint y = 0;
- glm::uint Carry = 0;
- glm::uint Result = glm::uaddCarry(x, y, Carry);
-
- Error += Carry == 0 ? 0 : 1;
- Error += Result == std::numeric_limits<glm::uint>::max() ? 0 : 1;
- }
-
- {
- glm::uint x = std::numeric_limits<glm::uint>::max();
- glm::uint y = 1;
- glm::uint Carry = 0;
- glm::uint Result = glm::uaddCarry(x, y, Carry);
-
- Error += Carry == 1 ? 0 : 1;
- Error += Result == 0 ? 0 : 1;
- }
-
- {
- glm::uvec1 x(std::numeric_limits<glm::uint>::max());
- glm::uvec1 y(0);
- glm::uvec1 Carry(0);
- glm::uvec1 Result(glm::uaddCarry(x, y, Carry));
-
- Error += glm::all(glm::equal(Carry, glm::uvec1(0))) ? 0 : 1;
- Error += glm::all(glm::equal(Result, glm::uvec1(std::numeric_limits<glm::uint>::max()))) ? 0 : 1;
- }
-
- {
- glm::uvec1 x(std::numeric_limits<glm::uint>::max());
- glm::uvec1 y(1);
- glm::uvec1 Carry(0);
- glm::uvec1 Result(glm::uaddCarry(x, y, Carry));
-
- Error += glm::all(glm::equal(Carry, glm::uvec1(1))) ? 0 : 1;
- Error += glm::all(glm::equal(Result, glm::uvec1(0))) ? 0 : 1;
- }
-
- return Error;
- }
-}//namespace uaddCarry
-
-namespace usubBorrow
-{
- static int test()
- {
- int Error(0);
-
- {
- glm::uint x = 16;
- glm::uint y = 17;
- glm::uint Borrow = 0;
- glm::uint Result = glm::usubBorrow(x, y, Borrow);
-
- Error += Borrow == 1 ? 0 : 1;
- Error += Result == 1 ? 0 : 1;
- }
-
- {
- glm::uvec1 x(16);
- glm::uvec1 y(17);
- glm::uvec1 Borrow(0);
- glm::uvec1 Result(glm::usubBorrow(x, y, Borrow));
-
- Error += glm::all(glm::equal(Borrow, glm::uvec1(1))) ? 0 : 1;
- Error += glm::all(glm::equal(Result, glm::uvec1(1))) ? 0 : 1;
- }
-
- {
- glm::uvec2 x(16);
- glm::uvec2 y(17);
- glm::uvec2 Borrow(0);
- glm::uvec2 Result(glm::usubBorrow(x, y, Borrow));
-
- Error += glm::all(glm::equal(Borrow, glm::uvec2(1))) ? 0 : 1;
- Error += glm::all(glm::equal(Result, glm::uvec2(1))) ? 0 : 1;
- }
-
- {
- glm::uvec3 x(16);
- glm::uvec3 y(17);
- glm::uvec3 Borrow(0);
- glm::uvec3 Result(glm::usubBorrow(x, y, Borrow));
-
- Error += glm::all(glm::equal(Borrow, glm::uvec3(1))) ? 0 : 1;
- Error += glm::all(glm::equal(Result, glm::uvec3(1))) ? 0 : 1;
- }
-
- {
- glm::uvec4 x(16);
- glm::uvec4 y(17);
- glm::uvec4 Borrow(0);
- glm::uvec4 Result(glm::usubBorrow(x, y, Borrow));
-
- Error += glm::all(glm::equal(Borrow, glm::uvec4(1))) ? 0 : 1;
- Error += glm::all(glm::equal(Result, glm::uvec4(1))) ? 0 : 1;
- }
-
- return Error;
- }
-}//namespace usubBorrow
-
-namespace umulExtended
-{
- static int test()
- {
- int Error(0);
-
- {
- glm::uint x = 2;
- glm::uint y = 3;
- glm::uint msb = 0;
- glm::uint lsb = 0;
- glm::umulExtended(x, y, msb, lsb);
-
- Error += msb == 0 ? 0 : 1;
- Error += lsb == 6 ? 0 : 1;
- }
-
- {
- glm::uvec1 x(2);
- glm::uvec1 y(3);
- glm::uvec1 msb(0);
- glm::uvec1 lsb(0);
- glm::umulExtended(x, y, msb, lsb);
-
- Error += glm::all(glm::equal(msb, glm::uvec1(0))) ? 0 : 1;
- Error += glm::all(glm::equal(lsb, glm::uvec1(6))) ? 0 : 1;
- }
-
- {
- glm::uvec2 x(2);
- glm::uvec2 y(3);
- glm::uvec2 msb(0);
- glm::uvec2 lsb(0);
- glm::umulExtended(x, y, msb, lsb);
-
- Error += glm::all(glm::equal(msb, glm::uvec2(0))) ? 0 : 1;
- Error += glm::all(glm::equal(lsb, glm::uvec2(6))) ? 0 : 1;
- }
-
- {
- glm::uvec3 x(2);
- glm::uvec3 y(3);
- glm::uvec3 msb(0);
- glm::uvec3 lsb(0);
- glm::umulExtended(x, y, msb, lsb);
-
- Error += glm::all(glm::equal(msb, glm::uvec3(0))) ? 0 : 1;
- Error += glm::all(glm::equal(lsb, glm::uvec3(6))) ? 0 : 1;
- }
-
- {
- glm::uvec4 x(2);
- glm::uvec4 y(3);
- glm::uvec4 msb(0);
- glm::uvec4 lsb(0);
- glm::umulExtended(x, y, msb, lsb);
-
- Error += glm::all(glm::equal(msb, glm::uvec4(0))) ? 0 : 1;
- Error += glm::all(glm::equal(lsb, glm::uvec4(6))) ? 0 : 1;
- }
-
- return Error;
- }
-}//namespace umulExtended
-
-namespace imulExtended
-{
- static int test()
- {
- int Error(0);
-
- {
- int x = 2;
- int y = 3;
- int msb = 0;
- int lsb = 0;
- glm::imulExtended(x, y, msb, lsb);
-
- Error += msb == 0 ? 0 : 1;
- Error += lsb == 6 ? 0 : 1;
- }
-
- {
- glm::ivec1 x(2);
- glm::ivec1 y(3);
- glm::ivec1 msb(0);
- glm::ivec1 lsb(0);
- glm::imulExtended(x, y, msb, lsb);
-
- Error += glm::all(glm::equal(msb, glm::ivec1(0))) ? 0 : 1;
- Error += glm::all(glm::equal(lsb, glm::ivec1(6))) ? 0 : 1;
- }
-
- {
- glm::ivec2 x(2);
- glm::ivec2 y(3);
- glm::ivec2 msb(0);
- glm::ivec2 lsb(0);
- glm::imulExtended(x, y, msb, lsb);
-
- Error += glm::all(glm::equal(msb, glm::ivec2(0))) ? 0 : 1;
- Error += glm::all(glm::equal(lsb, glm::ivec2(6))) ? 0 : 1;
- }
-
- {
- glm::ivec3 x(2);
- glm::ivec3 y(3);
- glm::ivec3 msb(0);
- glm::ivec3 lsb(0);
- glm::imulExtended(x, y, msb, lsb);
-
- Error += glm::all(glm::equal(msb, glm::ivec3(0))) ? 0 : 1;
- Error += glm::all(glm::equal(lsb, glm::ivec3(6))) ? 0 : 1;
- }
-
- {
- glm::ivec4 x(2);
- glm::ivec4 y(3);
- glm::ivec4 msb(0);
- glm::ivec4 lsb(0);
- glm::imulExtended(x, y, msb, lsb);
-
- Error += glm::all(glm::equal(msb, glm::ivec4(0))) ? 0 : 1;
- Error += glm::all(glm::equal(lsb, glm::ivec4(6))) ? 0 : 1;
- }
-
- return Error;
- }
-}//namespace imulExtended
-
-namespace bitCount
-{
- template<typename genType>
- struct type
- {
- genType Value;
- genType Return;
- };
-
- type<int> const DataI32[] =
- {
- {0x00000001, 1},
- {0x00000003, 2},
- {0x00000002, 1},
- {0x7fffffff, 31},
- {0x00000000, 0}
- };
-
- template<typename T>
- inline int bitCount_if(T v)
- {
- GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'bitCount' only accept integer values");
-
- int Count(0);
- for(T i = 0, n = static_cast<T>(sizeof(T) * 8); i < n; ++i)
- {
- if(v & static_cast<T>(1 << i))
- ++Count;
- }
- return Count;
- }
-
- template<typename T>
- inline int bitCount_vec(T v)
- {
- GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'bitCount' only accept integer values");
-
- int Count(0);
- for(T i = 0, n = static_cast<T>(sizeof(T) * 8); i < n; ++i)
- {
- Count += static_cast<int>((v >> i) & static_cast<T>(1));
- }
- return Count;
- }
-
- template<bool EXEC = false>
- struct compute_bitfieldBitCountStep
- {
- template<glm::length_t L, typename T, glm::qualifier Q>
- GLM_FUNC_QUALIFIER static glm::vec<L, T, Q> call(glm::vec<L, T, Q> const& v, T, T)
- {
- return v;
- }
- };
-
- template<>
- struct compute_bitfieldBitCountStep<true>
- {
- template<glm::length_t L, typename T, glm::qualifier Q>
- GLM_FUNC_QUALIFIER static glm::vec<L, T, Q> call(glm::vec<L, T, Q> const& v, T Mask, T Shift)
- {
- return (v & Mask) + ((v >> Shift) & Mask);
- }
- };
-
- template<glm::length_t L, typename T, glm::qualifier Q>
- static glm::vec<L, int, Q> bitCount_bitfield(glm::vec<L, T, Q> const& v)
- {
- glm::vec<L, typename glm::detail::make_unsigned<T>::type, Q> x(*reinterpret_cast<glm::vec<L, typename glm::detail::make_unsigned<T>::type, Q> const *>(&v));
- x = compute_bitfieldBitCountStep<sizeof(T) * 8 >= 2>::call(x, static_cast<typename glm::detail::make_unsigned<T>::type>(0x5555555555555555ull), static_cast<typename glm::detail::make_unsigned<T>::type>( 1));
- x = compute_bitfieldBitCountStep<sizeof(T) * 8 >= 4>::call(x, static_cast<typename glm::detail::make_unsigned<T>::type>(0x3333333333333333ull), static_cast<typename glm::detail::make_unsigned<T>::type>( 2));
- x = compute_bitfieldBitCountStep<sizeof(T) * 8 >= 8>::call(x, static_cast<typename glm::detail::make_unsigned<T>::type>(0x0F0F0F0F0F0F0F0Full), static_cast<typename glm::detail::make_unsigned<T>::type>( 4));
- x = compute_bitfieldBitCountStep<sizeof(T) * 8 >= 16>::call(x, static_cast<typename glm::detail::make_unsigned<T>::type>(0x00FF00FF00FF00FFull), static_cast<typename glm::detail::make_unsigned<T>::type>( 8));
- x = compute_bitfieldBitCountStep<sizeof(T) * 8 >= 32>::call(x, static_cast<typename glm::detail::make_unsigned<T>::type>(0x0000FFFF0000FFFFull), static_cast<typename glm::detail::make_unsigned<T>::type>(16));
- x = compute_bitfieldBitCountStep<sizeof(T) * 8 >= 64>::call(x, static_cast<typename glm::detail::make_unsigned<T>::type>(0x00000000FFFFFFFFull), static_cast<typename glm::detail::make_unsigned<T>::type>(32));
- return glm::vec<L, int, Q>(x);
- }
-
- template<typename genType>
- static int bitCount_bitfield(genType x)
- {
- return bitCount_bitfield(glm::vec<1, genType, glm::defaultp>(x)).x;
- }
-
- static int perf(std::size_t Size)
- {
- int Error(0);
-
- std::vector<int> v;
- v.resize(Size);
-
- std::vector<glm::ivec4> w;
- w.resize(Size);
-
-
- std::clock_t TimestampsA = std::clock();
-
- // bitCount - TimeIf
- {
- for(std::size_t i = 0, n = v.size(); i < n; ++i)
- v[i] = bitCount_if(static_cast<int>(i));
- }
-
- std::clock_t TimestampsB = std::clock();
-
- // bitCount - TimeVec
- {
- for(std::size_t i = 0, n = v.size(); i < n; ++i)
- v[i] = bitCount_vec(i);
- }
-
- std::clock_t TimestampsC = std::clock();
-
- // bitCount - TimeDefault
- {
- for(std::size_t i = 0, n = v.size(); i < n; ++i)
- v[i] = glm::bitCount(i);
- }
-
- std::clock_t TimestampsD = std::clock();
-
- // bitCount - TimeVec4
- {
- for(std::size_t i = 0, n = v.size(); i < n; ++i)
- w[i] = glm::bitCount(glm::ivec4(static_cast<int>(i)));
- }
-
- std::clock_t TimestampsE = std::clock();
-
- {
- for(std::size_t i = 0, n = v.size(); i < n; ++i)
- v[i] = bitCount_bitfield(static_cast<int>(i));
- }
-
- std::clock_t TimestampsF = std::clock();
-
- std::printf("bitCount - TimeIf %d\n", static_cast<int>(TimestampsB - TimestampsA));
- std::printf("bitCount - TimeVec %d\n", static_cast<int>(TimestampsC - TimestampsB));
- std::printf("bitCount - TimeDefault %d\n", static_cast<int>(TimestampsD - TimestampsC));
- std::printf("bitCount - TimeVec4 %d\n", static_cast<int>(TimestampsE - TimestampsD));
- std::printf("bitCount - bitfield %d\n", static_cast<int>(TimestampsF - TimestampsE));
-
- return Error;
- }
-
- static int test()
- {
- int Error(0);
-
- for(std::size_t i = 0, n = sizeof(DataI32) / sizeof(type<int>); i < n; ++i)
- {
- int ResultA = glm::bitCount(DataI32[i].Value);
- int ResultB = bitCount_if(DataI32[i].Value);
- int ResultC = bitCount_vec(DataI32[i].Value);
- int ResultE = bitCount_bitfield(DataI32[i].Value);
-
- Error += DataI32[i].Return == ResultA ? 0 : 1;
- Error += DataI32[i].Return == ResultB ? 0 : 1;
- Error += DataI32[i].Return == ResultC ? 0 : 1;
- Error += DataI32[i].Return == ResultE ? 0 : 1;
-
- assert(!Error);
- }
-
- return Error;
- }
-}//bitCount
-
-int main()
-{
- int Error = 0;
-
- Error += ::bitCount::test();
- Error += ::bitfieldReverse::test();
- Error += ::findMSB::test();
- Error += ::findLSB::test();
- Error += ::umulExtended::test();
- Error += ::imulExtended::test();
- Error += ::uaddCarry::test();
- Error += ::usubBorrow::test();
- Error += ::bitfieldInsert::test();
- Error += ::bitfieldExtract::test();
-
-# ifdef NDEBUG
- std::size_t const Samples = 1000;
-# else
- std::size_t const Samples = 1;
-# endif
-
- ::bitCount::perf(Samples);
- ::bitfieldReverse::perf(Samples);
- ::findMSB::perf(Samples);
- ::findLSB::perf(Samples);
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/core/core_func_integer_bit_count.cpp b/3rdparty/glm/source/test/core/core_func_integer_bit_count.cpp
deleted file mode 100644
index 0fa11fb..0000000
--- a/3rdparty/glm/source/test/core/core_func_integer_bit_count.cpp
+++ /dev/null
@@ -1,291 +0,0 @@
-// This has the programs for computing the number of 1-bits
-// in a word, or byte, etc.
-// Max line length is 57, to fit in hacker.book.
-#include <cstdio>
-#include <cstdlib> //To define "exit", req'd by XLC.
-#include <ctime>
-
-unsigned rotatel(unsigned x, int n)
-{
- if (static_cast<unsigned>(n) > 63) { std::printf("rotatel, n out of range.\n"); std::exit(1);}
- return (x << n) | (x >> (32 - n));
-}
-
-int pop0(unsigned x)
-{
- x = (x & 0x55555555) + ((x >> 1) & 0x55555555);
- x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
- x = (x & 0x0F0F0F0F) + ((x >> 4) & 0x0F0F0F0F);
- x = (x & 0x00FF00FF) + ((x >> 8) & 0x00FF00FF);
- x = (x & 0x0000FFFF) + ((x >>16) & 0x0000FFFF);
- return x;
-}
-
-int pop1(unsigned x)
-{
- x = x - ((x >> 1) & 0x55555555);
- x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
- x = (x + (x >> 4)) & 0x0F0F0F0F;
- x = x + (x >> 8);
- x = x + (x >> 16);
- return x & 0x0000003F;
-}
-/* Note: an alternative to the last three executable lines above is:
- return x*0x01010101 >> 24;
-if your machine has a fast multiplier (suggested by Jari Kirma). */
-
-int pop2(unsigned x)
-{
- unsigned n;
-
- n = (x >> 1) & 033333333333; // Count bits in
- x = x - n; // each 3-bit
- n = (n >> 1) & 033333333333; // field.
- x = x - n;
- x = (x + (x >> 3)) & 030707070707; // 6-bit sums.
- return x%63; // Add 6-bit sums.
-}
-
-/* An alternative to the "return" statement above is:
- return ((x * 0404040404) >> 26) + // Add 6-bit sums.
- (x >> 30);
-which runs faster on most machines (suggested by Norbert Juffa). */
-
-int pop3(unsigned x)
-{
- unsigned n;
-
- n = (x >> 1) & 0x77777777; // Count bits in
- x = x - n; // each 4-bit
- n = (n >> 1) & 0x77777777; // field.
- x = x - n;
- n = (n >> 1) & 0x77777777;
- x = x - n;
- x = (x + (x >> 4)) & 0x0F0F0F0F; // Get byte sums.
- x = x*0x01010101; // Add the bytes.
- return x >> 24;
-}
-
-int pop4(unsigned x)
-{
- int n;
-
- n = 0;
- while (x != 0) {
- n = n + 1;
- x = x & (x - 1);
- }
- return n;
-}
-
-int pop5(unsigned x)
-{
- int i, sum;
-
- // Rotate and sum method // Shift right & subtract
-
- sum = x; // sum = x;
- for (i = 1; i <= 31; i++) { // while (x != 0) {
- x = rotatel(x, 1); // x = x >> 1;
- sum = sum + x; // sum = sum - x;
- } // }
- return -sum; // return sum;
-}
-
-int pop5a(unsigned x)
-{
- int sum;
-
- // Shift right & subtract
-
- sum = x;
- while (x != 0) {
- x = x >> 1;
- sum = sum - x;
- }
- return sum;
-}
-
-int pop6(unsigned x)
-{ // Table lookup.
- static char table[256] = {
- 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
- 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
- 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
-
- 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
-
- 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
-
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
- 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
- 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8};
-
- return table[x & 0xFF] +
- table[(x >> 8) & 0xFF] +
- table[(x >> 16) & 0xFF] +
- table[(x >> 24)];
-}
-
-// The following works only for 8-bit quantities.
-int pop7(unsigned x)
-{
- x = x*0x08040201; // Make 4 copies.
- x = x >> 3; // So next step hits proper bits.
- x = x & 0x11111111; // Every 4th bit.
- x = x*0x11111111; // Sum the digits (each 0 or 1).
- x = x >> 28; // Position the result.
- return x;
-}
-
-// The following works only for 7-bit quantities.
-int pop8(unsigned x)
-{
- x = x*0x02040810; // Make 4 copies, left-adjusted.
- x = x & 0x11111111; // Every 4th bit.
- x = x*0x11111111; // Sum the digits (each 0 or 1).
- x = x >> 28; // Position the result.
- return x;
-}
-
-// The following works only for 15-bit quantities.
-int pop9(unsigned x)
-{
- unsigned long long y;
- y = x * 0x0002000400080010ULL;
- y = y & 0x1111111111111111ULL;
- y = y * 0x1111111111111111ULL;
- y = y >> 60;
- return static_cast<int>(y);
-}
-
-int errors;
-void error(int x, int y)
-{
- errors = errors + 1;
- std::printf("Error for x = %08x, got %08x\n", x, y);
-}
-
-int main()
-{
-# ifdef NDEBUG
-
- int i, n;
- static unsigned test[] = {0,0, 1,1, 2,1, 3,2, 4,1, 5,2, 6,2, 7,3,
- 8,1, 9,2, 10,2, 11,3, 12,2, 13,3, 14,3, 15,4, 16,1, 17,2,
- 0x3F,6, 0x40,1, 0x41,2, 0x7f,7, 0x80,1, 0x81,2, 0xfe,7, 0xff,8,
- 0x4000,1, 0x4001,2, 0x7000,3, 0x7fff,15,
- 0x55555555,16, 0xAAAAAAAA, 16, 0xFF000000,8, 0xC0C0C0C0,8,
- 0x0FFFFFF0,24, 0x80000000,1, 0xFFFFFFFF,32};
-
- std::size_t const Count = 1000000;
-
- n = sizeof(test)/4;
-
- std::clock_t TimestampBeg = 0;
- std::clock_t TimestampEnd = 0;
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (pop0(test[i]) != test[i+1]) error(test[i], pop0(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("pop0: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (pop1(test[i]) != test[i+1]) error(test[i], pop1(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("pop1: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (pop2(test[i]) != test[i+1]) error(test[i], pop2(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("pop2: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (pop3(test[i]) != test[i+1]) error(test[i], pop3(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("pop3: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (pop4(test[i]) != test[i+1]) error(test[i], pop4(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("pop4: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (pop5(test[i]) != test[i+1]) error(test[i], pop5(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("pop5: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (pop5a(test[i]) != test[i+1]) error(test[i], pop5a(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("pop5a: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (pop6(test[i]) != test[i+1]) error(test[i], pop6(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("pop6: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if ((test[i] & 0xffffff00) == 0)
- if (pop7(test[i]) != test[i+1]) error(test[i], pop7(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("pop7: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if ((test[i] & 0xffffff80) == 0)
- if (pop8(test[i]) != test[i+1]) error(test[i], pop8(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("pop8: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if ((test[i] & 0xffff8000) == 0)
- if (pop9(test[i]) != test[i+1]) error(test[i], pop9(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("pop9: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- if (errors == 0)
- std::printf("Passed all %d cases.\n", static_cast<int>(sizeof(test)/8));
-
-# endif//NDEBUG
-}
diff --git a/3rdparty/glm/source/test/core/core_func_integer_find_lsb.cpp b/3rdparty/glm/source/test/core/core_func_integer_find_lsb.cpp
deleted file mode 100644
index 7b42d33..0000000
--- a/3rdparty/glm/source/test/core/core_func_integer_find_lsb.cpp
+++ /dev/null
@@ -1,416 +0,0 @@
-#include <glm/glm.hpp>
-#include <cstdio>
-#include <cstdlib> //To define "exit", req'd by XLC.
-#include <ctime>
-
-int nlz(unsigned x)
-{
- int pop(unsigned x);
-
- x = x | (x >> 1);
- x = x | (x >> 2);
- x = x | (x >> 4);
- x = x | (x >> 8);
- x = x | (x >>16);
- return pop(~x);
-}
-
-int pop(unsigned x)
-{
- x = x - ((x >> 1) & 0x55555555);
- x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
- x = (x + (x >> 4)) & 0x0F0F0F0F;
- x = x + (x << 8);
- x = x + (x << 16);
- return x >> 24;
-}
-
-int ntz1(unsigned x)
-{
- return 32 - nlz(~x & (x-1));
-}
-
-int ntz2(unsigned x)
-{
- return pop(~x & (x - 1));
-}
-
-int ntz3(unsigned x)
-{
- int n;
-
- if (x == 0) return(32);
- n = 1;
- if ((x & 0x0000FFFF) == 0) {n = n +16; x = x >>16;}
- if ((x & 0x000000FF) == 0) {n = n + 8; x = x >> 8;}
- if ((x & 0x0000000F) == 0) {n = n + 4; x = x >> 4;}
- if ((x & 0x00000003) == 0) {n = n + 2; x = x >> 2;}
- return n - (x & 1);
-}
-
-int ntz4(unsigned x)
-{
- unsigned y;
- int n;
-
- if (x == 0) return 32;
- n = 31;
- y = x <<16; if (y != 0) {n = n -16; x = y;}
- y = x << 8; if (y != 0) {n = n - 8; x = y;}
- y = x << 4; if (y != 0) {n = n - 4; x = y;}
- y = x << 2; if (y != 0) {n = n - 2; x = y;}
- y = x << 1; if (y != 0) {n = n - 1;}
- return n;
-}
-
-int ntz4a(unsigned x)
-{
- unsigned y;
- int n;
-
- if (x == 0) return 32;
- n = 31;
- y = x <<16; if (y != 0) {n = n -16; x = y;}
- y = x << 8; if (y != 0) {n = n - 8; x = y;}
- y = x << 4; if (y != 0) {n = n - 4; x = y;}
- y = x << 2; if (y != 0) {n = n - 2; x = y;}
- n = n - ((x << 1) >> 31);
- return n;
-}
-
-int ntz5(char x)
-{
- if (x & 15) {
- if (x & 3) {
- if (x & 1) return 0;
- else return 1;
- }
- else if (x & 4) return 2;
- else return 3;
- }
- else if (x & 0x30) {
- if (x & 0x10) return 4;
- else return 5;
- }
- else if (x & 0x40) return 6;
- else if (x) return 7;
- else return 8;
-}
-
-int ntz6(unsigned x)
-{
- int n;
-
- x = ~x & (x - 1);
- n = 0; // n = 32;
- while(x != 0)
- { // while (x != 0) {
- n = n + 1; // n = n - 1;
- x = x >> 1; // x = x + x;
- } // }
- return n; // return n;
-}
-
-int ntz6a(unsigned x)
-{
- int n = 32;
-
- while (x != 0) {
- n = n - 1;
- x = x + x;
- }
- return n;
-}
-
-/* Dean Gaudet's algorithm. To be most useful there must be a good way
-to evaluate the C "conditional expression" (a?b:c construction) without
-branching. The result of a?b:c is b if a is true (nonzero), and c if a
-is false (0).
- For example, a compare to zero op that sets a target GPR to 1 if the
-operand is 0, and to 0 if the operand is nonzero, will do it. With this
-instruction, the algorithm is entirely branch-free. But the most
-interesting thing about it is the high degree of parallelism. All six
-lines with conditional expressions can be executed in parallel (on a
-machine with sufficient computational units).
- Although the instruction count is 30 measured statically, it could
-execute in only 10 cycles on a machine with sufficient parallelism.
- The first two uses of y can instead be x, which would increase the
-useful parallelism on most machines (the assignments to y, bz, and b4
-could then all run in parallel). */
-
-int ntz7(unsigned x)
-{
- unsigned y, bz, b4, b3, b2, b1, b0;
-
- y = x & -x; // Isolate rightmost 1-bit.
- bz = y ? 0 : 1; // 1 if y = 0.
- b4 = (y & 0x0000FFFF) ? 0 : 16;
- b3 = (y & 0x00FF00FF) ? 0 : 8;
- b2 = (y & 0x0F0F0F0F) ? 0 : 4;
- b1 = (y & 0x33333333) ? 0 : 2;
- b0 = (y & 0x55555555) ? 0 : 1;
- return bz + b4 + b3 + b2 + b1 + b0;
-}
-
-// This file has divisions by zero to test isnan
-#if GLM_COMPILER & GLM_COMPILER_VC
-# pragma warning(disable : 4800)
-#endif
-
-int ntz7_christophe(unsigned x)
-{
- unsigned y, bz, b4, b3, b2, b1, b0;
-
- y = x & -x; // Isolate rightmost 1-bit.
- bz = unsigned(!bool(y)); // 1 if y = 0.
- b4 = unsigned(!bool(y & 0x0000FFFF)) * 16;
- b3 = unsigned(!bool(y & 0x00FF00FF)) * 8;
- b2 = unsigned(!bool(y & 0x0F0F0F0F)) * 4;
- b1 = unsigned(!bool(y & 0x33333333)) * 2;
- b0 = unsigned(!bool(y & 0x55555555)) * 1;
- return bz + b4 + b3 + b2 + b1 + b0;
-}
-
-/* Below is David Seal's algorithm, found at
-http://www.ciphersbyritter.com/NEWS4/BITCT.HTM Table
-entries marked "u" are unused. 6 ops including a
-multiply, plus an indexed load. */
-
-#define u 99
-int ntz8(unsigned x)
-{
- static char table[64] =
- {32, 0, 1,12, 2, 6, u,13, 3, u, 7, u, u, u, u,14,
- 10, 4, u, u, 8, u, u,25, u, u, u, u, u,21,27,15,
- 31,11, 5, u, u, u, u, u, 9, u, u,24, u, u,20,26,
- 30, u, u, u, u,23, u,19, 29, u,22,18,28,17,16, u};
-
- x = (x & -x)*0x0450FBAF;
- return table[x >> 26];
-}
-
-/* Seal's algorithm with multiply expanded.
-9 elementary ops plus an indexed load. */
-
-int ntz8a(unsigned x)
-{
- static char table[64] =
- {32, 0, 1,12, 2, 6, u,13, 3, u, 7, u, u, u, u,14,
- 10, 4, u, u, 8, u, u,25, u, u, u, u, u,21,27,15,
- 31,11, 5, u, u, u, u, u, 9, u, u,24, u, u,20,26,
- 30, u, u, u, u,23, u,19, 29, u,22,18,28,17,16, u};
-
- x = (x & -x);
- x = (x << 4) + x; // x = x*17.
- x = (x << 6) + x; // x = x*65.
- x = (x << 16) - x; // x = x*65535.
- return table[x >> 26];
-}
-
-/* Reiser's algorithm. Three ops including a "remainder,"
-plus an indexed load. */
-
-int ntz9(unsigned x)
-{
- static char table[37] = {
- 32, 0, 1, 26, 2, 23, 27,
- u, 3, 16, 24, 30, 28, 11, u, 13, 4,
- 7, 17, u, 25, 22, 31, 15, 29, 10, 12,
- 6, u, 21, 14, 9, 5, 20, 8, 19, 18};
-
- x = (x & -x)%37;
- return table[x];
-}
-
-/* Using a de Bruijn sequence. This is a table lookup with a 32-entry
-table. The de Bruijn sequence used here is
- 0000 0100 1101 0111 0110 0101 0001 1111,
-obtained from Danny Dube's October 3, 1997, posting in
-comp.compression.research. Thanks to Norbert Juffa for this reference. */
-
-int ntz10(unsigned x) {
-
- static char table[32] =
- { 0, 1, 2,24, 3,19, 6,25, 22, 4,20,10,16, 7,12,26,
- 31,23,18, 5,21, 9,15,11, 30,17, 8,14,29,13,28,27};
-
- if (x == 0) return 32;
- x = (x & -x)*0x04D7651F;
- return table[x >> 27];
-}
-
-/* Norbert Juffa's code, answer to exercise 1 of Chapter 5 (2nd ed). */
-
-#define SLOW_MUL
-int ntz11 (unsigned int n) {
-
- static unsigned char tab[32] =
- { 0, 1, 2, 24, 3, 19, 6, 25,
- 22, 4, 20, 10, 16, 7, 12, 26,
- 31, 23, 18, 5, 21, 9, 15, 11,
- 30, 17, 8, 14, 29, 13, 28, 27
- };
- unsigned int k;
- n = n & (-n); /* isolate lsb */
- printf("n = %d\n", n);
-#if defined(SLOW_MUL)
- k = (n << 11) - n;
- k = (k << 2) + k;
- k = (k << 8) + n;
- k = (k << 5) - k;
-#else
- k = n * 0x4d7651f;
-#endif
- return n ? tab[k>>27] : 32;
-}
-
-int errors;
-void error(int x, int y) {
- errors = errors + 1;
- std::printf("Error for x = %08x, got %d\n", x, y);
-}
-
-int main()
-{
-# ifdef NDEBUG
-
- int i, m, n;
- static unsigned test[] = {0,32, 1,0, 2,1, 3,0, 4,2, 5,0, 6,1, 7,0,
- 8,3, 9,0, 16,4, 32,5, 64,6, 128,7, 255,0, 256,8, 512,9, 1024,10,
- 2048,11, 4096,12, 8192,13, 16384,14, 32768,15, 65536,16,
- 0x20000,17, 0x40000,18, 0x80000,19, 0x100000,20, 0x200000,21,
- 0x400000,22, 0x800000,23, 0x1000000,24, 0x2000000,25,
- 0x4000000,26, 0x8000000,27, 0x10000000,28, 0x20000000,29,
- 0x40000000,30, 0x80000000,31, 0xFFFFFFF0,4, 0x3000FF00,8,
- 0xC0000000,30, 0x60000000,29, 0x00011000, 12};
-
- std::size_t const Count = 1000;
-
- n = sizeof(test)/4;
-
- std::clock_t TimestampBeg = 0;
- std::clock_t TimestampEnd = 0;
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (ntz1(test[i]) != test[i+1]) error(test[i], ntz1(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("ntz1: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (ntz2(test[i]) != test[i+1]) error(test[i], ntz2(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("ntz2: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (ntz3(test[i]) != test[i+1]) error(test[i], ntz3(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("ntz3: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (ntz4(test[i]) != test[i+1]) error(test[i], ntz4(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("ntz4: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (ntz4a(test[i]) != test[i+1]) error(test[i], ntz4a(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("ntz4a: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for(std::size_t k = 0; k < Count; ++k)
- for(i = 0; i < n; i += 2)
- {
- m = test[i+1];
- if(m > 8)
- m = 8;
- if(ntz5(static_cast<char>(test[i])) != m)
- error(test[i], ntz5(static_cast<char>(test[i])));
- }
- TimestampEnd = std::clock();
-
- std::printf("ntz5: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (ntz6(test[i]) != test[i+1]) error(test[i], ntz6(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("ntz6: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (ntz6a(test[i]) != test[i+1]) error(test[i], ntz6a(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("ntz6a: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (ntz7(test[i]) != test[i+1]) error(test[i], ntz7(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("ntz7: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (ntz7_christophe(test[i]) != test[i+1]) error(test[i], ntz7(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("ntz7_christophe: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (ntz8(test[i]) != test[i+1]) error(test[i], ntz8(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("ntz8: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (ntz8a(test[i]) != test[i+1]) error(test[i], ntz8a(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("ntz8a: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (ntz9(test[i]) != test[i+1]) error(test[i], ntz9(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("ntz9: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (ntz10(test[i]) != test[i+1]) error(test[i], ntz10(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("ntz10: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- if (errors == 0)
- std::printf("Passed all %d cases.\n", static_cast<int>(sizeof(test)/8));
-
-# endif//NDEBUG
-}
diff --git a/3rdparty/glm/source/test/core/core_func_integer_find_msb.cpp b/3rdparty/glm/source/test/core/core_func_integer_find_msb.cpp
deleted file mode 100644
index c435467..0000000
--- a/3rdparty/glm/source/test/core/core_func_integer_find_msb.cpp
+++ /dev/null
@@ -1,440 +0,0 @@
-#include <glm/glm.hpp>
-#include <cstdio>
-#include <cstdlib> // To define "exit", req'd by XLC.
-#include <ctime>
-
-#define LE 1 // 1 for little-endian, 0 for big-endian.
-
-int pop(unsigned x) {
- x = x - ((x >> 1) & 0x55555555);
- x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
- x = (x + (x >> 4)) & 0x0F0F0F0F;
- x = x + (x << 8);
- x = x + (x << 16);
- return x >> 24;
-}
-
-int nlz1(unsigned x) {
- int n;
-
- if (x == 0) return(32);
- n = 0;
- if (x <= 0x0000FFFF) {n = n +16; x = x <<16;}
- if (x <= 0x00FFFFFF) {n = n + 8; x = x << 8;}
- if (x <= 0x0FFFFFFF) {n = n + 4; x = x << 4;}
- if (x <= 0x3FFFFFFF) {n = n + 2; x = x << 2;}
- if (x <= 0x7FFFFFFF) {n = n + 1;}
- return n;
-}
-
-int nlz1a(unsigned x) {
- int n;
-
-/* if (x == 0) return(32); */
- if (static_cast<int>(x) <= 0) return (~x >> 26) & 32;
- n = 1;
- if ((x >> 16) == 0) {n = n +16; x = x <<16;}
- if ((x >> 24) == 0) {n = n + 8; x = x << 8;}
- if ((x >> 28) == 0) {n = n + 4; x = x << 4;}
- if ((x >> 30) == 0) {n = n + 2; x = x << 2;}
- n = n - (x >> 31);
- return n;
-}
-// On basic Risc, 12 to 20 instructions.
-
-int nlz2(unsigned x) {
- unsigned y;
- int n;
-
- n = 32;
- y = x >>16; if (y != 0) {n = n -16; x = y;}
- y = x >> 8; if (y != 0) {n = n - 8; x = y;}
- y = x >> 4; if (y != 0) {n = n - 4; x = y;}
- y = x >> 2; if (y != 0) {n = n - 2; x = y;}
- y = x >> 1; if (y != 0) return n - 2;
- return n - x;
-}
-
-// As above but coded as a loop for compactness:
-// 23 to 33 basic Risc instructions.
-int nlz2a(unsigned x) {
- unsigned y;
- int n, c;
-
- n = 32;
- c = 16;
- do {
- y = x >> c; if (y != 0) {n = n - c; x = y;}
- c = c >> 1;
- } while (c != 0);
- return n - x;
-}
-
-int nlz3(int x) {
- int y, n;
-
- n = 0;
- y = x;
-L: if (x < 0) return n;
- if (y == 0) return 32 - n;
- n = n + 1;
- x = x << 1;
- y = y >> 1;
- goto L;
-}
-
-int nlz4(unsigned x) {
- int y, m, n;
-
- y = -(x >> 16); // If left half of x is 0,
- m = (y >> 16) & 16; // set n = 16. If left half
- n = 16 - m; // is nonzero, set n = 0 and
- x = x >> m; // shift x right 16.
- // Now x is of the form 0000xxxx.
- y = x - 0x100; // If positions 8-15 are 0,
- m = (y >> 16) & 8; // add 8 to n and shift x left 8.
- n = n + m;
- x = x << m;
-
- y = x - 0x1000; // If positions 12-15 are 0,
- m = (y >> 16) & 4; // add 4 to n and shift x left 4.
- n = n + m;
- x = x << m;
-
- y = x - 0x4000; // If positions 14-15 are 0,
- m = (y >> 16) & 2; // add 2 to n and shift x left 2.
- n = n + m;
- x = x << m;
-
- y = x >> 14; // Set y = 0, 1, 2, or 3.
- m = y & ~(y >> 1); // Set m = 0, 1, 2, or 2 resp.
- return n + 2 - m;
-}
-
-int nlz5(unsigned x) {
- int pop(unsigned x);
-
- x = x | (x >> 1);
- x = x | (x >> 2);
- x = x | (x >> 4);
- x = x | (x >> 8);
- x = x | (x >>16);
- return pop(~x);
-}
-
-/* The four programs below are not valid ANSI C programs. This is
-because they refer to the same storage locations as two different types.
-However, they work with xlc/AIX, gcc/AIX, and gcc/NT. If you try to
-code them more compactly by declaring a variable xx to be "double," and
-then using
-
- n = 1054 - (*((unsigned *)&xx + LE) >> 20);
-
-then you are violating not only the rule above, but also the ANSI C
-rule that pointer arithmetic can be performed only on pointers to
-array elements.
- When coded with the above statement, the program fails with xlc,
-gcc/AIX, and gcc/NT, at some optimization levels.
- BTW, these programs use the "anonymous union" feature of C++, not
-available in C. */
-
-int nlz6(unsigned k)
-{
- union {
- unsigned asInt[2];
- double asDouble;
- };
- int n;
-
- asDouble = static_cast<double>(k) + 0.5;
- n = 1054 - (asInt[LE] >> 20);
- return n;
-}
-
-int nlz7(unsigned k)
-{
- union {
- unsigned asInt[2];
- double asDouble;
- };
- int n;
-
- asDouble = static_cast<double>(k);
- n = 1054 - (asInt[LE] >> 20);
- n = (n & 31) + (n >> 9);
- return n;
-}
-
- /* In single qualifier, round-to-nearest mode, the basic method fails for:
- k = 0, k = 01FFFFFF, 03FFFFFE <= k <= 03FFFFFF,
- 07FFFFFC <= k <= 07FFFFFF,
- 0FFFFFF8 <= k <= 0FFFFFFF,
- ...
- 7FFFFFC0 <= k <= 7FFFFFFF.
- FFFFFF80 <= k <= FFFFFFFF.
- For k = 0 it gives 158, and for the other values it is too low by 1. */
-
-int nlz8(unsigned k)
-{
- union {
- unsigned asInt;
- float asFloat;
- };
- int n;
-
- k = k & ~(k >> 1); /* Fix problem with rounding. */
- asFloat = static_cast<float>(k) + 0.5f;
- n = 158 - (asInt >> 23);
- return n;
-}
-
-/* The example below shows how to make a macro for nlz. It uses an
-extension to the C and C++ languages that is provided by the GNU C/C++
-compiler, namely, that of allowing statements and declarations in
-expressions (see "Using and Porting GNU CC", by Richard M. Stallman
-(1998). The underscores are necessary to protect against the
-possibility that the macro argument will conflict with one of its local
-variables, e.g., NLZ(k). */
-
-int nlz9(unsigned k)
-{
- union {
- unsigned asInt;
- float asFloat;
- };
- int n;
-
- k = k & ~(k >> 1); /* Fix problem with rounding. */
- asFloat = static_cast<float>(k);
- n = 158 - (asInt >> 23);
- n = (n & 31) + (n >> 6); /* Fix problem with k = 0. */
- return n;
-}
-
-/* Below are three nearly equivalent programs for computing the number
-of leading zeros in a word. This material is not in HD, but may be in a
-future edition.
- Immediately below is Robert Harley's algorithm, found at the
-comp.arch newsgroup entry dated 7/12/96, pointed out to me by Norbert
-Juffa.
- Table entries marked "u" are unused. 14 ops including a multiply,
-plus an indexed load.
- The smallest multiplier that works is 0x045BCED1 = 17*65*129*513 (all
-of form 2**k + 1). There are no multipliers of three terms of the form
-2**k +- 1 that work, with a table size of 64 or 128. There are some,
-with a table size of 64, if you precede the multiplication with x = x -
-(x >> 1), but that seems less elegant. There are also some if you use a
-table size of 256, the smallest is 0x01033CBF = 65*255*1025 (this would
-save two instructions in the form of this algorithm with the
-multiplication expanded into shifts and adds, but the table size is
-getting a bit large). */
-
-#define u 99
-int nlz10(unsigned x)
-{
- static char table[64] =
- {32,31, u,16, u,30, 3, u, 15, u, u, u,29,10, 2, u,
- u, u,12,14,21, u,19, u, u,28, u,25, u, 9, 1, u,
- 17, u, 4, u, u, u,11, u, 13,22,20, u,26, u, u,18,
- 5, u, u,23, u,27, u, 6, u,24, 7, u, 8, u, 0, u};
-
- x = x | (x >> 1); // Propagate leftmost
- x = x | (x >> 2); // 1-bit to the right.
- x = x | (x >> 4);
- x = x | (x >> 8);
- x = x | (x >>16);
- x = x*0x06EB14F9; // Multiplier is 7*255**3.
- return table[x >> 26];
-}
-
-/* Harley's algorithm with multiply expanded.
-19 elementary ops plus an indexed load. */
-
-int nlz10a(unsigned x)
-{
- static char table[64] =
- {32,31, u,16, u,30, 3, u, 15, u, u, u,29,10, 2, u,
- u, u,12,14,21, u,19, u, u,28, u,25, u, 9, 1, u,
- 17, u, 4, u, u, u,11, u, 13,22,20, u,26, u, u,18,
- 5, u, u,23, u,27, u, 6, u,24, 7, u, 8, u, 0, u};
-
- x = x | (x >> 1); // Propagate leftmost
- x = x | (x >> 2); // 1-bit to the right.
- x = x | (x >> 4);
- x = x | (x >> 8);
- x = x | (x >> 16);
- x = (x << 3) - x; // Multiply by 7.
- x = (x << 8) - x; // Multiply by 255.
- x = (x << 8) - x; // Again.
- x = (x << 8) - x; // Again.
- return table[x >> 26];
-}
-
-/* Julius Goryavsky's version of Harley's algorithm.
-17 elementary ops plus an indexed load, if the machine
-has "and not." */
-
-int nlz10b(unsigned x)
-{
- static char table[64] =
- {32,20,19, u, u,18, u, 7, 10,17, u, u,14, u, 6, u,
- u, 9, u,16, u, u, 1,26, u,13, u, u,24, 5, u, u,
- u,21, u, 8,11, u,15, u, u, u, u, 2,27, 0,25, u,
- 22, u,12, u, u, 3,28, u, 23, u, 4,29, u, u,30,31};
-
- x = x | (x >> 1); // Propagate leftmost
- x = x | (x >> 2); // 1-bit to the right.
- x = x | (x >> 4);
- x = x | (x >> 8);
- x = x & ~(x >> 16);
- x = x*0xFD7049FF; // Activate this line or the following 3.
- // x = (x << 9) - x; // Multiply by 511.
- // x = (x << 11) - x; // Multiply by 2047.
- // x = (x << 14) - x; // Multiply by 16383.
- return table[x >> 26];
-}
-
-int errors;
-void error(int x, int y)
-{
- errors = errors + 1;
- std::printf("Error for x = %08x, got %d\n", x, y);
-}
-
-int main()
-{
-# ifdef NDEBUG
-
- int i, n;
- static unsigned test[] = {0,32, 1,31, 2,30, 3,30, 4,29, 5,29, 6,29,
- 7,29, 8,28, 9,28, 16,27, 32,26, 64,25, 128,24, 255,24, 256,23,
- 512,22, 1024,21, 2048,20, 4096,19, 8192,18, 16384,17, 32768,16,
- 65536,15, 0x20000,14, 0x40000,13, 0x80000,12, 0x100000,11,
- 0x200000,10, 0x400000,9, 0x800000,8, 0x1000000,7, 0x2000000,6,
- 0x4000000,5, 0x8000000,4, 0x0FFFFFFF,4, 0x10000000,3,
- 0x3000FFFF,2, 0x50003333,1, 0x7FFFFFFF,1, 0x80000000,0,
- 0xFFFFFFFF,0};
- std::size_t const Count = 1000;
-
- n = sizeof(test)/4;
-
- std::clock_t TimestampBeg = 0;
- std::clock_t TimestampEnd = 0;
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (nlz1(test[i]) != test[i+1]) error(test[i], nlz1(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("nlz1: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (nlz1a(test[i]) != test[i+1]) error(test[i], nlz1a(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("nlz1a: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (nlz2(test[i]) != test[i+1]) error(test[i], nlz2(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("nlz2: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (nlz2a(test[i]) != test[i+1]) error(test[i], nlz2a(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("nlz2a: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (nlz3(test[i]) != test[i+1]) error(test[i], nlz3(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("nlz3: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (nlz4(test[i]) != test[i+1]) error(test[i], nlz4(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("nlz4: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (nlz5(test[i]) != test[i+1]) error(test[i], nlz5(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("nlz5: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (nlz6(test[i]) != test[i+1]) error(test[i], nlz6(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("nlz6: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (nlz7(test[i]) != test[i+1]) error(test[i], nlz7(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("nlz7: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (nlz8(test[i]) != test[i+1]) error(test[i], nlz8(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("nlz8: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (nlz9(test[i]) != test[i+1]) error(test[i], nlz9(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("nlz9: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (nlz10(test[i]) != test[i+1]) error(test[i], nlz10(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("nlz10: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (nlz10a(test[i]) != test[i+1]) error(test[i], nlz10a(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("nlz10a: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- TimestampBeg = std::clock();
- for (std::size_t k = 0; k < Count; ++k)
- for (i = 0; i < n; i += 2) {
- if (nlz10b(test[i]) != test[i+1]) error(test[i], nlz10b(test[i]));}
- TimestampEnd = std::clock();
-
- std::printf("nlz10b: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
-
- if (errors == 0)
- std::printf("Passed all %d cases.\n", static_cast<int>(sizeof(test)/8));
-
-# endif//NDEBUG
-}
diff --git a/3rdparty/glm/source/test/core/core_func_matrix.cpp b/3rdparty/glm/source/test/core/core_func_matrix.cpp
deleted file mode 100644
index c5b2007..0000000
--- a/3rdparty/glm/source/test/core/core_func_matrix.cpp
+++ /dev/null
@@ -1,312 +0,0 @@
-#include <glm/ext/matrix_relational.hpp>
-#include <glm/ext/matrix_transform.hpp>
-#include <glm/ext/scalar_constants.hpp>
-#include <glm/mat2x2.hpp>
-#include <glm/mat2x3.hpp>
-#include <glm/mat2x4.hpp>
-#include <glm/mat3x2.hpp>
-#include <glm/mat3x3.hpp>
-#include <glm/mat3x4.hpp>
-#include <glm/mat4x2.hpp>
-#include <glm/mat4x3.hpp>
-#include <glm/mat4x4.hpp>
-#include <vector>
-#include <ctime>
-#include <cstdio>
-
-using namespace glm;
-
-int test_matrixCompMult()
-{
- int Error(0);
-
- {
- mat2 m(0, 1, 2, 3);
- mat2 n = matrixCompMult(m, m);
- mat2 expected = mat2(0, 1, 4, 9);
- Error += all(equal(n, expected, epsilon<float>())) ? 0 : 1;
- }
-
- {
- mat2x3 m(0, 1, 2, 3, 4, 5);
- mat2x3 n = matrixCompMult(m, m);
- mat2x3 expected = mat2x3(0, 1, 4, 9, 16, 25);
- Error += all(equal(n, expected, epsilon<float>())) ? 0 : 1;
- }
-
- {
- mat2x4 m(0, 1, 2, 3, 4, 5, 6, 7);
- mat2x4 n = matrixCompMult(m, m);
- mat2x4 expected = mat2x4(0, 1, 4, 9, 16, 25, 36, 49);
- Error += all(equal(n, expected, epsilon<float>())) ? 0 : 1;
- }
-
- {
- mat3 m(0, 1, 2, 3, 4, 5, 6, 7, 8);
- mat3 n = matrixCompMult(m, m);
- mat3 expected = mat3(0, 1, 4, 9, 16, 25, 36, 49, 64);
- Error += all(equal(n, expected, epsilon<float>())) ? 0 : 1;
- }
-
- {
- mat3x2 m(0, 1, 2, 3, 4, 5);
- mat3x2 n = matrixCompMult(m, m);
- mat3x2 expected = mat3x2(0, 1, 4, 9, 16, 25);
- Error += all(equal(n, expected, epsilon<float>())) ? 0 : 1;
- }
-
- {
- mat3x4 m(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);
- mat3x4 n = matrixCompMult(m, m);
- mat3x4 expected = mat3x4(0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121);
- Error += all(equal(n, expected, epsilon<float>())) ? 0 : 1;
- }
-
- {
- mat4 m(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
- mat4 n = matrixCompMult(m, m);
- mat4 expected = mat4(0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225);
- Error += all(equal(n, expected, epsilon<float>())) ? 0 : 1;
- }
-
- {
- mat4x2 m(0, 1, 2, 3, 4, 5, 6, 7);
- mat4x2 n = matrixCompMult(m, m);
- mat4x2 expected = mat4x2(0, 1, 4, 9, 16, 25, 36, 49);
- Error += all(equal(n, expected, epsilon<float>())) ? 0 : 1;
- }
-
- {
- mat4x3 m(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);
- mat4x3 n = matrixCompMult(m, m);
- mat4x3 expected = mat4x3(0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121);
- Error += all(equal(n, expected, epsilon<float>())) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_outerProduct()
-{
- { glm::mat2 m = glm::outerProduct(glm::vec2(1.0f), glm::vec2(1.0f)); }
- { glm::mat3 m = glm::outerProduct(glm::vec3(1.0f), glm::vec3(1.0f)); }
- { glm::mat4 m = glm::outerProduct(glm::vec4(1.0f), glm::vec4(1.0f)); }
-
- { glm::mat2x3 m = glm::outerProduct(glm::vec3(1.0f), glm::vec2(1.0f)); }
- { glm::mat2x4 m = glm::outerProduct(glm::vec4(1.0f), glm::vec2(1.0f)); }
-
- { glm::mat3x2 m = glm::outerProduct(glm::vec2(1.0f), glm::vec3(1.0f)); }
- { glm::mat3x4 m = glm::outerProduct(glm::vec4(1.0f), glm::vec3(1.0f)); }
-
- { glm::mat4x2 m = glm::outerProduct(glm::vec2(1.0f), glm::vec4(1.0f)); }
- { glm::mat4x3 m = glm::outerProduct(glm::vec3(1.0f), glm::vec4(1.0f)); }
-
- return 0;
-}
-
-int test_transpose()
-{
- int Error(0);
-
- {
- mat2 const m(0, 1, 2, 3);
- mat2 const t = transpose(m);
- mat2 const expected = mat2(0, 2, 1, 3);
- Error += all(equal(t, expected, epsilon<float>())) ? 0 : 1;
- }
-
- {
- mat2x3 m(0, 1, 2, 3, 4, 5);
- mat3x2 t = transpose(m);
- mat3x2 const expected = mat3x2(0, 3, 1, 4, 2, 5);
- Error += all(equal(t, expected, epsilon<float>())) ? 0 : 1;
- }
-
- {
- mat2x4 m(0, 1, 2, 3, 4, 5, 6, 7);
- mat4x2 t = transpose(m);
- mat4x2 const expected = mat4x2(0, 4, 1, 5, 2, 6, 3, 7);
- Error += all(equal(t, expected, epsilon<float>())) ? 0 : 1;
- }
-
- {
- mat3 m(0, 1, 2, 3, 4, 5, 6, 7, 8);
- mat3 t = transpose(m);
- mat3 const expected = mat3(0, 3, 6, 1, 4, 7, 2, 5, 8);
- Error += all(equal(t, expected, epsilon<float>())) ? 0 : 1;
- }
-
- {
- mat3x2 m(0, 1, 2, 3, 4, 5);
- mat2x3 t = transpose(m);
- mat2x3 const expected = mat2x3(0, 2, 4, 1, 3, 5);
- Error += all(equal(t, expected, epsilon<float>())) ? 0 : 1;
- }
-
- {
- mat3x4 m(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);
- mat4x3 t = transpose(m);
- mat4x3 const expected = mat4x3(0, 4, 8, 1, 5, 9, 2, 6, 10, 3, 7, 11);
- Error += all(equal(t, expected, epsilon<float>())) ? 0 : 1;
- }
-
- {
- mat4 m(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
- mat4 t = transpose(m);
- mat4 const expected = mat4(0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15);
- Error += all(equal(t, expected, epsilon<float>())) ? 0 : 1;
- }
-
- {
- mat4x2 m(0, 1, 2, 3, 4, 5, 6, 7);
- mat2x4 t = transpose(m);
- mat2x4 const expected = mat2x4(0, 2, 4, 6, 1, 3, 5, 7);
- Error += all(equal(t, expected, epsilon<float>())) ? 0 : 1;
- }
-
- {
- mat4x3 m(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);
- mat3x4 t = transpose(m);
- mat3x4 const expected = mat3x4(0, 3, 6, 9, 1, 4, 7, 10, 2, 5, 8, 11);
- Error += all(equal(t, expected, epsilon<float>())) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_determinant()
-{
-
-
- return 0;
-}
-
-int test_inverse()
-{
- int Error = 0;
-
- {
- glm::mat4x4 A4x4(
- glm::vec4(1, 0, 1, 0),
- glm::vec4(0, 1, 0, 0),
- glm::vec4(0, 0, 1, 0),
- glm::vec4(0, 0, 0, 1));
- glm::mat4x4 B4x4 = inverse(A4x4);
- glm::mat4x4 I4x4 = A4x4 * B4x4;
- glm::mat4x4 Identity(1);
- Error += all(equal(I4x4, Identity, epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::mat3x3 A3x3(
- glm::vec3(1, 0, 1),
- glm::vec3(0, 1, 0),
- glm::vec3(0, 0, 1));
- glm::mat3x3 B3x3 = glm::inverse(A3x3);
- glm::mat3x3 I3x3 = A3x3 * B3x3;
- glm::mat3x3 Identity(1);
- Error += all(equal(I3x3, Identity, epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::mat2x2 A2x2(
- glm::vec2(1, 1),
- glm::vec2(0, 1));
- glm::mat2x2 B2x2 = glm::inverse(A2x2);
- glm::mat2x2 I2x2 = A2x2 * B2x2;
- glm::mat2x2 Identity(1);
- Error += all(equal(I2x2, Identity, epsilon<float>())) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_inverse_simd()
-{
- int Error = 0;
-
- glm::mat4x4 const Identity(1);
-
- glm::mat4x4 const A4x4(
- glm::vec4(1, 0, 1, 0),
- glm::vec4(0, 1, 0, 0),
- glm::vec4(0, 0, 1, 0),
- glm::vec4(0, 0, 0, 1));
- glm::mat4x4 const B4x4 = glm::inverse(A4x4);
- glm::mat4x4 const I4x4 = A4x4 * B4x4;
-
- Error += glm::all(glm::equal(I4x4, Identity, 0.001f)) ? 0 : 1;
-
- return Error;
-}
-
-template<typename VEC3, typename MAT4>
-int test_inverse_perf(std::size_t Count, std::size_t Instance, char const * Message)
-{
- std::vector<MAT4> TestInputs;
- TestInputs.resize(Count);
- std::vector<MAT4> TestOutputs;
- TestOutputs.resize(TestInputs.size());
-
- VEC3 Axis(glm::normalize(VEC3(1.0f, 2.0f, 3.0f)));
-
- for(std::size_t i = 0; i < TestInputs.size(); ++i)
- {
- typename MAT4::value_type f = static_cast<typename MAT4::value_type>(i + Instance) * typename MAT4::value_type(0.1) + typename MAT4::value_type(0.1);
- TestInputs[i] = glm::rotate(glm::translate(MAT4(1), Axis * f), f, Axis);
- //TestInputs[i] = glm::translate(MAT4(1), Axis * f);
- }
-
- std::clock_t StartTime = std::clock();
-
- for(std::size_t i = 0; i < TestInputs.size(); ++i)
- TestOutputs[i] = glm::inverse(TestInputs[i]);
-
- std::clock_t EndTime = std::clock();
-
- for(std::size_t i = 0; i < TestInputs.size(); ++i)
- TestOutputs[i] = TestOutputs[i] * TestInputs[i];
-
- typename MAT4::value_type Diff(0);
- for(std::size_t Entry = 0; Entry < TestOutputs.size(); ++Entry)
- {
- MAT4 i(1.0);
- MAT4 m(TestOutputs[Entry]);
- for(glm::length_t y = 0; y < m.length(); ++y)
- for(glm::length_t x = 0; x < m[y].length(); ++x)
- Diff = glm::max(m[y][x], i[y][x]);
- }
-
- //glm::uint Ulp = 0;
- //Ulp = glm::max(glm::float_distance(*Dst, *Src), Ulp);
-
- std::printf("inverse<%s>(%f): %lu\n", Message, static_cast<double>(Diff), EndTime - StartTime);
-
- return 0;
-}
-
-int main()
-{
- int Error = 0;
- Error += test_matrixCompMult();
- Error += test_outerProduct();
- Error += test_transpose();
- Error += test_determinant();
- Error += test_inverse();
- Error += test_inverse_simd();
-
-# ifdef NDEBUG
- std::size_t const Samples = 1000;
-# else
- std::size_t const Samples = 1;
-# endif//NDEBUG
-
- for(std::size_t i = 0; i < 1; ++i)
- {
- Error += test_inverse_perf<glm::vec3, glm::mat4>(Samples, i, "mat4");
- Error += test_inverse_perf<glm::dvec3, glm::dmat4>(Samples, i, "dmat4");
- }
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_func_noise.cpp b/3rdparty/glm/source/test/core/core_func_noise.cpp
deleted file mode 100644
index 4f0b430..0000000
--- a/3rdparty/glm/source/test/core/core_func_noise.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-int main()
-{
- int Error = 0;
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_func_packing.cpp b/3rdparty/glm/source/test/core/core_func_packing.cpp
deleted file mode 100644
index c3cd14a..0000000
--- a/3rdparty/glm/source/test/core/core_func_packing.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-#include <glm/gtc/type_precision.hpp>
-#include <glm/gtc/epsilon.hpp>
-#include <glm/vector_relational.hpp>
-#include <glm/packing.hpp>
-#include <vector>
-
-int test_packUnorm2x16()
-{
- int Error = 0;
-
- std::vector<glm::vec2> A;
- A.push_back(glm::vec2(1.0f, 0.0f));
- A.push_back(glm::vec2(0.5f, 0.7f));
- A.push_back(glm::vec2(0.1f, 0.2f));
-
- for(std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec2 B(A[i]);
- glm::uint32 C = glm::packUnorm2x16(B);
- glm::vec2 D = glm::unpackUnorm2x16(C);
- Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 65535.f)) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_packSnorm2x16()
-{
- int Error = 0;
-
- std::vector<glm::vec2> A;
- A.push_back(glm::vec2( 1.0f, 0.0f));
- A.push_back(glm::vec2(-0.5f,-0.7f));
- A.push_back(glm::vec2(-0.1f, 0.1f));
-
- for(std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec2 B(A[i]);
- glm::uint32 C = glm::packSnorm2x16(B);
- glm::vec2 D = glm::unpackSnorm2x16(C);
- Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 32767.0f * 2.0f)) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_packUnorm4x8()
-{
- int Error = 0;
-
- glm::uint32 Packed = glm::packUnorm4x8(glm::vec4(1.0f, 0.5f, 0.0f, 1.0f));
- glm::u8vec4 Vec(255, 128, 0, 255);
- glm::uint32 & Ref = *reinterpret_cast<glm::uint32*>(&Vec[0]);
-
- Error += Packed == Ref ? 0 : 1;
-
- std::vector<glm::vec4> A;
- A.push_back(glm::vec4(1.0f, 0.7f, 0.3f, 0.0f));
- A.push_back(glm::vec4(0.5f, 0.1f, 0.2f, 0.3f));
-
- for(std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec4 B(A[i]);
- glm::uint32 C = glm::packUnorm4x8(B);
- glm::vec4 D = glm::unpackUnorm4x8(C);
- Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 255.f)) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_packSnorm4x8()
-{
- int Error = 0;
-
- std::vector<glm::vec4> A;
- A.push_back(glm::vec4( 1.0f, 0.0f,-0.5f,-1.0f));
- A.push_back(glm::vec4(-0.7f,-0.1f, 0.1f, 0.7f));
-
- for(std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec4 B(A[i]);
- glm::uint32 C = glm::packSnorm4x8(B);
- glm::vec4 D = glm::unpackSnorm4x8(C);
- Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 127.f)) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_packHalf2x16()
-{
- int Error = 0;
-/*
- std::vector<glm::hvec2> A;
- A.push_back(glm::hvec2(glm::half( 1.0f), glm::half( 2.0f)));
- A.push_back(glm::hvec2(glm::half(-1.0f), glm::half(-2.0f)));
- A.push_back(glm::hvec2(glm::half(-1.1f), glm::half( 1.1f)));
-*/
- std::vector<glm::vec2> A;
- A.push_back(glm::vec2( 1.0f, 2.0f));
- A.push_back(glm::vec2(-1.0f,-2.0f));
- A.push_back(glm::vec2(-1.1f, 1.1f));
-
- for(std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec2 B(A[i]);
- glm::uint C = glm::packHalf2x16(B);
- glm::vec2 D = glm::unpackHalf2x16(C);
- //Error += B == D ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 127.f)) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_packDouble2x32()
-{
- int Error = 0;
-
- std::vector<glm::uvec2> A;
- A.push_back(glm::uvec2( 1, 2));
- A.push_back(glm::uvec2(-1,-2));
- A.push_back(glm::uvec2(-1000, 1100));
-
- for(std::size_t i = 0; i < A.size(); ++i)
- {
- glm::uvec2 B(A[i]);
- double C = glm::packDouble2x32(B);
- glm::uvec2 D = glm::unpackDouble2x32(C);
- Error += B == D ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_packSnorm4x8();
- Error += test_packUnorm4x8();
- Error += test_packSnorm2x16();
- Error += test_packUnorm2x16();
- Error += test_packHalf2x16();
- Error += test_packDouble2x32();
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_func_swizzle.cpp b/3rdparty/glm/source/test/core/core_func_swizzle.cpp
deleted file mode 100644
index 9758533..0000000
--- a/3rdparty/glm/source/test/core/core_func_swizzle.cpp
+++ /dev/null
@@ -1,164 +0,0 @@
-#define GLM_FORCE_SWIZZLE
-#include <glm/ext/scalar_relational.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/glm.hpp>
-
-static int test_ivec2_swizzle()
-{
- int Error = 0;
-
-# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR || GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
- {
- glm::ivec2 A(1, 2);
- glm::ivec2 B = A.yx();
- glm::ivec2 C = B.yx();
-
- Error += A != B ? 0 : 1;
- Error += A == C ? 0 : 1;
- }
-# endif//GLM_CONFIG_SWIZZLE
-
-# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
- {
- glm::ivec2 A(1, 2);
- glm::ivec2 B = A.yx;
- glm::ivec2 C = A.yx;
-
- Error += A != B ? 0 : 1;
- Error += B == C ? 0 : 1;
-
- B.xy = B.yx;
- C.xy = C.yx;
-
- Error += B == C ? 0 : 1;
-
- glm::ivec2 D(0, 0);
- D.yx = A.xy;
- Error += A.yx() == D ? 0 : 1;
-
- glm::ivec2 E = A.yx;
- Error += E == D ? 0 : 1;
- }
-# endif//GLM_CONFIG_SWIZZLE
-
- return Error;
-}
-
-int test_ivec3_swizzle()
-{
- int Error = 0;
-
-# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR || GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
- {
- glm::ivec3 A(1, 2, 3);
- glm::ivec3 B = A.zyx();
- glm::ivec3 C = B.zyx();
-
- Error += A != B ? 0 : 1;
- Error += A == C ? 0 : 1;
- }
-# endif
-
-# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
- {
- glm::ivec3 const A(1, 2, 3);
- glm::ivec2 B = A.yx;
- glm::ivec2 C = A.yx;
-
- Error += A.yx() == B ? 0 : 1;
- Error += B == C ? 0 : 1;
-
- B.xy = B.yx;
- C.xy = C.yx;
-
- Error += B == C ? 0 : 1;
-
- glm::ivec2 D(0, 0);
- D.yx = A.xy;
-
- Error += A.yx() == D ? 0 : 1;
-
- glm::ivec2 E(0, 0);
- E.xy = A.xy();
-
- Error += E == A.xy() ? 0 : 1;
- Error += E.xy() == A.xy() ? 0 : 1;
-
- glm::ivec3 const F = A.xxx + A.xxx;
- Error += F == glm::ivec3(2) ? 0 : 1;
-
- glm::ivec3 const G = A.xxx - A.xxx;
- Error += G == glm::ivec3(0) ? 0 : 1;
-
- glm::ivec3 const H = A.xxx * A.xxx;
- Error += H == glm::ivec3(1) ? 0 : 1;
-
- glm::ivec3 const I = A.xxx / A.xxx;
- Error += I == glm::ivec3(1) ? 0 : 1;
-
- glm::ivec3 J(1, 2, 3);
- J.xyz += glm::ivec3(1);
- Error += J == glm::ivec3(2, 3, 4) ? 0 : 1;
-
- glm::ivec3 K(1, 2, 3);
- K.xyz += A.xyz;
- Error += K == glm::ivec3(2, 4, 6) ? 0 : 1;
- }
-# endif
-
- return Error;
-}
-
-int test_ivec4_swizzle()
-{
- int Error = 0;
-
-# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR || GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
- {
- glm::ivec4 A(1, 2, 3, 4);
- glm::ivec4 B = A.wzyx();
- glm::ivec4 C = B.wzyx();
-
- Error += A != B ? 0 : 1;
- Error += A == C ? 0 : 1;
- }
-# endif
-
- return Error;
-}
-
-int test_vec4_swizzle()
-{
- int Error = 0;
-
-# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR || GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
- {
- glm::vec4 A(1, 2, 3, 4);
- glm::vec4 B = A.wzyx();
- glm::vec4 C = B.wzyx();
-
- Error += glm::any(glm::notEqual(A, B, 0.0001f)) ? 0 : 1;
- Error += glm::all(glm::equal(A, C, 0.0001f)) ? 0 : 1;
-
- float D = glm::dot(C.wzyx(), C.xyzw());
- Error += glm::equal(D, 20.f, 0.001f) ? 0 : 1;
- }
-# endif
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_ivec2_swizzle();
- Error += test_ivec3_swizzle();
- Error += test_ivec4_swizzle();
- Error += test_vec4_swizzle();
-
- return Error;
-}
-
-
-
diff --git a/3rdparty/glm/source/test/core/core_func_trigonometric.cpp b/3rdparty/glm/source/test/core/core_func_trigonometric.cpp
deleted file mode 100644
index 3172340..0000000
--- a/3rdparty/glm/source/test/core/core_func_trigonometric.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <glm/trigonometric.hpp>
-
-int main()
-{
- int Error = 0;
-
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_func_vector_relational.cpp b/3rdparty/glm/source/test/core/core_func_vector_relational.cpp
deleted file mode 100644
index 0a4e7e7..0000000
--- a/3rdparty/glm/source/test/core/core_func_vector_relational.cpp
+++ /dev/null
@@ -1,180 +0,0 @@
-#include <glm/vec2.hpp>
-#include <glm/vec3.hpp>
-#include <glm/vec4.hpp>
-#include <glm/vector_relational.hpp>
-#include <glm/gtc/vec1.hpp>
-
-static int test_not()
-{
- int Error = 0;
-
- {
- glm::bvec1 v(false);
- Error += glm::all(glm::not_(v)) ? 0 : 1;
- }
-
- {
- glm::bvec2 v(false);
- Error += glm::all(glm::not_(v)) ? 0 : 1;
- }
-
- {
- glm::bvec3 v(false);
- Error += glm::all(glm::not_(v)) ? 0 : 1;
- }
-
- {
- glm::bvec4 v(false);
- Error += glm::all(glm::not_(v)) ? 0 : 1;
- }
-
- return Error;
-}
-
-static int test_less()
-{
- int Error = 0;
-
- {
- glm::vec2 const A(1, 2);
- glm::vec2 const B(2, 3);
- Error += glm::all(glm::lessThan(A, B)) ? 0: 1;
- Error += glm::all(glm::lessThanEqual(A, B)) ? 0: 1;
- }
-
- {
- glm::vec3 const A(1, 2, 3);
- glm::vec3 const B(2, 3, 4);
- Error += glm::all(glm::lessThan(A, B)) ? 0: 1;
- Error += glm::all(glm::lessThanEqual(A, B)) ? 0: 1;
- }
-
- {
- glm::vec4 const A(1, 2, 3, 4);
- glm::vec4 const B(2, 3, 4, 5);
- Error += glm::all(glm::lessThan(A, B)) ? 0: 1;
- Error += glm::all(glm::lessThanEqual(A, B)) ? 0: 1;
- }
-
- {
- glm::ivec2 const A(1, 2);
- glm::ivec2 const B(2, 3);
- Error += glm::all(glm::lessThan(A, B)) ? 0: 1;
-
- glm::ivec2 const C(1, 3);
- Error += glm::all(glm::lessThanEqual(A, C)) ? 0: 1;
- }
-
- {
- glm::ivec3 const A(1, 2, 3);
- glm::ivec3 const B(2, 3, 4);
- Error += glm::all(glm::lessThan(A, B)) ? 0: 1;
-
- glm::ivec3 const C(1, 3, 4);
- Error += glm::all(glm::lessThanEqual(A, C)) ? 0: 1;
- }
-
- {
- glm::ivec4 const A(1, 2, 3, 4);
- glm::ivec4 const B(2, 3, 4, 5);
- Error += glm::all(glm::lessThan(A, B)) ? 0: 1;
-
- glm::ivec4 const C(1, 3, 4, 5);
- Error += glm::all(glm::lessThanEqual(A, C)) ? 0: 1;
- }
-
- return Error;
-}
-
-static int test_greater()
-{
- int Error = 0;
-
- {
- glm::vec2 const A(1, 2);
- glm::vec2 const B(2, 3);
- Error += glm::all(glm::greaterThan(B, A)) ? 0: 1;
- Error += glm::all(glm::greaterThanEqual(B, A)) ? 0: 1;
- }
-
- {
- glm::vec3 const A(1, 2, 3);
- glm::vec3 const B(2, 3, 4);
- Error += glm::all(glm::greaterThan(B, A)) ? 0: 1;
- Error += glm::all(glm::greaterThanEqual(B, A)) ? 0: 1;
- }
-
- {
- glm::vec4 const A(1, 2, 3, 4);
- glm::vec4 const B(2, 3, 4, 5);
- Error += glm::all(glm::greaterThan(B, A)) ? 0: 1;
- Error += glm::all(glm::greaterThanEqual(B, A)) ? 0: 1;
- }
-
- {
- glm::ivec2 const A(1, 2);
- glm::ivec2 const B(2, 3);
- Error += glm::all(glm::greaterThan(B, A)) ? 0: 1;
-
- glm::ivec2 const C(1, 3);
- Error += glm::all(glm::greaterThanEqual(C, A)) ? 0: 1;
- }
-
- {
- glm::ivec3 const A(1, 2, 3);
- glm::ivec3 const B(2, 3, 4);
- Error += glm::all(glm::greaterThan(B, A)) ? 0: 1;
-
- glm::ivec3 const C(1, 3, 4);
- Error += glm::all(glm::greaterThanEqual(C, A)) ? 0: 1;
- }
-
- {
- glm::ivec4 const A(1, 2, 3, 4);
- glm::ivec4 const B(2, 3, 4, 5);
- Error += glm::all(glm::greaterThan(B, A)) ? 0: 1;
-
- glm::ivec4 const C(1, 3, 4, 5);
- Error += glm::all(glm::greaterThanEqual(C, A)) ? 0: 1;
- }
-
- return Error;
-}
-
-static int test_equal()
-{
- int Error = 0;
-
- {
- glm::ivec2 const A(1, 2);
- glm::ivec2 const B(1, 2);
- Error += glm::all(glm::equal(B, A)) ? 0: 1;
- }
-
- {
- glm::ivec3 const A(1, 2, 3);
- glm::ivec3 const B(1, 2, 3);
- Error += glm::all(glm::equal(B, A)) ? 0: 1;
- }
-
- {
- glm::ivec4 const A(1, 2, 3, 4);
- glm::ivec4 const B(1, 2, 3, 4);
- Error += glm::all(glm::equal(B, A)) ? 0: 1;
- }
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_not();
- Error += test_less();
- Error += test_greater();
- Error += test_equal();
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_setup_force_cxx98.cpp b/3rdparty/glm/source/test/core/core_setup_force_cxx98.cpp
deleted file mode 100644
index 32bb63c..0000000
--- a/3rdparty/glm/source/test/core/core_setup_force_cxx98.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef GLM_FORCE_CXX98
-# define GLM_FORCE_CXX98
-#endif
-#include <glm/glm.hpp>
-#include <glm/ext.hpp>
-
-int main()
-{
- int Error = 0;
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/core/core_setup_force_size_t_length.cpp b/3rdparty/glm/source/test/core/core_setup_force_size_t_length.cpp
deleted file mode 100644
index 36010e3..0000000
--- a/3rdparty/glm/source/test/core/core_setup_force_size_t_length.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-#define GLM_FORCE_SIZE_T_LENGTH
-#include <glm/glm.hpp>
-#include <glm/ext.hpp>
-
-template <typename genType>
-genType add(genType const& a, genType const& b)
-{
- genType result(0);
- for(glm::length_t i = 0; i < a.length(); ++i)
- result[i] = a[i] + b[i];
- return result;
-}
-
-int main()
-{
- int Error = 0;
-
- glm::ivec4 v(1);
- Error += add(v, v) == glm::ivec4(2) ? 0 : 1;
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/core/core_setup_message.cpp b/3rdparty/glm/source/test/core/core_setup_message.cpp
deleted file mode 100644
index 7594743..0000000
--- a/3rdparty/glm/source/test/core/core_setup_message.cpp
+++ /dev/null
@@ -1,230 +0,0 @@
-#define GLM_FORCE_MESSAGES
-#include <glm/vec3.hpp>
-#include <cstdio>
-
-int test_compiler()
-{
- int Error(0);
-
- if(GLM_COMPILER & GLM_COMPILER_VC)
- {
- switch(GLM_COMPILER)
- {
- case GLM_COMPILER_VC12:
- std::printf("Visual C++ 12 - 2013\n");
- break;
- case GLM_COMPILER_VC14:
- std::printf("Visual C++ 14 - 2015\n");
- break;
- case GLM_COMPILER_VC15:
- std::printf("Visual C++ 15 - 2017\n");
- break;
- case GLM_COMPILER_VC15_3:
- std::printf("Visual C++ 15.3 - 2017\n");
- break;
- case GLM_COMPILER_VC15_5:
- std::printf("Visual C++ 15.5 - 2017\n");
- break;
- case GLM_COMPILER_VC15_6:
- std::printf("Visual C++ 15.6 - 2017\n");
- break;
- case GLM_COMPILER_VC15_7:
- std::printf("Visual C++ 15.7 - 2017\n");
- break;
- case GLM_COMPILER_VC15_8:
- std::printf("Visual C++ 15.8 - 2017\n");
- break;
- case GLM_COMPILER_VC15_9:
- std::printf("Visual C++ 15.9 - 2017\n");
- break;
- case GLM_COMPILER_VC16:
- std::printf("Visual C++ 16 - 2019\n");
- break;
- default:
- std::printf("Visual C++ version not detected\n");
- Error += 1;
- break;
- }
- }
- else if(GLM_COMPILER & GLM_COMPILER_GCC)
- {
- switch(GLM_COMPILER)
- {
- case GLM_COMPILER_GCC46:
- std::printf("GCC 4.6\n");
- break;
- case GLM_COMPILER_GCC47:
- std::printf("GCC 4.7\n");
- break;
- case GLM_COMPILER_GCC48:
- std::printf("GCC 4.8\n");
- break;
- case GLM_COMPILER_GCC49:
- std::printf("GCC 4.9\n");
- break;
- case GLM_COMPILER_GCC5:
- std::printf("GCC 5\n");
- break;
- case GLM_COMPILER_GCC6:
- std::printf("GCC 6\n");
- break;
- case GLM_COMPILER_GCC7:
- std::printf("GCC 7\n");
- break;
- case GLM_COMPILER_GCC8:
- std::printf("GCC 8\n");
- break;
- default:
- std::printf("GCC version not detected\n");
- Error += 1;
- break;
- }
- }
- else if(GLM_COMPILER & GLM_COMPILER_CUDA)
- {
- std::printf("CUDA\n");
- }
- else if(GLM_COMPILER & GLM_COMPILER_CLANG)
- {
- switch(GLM_COMPILER)
- {
- case GLM_COMPILER_CLANG34:
- std::printf("Clang 3.4\n");
- break;
- case GLM_COMPILER_CLANG35:
- std::printf("Clang 3.5\n");
- break;
- case GLM_COMPILER_CLANG36:
- std::printf("Clang 3.6\n");
- break;
- case GLM_COMPILER_CLANG37:
- std::printf("Clang 3.7\n");
- break;
- case GLM_COMPILER_CLANG38:
- std::printf("Clang 3.8\n");
- break;
- case GLM_COMPILER_CLANG39:
- std::printf("Clang 3.9\n");
- break;
- case GLM_COMPILER_CLANG40:
- std::printf("Clang 4.0\n");
- break;
- case GLM_COMPILER_CLANG41:
- std::printf("Clang 4.1\n");
- break;
- case GLM_COMPILER_CLANG42:
- std::printf("Clang 4.2\n");
- break;
- default:
- std::printf("LLVM version not detected\n");
- break;
- }
- }
- else if(GLM_COMPILER & GLM_COMPILER_INTEL)
- {
- switch(GLM_COMPILER)
- {
- case GLM_COMPILER_INTEL14:
- std::printf("ICC 14 - 2013 SP1\n");
- break;
- case GLM_COMPILER_INTEL15:
- std::printf("ICC 15 - 2015\n");
- break;
- case GLM_COMPILER_INTEL16:
- std::printf("ICC 16 - 2017\n");
- break;
- case GLM_COMPILER_INTEL17:
- std::printf("ICC 17 - 20XX\n");
- break;
- default:
- std::printf("Intel compiler version not detected\n");
- Error += 1;
- break;
- }
- }
- else
- {
- std::printf("Undetected compiler\n");
- Error += 1;
- }
-
- return Error;
-}
-
-int test_model()
-{
- int Error = 0;
-
- Error += ((sizeof(void*) == 4) && (GLM_MODEL == GLM_MODEL_32)) || ((sizeof(void*) == 8) && (GLM_MODEL == GLM_MODEL_64)) ? 0 : 1;
-
- if(GLM_MODEL == GLM_MODEL_32)
- std::printf("GLM_MODEL_32\n");
- else if(GLM_MODEL == GLM_MODEL_64)
- std::printf("GLM_MODEL_64\n");
-
- return Error;
-}
-
-int test_instruction_set()
-{
- int Error = 0;
-
- std::printf("GLM_ARCH: ");
-
- if(GLM_ARCH & GLM_ARCH_ARM_BIT)
- std::printf("ARM ");
- if(GLM_ARCH & GLM_ARCH_NEON_BIT)
- std::printf("NEON ");
- if(GLM_ARCH & GLM_ARCH_AVX2_BIT)
- std::printf("AVX2 ");
- if(GLM_ARCH & GLM_ARCH_AVX_BIT)
- std::printf("AVX ");
- if(GLM_ARCH & GLM_ARCH_SSE42_BIT)
- std::printf("SSE4.2 ");
- if(GLM_ARCH & GLM_ARCH_SSE41_BIT)
- std::printf("SSE4.1 ");
- if(GLM_ARCH & GLM_ARCH_SSSE3_BIT)
- std::printf("SSSE3 ");
- if(GLM_ARCH & GLM_ARCH_SSE3_BIT)
- std::printf("SSE3 ");
- if(GLM_ARCH & GLM_ARCH_SSE2_BIT)
- std::printf("SSE2 ");
-
- std::printf("\n");
-
- return Error;
-}
-
-int test_cpp_version()
-{
- std::printf("__cplusplus: %d\n", static_cast<int>(__cplusplus));
-
- return 0;
-}
-
-int test_operators()
-{
- glm::ivec3 A(1);
- glm::ivec3 B(1);
- bool R = A != B;
- bool S = A == B;
-
- return (S && !R) ? 0 : 1;
-}
-
-int main()
-{
- int Error = 0;
-
-# if !defined(GLM_FORCE_PLATFORM_UNKNOWN) && !defined(GLM_FORCE_COMPILER_UNKNOWN) && !defined(GLM_FORCE_ARCH_UNKNOWN) && !defined(GLM_FORCE_CXX_UNKNOWN)
-
- Error += test_cpp_version();
- Error += test_compiler();
- Error += test_model();
- Error += test_instruction_set();
- Error += test_operators();
-
-# endif
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/core/core_setup_platform_unknown.cpp b/3rdparty/glm/source/test/core/core_setup_platform_unknown.cpp
deleted file mode 100644
index 9feaee3..0000000
--- a/3rdparty/glm/source/test/core/core_setup_platform_unknown.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef GLM_FORCE_PLATFORM_UNKNOWN
-# define GLM_FORCE_PLATFORM_UNKNOWN
-#endif
-#ifndef GLM_FORCE_COMPILER_UNKNOWN
-# define GLM_FORCE_COMPILER_UNKNOWN
-#endif
-#ifndef GLM_FORCE_ARCH_UNKNOWN
-# define GLM_FORCE_ARCH_UNKNOWN
-#endif
-#ifndef GLM_FORCE_CXX_UNKNOWN
-# define GLM_FORCE_CXX_UNKNOWN
-#endif
-#include <glm/glm.hpp>
-#include <glm/ext.hpp>
-
-int main()
-{
- int Error = 0;
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/core/core_setup_precision.cpp b/3rdparty/glm/source/test/core/core_setup_precision.cpp
deleted file mode 100644
index b44bc50..0000000
--- a/3rdparty/glm/source/test/core/core_setup_precision.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-#define GLM_FORCE_INLINE
-#define GLM_PRECISION_HIGHP_FLOAT
-#include <glm/glm.hpp>
-#include <glm/ext.hpp>
-
-static int test_mat()
-{
- int Error = 0;
-
- Error += sizeof(glm::mat2) == sizeof(glm::highp_mat2) ? 0 : 1;
- Error += sizeof(glm::mat3) == sizeof(glm::highp_mat3) ? 0 : 1;
- Error += sizeof(glm::mat4) == sizeof(glm::highp_mat4) ? 0 : 1;
-
- Error += sizeof(glm::mat2x2) == sizeof(glm::highp_mat2x2) ? 0 : 1;
- Error += sizeof(glm::mat2x3) == sizeof(glm::highp_mat2x3) ? 0 : 1;
- Error += sizeof(glm::mat2x4) == sizeof(glm::highp_mat2x4) ? 0 : 1;
- Error += sizeof(glm::mat3x2) == sizeof(glm::highp_mat3x2) ? 0 : 1;
- Error += sizeof(glm::mat3x3) == sizeof(glm::highp_mat3x3) ? 0 : 1;
- Error += sizeof(glm::mat3x4) == sizeof(glm::highp_mat3x4) ? 0 : 1;
- Error += sizeof(glm::mat4x2) == sizeof(glm::highp_mat4x2) ? 0 : 1;
- Error += sizeof(glm::mat4x3) == sizeof(glm::highp_mat4x3) ? 0 : 1;
- Error += sizeof(glm::mat4x4) == sizeof(glm::highp_mat4x4) ? 0 : 1;
-
- return Error;
-}
-
-static int test_vec()
-{
- int Error = 0;
-
- Error += sizeof(glm::vec2) == sizeof(glm::highp_vec2) ? 0 : 1;
- Error += sizeof(glm::vec3) == sizeof(glm::highp_vec3) ? 0 : 1;
- Error += sizeof(glm::vec4) == sizeof(glm::highp_vec4) ? 0 : 1;
-
- return Error;
-}
-
-static int test_dvec()
-{
- int Error = 0;
-
- Error += sizeof(glm::dvec2) == sizeof(glm::highp_dvec2) ? 0 : 1;
- Error += sizeof(glm::dvec3) == sizeof(glm::highp_dvec3) ? 0 : 1;
- Error += sizeof(glm::dvec4) == sizeof(glm::highp_dvec4) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_mat();
- Error += test_vec();
- Error += test_dvec();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/core/core_type_aligned.cpp b/3rdparty/glm/source/test/core/core_type_aligned.cpp
deleted file mode 100644
index dff0939..0000000
--- a/3rdparty/glm/source/test/core/core_type_aligned.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-#define GLM_FORCE_DEFAULT_ALIGNED_GENTYPES
-#include <glm/glm.hpp>
-
-#if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE
-#include <type_traits>
-
-static_assert(sizeof(glm::bvec4) > sizeof(glm::bvec2), "Invalid sizeof");
-static_assert(sizeof(glm::ivec4) > sizeof(glm::uvec2), "Invalid sizeof");
-static_assert(sizeof(glm::dvec4) > sizeof(glm::dvec2), "Invalid sizeof");
-
-static_assert(sizeof(glm::bvec4) == sizeof(glm::bvec3), "Invalid sizeof");
-static_assert(sizeof(glm::uvec4) == sizeof(glm::uvec3), "Invalid sizeof");
-static_assert(sizeof(glm::dvec4) == sizeof(glm::dvec3), "Invalid sizeof");
-
-static int test_storage_aligned()
-{
- int Error = 0;
-
- size_t size1_aligned = sizeof(glm::detail::storage<1, int, true>::type);
- Error += size1_aligned == sizeof(int) * 1 ? 0 : 1;
- size_t size2_aligned = sizeof(glm::detail::storage<2, int, true>::type);
- Error += size2_aligned == sizeof(int) * 2 ? 0 : 1;
- size_t size4_aligned = sizeof(glm::detail::storage<4, int, true>::type);
- Error += size4_aligned == sizeof(int) * 4 ? 0 : 1;
-
- size_t align1_aligned = alignof(glm::detail::storage<1, int, true>::type);
- Error += align1_aligned == 4 ? 0 : 1;
- size_t align2_aligned = alignof(glm::detail::storage<2, int, true>::type);
- Error += align2_aligned == 8 ? 0 : 1;
- size_t align4_aligned = alignof(glm::detail::storage<4, int, true>::type);
- Error += align4_aligned == 16 ? 0 : 1;
-
- return Error;
-}
-
-static int test_storage_unaligned()
-{
- int Error = 0;
-
- size_t align1_unaligned = alignof(glm::detail::storage<1, int, false>::type);
- Error += align1_unaligned == sizeof(int) ? 0 : 1;
- size_t align2_unaligned = alignof(glm::detail::storage<2, int, false>::type);
- Error += align2_unaligned == sizeof(int) ? 0 : 1;
- size_t align3_unaligned = alignof(glm::detail::storage<3, int, false>::type);
- Error += align3_unaligned == sizeof(int) ? 0 : 1;
- size_t align4_unaligned = alignof(glm::detail::storage<4, int, false>::type);
- Error += align4_unaligned == sizeof(int) ? 0 : 1;
-
- return Error;
-}
-
-static int test_vec3_aligned()
-{
- int Error = 0;
-
- struct Struct1
- {
- glm::vec4 A;
- float B;
- glm::vec3 C;
- };
-
- std::size_t const Size1 = sizeof(Struct1);
- Error += Size1 == 48 ? 0 : 1;
-
- struct Struct2
- {
- glm::vec4 A;
- glm::vec3 B;
- float C;
- };
-
- std::size_t const Size2 = sizeof(Struct2);
- Error += Size2 == 48 ? 0 : 1;
-
- return Error;
-}
-
-#endif
-
-int main()
-{
- int Error = 0;
-
-# if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE
- Error += test_storage_aligned();
- Error += test_storage_unaligned();
- Error += test_vec3_aligned();
-# endif
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/core/core_type_cast.cpp b/3rdparty/glm/source/test/core/core_type_cast.cpp
deleted file mode 100644
index 7ff1901..0000000
--- a/3rdparty/glm/source/test/core/core_type_cast.cpp
+++ /dev/null
@@ -1,146 +0,0 @@
-#include <glm/gtc/constants.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/glm.hpp>
-#include <algorithm>
-#include <vector>
-#include <iterator>
-
-struct my_vec2
-{
- operator glm::vec2() { return glm::vec2(x, y); }
- float x, y;
-};
-
-int test_vec2_cast()
-{
- glm::vec2 A(1.0f, 2.0f);
- glm::lowp_vec2 B(A);
- glm::mediump_vec2 C(A);
- glm::highp_vec2 D(A);
-
- glm::vec2 E = static_cast<glm::vec2>(A);
- glm::lowp_vec2 F = static_cast<glm::lowp_vec2>(A);
- glm::mediump_vec2 G = static_cast<glm::mediump_vec2>(A);
- glm::highp_vec2 H = static_cast<glm::highp_vec2>(A);
-
- my_vec2 I;
- glm::vec2 J = static_cast<glm::vec2>(I);
- glm::vec2 K(7.8f);
-
- int Error(0);
-
- Error += glm::all(glm::equal(A, E, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(B, F, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(C, G, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(D, H, glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-int test_vec3_cast()
-{
- glm::vec3 A(1.0f, 2.0f, 3.0f);
- glm::lowp_vec3 B(A);
- glm::mediump_vec3 C(A);
- glm::highp_vec3 D(A);
-
- glm::vec3 E = static_cast<glm::vec3>(A);
- glm::lowp_vec3 F = static_cast<glm::lowp_vec3>(A);
- glm::mediump_vec3 G = static_cast<glm::mediump_vec3>(A);
- glm::highp_vec3 H = static_cast<glm::highp_vec3>(A);
-
- int Error(0);
-
- Error += glm::all(glm::equal(A, E, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(B, F, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(C, G, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(D, H, glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-int test_vec4_cast()
-{
- glm::vec4 A(1.0f, 2.0f, 3.0f, 4.0f);
- glm::lowp_vec4 B(A);
- glm::mediump_vec4 C(A);
- glm::highp_vec4 D(A);
-
- glm::vec4 E = static_cast<glm::vec4>(A);
- glm::lowp_vec4 F = static_cast<glm::lowp_vec4>(A);
- glm::mediump_vec4 G = static_cast<glm::mediump_vec4>(A);
- glm::highp_vec4 H = static_cast<glm::highp_vec4>(A);
-
- int Error(0);
-
- Error += glm::all(glm::equal(A, E, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(B, F, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(C, G, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(D, H, glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-int test_std_copy()
-{
- int Error = 0;
-
- {
- std::vector<int> High;
- High.resize(64);
- std::vector<int> Medium(High.size());
-
- std::copy(High.begin(), High.end(), Medium.begin());
-
- *Medium.begin() = *High.begin();
- }
-
- {
- std::vector<glm::dvec4> High4;
- High4.resize(64);
- std::vector<glm::vec4> Medium4(High4.size());
-
- std::copy(High4.begin(), High4.end(), Medium4.begin());
-
- *Medium4.begin() = *High4.begin();
- }
-
- {
- std::vector<glm::dvec3> High3;
- High3.resize(64);
- std::vector<glm::vec3> Medium3(High3.size());
-
- std::copy(High3.begin(), High3.end(), Medium3.begin());
-
- *Medium3.begin() = *High3.begin();
- }
-
- {
- std::vector<glm::dvec2> High2;
- High2.resize(64);
- std::vector<glm::vec2> Medium2(High2.size());
-
- std::copy(High2.begin(), High2.end(), Medium2.begin());
-
- *Medium2.begin() = *High2.begin();
- }
-
- glm::dvec4 v1;
- glm::vec4 v2;
-
- v2 = v1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_std_copy();
- Error += test_vec2_cast();
- Error += test_vec3_cast();
- Error += test_vec4_cast();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/core/core_type_ctor.cpp b/3rdparty/glm/source/test/core/core_type_ctor.cpp
deleted file mode 100644
index 078fcdf..0000000
--- a/3rdparty/glm/source/test/core/core_type_ctor.cpp
+++ /dev/null
@@ -1,351 +0,0 @@
-#include <glm/gtc/vec1.hpp>
-#include <glm/gtc/quaternion.hpp>
-#include <glm/gtc/constants.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/glm.hpp>
-
-static int test_vec1_ctor()
-{
- int Error = 0;
-
-# if GLM_CONFIG_DEFAULTED_FUNCTIONS == GLM_ENABLE
- {
- union pack
- {
- glm::vec1 f;
- glm::ivec1 i;
- } A, B;
-
- A.f = glm::vec1(0);
- Error += glm::all(glm::equal(A.i, glm::ivec1(0))) ? 0 : 1;
-
- B.f = glm::vec1(1);
- Error += glm::all(glm::equal(B.i, glm::ivec1(1065353216))) ? 0 : 1;
- }
-# endif//GLM_CONFIG_DEFAULTED_FUNCTIONS == GLM_ENABLE
-
- return Error;
-}
-
-static int test_vec2_ctor()
-{
- int Error = 0;
-
-# if GLM_CONFIG_DEFAULTED_FUNCTIONS == GLM_ENABLE
- {
- union pack
- {
- glm::vec2 f;
- glm::ivec2 i;
- } A, B;
-
- A.f = glm::vec2(0);
- Error += glm::all(glm::equal(A.i, glm::ivec2(0))) ? 0 : 1;
-
- B.f = glm::vec2(1);
- Error += glm::all(glm::equal(B.i, glm::ivec2(1065353216))) ? 0 : 1;
- }
-# endif
-
- return Error;
-}
-
-static int test_vec3_ctor()
-{
- int Error = 0;
-
-# if GLM_CONFIG_DEFAULTED_FUNCTIONS == GLM_ENABLE
- {
- union pack
- {
- glm::vec3 f;
- glm::ivec3 i;
- } A, B;
-
- A.f = glm::vec3(0);
- Error += glm::all(glm::equal(A.i, glm::ivec3(0))) ? 0 : 1;
-
- B.f = glm::vec3(1);
- Error += glm::all(glm::equal(B.i, glm::ivec3(1065353216))) ? 0 : 1;
- }
-# endif
-
- return Error;
-}
-
-static int test_vec4_ctor()
-{
- int Error = 0;
-
-# if GLM_CONFIG_DEFAULTED_FUNCTIONS == GLM_ENABLE
- {
- union pack
- {
- glm::vec4 f;
- glm::ivec4 i;
- } A, B;
-
- A.f = glm::vec4(0);
- Error += glm::all(glm::equal(A.i, glm::ivec4(0))) ? 0 : 1;
-
- B.f = glm::vec4(1);
- Error += glm::all(glm::equal(B.i, glm::ivec4(1065353216))) ? 0 : 1;
- }
-# endif
-
- return Error;
-}
-
-static int test_mat2x2_ctor()
-{
- int Error = 0;
-
-# if GLM_LANG & GLM_LANG_CXX11_FLAG
- {
- union pack
- {
- glm::mat2x2 f;
- glm::mat2x2 i;
- } A, B;
-
- A.f = glm::mat2x2(0);
- Error += glm::all(glm::equal(A.i[0], glm::vec2(0), glm::epsilon<float>())) ? 0 : 1;
-
- B.f = glm::mat2x2(1);
- Error += glm::all(glm::equal(B.i[0], glm::vec2(1, 0), glm::epsilon<float>())) ? 0 : 1;
- }
-# endif//GLM_LANG & GLM_LANG_CXX11_FLAG
-
- return Error;
-}
-
-static int test_mat2x3_ctor()
-{
- int Error = 0;
-
-# if GLM_LANG & GLM_LANG_CXX11_FLAG
- {
- union pack
- {
- glm::mat2x3 f;
- glm::mat2x3 i;
- } A, B;
-
- A.f = glm::mat2x3(0);
- Error += glm::all(glm::equal(A.i[0], glm::vec3(0), glm::epsilon<float>())) ? 0 : 1;
-
- B.f = glm::mat2x3(1);
- Error += glm::all(glm::equal(B.i[0], glm::vec3(1, 0, 0), glm::epsilon<float>())) ? 0 : 1;
- }
-# endif//GLM_LANG & GLM_LANG_CXX11_FLAG
-
- return Error;
-}
-
-static int test_mat2x4_ctor()
-{
- int Error = 0;
-
-# if GLM_LANG & GLM_LANG_CXX11_FLAG
- {
- union pack
- {
- glm::mat2x4 f;
- glm::mat2x4 i;
- } A, B;
-
- A.f = glm::mat2x4(0);
- glm::vec4 const C(0, 0, 0, 0);
- Error += glm::all(glm::equal(A.i[0], C, glm::epsilon<float>())) ? 0 : 1;
-
- B.f = glm::mat2x4(1);
- glm::vec4 const D(1, 0, 0, 0);
- Error += glm::all(glm::equal(B.i[0], D, glm::epsilon<float>())) ? 0 : 1;
- }
-# endif//GLM_LANG & GLM_LANG_CXX11_FLAG
-
- return Error;
-}
-
-static int test_mat3x2_ctor()
-{
- int Error = 0;
-
-# if GLM_LANG & GLM_LANG_CXX11_FLAG
- {
- union pack
- {
- glm::mat3x2 f;
- glm::mat3x2 i;
- } A, B;
-
- A.f = glm::mat3x2(0);
- Error += glm::all(glm::equal(A.i[0], glm::vec2(0), glm::epsilon<float>())) ? 0 : 1;
-
- B.f = glm::mat3x2(1);
- Error += glm::all(glm::equal(B.i[0], glm::vec2(1, 0), glm::epsilon<float>())) ? 0 : 1;
- }
-# endif//GLM_LANG & GLM_LANG_CXX11_FLAG
-
- return Error;
-}
-
-static int test_mat3x3_ctor()
-{
- int Error = 0;
-
-# if GLM_LANG & GLM_LANG_CXX11_FLAG
- {
- union pack
- {
- glm::mat3x3 f;
- glm::mat3x3 i;
- } A, B;
-
- A.f = glm::mat3x3(0);
- Error += glm::all(glm::equal(A.i[0], glm::vec3(0), glm::epsilon<float>())) ? 0 : 1;
-
- B.f = glm::mat3x3(1);
- Error += glm::all(glm::equal(B.i[0], glm::vec3(1, 0, 0), glm::epsilon<float>())) ? 0 : 1;
- }
-# endif//GLM_LANG & GLM_LANG_CXX11_FLAG
-
- return Error;
-}
-
-static int test_mat3x4_ctor()
-{
- int Error = 0;
-
-# if GLM_LANG & GLM_LANG_CXX11_FLAG
- {
- union pack
- {
- glm::mat3x4 f;
- glm::mat3x4 i;
- } A, B;
-
- A.f = glm::mat3x4(0);
- Error += glm::all(glm::equal(A.i[0], glm::vec4(0), glm::epsilon<float>())) ? 0 : 1;
-
- B.f = glm::mat3x4(1);
- Error += glm::all(glm::equal(B.i[0], glm::vec4(1, 0, 0, 0), glm::epsilon<float>())) ? 0 : 1;
- }
-# endif//GLM_LANG & GLM_LANG_CXX11_FLAG
-
- return Error;
-}
-
-static int test_mat4x2_ctor()
-{
- int Error = 0;
-
-# if GLM_LANG & GLM_LANG_CXX11_FLAG
- {
- union pack
- {
- glm::mat4x2 f;
- glm::mat4x2 i;
- } A, B;
-
- A.f = glm::mat4x2(0);
- Error += glm::all(glm::equal(A.i[0], glm::vec2(0), glm::epsilon<float>())) ? 0 : 1;
-
- B.f = glm::mat4x2(1);
- Error += glm::all(glm::equal(B.i[0], glm::vec2(1, 0), glm::epsilon<float>())) ? 0 : 1;
- }
-# endif//GLM_LANG & GLM_LANG_CXX11_FLAG
-
- return Error;
-}
-
-static int test_mat4x3_ctor()
-{
- int Error = 0;
-
-# if GLM_LANG & GLM_LANG_CXX11_FLAG
- {
- union pack
- {
- glm::mat4x3 f;
- glm::mat4x3 i;
- } A, B;
-
- A.f = glm::mat4x3(0);
- Error += glm::all(glm::equal(A.i[0], glm::vec3(0), glm::epsilon<float>())) ? 0 : 1;
-
- B.f = glm::mat4x3(1);
- Error += glm::all(glm::equal(B.i[0], glm::vec3(1, 0, 0), glm::epsilon<float>())) ? 0 : 1;
- }
-# endif//GLM_LANG & GLM_LANG_CXX11_FLAG
-
- return Error;
-}
-
-static int test_mat4x4_ctor()
-{
- int Error = 0;
-
-# if GLM_LANG & GLM_LANG_CXX11_FLAG
- {
- union pack
- {
- glm::mat4 f;
- glm::mat4 i;
- } A, B;
-
- A.f = glm::mat4(0);
- Error += glm::all(glm::equal(A.i[0], glm::vec4(0), glm::epsilon<float>())) ? 0 : 1;
-
- B.f = glm::mat4(1);
- Error += glm::all(glm::equal(B.i[0], glm::vec4(1, 0, 0, 0), glm::epsilon<float>())) ? 0 : 1;
- }
-# endif//GLM_LANG & GLM_LANG_CXX11_FLAG
-
- return Error;
-}
-
-static int test_quat_ctor()
-{
- int Error = 0;
-
-# if GLM_LANG & GLM_LANG_CXX11_FLAG
- {
- union pack
- {
- glm::quat f;
- glm::quat i;
- } A, B;
-
- A.f = glm::quat(0, 0, 0, 0);
- Error += glm::all(glm::equal(A.i, glm::quat(0, 0, 0, 0), glm::epsilon<float>())) ? 0 : 1;
-
- B.f = glm::quat(1, 1, 1, 1);
- Error += glm::all(glm::equal(B.i, glm::quat(1, 1, 1, 1), glm::epsilon<float>())) ? 0 : 1;
- }
-# endif//GLM_LANG & GLM_LANG_CXX11_FLAG
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_vec1_ctor();
- Error += test_vec2_ctor();
- Error += test_vec3_ctor();
- Error += test_vec4_ctor();
- Error += test_mat2x2_ctor();
- Error += test_mat2x3_ctor();
- Error += test_mat2x4_ctor();
- Error += test_mat3x2_ctor();
- Error += test_mat3x3_ctor();
- Error += test_mat3x4_ctor();
- Error += test_mat4x2_ctor();
- Error += test_mat4x3_ctor();
- Error += test_mat4x4_ctor();
- Error += test_quat_ctor();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/core/core_type_int.cpp b/3rdparty/glm/source/test/core/core_type_int.cpp
deleted file mode 100644
index 2631509..0000000
--- a/3rdparty/glm/source/test/core/core_type_int.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-#include <glm/glm.hpp>
-#include <glm/ext/scalar_int_sized.hpp>
-
-static int test_bit_operator()
-{
- int Error = 0;
-
- glm::ivec4 const a(1);
- glm::ivec4 const b = ~a;
- Error += glm::all(glm::equal(b, glm::ivec4(-2))) ? 0 : 1;
-
- glm::int32 const c(1);
- glm::int32 const d = ~c;
- Error += d == -2 ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_bit_operator();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/core/core_type_length.cpp b/3rdparty/glm/source/test/core/core_type_length.cpp
deleted file mode 100644
index f088cb3..0000000
--- a/3rdparty/glm/source/test/core/core_type_length.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-#include <glm/glm.hpp>
-
-static int test_length_mat_non_squared()
-{
- int Error = 0;
-
- Error += glm::mat2x3().length() == 2 ? 0 : 1;
- Error += glm::mat2x4().length() == 2 ? 0 : 1;
- Error += glm::mat3x2().length() == 3 ? 0 : 1;
- Error += glm::mat3x4().length() == 3 ? 0 : 1;
- Error += glm::mat4x2().length() == 4 ? 0 : 1;
- Error += glm::mat4x3().length() == 4 ? 0 : 1;
-
- Error += glm::dmat2x3().length() == 2 ? 0 : 1;
- Error += glm::dmat2x4().length() == 2 ? 0 : 1;
- Error += glm::dmat3x2().length() == 3 ? 0 : 1;
- Error += glm::dmat3x4().length() == 3 ? 0 : 1;
- Error += glm::dmat4x2().length() == 4 ? 0 : 1;
- Error += glm::dmat4x3().length() == 4 ? 0 : 1;
-
- return Error;
-}
-
-static int test_length_mat()
-{
- int Error = 0;
-
- Error += glm::mat2().length() == 2 ? 0 : 1;
- Error += glm::mat3().length() == 3 ? 0 : 1;
- Error += glm::mat4().length() == 4 ? 0 : 1;
- Error += glm::mat2x2().length() == 2 ? 0 : 1;
- Error += glm::mat3x3().length() == 3 ? 0 : 1;
- Error += glm::mat4x4().length() == 4 ? 0 : 1;
-
- Error += glm::dmat2().length() == 2 ? 0 : 1;
- Error += glm::dmat3().length() == 3 ? 0 : 1;
- Error += glm::dmat4().length() == 4 ? 0 : 1;
- Error += glm::dmat2x2().length() == 2 ? 0 : 1;
- Error += glm::dmat3x3().length() == 3 ? 0 : 1;
- Error += glm::dmat4x4().length() == 4 ? 0 : 1;
-
- return Error;
-}
-
-static int test_length_vec()
-{
- int Error = 0;
-
- Error += glm::vec2().length() == 2 ? 0 : 1;
- Error += glm::vec3().length() == 3 ? 0 : 1;
- Error += glm::vec4().length() == 4 ? 0 : 1;
-
- Error += glm::ivec2().length() == 2 ? 0 : 1;
- Error += glm::ivec3().length() == 3 ? 0 : 1;
- Error += glm::ivec4().length() == 4 ? 0 : 1;
-
- Error += glm::uvec2().length() == 2 ? 0 : 1;
- Error += glm::uvec3().length() == 3 ? 0 : 1;
- Error += glm::uvec4().length() == 4 ? 0 : 1;
-
- Error += glm::dvec2().length() == 2 ? 0 : 1;
- Error += glm::dvec3().length() == 3 ? 0 : 1;
- Error += glm::dvec4().length() == 4 ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_length_vec();
- Error += test_length_mat();
- Error += test_length_mat_non_squared();
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_type_mat2x2.cpp b/3rdparty/glm/source/test/core/core_type_mat2x2.cpp
deleted file mode 100644
index 2f8b018..0000000
--- a/3rdparty/glm/source/test/core/core_type_mat2x2.cpp
+++ /dev/null
@@ -1,177 +0,0 @@
-#include <glm/ext/matrix_relational.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/scalar_relational.hpp>
-#include <glm/gtc/constants.hpp>
-#include <glm/matrix.hpp>
-#include <glm/vector_relational.hpp>
-#include <glm/mat2x2.hpp>
-#include <glm/mat2x3.hpp>
-#include <glm/mat2x4.hpp>
-#include <glm/mat3x2.hpp>
-#include <glm/mat3x3.hpp>
-#include <glm/mat3x4.hpp>
-#include <glm/mat4x2.hpp>
-#include <glm/mat4x3.hpp>
-#include <glm/mat4x4.hpp>
-#include <vector>
-
-int test_operators()
-{
- glm::mat2x2 l(1.0f);
- glm::mat2x2 m(1.0f);
- glm::vec2 u(1.0f);
- glm::vec2 v(1.0f);
- float x = 1.0f;
- glm::vec2 a = m * u;
- glm::vec2 b = v * m;
- glm::mat2x2 n = x / m;
- glm::mat2x2 o = m / x;
- glm::mat2x2 p = x * m;
- glm::mat2x2 q = m * x;
- bool R = glm::any(glm::notEqual(m, q, glm::epsilon<float>()));
- bool S = glm::all(glm::equal(m, l, glm::epsilon<float>()));
-
- return (S && !R) ? 0 : 1;
-}
-
-int test_inverse()
-{
- int Error(0);
-
- {
- glm::mat2 const Matrix(1, 2, 3, 4);
- glm::mat2 const Inverse = glm::inverse(Matrix);
- glm::mat2 const Identity = Matrix * Inverse;
-
- Error += glm::all(glm::equal(Identity[0], glm::vec2(1.0f, 0.0f), glm::vec2(0.01f))) ? 0 : 1;
- Error += glm::all(glm::equal(Identity[1], glm::vec2(0.0f, 1.0f), glm::vec2(0.01f))) ? 0 : 1;
- }
-
- {
- glm::mat2 const Matrix(1, 2, 3, 4);
- glm::mat2 const Identity = Matrix / Matrix;
-
- Error += glm::all(glm::equal(Identity[0], glm::vec2(1.0f, 0.0f), glm::vec2(0.01f))) ? 0 : 1;
- Error += glm::all(glm::equal(Identity[1], glm::vec2(0.0f, 1.0f), glm::vec2(0.01f))) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_ctr()
-{
- int Error = 0;
-
- {
- glm::mediump_mat2x2 const A(1.0f);
- glm::highp_mat2x2 const B(A);
- glm::mediump_mat2x2 const C(B);
-
- Error += glm::all(glm::equal(A, C, glm::epsilon<float>())) ? 0 : 1;
- }
-
-#if GLM_HAS_INITIALIZER_LISTS
- glm::mat2x2 m0(
- glm::vec2(0, 1),
- glm::vec2(2, 3));
-
- glm::mat2x2 m1{0, 1, 2, 3};
-
- glm::mat2x2 m2{
- {0, 1},
- {2, 3}};
-
- Error += glm::all(glm::equal(m0, m2, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(m1, m2, glm::epsilon<float>())) ? 0 : 1;
-
- std::vector<glm::mat2x2> v1{
- {0, 1, 2, 3},
- {0, 1, 2, 3}
- };
-
- std::vector<glm::mat2x2> v2{
- {
- { 0, 1},
- { 4, 5}
- },
- {
- { 0, 1},
- { 4, 5}
- }
- };
-
-#endif//GLM_HAS_INITIALIZER_LISTS
-
- return Error;
-}
-
-namespace cast
-{
- template<typename genType>
- int entry()
- {
- int Error = 0;
-
- genType A(1.0f);
- glm::mat2 B(A);
- glm::mat2 Identity(1.0f);
-
- Error += glm::all(glm::equal(B, Identity, glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
- }
-
- int test()
- {
- int Error = 0;
-
- Error += entry<glm::mat2x2>();
- Error += entry<glm::mat2x3>();
- Error += entry<glm::mat2x4>();
- Error += entry<glm::mat3x2>();
- Error += entry<glm::mat3x3>();
- Error += entry<glm::mat3x4>();
- Error += entry<glm::mat4x2>();
- Error += entry<glm::mat4x3>();
- Error += entry<glm::mat4x4>();
-
- return Error;
- }
-}//namespace cast
-
-int test_size()
-{
- int Error = 0;
-
- Error += 16 == sizeof(glm::mat2x2) ? 0 : 1;
- Error += 32 == sizeof(glm::dmat2x2) ? 0 : 1;
- Error += glm::mat2x2().length() == 2 ? 0 : 1;
- Error += glm::dmat2x2().length() == 2 ? 0 : 1;
- Error += glm::mat2x2::length() == 2 ? 0 : 1;
- Error += glm::dmat2x2::length() == 2 ? 0 : 1;
-
- return Error;
-}
-
-int test_constexpr()
-{
-#if GLM_HAS_CONSTEXPR
- static_assert(glm::mat2x2::length() == 2, "GLM: Failed constexpr");
-#endif
-
- return 0;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += cast::test();
- Error += test_ctr();
- Error += test_operators();
- Error += test_inverse();
- Error += test_size();
- Error += test_constexpr();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/core/core_type_mat2x3.cpp b/3rdparty/glm/source/test/core/core_type_mat2x3.cpp
deleted file mode 100644
index e3ad76b..0000000
--- a/3rdparty/glm/source/test/core/core_type_mat2x3.cpp
+++ /dev/null
@@ -1,142 +0,0 @@
-#include <glm/ext/scalar_relational.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/matrix_relational.hpp>
-#include <glm/gtc/constants.hpp>
-#include <glm/mat2x2.hpp>
-#include <glm/mat2x3.hpp>
-#include <glm/mat2x4.hpp>
-#include <glm/mat3x2.hpp>
-#include <glm/mat3x3.hpp>
-#include <glm/mat3x4.hpp>
-#include <glm/mat4x2.hpp>
-#include <glm/mat4x3.hpp>
-#include <glm/mat4x4.hpp>
-#include <vector>
-
-static int test_operators()
-{
- glm::mat2x3 l(1.0f);
- glm::mat2x3 m(1.0f);
- glm::vec2 u(1.0f);
- glm::vec3 v(1.0f);
- float x = 1.0f;
- glm::vec3 a = m * u;
- glm::vec2 b = v * m;
- glm::mat2x3 n = x / m;
- glm::mat2x3 o = m / x;
- glm::mat2x3 p = x * m;
- glm::mat2x3 q = m * x;
- bool R = glm::any(glm::notEqual(m, q, glm::epsilon<float>()));
- bool S = glm::all(glm::equal(m, l, glm::epsilon<float>()));
-
- return (S && !R) ? 0 : 1;
-}
-
-int test_ctr()
-{
- int Error(0);
-
-#if GLM_HAS_INITIALIZER_LISTS
- glm::mat2x3 m0(
- glm::vec3(0, 1, 2),
- glm::vec3(3, 4, 5));
-
- glm::mat2x3 m1{0, 1, 2, 3, 4, 5};
-
- glm::mat2x3 m2{
- {0, 1, 2},
- {3, 4, 5}};
-
- Error += glm::all(glm::equal(m0, m2, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(m1, m2, glm::epsilon<float>())) ? 0 : 1;
-
- std::vector<glm::mat2x3> v1{
- {0, 1, 2, 3, 4, 5},
- {0, 1, 2, 3, 4, 5}
- };
-
- std::vector<glm::mat2x3> v2{
- {
- { 0, 1, 2},
- { 4, 5, 6}
- },
- {
- { 0, 1, 2},
- { 4, 5, 6}
- }
- };
-
-#endif//GLM_HAS_INITIALIZER_LISTS
-
- return Error;
-}
-
-namespace cast
-{
- template<typename genType>
- int entry()
- {
- int Error = 0;
-
- genType A(1.0f);
- glm::mat2x3 B(A);
- glm::mat2x3 Identity(1.0f);
-
- Error += glm::all(glm::equal(B, Identity, glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
- }
-
- int test()
- {
- int Error = 0;
-
- Error += entry<glm::mat2x2>();
- Error += entry<glm::mat2x3>();
- Error += entry<glm::mat2x4>();
- Error += entry<glm::mat3x2>();
- Error += entry<glm::mat3x3>();
- Error += entry<glm::mat3x4>();
- Error += entry<glm::mat4x2>();
- Error += entry<glm::mat4x3>();
- Error += entry<glm::mat4x4>();
-
- return Error;
- }
-}//namespace cast
-
-int test_size()
-{
- int Error = 0;
-
- Error += 24 == sizeof(glm::mat2x3) ? 0 : 1;
- Error += 48 == sizeof(glm::dmat2x3) ? 0 : 1;
- Error += glm::mat2x3().length() == 2 ? 0 : 1;
- Error += glm::dmat2x3().length() == 2 ? 0 : 1;
- Error += glm::mat2x3::length() == 2 ? 0 : 1;
- Error += glm::dmat2x3::length() == 2 ? 0 : 1;
-
- return Error;
-}
-
-int test_constexpr()
-{
-#if GLM_HAS_CONSTEXPR
- static_assert(glm::mat2x3::length() == 2, "GLM: Failed constexpr");
-#endif
-
- return 0;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += cast::test();
- Error += test_ctr();
- Error += test_operators();
- Error += test_size();
- Error += test_constexpr();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/core/core_type_mat2x4.cpp b/3rdparty/glm/source/test/core/core_type_mat2x4.cpp
deleted file mode 100644
index ade3a44..0000000
--- a/3rdparty/glm/source/test/core/core_type_mat2x4.cpp
+++ /dev/null
@@ -1,147 +0,0 @@
-#include <glm/gtc/epsilon.hpp>
-#include <glm/gtc/constants.hpp>
-#include <glm/ext/scalar_relational.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/matrix_relational.hpp>
-#include <glm/mat2x2.hpp>
-#include <glm/mat2x3.hpp>
-#include <glm/mat2x4.hpp>
-#include <glm/mat3x2.hpp>
-#include <glm/mat3x3.hpp>
-#include <glm/mat3x4.hpp>
-#include <glm/mat4x2.hpp>
-#include <glm/mat4x3.hpp>
-#include <glm/mat4x4.hpp>
-#include <vector>
-
-static int test_operators()
-{
- glm::mat2x4 l(1.0f);
- glm::mat2x4 m(1.0f);
- glm::vec2 u(1.0f);
- glm::vec4 v(1.0f);
- float x = 1.0f;
- glm::vec4 a = m * u;
- glm::vec2 b = v * m;
- glm::mat2x4 n = x / m;
- glm::mat2x4 o = m / x;
- glm::mat2x4 p = x * m;
- glm::mat2x4 q = m * x;
- bool R = glm::any(glm::notEqual(m, q, glm::epsilon<float>()));
- bool S = glm::all(glm::equal(m, l, glm::epsilon<float>()));
-
- return (S && !R) ? 0 : 1;
-}
-
-int test_ctr()
-{
- int Error(0);
-
-#if(GLM_HAS_INITIALIZER_LISTS)
- glm::mat2x4 m0(
- glm::vec4(0, 1, 2, 3),
- glm::vec4(4, 5, 6, 7));
-
- glm::mat2x4 m1{0, 1, 2, 3, 4, 5, 6, 7};
-
- glm::mat2x4 m2{
- {0, 1, 2, 3},
- {4, 5, 6, 7}};
-
- Error += glm::all(glm::equal(m0, m2, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(m1, m2, glm::epsilon<float>())) ? 0 : 1;
-
- std::vector<glm::mat2x4> v1{
- {0, 1, 2, 3, 4, 5, 6, 7},
- {0, 1, 2, 3, 4, 5, 6, 7}
- };
-
- std::vector<glm::mat2x4> v2{
- {
- { 0, 1, 2, 3},
- { 4, 5, 6, 7}
- },
- {
- { 0, 1, 2, 3},
- { 4, 5, 6, 7}
- }
- };
-
-#endif//GLM_HAS_INITIALIZER_LISTS
-
- return Error;
-}
-
-namespace cast
-{
- template<typename genType>
- int entry()
- {
- int Error = 0;
-
- genType A(1.0f);
- glm::mat2x4 B(A);
- glm::mat2x4 Identity(1.0f);
-
- for(glm::length_t i = 0, length = B.length(); i < length; ++i)
- Error += glm::all(glm::epsilonEqual(B[i], Identity[i], glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
- }
-
- int test()
- {
- int Error = 0;
-
- Error += entry<glm::mat2x2>();
- Error += entry<glm::mat2x3>();
- Error += entry<glm::mat2x4>();
- Error += entry<glm::mat3x2>();
- Error += entry<glm::mat3x3>();
- Error += entry<glm::mat3x4>();
- Error += entry<glm::mat4x2>();
- Error += entry<glm::mat4x3>();
- Error += entry<glm::mat4x4>();
-
- return Error;
- }
-}//namespace cast
-
-static int test_size()
-{
- int Error = 0;
-
- Error += 32 == sizeof(glm::mat2x4) ? 0 : 1;
- Error += 64 == sizeof(glm::dmat2x4) ? 0 : 1;
- Error += glm::mat2x4().length() == 2 ? 0 : 1;
- Error += glm::dmat2x4().length() == 2 ? 0 : 1;
- Error += glm::mat2x4::length() == 2 ? 0 : 1;
- Error += glm::dmat2x4::length() == 2 ? 0 : 1;
-
- return Error;
-}
-
-static int test_constexpr()
-{
-#if GLM_HAS_CONSTEXPR
- static_assert(glm::mat2x4::length() == 2, "GLM: Failed constexpr");
-#endif
-
- return 0;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += cast::test();
- Error += test_ctr();
- Error += test_operators();
- Error += test_size();
- Error += test_constexpr();
-
- return Error;
-}
-
-
-
diff --git a/3rdparty/glm/source/test/core/core_type_mat3x2.cpp b/3rdparty/glm/source/test/core/core_type_mat3x2.cpp
deleted file mode 100644
index 7a40f90..0000000
--- a/3rdparty/glm/source/test/core/core_type_mat3x2.cpp
+++ /dev/null
@@ -1,148 +0,0 @@
-#include <glm/gtc/constants.hpp>
-#include <glm/ext/scalar_relational.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/matrix_relational.hpp>
-#include <glm/mat2x2.hpp>
-#include <glm/mat2x3.hpp>
-#include <glm/mat2x4.hpp>
-#include <glm/mat3x2.hpp>
-#include <glm/mat3x3.hpp>
-#include <glm/mat3x4.hpp>
-#include <glm/mat4x2.hpp>
-#include <glm/mat4x3.hpp>
-#include <glm/mat4x4.hpp>
-#include <vector>
-
-static bool test_operators()
-{
- glm::mat3x2 l(1.0f);
- glm::mat3x2 m(1.0f);
- glm::vec3 u(1.0f);
- glm::vec2 v(1.0f);
- float x = 1.0f;
- glm::vec2 a = m * u;
- glm::vec3 b = v * m;
- glm::mat3x2 n = x / m;
- glm::mat3x2 o = m / x;
- glm::mat3x2 p = x * m;
- glm::mat3x2 q = m * x;
- bool R = glm::any(glm::notEqual(m, q, glm::epsilon<float>()));
- bool S = glm::all(glm::equal(m, l, glm::epsilon<float>()));
-
- return (S && !R) ? 0 : 1;
-}
-
-int test_ctr()
-{
- int Error(0);
-
-#if(GLM_HAS_INITIALIZER_LISTS)
- glm::mat3x2 m0(
- glm::vec2(0, 1),
- glm::vec2(2, 3),
- glm::vec2(4, 5));
-
- glm::mat3x2 m1{0, 1, 2, 3, 4, 5};
-
- glm::mat3x2 m2{
- {0, 1},
- {2, 3},
- {4, 5}};
-
- Error += glm::all(glm::equal(m0, m2, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(m1, m2, glm::epsilon<float>())) ? 0 : 1;
-
- std::vector<glm::mat3x2> v1{
- {0, 1, 2, 3, 4, 5},
- {0, 1, 2, 3, 4, 5}
- };
-
- std::vector<glm::mat3x2> v2{
- {
- { 0, 1},
- { 2, 3},
- { 4, 5}
- },
- {
- { 0, 1},
- { 2, 3},
- { 4, 5}
- }
- };
-
-#endif//GLM_HAS_INITIALIZER_LISTS
-
- return Error;
-}
-
-namespace cast
-{
- template<typename genType>
- int entry()
- {
- int Error = 0;
-
- genType A(1.0f);
- glm::mat3x2 B(A);
- glm::mat3x2 Identity(1.0f);
-
- Error += glm::all(glm::equal(B, Identity, glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
- }
-
- int test()
- {
- int Error = 0;
-
- Error += entry<glm::mat2x2>();
- Error += entry<glm::mat2x3>();
- Error += entry<glm::mat2x4>();
- Error += entry<glm::mat3x2>();
- Error += entry<glm::mat3x3>();
- Error += entry<glm::mat3x4>();
- Error += entry<glm::mat4x2>();
- Error += entry<glm::mat4x3>();
- Error += entry<glm::mat4x4>();
-
- return Error;
- }
-}//namespace cast
-
-static int test_size()
-{
- int Error = 0;
-
- Error += 24 == sizeof(glm::mat3x2) ? 0 : 1;
- Error += 48 == sizeof(glm::dmat3x2) ? 0 : 1;
- Error += glm::mat3x2().length() == 3 ? 0 : 1;
- Error += glm::dmat3x2().length() == 3 ? 0 : 1;
- Error += glm::mat3x2::length() == 3 ? 0 : 1;
- Error += glm::dmat3x2::length() == 3 ? 0 : 1;
-
- return Error;
-}
-
-static int test_constexpr()
-{
-#if GLM_HAS_CONSTEXPR
- static_assert(glm::mat3x2::length() == 3, "GLM: Failed constexpr");
-#endif
-
- return 0;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += cast::test();
- Error += test_ctr();
- Error += test_operators();
- Error += test_size();
- Error += test_constexpr();
-
- return Error;
-}
-
-
diff --git a/3rdparty/glm/source/test/core/core_type_mat3x3.cpp b/3rdparty/glm/source/test/core/core_type_mat3x3.cpp
deleted file mode 100644
index 99e1f41..0000000
--- a/3rdparty/glm/source/test/core/core_type_mat3x3.cpp
+++ /dev/null
@@ -1,197 +0,0 @@
-#include <glm/gtc/constants.hpp>
-#include <glm/ext/scalar_relational.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/matrix_relational.hpp>
-#include <glm/matrix.hpp>
-#include <glm/vector_relational.hpp>
-#include <glm/mat2x2.hpp>
-#include <glm/mat2x3.hpp>
-#include <glm/mat2x4.hpp>
-#include <glm/mat3x2.hpp>
-#include <glm/mat3x3.hpp>
-#include <glm/mat3x4.hpp>
-#include <glm/mat4x2.hpp>
-#include <glm/mat4x3.hpp>
-#include <glm/mat4x4.hpp>
-#include <vector>
-
-static int test_mat3x3()
-{
- glm::dmat3 Mat0(
- glm::dvec3(0.6f, 0.2f, 0.3f),
- glm::dvec3(0.2f, 0.7f, 0.5f),
- glm::dvec3(0.3f, 0.5f, 0.7f));
- glm::dmat3 Inv0 = glm::inverse(Mat0);
- glm::dmat3 Res0 = Mat0 * Inv0;
-
- return glm::all(glm::equal(Res0, glm::dmat3(1.0), 0.01)) ? 0 : 1;
-}
-
-static int test_operators()
-{
- glm::mat3x3 l(1.0f);
- glm::mat3x3 m(1.0f);
- glm::vec3 u(1.0f);
- glm::vec3 v(1.0f);
- float x = 1.0f;
- glm::vec3 a = m * u;
- glm::vec3 b = v * m;
- glm::mat3x3 n = x / m;
- glm::mat3x3 o = m / x;
- glm::mat3x3 p = x * m;
- glm::mat3x3 q = m * x;
- bool R = glm::any(glm::notEqual(m, q, glm::epsilon<float>()));
- bool S = glm::all(glm::equal(m, l, glm::epsilon<float>()));
-
- return (S && !R) ? 0 : 1;
-}
-
-static int test_inverse()
-{
- int Error(0);
-
- {
- glm::mat3 const Matrix(
- glm::vec3(0.6f, 0.2f, 0.3f),
- glm::vec3(0.2f, 0.7f, 0.5f),
- glm::vec3(0.3f, 0.5f, 0.7f));
- glm::mat3 const Inverse = glm::inverse(Matrix);
- glm::mat3 const Identity = Matrix * Inverse;
-
- Error += glm::all(glm::equal(Identity[0], glm::vec3(1.0f, 0.0f, 0.0f), glm::vec3(0.01f))) ? 0 : 1;
- Error += glm::all(glm::equal(Identity[1], glm::vec3(0.0f, 1.0f, 0.0f), glm::vec3(0.01f))) ? 0 : 1;
- Error += glm::all(glm::equal(Identity[2], glm::vec3(0.0f, 0.0f, 1.0f), glm::vec3(0.01f))) ? 0 : 1;
- }
-
- {
- glm::mat3 const Matrix(
- glm::vec3(0.6f, 0.2f, 0.3f),
- glm::vec3(0.2f, 0.7f, 0.5f),
- glm::vec3(0.3f, 0.5f, 0.7f));
- glm::mat3 const Identity = Matrix / Matrix;
-
- Error += glm::all(glm::equal(Identity[0], glm::vec3(1.0f, 0.0f, 0.0f), glm::vec3(0.01f))) ? 0 : 1;
- Error += glm::all(glm::equal(Identity[1], glm::vec3(0.0f, 1.0f, 0.0f), glm::vec3(0.01f))) ? 0 : 1;
- Error += glm::all(glm::equal(Identity[2], glm::vec3(0.0f, 0.0f, 1.0f), glm::vec3(0.01f))) ? 0 : 1;
- }
-
- return Error;
-}
-
-static int test_ctr()
-{
- int Error(0);
-
-#if(GLM_HAS_INITIALIZER_LISTS)
- glm::mat3x3 m0(
- glm::vec3(0, 1, 2),
- glm::vec3(3, 4, 5),
- glm::vec3(6, 7, 8));
-
- glm::mat3x3 m1{0, 1, 2, 3, 4, 5, 6, 7, 8};
-
- glm::mat3x3 m2{
- {0, 1, 2},
- {3, 4, 5},
- {6, 7, 8}};
-
- Error += glm::all(glm::equal(m0, m2, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(m1, m2, glm::epsilon<float>())) ? 0 : 1;
-
- std::vector<glm::mat3x3> v1{
- {0, 1, 2, 3, 4, 5, 6, 7, 8},
- {0, 1, 2, 3, 4, 5, 6, 7, 8}
- };
-
- std::vector<glm::mat3x3> v2{
- {
- { 0, 1, 2},
- { 3, 4, 5},
- { 6, 7, 8}
- },
- {
- { 0, 1, 2},
- { 3, 4, 5},
- { 6, 7, 8}
- }
- };
-
-#endif//GLM_HAS_INITIALIZER_LISTS
-
- return Error;
-}
-
-namespace cast
-{
- template<typename genType>
- int entry()
- {
- int Error = 0;
-
- genType A(1.0f);
- glm::mat3x3 B(A);
- glm::mat3x3 Identity(1.0f);
-
- Error += glm::all(glm::equal(B, Identity, glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
- }
-
- int test()
- {
- int Error = 0;
-
- Error += entry<glm::mat2x2>();
- Error += entry<glm::mat2x3>();
- Error += entry<glm::mat2x4>();
- Error += entry<glm::mat3x2>();
- Error += entry<glm::mat3x3>();
- Error += entry<glm::mat3x4>();
- Error += entry<glm::mat4x2>();
- Error += entry<glm::mat4x3>();
- Error += entry<glm::mat4x4>();
-
- return Error;
- }
-}//namespace cast
-
-static int test_size()
-{
- int Error = 0;
-
- Error += 36 == sizeof(glm::mat3x3) ? 0 : 1;
- Error += 72 == sizeof(glm::dmat3x3) ? 0 : 1;
- Error += glm::mat3x3().length() == 3 ? 0 : 1;
- Error += glm::dmat3x3().length() == 3 ? 0 : 1;
- Error += glm::mat3x3::length() == 3 ? 0 : 1;
- Error += glm::dmat3x3::length() == 3 ? 0 : 1;
-
- return Error;
-}
-
-static int test_constexpr()
-{
-#if GLM_HAS_CONSTEXPR
- static_assert(glm::mat3x3::length() == 3, "GLM: Failed constexpr");
-
- constexpr glm::mat3x3 const Z(0.0f);
-#endif
-
- return 0;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += cast::test();
- Error += test_ctr();
- Error += test_mat3x3();
- Error += test_operators();
- Error += test_inverse();
- Error += test_size();
- Error += test_constexpr();
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_type_mat3x4.cpp b/3rdparty/glm/source/test/core/core_type_mat3x4.cpp
deleted file mode 100644
index 97d4574..0000000
--- a/3rdparty/glm/source/test/core/core_type_mat3x4.cpp
+++ /dev/null
@@ -1,149 +0,0 @@
-#include <glm/gtc/epsilon.hpp>
-#include <glm/gtc/constants.hpp>
-#include <glm/ext/scalar_relational.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/matrix_relational.hpp>
-#include <glm/mat2x2.hpp>
-#include <glm/mat2x3.hpp>
-#include <glm/mat2x4.hpp>
-#include <glm/mat3x2.hpp>
-#include <glm/mat3x3.hpp>
-#include <glm/mat3x4.hpp>
-#include <glm/mat4x2.hpp>
-#include <glm/mat4x3.hpp>
-#include <glm/mat4x4.hpp>
-#include <vector>
-
-static bool test_operators()
-{
- glm::mat3x4 l(1.0f);
- glm::mat3x4 m(1.0f);
- glm::vec3 u(1.0f);
- glm::vec4 v(1.0f);
- float x = 1.0f;
- glm::vec4 a = m * u;
- glm::vec3 b = v * m;
- glm::mat3x4 n = x / m;
- glm::mat3x4 o = m / x;
- glm::mat3x4 p = x * m;
- glm::mat3x4 q = m * x;
- bool R = glm::any(glm::notEqual(m, q, glm::epsilon<float>()));
- bool S = glm::all(glm::equal(m, l, glm::epsilon<float>()));
-
- return (S && !R) ? 0 : 1;
-}
-
-int test_ctr()
-{
- int Error(0);
-
-#if(GLM_HAS_INITIALIZER_LISTS)
- glm::mat3x4 m0(
- glm::vec4(0, 1, 2, 3),
- glm::vec4(4, 5, 6, 7),
- glm::vec4(8, 9, 10, 11));
-
- glm::mat3x4 m1{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
-
- glm::mat3x4 m2{
- {0, 1, 2, 3},
- {4, 5, 6, 7},
- {8, 9, 10, 11}};
-
- Error += glm::all(glm::equal(m0, m2, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(m1, m2, glm::epsilon<float>())) ? 0 : 1;
-
- std::vector<glm::mat3x4> v1{
- {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11},
- {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}
- };
-
- std::vector<glm::mat3x4> v2{
- {
- { 0, 1, 2, 3},
- { 4, 5, 6, 7},
- { 8, 9, 10, 11}
- },
- {
- { 0, 1, 2, 3},
- { 4, 5, 6, 7},
- { 8, 9, 10, 11}
- }
- };
-
-#endif//GLM_HAS_INITIALIZER_LISTS
-
- return Error;
-}
-
-namespace cast
-{
- template<typename genType>
- int entry()
- {
- int Error = 0;
-
- genType A(1.0f);
- glm::mat3x4 B(A);
- glm::mat3x4 Identity(1.0f);
-
- for(glm::length_t i = 0, length = B.length(); i < length; ++i)
- Error += glm::all(glm::epsilonEqual(B[i], Identity[i], glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
- }
-
- int test()
- {
- int Error = 0;
-
- Error += entry<glm::mat2x2>();
- Error += entry<glm::mat2x3>();
- Error += entry<glm::mat2x4>();
- Error += entry<glm::mat3x2>();
- Error += entry<glm::mat3x3>();
- Error += entry<glm::mat3x4>();
- Error += entry<glm::mat4x2>();
- Error += entry<glm::mat4x3>();
- Error += entry<glm::mat4x4>();
-
- return Error;
- }
-}//namespace cast
-
-static int test_size()
-{
- int Error = 0;
-
- Error += 48 == sizeof(glm::mat3x4) ? 0 : 1;
- Error += 96 == sizeof(glm::dmat3x4) ? 0 : 1;
- Error += glm::mat3x4().length() == 3 ? 0 : 1;
- Error += glm::dmat3x4().length() == 3 ? 0 : 1;
- Error += glm::mat3x4::length() == 3 ? 0 : 1;
- Error += glm::dmat3x4::length() == 3 ? 0 : 1;
-
- return Error;
-}
-
-static int test_constexpr()
-{
-#if GLM_HAS_CONSTEXPR
- static_assert(glm::mat3x4::length() == 3, "GLM: Failed constexpr");
-#endif
-
- return 0;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += cast::test();
- Error += test_ctr();
- Error += test_operators();
- Error += test_size();
- Error += test_constexpr();
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_type_mat4x2.cpp b/3rdparty/glm/source/test/core/core_type_mat4x2.cpp
deleted file mode 100644
index 7133edc..0000000
--- a/3rdparty/glm/source/test/core/core_type_mat4x2.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-#include <glm/gtc/constants.hpp>
-#include <glm/ext/scalar_relational.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/matrix_relational.hpp>
-#include <glm/mat2x2.hpp>
-#include <glm/mat2x3.hpp>
-#include <glm/mat2x4.hpp>
-#include <glm/mat3x2.hpp>
-#include <glm/mat3x3.hpp>
-#include <glm/mat3x4.hpp>
-#include <glm/mat4x2.hpp>
-#include <glm/mat4x3.hpp>
-#include <glm/mat4x4.hpp>
-#include <vector>
-
-static int test_operators()
-{
- glm::mat4x2 l(1.0f);
- glm::mat4x2 m(1.0f);
- glm::vec4 u(1.0f);
- glm::vec2 v(1.0f);
- float x = 1.0f;
- glm::vec2 a = m * u;
- glm::vec4 b = v * m;
- glm::mat4x2 n = x / m;
- glm::mat4x2 o = m / x;
- glm::mat4x2 p = x * m;
- glm::mat4x2 q = m * x;
- bool R = glm::any(glm::notEqual(m, q, glm::epsilon<float>()));
- bool S = glm::all(glm::equal(m, l, glm::epsilon<float>()));
-
- return (S && !R) ? 0 : 1;
-}
-
-int test_ctr()
-{
- int Error(0);
-
-#if(GLM_HAS_INITIALIZER_LISTS)
- glm::mat4x2 m0(
- glm::vec2(0, 1),
- glm::vec2(2, 3),
- glm::vec2(4, 5),
- glm::vec2(6, 7));
-
- glm::mat4x2 m1{0, 1, 2, 3, 4, 5, 6, 7};
-
- glm::mat4x2 m2{
- {0, 1},
- {2, 3},
- {4, 5},
- {6, 7}};
-
- Error += glm::all(glm::equal(m0, m2, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(m1, m2, glm::epsilon<float>())) ? 0 : 1;
-
- std::vector<glm::mat4x2> v1{
- {0, 1, 2, 3, 4, 5, 6, 7},
- {0, 1, 2, 3, 4, 5, 6, 7}
- };
-
- std::vector<glm::mat4x2> v2{
- {
- { 0, 1},
- { 4, 5},
- { 8, 9},
- { 12, 13}
- },
- {
- { 0, 1},
- { 4, 5},
- { 8, 9},
- { 12, 13}
- }
- };
-
-#endif//GLM_HAS_INITIALIZER_LISTS
-
- return Error;
-}
-
-namespace cast
-{
- template<typename genType>
- int entry()
- {
- int Error = 0;
-
- genType A(1.0f);
- glm::mat4x2 B(A);
- glm::mat4x2 Identity(1.0f);
-
- Error += glm::all(glm::equal(B, Identity, glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
- }
-
- int test()
- {
- int Error = 0;
-
- Error += entry<glm::mat2x2>();
- Error += entry<glm::mat2x3>();
- Error += entry<glm::mat2x4>();
- Error += entry<glm::mat3x2>();
- Error += entry<glm::mat3x3>();
- Error += entry<glm::mat3x4>();
- Error += entry<glm::mat4x2>();
- Error += entry<glm::mat4x3>();
- Error += entry<glm::mat4x4>();
-
- return Error;
- }
-}//namespace cast
-
-static int test_size()
-{
- int Error = 0;
-
- Error += 32 == sizeof(glm::mat4x2) ? 0 : 1;
- Error += 64 == sizeof(glm::dmat4x2) ? 0 : 1;
- Error += glm::mat4x2().length() == 4 ? 0 : 1;
- Error += glm::dmat4x2().length() == 4 ? 0 : 1;
- Error += glm::mat4x2::length() == 4 ? 0 : 1;
- Error += glm::dmat4x2::length() == 4 ? 0 : 1;
-
- return Error;
-}
-
-static int test_constexpr()
-{
-#if GLM_HAS_CONSTEXPR
- static_assert(glm::mat4x2::length() == 4, "GLM: Failed constexpr");
-#endif
-
- return 0;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += cast::test();
- Error += test_ctr();
- Error += test_operators();
- Error += test_size();
- Error += test_constexpr();
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/core/core_type_mat4x3.cpp b/3rdparty/glm/source/test/core/core_type_mat4x3.cpp
deleted file mode 100644
index 1c65e7f..0000000
--- a/3rdparty/glm/source/test/core/core_type_mat4x3.cpp
+++ /dev/null
@@ -1,152 +0,0 @@
-#include <glm/gtc/constants.hpp>
-#include <glm/ext/scalar_relational.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/matrix_relational.hpp>
-#include <glm/mat2x2.hpp>
-#include <glm/mat2x3.hpp>
-#include <glm/mat2x4.hpp>
-#include <glm/mat3x2.hpp>
-#include <glm/mat3x3.hpp>
-#include <glm/mat3x4.hpp>
-#include <glm/mat4x2.hpp>
-#include <glm/mat4x3.hpp>
-#include <glm/mat4x4.hpp>
-#include <vector>
-
-static int test_operators()
-{
- glm::mat4x3 l(1.0f);
- glm::mat4x3 m(1.0f);
- glm::vec4 u(1.0f);
- glm::vec3 v(1.0f);
- float x = 1.0f;
- glm::vec3 a = m * u;
- glm::vec4 b = v * m;
- glm::mat4x3 n = x / m;
- glm::mat4x3 o = m / x;
- glm::mat4x3 p = x * m;
- glm::mat4x3 q = m * x;
- bool R = glm::any(glm::notEqual(m, q, glm::epsilon<float>()));
- bool S = glm::all(glm::equal(m, l, glm::epsilon<float>()));
-
- return (S && !R) ? 0 : 1;
-}
-
-int test_ctr()
-{
- int Error(0);
-
-#if(GLM_HAS_INITIALIZER_LISTS)
- glm::mat4x3 m0(
- glm::vec3(0, 1, 2),
- glm::vec3(3, 4, 5),
- glm::vec3(6, 7, 8),
- glm::vec3(9, 10, 11));
-
- glm::mat4x3 m1{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
-
- glm::mat4x3 m2{
- {0, 1, 2},
- {3, 4, 5},
- {6, 7, 8},
- {9, 10, 11}};
-
- Error += glm::all(glm::equal(m0, m2, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(m1, m2, glm::epsilon<float>())) ? 0 : 1;
-
- std::vector<glm::mat4x3> v1{
- {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11},
- {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}
- };
-
- std::vector<glm::mat4x3> v2{
- {
- { 0, 1, 2 },
- { 4, 5, 6 },
- { 8, 9, 10 },
- { 12, 13, 14 }
- },
- {
- { 0, 1, 2 },
- { 4, 5, 6 },
- { 8, 9, 10 },
- { 12, 13, 14 }
- }
- };
-
-#endif//GLM_HAS_INITIALIZER_LISTS
-
- return Error;
-}
-
-namespace cast
-{
- template<typename genType>
- int entry()
- {
- int Error = 0;
-
- genType A(1.0f);
- glm::mat4x3 B(A);
- glm::mat4x3 Identity(1.0f);
-
- Error += glm::all(glm::equal(B, Identity, glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
- }
-
- int test()
- {
- int Error = 0;
-
- Error += entry<glm::mat2x2>();
- Error += entry<glm::mat2x3>();
- Error += entry<glm::mat2x4>();
- Error += entry<glm::mat3x2>();
- Error += entry<glm::mat3x3>();
- Error += entry<glm::mat3x4>();
- Error += entry<glm::mat4x2>();
- Error += entry<glm::mat4x3>();
- Error += entry<glm::mat4x4>();
-
- return Error;
- }
-}//namespace cast
-
-static int test_size()
-{
- int Error = 0;
-
- Error += 48 == sizeof(glm::mat4x3) ? 0 : 1;
- Error += 96 == sizeof(glm::dmat4x3) ? 0 : 1;
- Error += glm::mat4x3().length() == 4 ? 0 : 1;
- Error += glm::dmat4x3().length() == 4 ? 0 : 1;
- Error += glm::mat4x3::length() == 4 ? 0 : 1;
- Error += glm::dmat4x3::length() == 4 ? 0 : 1;
-
- return Error;
-}
-
-static int test_constexpr()
-{
-#if GLM_HAS_CONSTEXPR
- static_assert(glm::mat4x3::length() == 4, "GLM: Failed constexpr");
-#endif
-
- return 0;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += cast::test();
- Error += test_ctr();
- Error += test_operators();
- Error += test_size();
- Error += test_constexpr();
-
- return Error;
-}
-
-
diff --git a/3rdparty/glm/source/test/core/core_type_mat4x4.cpp b/3rdparty/glm/source/test/core/core_type_mat4x4.cpp
deleted file mode 100644
index 0be87f1..0000000
--- a/3rdparty/glm/source/test/core/core_type_mat4x4.cpp
+++ /dev/null
@@ -1,218 +0,0 @@
-#include <glm/gtc/constants.hpp>
-#include <glm/ext/scalar_relational.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/matrix_relational.hpp>
-#include <glm/matrix.hpp>
-#include <glm/mat4x4.hpp>
-#include <glm/vec4.hpp>
-#include <vector>
-
-template <typename matType, typename vecType>
-static int test_operators()
-{
- typedef typename matType::value_type value_type;
-
- value_type const Epsilon = static_cast<value_type>(0.001);
-
- int Error = 0;
-
- matType const M(static_cast<value_type>(2.0f));
- matType const N(static_cast<value_type>(1.0f));
- vecType const U(static_cast<value_type>(2.0f));
-
- {
- matType const P = N * static_cast<value_type>(2.0f);
- Error += glm::all(glm::equal(P, M, Epsilon)) ? 0 : 1;
-
- matType const Q = M / static_cast<value_type>(2.0f);
- Error += glm::all(glm::equal(Q, N, Epsilon)) ? 0 : 1;
- }
-
- {
- vecType const V = M * U;
- Error += glm::all(glm::equal(V, vecType(static_cast<value_type>(4.f)), Epsilon)) ? 0 : 1;
-
- vecType const W = U / M;
- Error += glm::all(glm::equal(W, vecType(static_cast<value_type>(1.f)), Epsilon)) ? 0 : 1;
- }
-
- {
- matType const O = M * N;
- Error += glm::all(glm::equal(O, matType(static_cast<value_type>(2.f)), Epsilon)) ? 0 : 1;
- }
-
- return Error;
-}
-
-template <typename matType>
-static int test_inverse()
-{
- typedef typename matType::value_type value_type;
-
- value_type const Epsilon = static_cast<value_type>(0.001);
-
- int Error = 0;
-
- matType const Identity(static_cast<value_type>(1.0f));
- matType const Matrix(
- glm::vec4(0.6f, 0.2f, 0.3f, 0.4f),
- glm::vec4(0.2f, 0.7f, 0.5f, 0.3f),
- glm::vec4(0.3f, 0.5f, 0.7f, 0.2f),
- glm::vec4(0.4f, 0.3f, 0.2f, 0.6f));
- matType const Inverse = Identity / Matrix;
- matType const Result = Matrix * Inverse;
-
- Error += glm::all(glm::equal(Identity, Result, Epsilon)) ? 0 : 1;
-
- return Error;
-}
-
-static int test_ctr()
-{
- int Error = 0;
-
-#if GLM_HAS_TRIVIAL_QUERIES
- //Error += std::is_trivially_default_constructible<glm::mat4>::value ? 0 : 1;
- //Error += std::is_trivially_copy_assignable<glm::mat4>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::mat4>::value ? 0 : 1;
- //Error += std::is_copy_constructible<glm::mat4>::value ? 0 : 1;
- //Error += std::has_trivial_copy_constructor<glm::mat4>::value ? 0 : 1;
-#endif
-
-#if GLM_HAS_INITIALIZER_LISTS
- glm::mat4 const m0(
- glm::vec4(0, 1, 2, 3),
- glm::vec4(4, 5, 6, 7),
- glm::vec4(8, 9, 10, 11),
- glm::vec4(12, 13, 14, 15));
-
- assert(sizeof(m0) == 4 * 4 * 4);
-
- glm::vec4 const V{0, 1, 2, 3};
-
- glm::mat4 const m1{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
-
- glm::mat4 const m2{
- {0, 1, 2, 3},
- {4, 5, 6, 7},
- {8, 9, 10, 11},
- {12, 13, 14, 15}};
-
- Error += glm::all(glm::equal(m0, m2, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(m1, m2, glm::epsilon<float>())) ? 0 : 1;
-
-
- std::vector<glm::mat4> const m3{
- {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
- {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
- {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
- {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}};
-
- glm::mat4 const m4{
- {1, 0, 0, 0},
- {0, 1, 0, 0},
- {0, 0, 1, 0},
- {0, 0, 0, 1} };
-
- Error += glm::equal(m4[0][0], 1.0f, 0.0001f) ? 0 : 1;
- Error += glm::equal(m4[3][3], 1.0f, 0.0001f) ? 0 : 1;
-
- std::vector<glm::mat4> const v1{
- {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
- {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}};
-
- std::vector<glm::mat4> const v2{
- {
- { 0, 1, 2, 3 },
- { 4, 5, 6, 7 },
- { 8, 9, 10, 11 },
- { 12, 13, 14, 15 }
- },
- {
- { 0, 1, 2, 3 },
- { 4, 5, 6, 7 },
- { 8, 9, 10, 11 },
- { 12, 13, 14, 15 }
- }};
-
-#endif//GLM_HAS_INITIALIZER_LISTS
-
- return Error;
-}
-
-static int test_member_alloc_bug()
-{
- int Error = 0;
-
- struct repro
- {
- repro(){ this->matrix = new glm::mat4(); }
- ~repro(){delete this->matrix;}
-
- glm::mat4* matrix;
- };
-
- repro Repro;
-
- return Error;
-}
-
-static int test_size()
-{
- int Error = 0;
-
- Error += 64 == sizeof(glm::mat4) ? 0 : 1;
- Error += 128 == sizeof(glm::dmat4) ? 0 : 1;
- Error += glm::mat4().length() == 4 ? 0 : 1;
- Error += glm::dmat4().length() == 4 ? 0 : 1;
- Error += glm::mat4::length() == 4 ? 0 : 1;
- Error += glm::dmat4::length() == 4 ? 0 : 1;
-
- return Error;
-}
-
-static int test_constexpr()
-{
-#if GLM_HAS_CONSTEXPR
- static_assert(glm::mat4::length() == 4, "GLM: Failed constexpr");
- constexpr glm::mat4 A(1.f);
- constexpr glm::mat4 B(1.f);
- constexpr glm::bvec4 C = glm::equal(A, B, 0.01f);
- static_assert(glm::all(C), "GLM: Failed constexpr");
-#endif
-
- return 0;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_member_alloc_bug();
- Error += test_ctr();
-
- Error += test_operators<glm::mat4, glm::vec4>();
- Error += test_operators<glm::lowp_mat4, glm::lowp_vec4>();
- Error += test_operators<glm::mediump_mat4, glm::mediump_vec4>();
- Error += test_operators<glm::highp_mat4, glm::highp_vec4>();
-
- Error += test_operators<glm::dmat4, glm::dvec4>();
- Error += test_operators<glm::lowp_dmat4, glm::lowp_dvec4>();
- Error += test_operators<glm::mediump_dmat4, glm::mediump_dvec4>();
- Error += test_operators<glm::highp_dmat4, glm::highp_dvec4>();
-
- Error += test_inverse<glm::mat4>();
- Error += test_inverse<glm::lowp_mat4>();
- Error += test_inverse<glm::mediump_mat4>();
- Error += test_inverse<glm::highp_mat4>();
-
- Error += test_inverse<glm::dmat4>();
- Error += test_inverse<glm::lowp_dmat4>();
- Error += test_inverse<glm::mediump_dmat4>();
- Error += test_inverse<glm::highp_dmat4>();
-
- Error += test_size();
- Error += test_constexpr();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/core/core_type_vec1.cpp b/3rdparty/glm/source/test/core/core_type_vec1.cpp
deleted file mode 100644
index 77f3f84..0000000
--- a/3rdparty/glm/source/test/core/core_type_vec1.cpp
+++ /dev/null
@@ -1,169 +0,0 @@
-#define GLM_FORCE_SWIZZLE
-#include <glm/gtc/constants.hpp>
-#include <glm/gtc/vec1.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/vec2.hpp>
-#include <vector>
-
-static glm::vec1 g1;
-static glm::vec1 g2(1);
-
-int test_vec1_operators()
-{
- int Error = 0;
-
- glm::ivec1 A(1);
- glm::ivec1 B(1);
- {
- bool R = A != B;
- bool S = A == B;
-
- Error += (S && !R) ? 0 : 1;
- }
-
- {
- A *= 1;
- B *= 1;
- A += 1;
- B += 1;
-
- bool R = A != B;
- bool S = A == B;
-
- Error += (S && !R) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_vec1_ctor()
-{
- int Error = 0;
-
-# if GLM_HAS_TRIVIAL_QUERIES
- // Error += std::is_trivially_default_constructible<glm::vec1>::value ? 0 : 1;
- // Error += std::is_trivially_copy_assignable<glm::vec1>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::vec1>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::dvec1>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::ivec1>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::uvec1>::value ? 0 : 1;
-
- Error += std::is_copy_constructible<glm::vec1>::value ? 0 : 1;
-# endif
-
-/*
-#if GLM_HAS_INITIALIZER_LISTS
- {
- glm::vec1 a{ 0 };
- std::vector<glm::vec1> v = {
- {0.f},
- {4.f},
- {8.f}};
- }
-
- {
- glm::dvec2 a{ 0 };
- std::vector<glm::dvec1> v = {
- {0.0},
- {4.0},
- {8.0}};
- }
-#endif
-*/
-
- {
- glm::vec2 A = glm::vec2(2.0f);
- glm::vec2 B = glm::vec2(2.0f, 3.0f);
- glm::vec2 C = glm::vec2(2.0f, 3.0);
- //glm::vec2 D = glm::dvec2(2.0); // Build error TODO: What does the specification says?
- glm::vec2 E(glm::dvec2(2.0));
- glm::vec2 F(glm::ivec2(2));
- }
-
- return Error;
-}
-
-static int test_vec1_size()
-{
- int Error = 0;
-
- Error += sizeof(glm::vec1) == sizeof(glm::mediump_vec1) ? 0 : 1;
- Error += 4 == sizeof(glm::mediump_vec1) ? 0 : 1;
- Error += sizeof(glm::dvec1) == sizeof(glm::highp_dvec1) ? 0 : 1;
- Error += 8 == sizeof(glm::highp_dvec1) ? 0 : 1;
- Error += glm::vec1().length() == 1 ? 0 : 1;
- Error += glm::dvec1().length() == 1 ? 0 : 1;
- Error += glm::vec1::length() == 1 ? 0 : 1;
- Error += glm::dvec1::length() == 1 ? 0 : 1;
-
- return Error;
-}
-
-static int test_vec1_operator_increment()
-{
- int Error(0);
-
- glm::ivec1 v0(1);
- glm::ivec1 v1(v0);
- glm::ivec1 v2(v0);
- glm::ivec1 v3 = ++v1;
- glm::ivec1 v4 = v2++;
-
- Error += glm::all(glm::equal(v0, v4)) ? 0 : 1;
- Error += glm::all(glm::equal(v1, v2)) ? 0 : 1;
- Error += glm::all(glm::equal(v1, v3)) ? 0 : 1;
-
- int i0(1);
- int i1(i0);
- int i2(i0);
- int i3 = ++i1;
- int i4 = i2++;
-
- Error += i0 == i4 ? 0 : 1;
- Error += i1 == i2 ? 0 : 1;
- Error += i1 == i3 ? 0 : 1;
-
- return Error;
-}
-
-static int test_swizzle()
-{
- int Error = 0;
-
-# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
- {
- glm::vec1 A = glm::vec1(1.0f);
- //glm::vec1 B = A.x;
- glm::vec1 C(A.x);
-
- //Error += glm::all(glm::equal(A, B)) ? 0 : 1;
- Error += glm::all(glm::equal(A, C, glm::epsilon<float>())) ? 0 : 1;
- }
-# endif//GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
-
- return Error;
-}
-
-static int test_constexpr()
-{
-#if GLM_HAS_CONSTEXPR
- static_assert(glm::vec1::length() == 1, "GLM: Failed constexpr");
- static_assert(glm::vec1(1.0f).x > 0.0f, "GLM: Failed constexpr");
-#endif
-
- return 0;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_vec1_size();
- Error += test_vec1_ctor();
- Error += test_vec1_operators();
- Error += test_vec1_operator_increment();
- Error += test_swizzle();
- Error += test_constexpr();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/core/core_type_vec2.cpp b/3rdparty/glm/source/test/core/core_type_vec2.cpp
deleted file mode 100644
index 308c61f..0000000
--- a/3rdparty/glm/source/test/core/core_type_vec2.cpp
+++ /dev/null
@@ -1,392 +0,0 @@
-#define GLM_FORCE_SWIZZLE
-#include <glm/gtc/vec1.hpp>
-#include <glm/gtc/constants.hpp>
-#include <glm/ext/vector_float1.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/vector_relational.hpp>
-#include <glm/vec2.hpp>
-#include <vector>
-#if GLM_HAS_TRIVIAL_QUERIES
-# include <type_traits>
-#endif
-
-static glm::ivec2 g1;
-static glm::ivec2 g2(1);
-static glm::ivec2 g3(1, 1);
-
-static int test_operators()
-{
- int Error = 0;
-
- {
- glm::ivec2 A(1);
- glm::ivec2 B(1);
- Error += A != B ? 1 : 0;
- Error += A == B ? 0 : 1;
- }
-
- {
- glm::vec2 A(1.0f);
- glm::vec2 C = A + 1.0f;
- A += 1.0f;
- Error += glm::all(glm::equal(A, glm::vec2(2.0f), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, C, glm::epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::vec2 A(1.0f);
- glm::vec2 B(2.0f,-1.0f);
- glm::vec2 C = A + B;
- A += B;
- Error += glm::all(glm::equal(A, glm::vec2(3.0f, 0.0f), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, C, glm::epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::vec2 A(1.0f);
- glm::vec2 C = A - 1.0f;
- A -= 1.0f;
- Error += glm::all(glm::equal(A, glm::vec2(0.0f), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, C, glm::epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::vec2 A(1.0f);
- glm::vec2 B(2.0f,-1.0f);
- glm::vec2 C = A - B;
- A -= B;
- Error += glm::all(glm::equal(A, glm::vec2(-1.0f, 2.0f), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, C, glm::epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::vec2 A(1.0f);
- glm::vec2 C = A * 2.0f;
- A *= 2.0f;
- Error += glm::all(glm::equal(A, glm::vec2(2.0f), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, C, glm::epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::vec2 A(2.0f);
- glm::vec2 B(2.0f);
- glm::vec2 C = A / B;
- A /= B;
- Error += glm::all(glm::equal(A, glm::vec2(1.0f), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, C, glm::epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::vec2 A(1.0f, 2.0f);
- glm::vec2 B(4.0f, 5.0f);
-
- glm::vec2 C = A + B;
- Error += glm::all(glm::equal(C, glm::vec2(5, 7), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec2 D = B - A;
- Error += glm::all(glm::equal(D, glm::vec2(3, 3), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec2 E = A * B;
- Error += glm::all(glm::equal(E, glm::vec2(4, 10), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec2 F = B / A;
- Error += glm::all(glm::equal(F, glm::vec2(4, 2.5), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec2 G = A + 1.0f;
- Error += glm::all(glm::equal(G, glm::vec2(2, 3), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec2 H = B - 1.0f;
- Error += glm::all(glm::equal(H, glm::vec2(3, 4), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec2 I = A * 2.0f;
- Error += glm::all(glm::equal(I, glm::vec2(2, 4), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec2 J = B / 2.0f;
- Error += glm::all(glm::equal(J, glm::vec2(2, 2.5), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec2 K = 1.0f + A;
- Error += glm::all(glm::equal(K, glm::vec2(2, 3), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec2 L = 1.0f - B;
- Error += glm::all(glm::equal(L, glm::vec2(-3, -4), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec2 M = 2.0f * A;
- Error += glm::all(glm::equal(M, glm::vec2(2, 4), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec2 N = 2.0f / B;
- Error += glm::all(glm::equal(N, glm::vec2(0.5, 2.0 / 5.0), glm::epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::vec2 A(1.0f, 2.0f);
- glm::vec2 B(4.0f, 5.0f);
-
- A += B;
- Error += glm::all(glm::equal(A, glm::vec2(5, 7), glm::epsilon<float>())) ? 0 : 1;
-
- A += 1.0f;
- Error += glm::all(glm::equal(A, glm::vec2(6, 8), glm::epsilon<float>())) ? 0 : 1;
- }
- {
- glm::ivec2 A(1.0f, 2.0f);
- glm::ivec2 B(4.0f, 5.0f);
-
- B -= A;
- Error += B == glm::ivec2(3, 3) ? 0 : 1;
-
- B -= 1.0f;
- Error += B == glm::ivec2(2, 2) ? 0 : 1;
- }
- {
- glm::ivec2 A(1.0f, 2.0f);
- glm::ivec2 B(4.0f, 5.0f);
-
- A *= B;
- Error += A == glm::ivec2(4, 10) ? 0 : 1;
-
- A *= 2;
- Error += A == glm::ivec2(8, 20) ? 0 : 1;
- }
- {
- glm::ivec2 A(1.0f, 2.0f);
- glm::ivec2 B(4.0f, 16.0f);
-
- B /= A;
- Error += B == glm::ivec2(4, 8) ? 0 : 1;
-
- B /= 2.0f;
- Error += B == glm::ivec2(2, 4) ? 0 : 1;
- }
- {
- glm::ivec2 B(2);
-
- B /= B.y;
- Error += B == glm::ivec2(1) ? 0 : 1;
- }
-
- {
- glm::ivec2 A(1.0f, 2.0f);
- glm::ivec2 B = -A;
- Error += B == glm::ivec2(-1.0f, -2.0f) ? 0 : 1;
- }
-
- {
- glm::ivec2 A(1.0f, 2.0f);
- glm::ivec2 B = --A;
- Error += B == glm::ivec2(0.0f, 1.0f) ? 0 : 1;
- }
-
- {
- glm::ivec2 A(1.0f, 2.0f);
- glm::ivec2 B = A--;
- Error += B == glm::ivec2(1.0f, 2.0f) ? 0 : 1;
- Error += A == glm::ivec2(0.0f, 1.0f) ? 0 : 1;
- }
-
- {
- glm::ivec2 A(1.0f, 2.0f);
- glm::ivec2 B = ++A;
- Error += B == glm::ivec2(2.0f, 3.0f) ? 0 : 1;
- }
-
- {
- glm::ivec2 A(1.0f, 2.0f);
- glm::ivec2 B = A++;
- Error += B == glm::ivec2(1.0f, 2.0f) ? 0 : 1;
- Error += A == glm::ivec2(2.0f, 3.0f) ? 0 : 1;
- }
-
- return Error;
-}
-
-static int test_ctor()
-{
- int Error = 0;
-
- {
- glm::ivec2 A(1);
- glm::ivec2 B(A);
- Error += A == B ? 0 : 1;
- }
-
-# if GLM_HAS_TRIVIAL_QUERIES
- // Error += std::is_trivially_default_constructible<glm::vec2>::value ? 0 : 1;
- // Error += std::is_trivially_copy_assignable<glm::vec2>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::vec2>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::dvec2>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::ivec2>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::uvec2>::value ? 0 : 1;
-
- Error += std::is_copy_constructible<glm::vec2>::value ? 0 : 1;
-# endif
-
-#if GLM_HAS_INITIALIZER_LISTS
- {
- glm::vec2 a{ 0, 1 };
- std::vector<glm::vec2> v = {
- {0, 1},
- {4, 5},
- {8, 9}};
- }
-
- {
- glm::dvec2 a{ 0, 1 };
- std::vector<glm::dvec2> v = {
- {0, 1},
- {4, 5},
- {8, 9}};
- }
-#endif
-
- {
- glm::vec2 A = glm::vec2(2.0f);
- glm::vec2 B = glm::vec2(2.0f, 3.0f);
- glm::vec2 C = glm::vec2(2.0f, 3.0);
- //glm::vec2 D = glm::dvec2(2.0); // Build error TODO: What does the specification says?
- glm::vec2 E(glm::dvec2(2.0));
- glm::vec2 F(glm::ivec2(2));
- }
-
- {
- glm::vec1 const R(1.0f);
- glm::vec1 const S(2.0f);
- glm::vec2 const O(1.0f, 2.0f);
-
- glm::vec2 const A(R);
- glm::vec2 const B(1.0f);
- Error += glm::all(glm::equal(A, B, 0.0001f)) ? 0 : 1;
-
- glm::vec2 const C(R, S);
- Error += glm::all(glm::equal(C, O, 0.0001f)) ? 0 : 1;
-
- glm::vec2 const D(R, 2.0f);
- Error += glm::all(glm::equal(D, O, 0.0001f)) ? 0 : 1;
-
- glm::vec2 const E(1.0f, S);
- Error += glm::all(glm::equal(E, O, 0.0001f)) ? 0 : 1;
- }
-
- {
- glm::vec1 const R(1.0f);
- glm::dvec1 const S(2.0);
- glm::vec2 const O(1.0, 2.0);
-
- glm::vec2 const A(R);
- glm::vec2 const B(1.0);
- Error += glm::all(glm::equal(A, B, 0.0001f)) ? 0 : 1;
-
- glm::vec2 const C(R, S);
- Error += glm::all(glm::equal(C, O, 0.0001f)) ? 0 : 1;
-
- glm::vec2 const D(R, 2.0);
- Error += glm::all(glm::equal(D, O, 0.0001f)) ? 0 : 1;
-
- glm::vec2 const E(1.0, S);
- Error += glm::all(glm::equal(E, O, 0.0001f)) ? 0 : 1;
- }
-
- return Error;
-}
-
-static int test_size()
-{
- int Error = 0;
-
- Error += sizeof(glm::vec2) == sizeof(glm::mediump_vec2) ? 0 : 1;
- Error += 8 == sizeof(glm::mediump_vec2) ? 0 : 1;
- Error += sizeof(glm::dvec2) == sizeof(glm::highp_dvec2) ? 0 : 1;
- Error += 16 == sizeof(glm::highp_dvec2) ? 0 : 1;
- Error += glm::vec2().length() == 2 ? 0 : 1;
- Error += glm::dvec2().length() == 2 ? 0 : 1;
- Error += glm::vec2::length() == 2 ? 0 : 1;
- Error += glm::dvec2::length() == 2 ? 0 : 1;
-
- GLM_CONSTEXPR std::size_t Length = glm::vec2::length();
- Error += Length == 2 ? 0 : 1;
-
- return Error;
-}
-
-static int test_operator_increment()
-{
- int Error = 0;
-
- glm::ivec2 v0(1);
- glm::ivec2 v1(v0);
- glm::ivec2 v2(v0);
- glm::ivec2 v3 = ++v1;
- glm::ivec2 v4 = v2++;
-
- Error += glm::all(glm::equal(v0, v4)) ? 0 : 1;
- Error += glm::all(glm::equal(v1, v2)) ? 0 : 1;
- Error += glm::all(glm::equal(v1, v3)) ? 0 : 1;
-
- int i0(1);
- int i1(i0);
- int i2(i0);
- int i3 = ++i1;
- int i4 = i2++;
-
- Error += i0 == i4 ? 0 : 1;
- Error += i1 == i2 ? 0 : 1;
- Error += i1 == i3 ? 0 : 1;
-
- return Error;
-}
-
-static int test_constexpr()
-{
-#if GLM_HAS_CONSTEXPR
- static_assert(glm::vec2::length() == 2, "GLM: Failed constexpr");
- static_assert(glm::vec2(1.0f).x > 0.0f, "GLM: Failed constexpr");
- static_assert(glm::vec2(1.0f, -1.0f).x > 0.0f, "GLM: Failed constexpr");
- static_assert(glm::vec2(1.0f, -1.0f).y < 0.0f, "GLM: Failed constexpr");
-#endif
-
- return 0;
-}
-
-static int test_swizzle()
-{
- int Error = 0;
-
-# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
- {
- glm::vec2 A = glm::vec2(1.0f, 2.0f);
- glm::vec2 B = A.xy;
- glm::vec2 C(A.xy);
- glm::vec2 D(A.xy());
-
- Error += glm::all(glm::equal(A, B, 0.0001f)) ? 0 : 1;
- Error += glm::all(glm::equal(A, C, 0.0001f)) ? 0 : 1;
- Error += glm::all(glm::equal(A, D, 0.0001f)) ? 0 : 1;
- }
-# endif//GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
-
-# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR || GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
- {
- glm::vec2 A = glm::vec2(1.0f, 2.0f);
- glm::vec2 B = A.xy();
- glm::vec2 C(A.xy());
-
- Error += glm::all(glm::equal(A, B, 0.0001f)) ? 0 : 1;
- Error += glm::all(glm::equal(A, C, 0.0001f)) ? 0 : 1;
- }
-# endif//GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR || GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_size();
- Error += test_ctor();
- Error += test_operators();
- Error += test_operator_increment();
- Error += test_swizzle();
- Error += test_constexpr();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/core/core_type_vec3.cpp b/3rdparty/glm/source/test/core/core_type_vec3.cpp
deleted file mode 100644
index 4da8187..0000000
--- a/3rdparty/glm/source/test/core/core_type_vec3.cpp
+++ /dev/null
@@ -1,628 +0,0 @@
-#define GLM_FORCE_SWIZZLE
-#include <glm/gtc/constants.hpp>
-#include <glm/gtc/vec1.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/vector_relational.hpp>
-#include <glm/geometric.hpp>
-#include <glm/vec2.hpp>
-#include <glm/vec3.hpp>
-#include <glm/vec4.hpp>
-#include <vector>
-
-static glm::vec3 g1;
-static glm::vec3 g2(1);
-static glm::vec3 g3(1, 1, 1);
-
-int test_vec3_ctor()
-{
- int Error = 0;
-
-# if GLM_HAS_TRIVIAL_QUERIES
- // Error += std::is_trivially_default_constructible<glm::vec3>::value ? 0 : 1;
- // Error += std::is_trivially_copy_assignable<glm::vec3>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::vec3>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::dvec3>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::ivec3>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::uvec3>::value ? 0 : 1;
-
- Error += std::is_copy_constructible<glm::vec3>::value ? 0 : 1;
-# endif
-
-# if GLM_HAS_INITIALIZER_LISTS
- {
- glm::vec3 a{ 0, 1, 2 };
- std::vector<glm::vec3> v = {
- {0, 1, 2},
- {4, 5, 6},
- {8, 9, 0}};
- }
-
- {
- glm::dvec3 a{ 0, 1, 2 };
- std::vector<glm::dvec3> v = {
- {0, 1, 2},
- {4, 5, 6},
- {8, 9, 0}};
- }
-# endif
-
- {
- glm::ivec3 A(1);
- glm::ivec3 B(1, 1, 1);
-
- Error += A == B ? 0 : 1;
- }
-
- {
- std::vector<glm::ivec3> Tests;
- Tests.push_back(glm::ivec3(glm::ivec2(1, 2), 3));
- Tests.push_back(glm::ivec3(1, glm::ivec2(2, 3)));
- Tests.push_back(glm::ivec3(1, 2, 3));
- Tests.push_back(glm::ivec3(glm::ivec4(1, 2, 3, 4)));
-
- for(std::size_t i = 0; i < Tests.size(); ++i)
- Error += Tests[i] == glm::ivec3(1, 2, 3) ? 0 : 1;
- }
-
- {
- glm::vec1 const R(1.0f);
- glm::vec1 const S(2.0f);
- glm::vec1 const T(3.0f);
- glm::vec3 const O(1.0f, 2.0f, 3.0f);
-
- glm::vec3 const A(R);
- glm::vec3 const B(1.0f);
- Error += glm::all(glm::equal(A, B, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec3 const C(R, S, T);
- Error += glm::all(glm::equal(C, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec3 const D(R, 2.0f, 3.0f);
- Error += glm::all(glm::equal(D, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec3 const E(1.0f, S, 3.0f);
- Error += glm::all(glm::equal(E, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec3 const F(1.0f, S, T);
- Error += glm::all(glm::equal(F, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec3 const G(R, 2.0f, T);
- Error += glm::all(glm::equal(G, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec3 const H(R, S, 3.0f);
- Error += glm::all(glm::equal(H, O, glm::epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::vec1 const R(1.0);
- glm::dvec1 const S(2.0);
- glm::vec1 const T(3.0);
- glm::vec3 const O(1.0f, 2.0f, 3.0f);
-
- glm::vec3 const A(R);
- glm::vec3 const B(1.0);
- Error += glm::all(glm::equal(A, B, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec3 const C(R, S, T);
- Error += glm::all(glm::equal(C, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec3 const D(R, 2.0, 3.0);
- Error += glm::all(glm::equal(D, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec3 const E(1.0f, S, 3.0);
- Error += glm::all(glm::equal(E, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec3 const F(1.0, S, T);
- Error += glm::all(glm::equal(F, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec3 const G(R, 2.0, T);
- Error += glm::all(glm::equal(G, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec3 const H(R, S, 3.0);
- Error += glm::all(glm::equal(H, O, glm::epsilon<float>())) ? 0 : 1;
- }
-
- return Error;
-}
-
-float foo()
-{
- glm::vec3 bar = glm::vec3(0.0f, 1.0f, 1.0f);
-
- return glm::length(bar);
-}
-
-static int test_bvec3_ctor()
-{
- int Error = 0;
-
- glm::bvec3 const A(true);
- glm::bvec3 const B(true);
- glm::bvec3 const C(false);
- glm::bvec3 const D = A && B;
- glm::bvec3 const E = A && C;
- glm::bvec3 const F = A || C;
-
- Error += D == glm::bvec3(true) ? 0 : 1;
- Error += E == glm::bvec3(false) ? 0 : 1;
- Error += F == glm::bvec3(true) ? 0 : 1;
-
- bool const G = A == C;
- bool const H = A != C;
- Error += !G ? 0 : 1;
- Error += H ? 0 : 1;
-
- return Error;
-}
-
-static int test_vec3_operators()
-{
- int Error = 0;
-
- {
- glm::ivec3 A(1);
- glm::ivec3 B(1);
- bool R = A != B;
- bool S = A == B;
-
- Error += (S && !R) ? 0 : 1;
- }
-
- {
- glm::vec3 const A(1.0f, 2.0f, 3.0f);
- glm::vec3 const B(4.0f, 5.0f, 6.0f);
-
- glm::vec3 const C = A + B;
- Error += glm::all(glm::equal(C, glm::vec3(5, 7, 9), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec3 const D = B - A;
- Error += glm::all(glm::equal(D, glm::vec3(3, 3, 3), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec3 const E = A * B;
- Error += glm::all(glm::equal(E, glm::vec3(4, 10, 18), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec3 const F = B / A;
- Error += glm::all(glm::equal(F, glm::vec3(4, 2.5, 2), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec3 const G = A + 1.0f;
- Error += glm::all(glm::equal(G, glm::vec3(2, 3, 4), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec3 const H = B - 1.0f;
- Error += glm::all(glm::equal(H, glm::vec3(3, 4, 5), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec3 const I = A * 2.0f;
- Error += glm::all(glm::equal(I, glm::vec3(2, 4, 6), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec3 const J = B / 2.0f;
- Error += glm::all(glm::equal(J, glm::vec3(2, 2.5, 3), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec3 const K = 1.0f + A;
- Error += glm::all(glm::equal(K, glm::vec3(2, 3, 4), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec3 const L = 1.0f - B;
- Error += glm::all(glm::equal(L, glm::vec3(-3, -4, -5), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec3 const M = 2.0f * A;
- Error += glm::all(glm::equal(M, glm::vec3(2, 4, 6), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec3 const N = 2.0f / B;
- Error += glm::all(glm::equal(N, glm::vec3(0.5, 2.0 / 5.0, 2.0 / 6.0), glm::epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::ivec3 A(1.0f, 2.0f, 3.0f);
- glm::ivec3 B(4.0f, 5.0f, 6.0f);
-
- A += B;
- Error += A == glm::ivec3(5, 7, 9) ? 0 : 1;
-
- A += 1;
- Error += A == glm::ivec3(6, 8, 10) ? 0 : 1;
- }
- {
- glm::ivec3 A(1.0f, 2.0f, 3.0f);
- glm::ivec3 B(4.0f, 5.0f, 6.0f);
-
- B -= A;
- Error += B == glm::ivec3(3, 3, 3) ? 0 : 1;
-
- B -= 1;
- Error += B == glm::ivec3(2, 2, 2) ? 0 : 1;
- }
- {
- glm::ivec3 A(1.0f, 2.0f, 3.0f);
- glm::ivec3 B(4.0f, 5.0f, 6.0f);
-
- A *= B;
- Error += A == glm::ivec3(4, 10, 18) ? 0 : 1;
-
- A *= 2;
- Error += A == glm::ivec3(8, 20, 36) ? 0 : 1;
- }
- {
- glm::ivec3 A(1.0f, 2.0f, 3.0f);
- glm::ivec3 B(4.0f, 4.0f, 6.0f);
-
- B /= A;
- Error += B == glm::ivec3(4, 2, 2) ? 0 : 1;
-
- B /= 2;
- Error += B == glm::ivec3(2, 1, 1) ? 0 : 1;
- }
- {
- glm::ivec3 B(2);
-
- B /= B.y;
- Error += B == glm::ivec3(1) ? 0 : 1;
- }
-
- {
- glm::ivec3 A(1.0f, 2.0f, 3.0f);
- glm::ivec3 B = -A;
- Error += B == glm::ivec3(-1.0f, -2.0f, -3.0f) ? 0 : 1;
- }
-
- {
- glm::ivec3 A(1.0f, 2.0f, 3.0f);
- glm::ivec3 B = --A;
- Error += B == glm::ivec3(0.0f, 1.0f, 2.0f) ? 0 : 1;
- }
-
- {
- glm::ivec3 A(1.0f, 2.0f, 3.0f);
- glm::ivec3 B = A--;
- Error += B == glm::ivec3(1.0f, 2.0f, 3.0f) ? 0 : 1;
- Error += A == glm::ivec3(0.0f, 1.0f, 2.0f) ? 0 : 1;
- }
-
- {
- glm::ivec3 A(1.0f, 2.0f, 3.0f);
- glm::ivec3 B = ++A;
- Error += B == glm::ivec3(2.0f, 3.0f, 4.0f) ? 0 : 1;
- }
-
- {
- glm::ivec3 A(1.0f, 2.0f, 3.0f);
- glm::ivec3 B = A++;
- Error += B == glm::ivec3(1.0f, 2.0f, 3.0f) ? 0 : 1;
- Error += A == glm::ivec3(2.0f, 3.0f, 4.0f) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_vec3_size()
-{
- int Error = 0;
-
- Error += sizeof(glm::vec3) == sizeof(glm::lowp_vec3) ? 0 : 1;
- Error += sizeof(glm::vec3) == sizeof(glm::mediump_vec3) ? 0 : 1;
- Error += sizeof(glm::vec3) == sizeof(glm::highp_vec3) ? 0 : 1;
- Error += 12 == sizeof(glm::mediump_vec3) ? 0 : 1;
- Error += sizeof(glm::dvec3) == sizeof(glm::lowp_dvec3) ? 0 : 1;
- Error += sizeof(glm::dvec3) == sizeof(glm::mediump_dvec3) ? 0 : 1;
- Error += sizeof(glm::dvec3) == sizeof(glm::highp_dvec3) ? 0 : 1;
- Error += 24 == sizeof(glm::highp_dvec3) ? 0 : 1;
- Error += glm::vec3().length() == 3 ? 0 : 1;
- Error += glm::dvec3().length() == 3 ? 0 : 1;
- Error += glm::vec3::length() == 3 ? 0 : 1;
- Error += glm::dvec3::length() == 3 ? 0 : 1;
-
- GLM_CONSTEXPR std::size_t Length = glm::vec3::length();
- Error += Length == 3 ? 0 : 1;
-
- return Error;
-}
-
-int test_vec3_swizzle3_2()
-{
- int Error = 0;
-
-# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
- {
- glm::ivec3 v(1, 2, 3);
- glm::ivec2 u;
-
- // Can not assign a vec3 swizzle to a vec2
- //u = v.xyz; //Illegal
- //u = v.rgb; //Illegal
- //u = v.stp; //Illegal
-
- u = v.xx; Error += (u.x == 1 && u.y == 1) ? 0 : 1;
- u = v.xy; Error += (u.x == 1 && u.y == 2) ? 0 : 1;
- u = v.xz; Error += (u.x == 1 && u.y == 3) ? 0 : 1;
- u = v.yx; Error += (u.x == 2 && u.y == 1) ? 0 : 1;
- u = v.yy; Error += (u.x == 2 && u.y == 2) ? 0 : 1;
- u = v.yz; Error += (u.x == 2 && u.y == 3) ? 0 : 1;
- u = v.zx; Error += (u.x == 3 && u.y == 1) ? 0 : 1;
- u = v.zy; Error += (u.x == 3 && u.y == 2) ? 0 : 1;
- u = v.zz; Error += (u.x == 3 && u.y == 3) ? 0 : 1;
-
- u = v.rr; Error += (u.r == 1 && u.g == 1) ? 0 : 1;
- u = v.rg; Error += (u.r == 1 && u.g == 2) ? 0 : 1;
- u = v.rb; Error += (u.r == 1 && u.g == 3) ? 0 : 1;
- u = v.gr; Error += (u.r == 2 && u.g == 1) ? 0 : 1;
- u = v.gg; Error += (u.r == 2 && u.g == 2) ? 0 : 1;
- u = v.gb; Error += (u.r == 2 && u.g == 3) ? 0 : 1;
- u = v.br; Error += (u.r == 3 && u.g == 1) ? 0 : 1;
- u = v.bg; Error += (u.r == 3 && u.g == 2) ? 0 : 1;
- u = v.bb; Error += (u.r == 3 && u.g == 3) ? 0 : 1;
-
- u = v.ss; Error += (u.s == 1 && u.t == 1) ? 0 : 1;
- u = v.st; Error += (u.s == 1 && u.t == 2) ? 0 : 1;
- u = v.sp; Error += (u.s == 1 && u.t == 3) ? 0 : 1;
- u = v.ts; Error += (u.s == 2 && u.t == 1) ? 0 : 1;
- u = v.tt; Error += (u.s == 2 && u.t == 2) ? 0 : 1;
- u = v.tp; Error += (u.s == 2 && u.t == 3) ? 0 : 1;
- u = v.ps; Error += (u.s == 3 && u.t == 1) ? 0 : 1;
- u = v.pt; Error += (u.s == 3 && u.t == 2) ? 0 : 1;
- u = v.pp; Error += (u.s == 3 && u.t == 3) ? 0 : 1;
- // Mixed member aliases are not valid
- //u = v.rx; //Illegal
- //u = v.sy; //Illegal
-
- u = glm::ivec2(1, 2);
- v = glm::ivec3(1, 2, 3);
- //v.xx = u; //Illegal
- v.xy = u; Error += (v.x == 1 && v.y == 2 && v.z == 3) ? 0 : 1;
- v.xz = u; Error += (v.x == 1 && v.y == 2 && v.z == 2) ? 0 : 1;
- v.yx = u; Error += (v.x == 2 && v.y == 1 && v.z == 2) ? 0 : 1;
- //v.yy = u; //Illegal
- v.yz = u; Error += (v.x == 2 && v.y == 1 && v.z == 2) ? 0 : 1;
- v.zx = u; Error += (v.x == 2 && v.y == 1 && v.z == 1) ? 0 : 1;
- v.zy = u; Error += (v.x == 2 && v.y == 2 && v.z == 1) ? 0 : 1;
- //v.zz = u; //Illegal
- }
-# endif//GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
-
- return Error;
-}
-
-int test_vec3_swizzle3_3()
-{
- int Error = 0;
-
-# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
- {
- glm::ivec3 v(1, 2, 3);
- glm::ivec3 u;
-
- u = v; Error += (u.x == 1 && u.y == 2 && u.z == 3) ? 0 : 1;
-
- u = v.xyz; Error += (u.x == 1 && u.y == 2 && u.z == 3) ? 0 : 1;
- u = v.zyx; Error += (u.x == 3 && u.y == 2 && u.z == 1) ? 0 : 1;
- u.zyx = v; Error += (u.x == 3 && u.y == 2 && u.z == 1) ? 0 : 1;
-
- u = v.rgb; Error += (u.x == 1 && u.y == 2 && u.z == 3) ? 0 : 1;
- u = v.bgr; Error += (u.x == 3 && u.y == 2 && u.z == 1) ? 0 : 1;
- u.bgr = v; Error += (u.x == 3 && u.y == 2 && u.z == 1) ? 0 : 1;
-
- u = v.stp; Error += (u.x == 1 && u.y == 2 && u.z == 3) ? 0 : 1;
- u = v.pts; Error += (u.x == 3 && u.y == 2 && u.z == 1) ? 0 : 1;
- u.pts = v; Error += (u.x == 3 && u.y == 2 && u.z == 1) ? 0 : 1;
- }
-# endif//GLM_LANG
-
- return Error;
-}
-
-int test_vec3_swizzle_operators()
-{
- int Error = 0;
-
- glm::ivec3 const u = glm::ivec3(1, 2, 3);
- glm::ivec3 const v = glm::ivec3(10, 20, 30);
-
-# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
- {
- glm::ivec3 q;
-
- // Swizzle, swizzle binary operators
- q = u.xyz + v.xyz; Error += (q == (u + v)) ? 0 : 1;
- q = (u.zyx + v.zyx).zyx; Error += (q == (u + v)) ? 0 : 1;
- q = (u.xyz - v.xyz); Error += (q == (u - v)) ? 0 : 1;
- q = (u.xyz * v.xyz); Error += (q == (u * v)) ? 0 : 1;
- q = (u.xxx * v.xxx); Error += (q == glm::ivec3(u.x * v.x)) ? 0 : 1;
- q = (u.xyz / v.xyz); Error += (q == (u / v)) ? 0 : 1;
-
- // vec, swizzle binary operators
- q = u + v.xyz; Error += (q == (u + v)) ? 0 : 1;
- q = (u - v.xyz); Error += (q == (u - v)) ? 0 : 1;
- q = (u * v.xyz); Error += (q == (u * v)) ? 0 : 1;
- q = (u * v.xxx); Error += (q == v.x * u) ? 0 : 1;
- q = (u / v.xyz); Error += (q == (u / v)) ? 0 : 1;
-
- // swizzle,vec binary operators
- q = u.xyz + v; Error += (q == (u + v)) ? 0 : 1;
- q = (u.xyz - v); Error += (q == (u - v)) ? 0 : 1;
- q = (u.xyz * v); Error += (q == (u * v)) ? 0 : 1;
- q = (u.xxx * v); Error += (q == u.x * v) ? 0 : 1;
- q = (u.xyz / v); Error += (q == (u / v)) ? 0 : 1;
- }
-# endif//GLM_LANG
-
- // Compile errors
- //q = (u.yz * v.xyz);
- //q = (u * v.xy);
-
- return Error;
-}
-
-int test_vec3_swizzle_functions()
-{
- int Error = 0;
-
-# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR || GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
- {
- // NOTE: template functions cannot pick up the implicit conversion from
- // a swizzle to the unswizzled type, therefore the operator() must be
- // used. E.g.:
- //
- // glm::dot(u.xy, v.xy); <--- Compile error
- // glm::dot(u.xy(), v.xy()); <--- Compiles correctly
-
- float r;
-
- // vec2
- glm::vec2 a(1, 2);
- glm::vec2 b(10, 20);
- r = glm::dot(a, b); Error += (int(r) == 50) ? 0 : 1;
- r = glm::dot(glm::vec2(a.xy()), glm::vec2(b.xy())); Error += (int(r) == 50) ? 0 : 1;
- r = glm::dot(glm::vec2(a.xy()), glm::vec2(b.yy())); Error += (int(r) == 60) ? 0 : 1;
-
- // vec3
- glm::vec3 u = glm::vec3(1, 2, 3);
- glm::vec3 v = glm::vec3(10, 20, 30);
- r = glm::dot(u, v); Error += (int(r) == 140) ? 0 : 1;
- r = glm::dot(u.xyz(), v.zyz()); Error += (int(r) == 160) ? 0 : 1;
- r = glm::dot(u, v.zyx()); Error += (int(r) == 100) ? 0 : 1;
- r = glm::dot(u.xyz(), v); Error += (int(r) == 140) ? 0 : 1;
- r = glm::dot(u.xy(), v.xy()); Error += (int(r) == 50) ? 0 : 1;
-
- // vec4
- glm::vec4 s = glm::vec4(1, 2, 3, 4);
- glm::vec4 t = glm::vec4(10, 20, 30, 40);
- r = glm::dot(s, t); Error += (int(r) == 300) ? 0 : 1;
- r = glm::dot(s.xyzw(), t.xyzw()); Error += (int(r) == 300) ? 0 : 1;
- r = glm::dot(s.xyz(), t.xyz()); Error += (int(r) == 140) ? 0 : 1;
- }
-# endif//GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR || GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
-
- return Error;
-}
-
-int test_vec3_swizzle_partial()
-{
- int Error = 0;
-
-# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
- {
- glm::vec3 const A(1, 2, 3);
- glm::vec3 B(A.xy, 3);
- Error += glm::all(glm::equal(A, B, glm::epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::ivec3 const A(1, 2, 3);
- glm::ivec3 const B(1, A.yz);
- Error += A == B ? 0 : 1;
- }
-
- {
- glm::ivec3 const A(1, 2, 3);
- glm::ivec3 const B(A.xyz);
- Error += A == B ? 0 : 1;
- }
-# endif//GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
-
- return Error;
-}
-
-static int test_operator_increment()
-{
- int Error = 0;
-
- glm::ivec3 v0(1);
- glm::ivec3 v1(v0);
- glm::ivec3 v2(v0);
- glm::ivec3 v3 = ++v1;
- glm::ivec3 v4 = v2++;
-
- Error += glm::all(glm::equal(v0, v4)) ? 0 : 1;
- Error += glm::all(glm::equal(v1, v2)) ? 0 : 1;
- Error += glm::all(glm::equal(v1, v3)) ? 0 : 1;
-
- int i0(1);
- int i1(i0);
- int i2(i0);
- int i3 = ++i1;
- int i4 = i2++;
-
- Error += i0 == i4 ? 0 : 1;
- Error += i1 == i2 ? 0 : 1;
- Error += i1 == i3 ? 0 : 1;
-
- return Error;
-}
-
-static int test_swizzle()
-{
- int Error = 0;
-
-# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
- {
- glm::vec3 A = glm::vec3(1.0f, 2.0f, 3.0f);
- glm::vec3 B = A.xyz;
- glm::vec3 C(A.xyz);
- glm::vec3 D(A.xyz());
- glm::vec3 E(A.x, A.yz);
- glm::vec3 F(A.x, A.yz());
- glm::vec3 G(A.xy, A.z);
- glm::vec3 H(A.xy(), A.z);
-
- Error += glm::all(glm::equal(A, B, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, C, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, D, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, E, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, F, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, G, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, H, glm::epsilon<float>())) ? 0 : 1;
- }
-# endif//GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
-
-# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR || GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
- {
- glm::vec3 A = glm::vec3(1.0f, 2.0f, 3.0f);
- glm::vec3 B = A.xyz();
- glm::vec3 C(A.xyz());
- glm::vec3 D(A.xyz());
- glm::vec3 E(A.x, A.yz());
- glm::vec3 F(A.x, A.yz());
- glm::vec3 G(A.xy(), A.z);
- glm::vec3 H(A.xy(), A.z);
-
- Error += glm::all(glm::equal(A, B, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, C, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, D, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, E, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, F, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, G, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, H, glm::epsilon<float>())) ? 0 : 1;
- }
-# endif//GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR || GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
-
- return Error;
-}
-
-static int test_constexpr()
-{
-#if GLM_HAS_CONSTEXPR
- static_assert(glm::vec3::length() == 3, "GLM: Failed constexpr");
- static_assert(glm::vec3(1.0f).x > 0.0f, "GLM: Failed constexpr");
- static_assert(glm::vec3(1.0f, -1.0f, -1.0f).x > 0.0f, "GLM: Failed constexpr");
- static_assert(glm::vec3(1.0f, -1.0f, -1.0f).y < 0.0f, "GLM: Failed constexpr");
-#endif
-
- return 0;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_vec3_ctor();
- Error += test_bvec3_ctor();
- Error += test_vec3_operators();
- Error += test_vec3_size();
- Error += test_operator_increment();
- Error += test_constexpr();
-
- Error += test_swizzle();
- Error += test_vec3_swizzle3_2();
- Error += test_vec3_swizzle3_3();
- Error += test_vec3_swizzle_partial();
- Error += test_vec3_swizzle_operators();
- Error += test_vec3_swizzle_functions();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/core/core_type_vec4.cpp b/3rdparty/glm/source/test/core/core_type_vec4.cpp
deleted file mode 100644
index 5d65259..0000000
--- a/3rdparty/glm/source/test/core/core_type_vec4.cpp
+++ /dev/null
@@ -1,850 +0,0 @@
-#define GLM_FORCE_SWIZZLE
-#include <glm/gtc/constants.hpp>
-#include <glm/gtc/vec1.hpp>
-#include <glm/ext/scalar_relational.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/vector_relational.hpp>
-#include <glm/vec2.hpp>
-#include <glm/vec3.hpp>
-#include <glm/vec4.hpp>
-#include <cstdio>
-#include <ctime>
-#include <vector>
-
-static glm::vec4 g1;
-static glm::vec4 g2(1);
-static glm::vec4 g3(1, 1, 1, 1);
-
-template <int Value>
-struct mask
-{
- enum{value = Value};
-};
-
-enum comp
-{
- X,
- Y,
- Z,
- W
-};
-
-//template<comp X, comp Y, comp Z, comp W>
-//__m128 swizzle(glm::vec4 const& v)
-//{
-// __m128 Src = _mm_set_ps(v.w, v.z, v.y, v.x);
-// return _mm_shuffle_ps(Src, Src, mask<(int(W) << 6) | (int(Z) << 4) | (int(Y) << 2) | (int(X) << 0)>::value);
-//}
-
-static int test_vec4_ctor()
-{
- int Error = 0;
-
- {
- glm::ivec4 A(1, 2, 3, 4);
- glm::ivec4 B(A);
- Error += glm::all(glm::equal(A, B)) ? 0 : 1;
- }
-
-# if GLM_HAS_TRIVIAL_QUERIES
- // Error += std::is_trivially_default_constructible<glm::vec4>::value ? 0 : 1;
- // Error += std::is_trivially_copy_assignable<glm::vec4>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::vec4>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::dvec4>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::ivec4>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::uvec4>::value ? 0 : 1;
-
- Error += std::is_copy_constructible<glm::vec4>::value ? 0 : 1;
-# endif
-
-#if GLM_HAS_INITIALIZER_LISTS
- {
- glm::vec4 a{ 0, 1, 2, 3 };
- std::vector<glm::vec4> v = {
- {0, 1, 2, 3},
- {4, 5, 6, 7},
- {8, 9, 0, 1}};
- }
-
- {
- glm::dvec4 a{ 0, 1, 2, 3 };
- std::vector<glm::dvec4> v = {
- {0, 1, 2, 3},
- {4, 5, 6, 7},
- {8, 9, 0, 1}};
- }
-#endif
-
- {
- glm::ivec4 const A(1);
- glm::ivec4 const B(1, 1, 1, 1);
-
- Error += A == B ? 0 : 1;
- }
-
- {
- std::vector<glm::ivec4> Tests;
- Tests.push_back(glm::ivec4(glm::ivec2(1, 2), 3, 4));
- Tests.push_back(glm::ivec4(1, glm::ivec2(2, 3), 4));
- Tests.push_back(glm::ivec4(1, 2, glm::ivec2(3, 4)));
- Tests.push_back(glm::ivec4(glm::ivec3(1, 2, 3), 4));
- Tests.push_back(glm::ivec4(1, glm::ivec3(2, 3, 4)));
- Tests.push_back(glm::ivec4(glm::ivec2(1, 2), glm::ivec2(3, 4)));
- Tests.push_back(glm::ivec4(1, 2, 3, 4));
- Tests.push_back(glm::ivec4(glm::ivec4(1, 2, 3, 4)));
-
- for(std::size_t i = 0; i < Tests.size(); ++i)
- Error += Tests[i] == glm::ivec4(1, 2, 3, 4) ? 0 : 1;
- }
-
- {
- glm::vec1 const R(1.0f);
- glm::vec1 const S(2.0f);
- glm::vec1 const T(3.0f);
- glm::vec1 const U(4.0f);
- glm::vec4 const O(1.0f, 2.0f, 3.0f, 4.0f);
-
- glm::vec4 const A(R);
- glm::vec4 const B(1.0f);
- Error += glm::all(glm::equal(A, B, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const C(R, S, T, U);
- Error += glm::all(glm::equal(C, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const D(R, 2.0f, 3.0f, 4.0f);
- Error += glm::all(glm::equal(D, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const E(1.0f, S, 3.0f, 4.0f);
- Error += glm::all(glm::equal(E, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const F(R, S, 3.0f, 4.0f);
- Error += glm::all(glm::equal(F, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const G(1.0f, 2.0f, T, 4.0f);
- Error += glm::all(glm::equal(G, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const H(R, 2.0f, T, 4.0f);
- Error += glm::all(glm::equal(H, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const I(1.0f, S, T, 4.0f);
- Error += glm::all(glm::equal(I, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const J(R, S, T, 4.0f);
- Error += glm::all(glm::equal(J, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const K(R, 2.0f, 3.0f, U);
- Error += glm::all(glm::equal(K, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const L(1.0f, S, 3.0f, U);
- Error += glm::all(glm::equal(L, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const M(R, S, 3.0f, U);
- Error += glm::all(glm::equal(M, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const N(1.0f, 2.0f, T, U);
- Error += glm::all(glm::equal(N, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const P(R, 2.0f, T, U);
- Error += glm::all(glm::equal(P, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const Q(1.0f, S, T, U);
- Error += glm::all(glm::equal(Q, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const V(R, S, T, U);
- Error += glm::all(glm::equal(V, O, glm::epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::vec1 const R(1.0f);
- glm::dvec1 const S(2.0);
- glm::vec1 const T(3.0);
- glm::dvec1 const U(4.0);
- glm::vec4 const O(1.0f, 2.0, 3.0f, 4.0);
-
- glm::vec4 const A(R);
- glm::vec4 const B(1.0);
- Error += glm::all(glm::equal(A, B, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const C(R, S, T, U);
- Error += glm::all(glm::equal(C, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const D(R, 2.0f, 3.0, 4.0f);
- Error += glm::all(glm::equal(D, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const E(1.0, S, 3.0f, 4.0);
- Error += glm::all(glm::equal(E, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const F(R, S, 3.0, 4.0f);
- Error += glm::all(glm::equal(F, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const G(1.0f, 2.0, T, 4.0);
- Error += glm::all(glm::equal(G, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const H(R, 2.0, T, 4.0);
- Error += glm::all(glm::equal(H, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const I(1.0, S, T, 4.0f);
- Error += glm::all(glm::equal(I, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const J(R, S, T, 4.0f);
- Error += glm::all(glm::equal(J, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const K(R, 2.0f, 3.0, U);
- Error += glm::all(glm::equal(K, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const L(1.0f, S, 3.0, U);
- Error += glm::all(glm::equal(L, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const M(R, S, 3.0, U);
- Error += glm::all(glm::equal(M, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const N(1.0f, 2.0, T, U);
- Error += glm::all(glm::equal(N, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const P(R, 2.0, T, U);
- Error += glm::all(glm::equal(P, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const Q(1.0f, S, T, U);
- Error += glm::all(glm::equal(Q, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const V(R, S, T, U);
- Error += glm::all(glm::equal(V, O, glm::epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::vec1 const v1_0(1.0f);
- glm::vec1 const v1_1(2.0f);
- glm::vec1 const v1_2(3.0f);
- glm::vec1 const v1_3(4.0f);
-
- glm::vec2 const v2_0(1.0f, 2.0f);
- glm::vec2 const v2_1(2.0f, 3.0f);
- glm::vec2 const v2_2(3.0f, 4.0f);
-
- glm::vec3 const v3_0(1.0f, 2.0f, 3.0f);
- glm::vec3 const v3_1(2.0f, 3.0f, 4.0f);
-
- glm::vec4 const O(1.0f, 2.0, 3.0f, 4.0);
-
- glm::vec4 const A(v1_0, v1_1, v2_2);
- Error += glm::all(glm::equal(A, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const B(1.0f, 2.0f, v2_2);
- Error += glm::all(glm::equal(B, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const C(v1_0, 2.0f, v2_2);
- Error += glm::all(glm::equal(C, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const D(1.0f, v1_1, v2_2);
- Error += glm::all(glm::equal(D, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const E(v2_0, v1_2, v1_3);
- Error += glm::all(glm::equal(E, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const F(v2_0, 3.0, v1_3);
- Error += glm::all(glm::equal(F, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const G(v2_0, v1_2, 4.0);
- Error += glm::all(glm::equal(G, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const H(v2_0, 3.0f, 4.0);
- Error += glm::all(glm::equal(H, O, glm::epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::vec1 const v1_0(1.0f);
- glm::vec1 const v1_1(2.0f);
- glm::vec1 const v1_2(3.0f);
- glm::vec1 const v1_3(4.0f);
-
- glm::vec2 const v2(2.0f, 3.0f);
-
- glm::vec4 const O(1.0f, 2.0, 3.0f, 4.0);
-
- glm::vec4 const A(v1_0, v2, v1_3);
- Error += glm::all(glm::equal(A, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const B(v1_0, v2, 4.0);
- Error += glm::all(glm::equal(B, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const C(1.0, v2, v1_3);
- Error += glm::all(glm::equal(C, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const D(1.0f, v2, 4.0);
- Error += glm::all(glm::equal(D, O, glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const E(1.0, v2, 4.0f);
- Error += glm::all(glm::equal(E, O, glm::epsilon<float>())) ? 0 : 1;
- }
-
- return Error;
-}
-
-static int test_bvec4_ctor()
-{
- int Error = 0;
-
- glm::bvec4 const A(true);
- glm::bvec4 const B(true);
- glm::bvec4 const C(false);
- glm::bvec4 const D = A && B;
- glm::bvec4 const E = A && C;
- glm::bvec4 const F = A || C;
-
- Error += D == glm::bvec4(true) ? 0 : 1;
- Error += E == glm::bvec4(false) ? 0 : 1;
- Error += F == glm::bvec4(true) ? 0 : 1;
-
- bool const G = A == C;
- bool const H = A != C;
- Error += !G ? 0 : 1;
- Error += H ? 0 : 1;
-
- return Error;
-}
-
-static int test_operators()
-{
- int Error = 0;
-
- {
- glm::ivec4 A(1);
- glm::ivec4 B(1);
- bool R = A != B;
- bool S = A == B;
-
- Error += (S && !R) ? 0 : 1;
- }
-
- {
- glm::vec4 const A(1.0f, 2.0f, 3.0f, 4.0f);
- glm::vec4 const B(4.0f, 5.0f, 6.0f, 7.0f);
-
- glm::vec4 const C = A + B;
- Error += glm::all(glm::equal(C, glm::vec4(5, 7, 9, 11), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const D = B - A;
- Error += glm::all(glm::equal(D, glm::vec4(3, 3, 3, 3), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const E = A * B;
- Error += glm::all(glm::equal(E, glm::vec4(4, 10, 18, 28), glm::epsilon<float>()) )? 0 : 1;
-
- glm::vec4 const F = B / A;
- Error += glm::all(glm::equal(F, glm::vec4(4, 2.5, 2, 7.0f / 4.0f), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const G = A + 1.0f;
- Error += glm::all(glm::equal(G, glm::vec4(2, 3, 4, 5), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const H = B - 1.0f;
- Error += glm::all(glm::equal(H, glm::vec4(3, 4, 5, 6), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const I = A * 2.0f;
- Error += glm::all(glm::equal(I, glm::vec4(2, 4, 6, 8), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const J = B / 2.0f;
- Error += glm::all(glm::equal(J, glm::vec4(2, 2.5, 3, 3.5), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const K = 1.0f + A;
- Error += glm::all(glm::equal(K, glm::vec4(2, 3, 4, 5), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const L = 1.0f - B;
- Error += glm::all(glm::equal(L, glm::vec4(-3, -4, -5, -6), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const M = 2.0f * A;
- Error += glm::all(glm::equal(M, glm::vec4(2, 4, 6, 8), glm::epsilon<float>())) ? 0 : 1;
-
- glm::vec4 const N = 2.0f / B;
- Error += glm::all(glm::equal(N, glm::vec4(0.5, 2.0 / 5.0, 2.0 / 6.0, 2.0 / 7.0), glm::epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::ivec4 A(1.0f, 2.0f, 3.0f, 4.0f);
- glm::ivec4 B(4.0f, 5.0f, 6.0f, 7.0f);
-
- A += B;
- Error += A == glm::ivec4(5, 7, 9, 11) ? 0 : 1;
-
- A += 1;
- Error += A == glm::ivec4(6, 8, 10, 12) ? 0 : 1;
- }
- {
- glm::ivec4 A(1.0f, 2.0f, 3.0f, 4.0f);
- glm::ivec4 B(4.0f, 5.0f, 6.0f, 7.0f);
-
- B -= A;
- Error += B == glm::ivec4(3, 3, 3, 3) ? 0 : 1;
-
- B -= 1;
- Error += B == glm::ivec4(2, 2, 2, 2) ? 0 : 1;
- }
- {
- glm::ivec4 A(1.0f, 2.0f, 3.0f, 4.0f);
- glm::ivec4 B(4.0f, 5.0f, 6.0f, 7.0f);
-
- A *= B;
- Error += A == glm::ivec4(4, 10, 18, 28) ? 0 : 1;
-
- A *= 2;
- Error += A == glm::ivec4(8, 20, 36, 56) ? 0 : 1;
- }
- {
- glm::ivec4 A(1.0f, 2.0f, 2.0f, 4.0f);
- glm::ivec4 B(4.0f, 4.0f, 8.0f, 8.0f);
-
- B /= A;
- Error += B == glm::ivec4(4, 2, 4, 2) ? 0 : 1;
-
- B /= 2;
- Error += B == glm::ivec4(2, 1, 2, 1) ? 0 : 1;
- }
- {
- glm::ivec4 B(2);
-
- B /= B.y;
- Error += B == glm::ivec4(1) ? 0 : 1;
- }
-
- {
- glm::ivec4 A(1.0f, 2.0f, 3.0f, 4.0f);
- glm::ivec4 B = -A;
- Error += B == glm::ivec4(-1.0f, -2.0f, -3.0f, -4.0f) ? 0 : 1;
- }
-
- {
- glm::ivec4 A(1.0f, 2.0f, 3.0f, 4.0f);
- glm::ivec4 B = --A;
- Error += B == glm::ivec4(0.0f, 1.0f, 2.0f, 3.0f) ? 0 : 1;
- }
-
- {
- glm::ivec4 A(1.0f, 2.0f, 3.0f, 4.0f);
- glm::ivec4 B = A--;
- Error += B == glm::ivec4(1.0f, 2.0f, 3.0f, 4.0f) ? 0 : 1;
- Error += A == glm::ivec4(0.0f, 1.0f, 2.0f, 3.0f) ? 0 : 1;
- }
-
- {
- glm::ivec4 A(1.0f, 2.0f, 3.0f, 4.0f);
- glm::ivec4 B = ++A;
- Error += B == glm::ivec4(2.0f, 3.0f, 4.0f, 5.0f) ? 0 : 1;
- }
-
- {
- glm::ivec4 A(1.0f, 2.0f, 3.0f, 4.0f);
- glm::ivec4 B = A++;
- Error += B == glm::ivec4(1.0f, 2.0f, 3.0f, 4.0f) ? 0 : 1;
- Error += A == glm::ivec4(2.0f, 3.0f, 4.0f, 5.0f) ? 0 : 1;
- }
-
- return Error;
-}
-
-static int test_equal()
-{
- int Error = 0;
-
- {
- glm::uvec4 const A(1, 2, 3, 4);
- glm::uvec4 const B(1, 2, 3, 4);
- Error += A == B ? 0 : 1;
- Error += A != B ? 1 : 0;
- }
-
- {
- glm::ivec4 const A(1, 2, 3, 4);
- glm::ivec4 const B(1, 2, 3, 4);
- Error += A == B ? 0 : 1;
- Error += A != B ? 1 : 0;
- }
-
- return Error;
-}
-
-static int test_size()
-{
- int Error = 0;
-
- Error += sizeof(glm::vec4) == sizeof(glm::lowp_vec4) ? 0 : 1;
- Error += sizeof(glm::vec4) == sizeof(glm::mediump_vec4) ? 0 : 1;
- Error += sizeof(glm::vec4) == sizeof(glm::highp_vec4) ? 0 : 1;
- Error += 16 == sizeof(glm::mediump_vec4) ? 0 : 1;
- Error += sizeof(glm::dvec4) == sizeof(glm::lowp_dvec4) ? 0 : 1;
- Error += sizeof(glm::dvec4) == sizeof(glm::mediump_dvec4) ? 0 : 1;
- Error += sizeof(glm::dvec4) == sizeof(glm::highp_dvec4) ? 0 : 1;
- Error += 32 == sizeof(glm::highp_dvec4) ? 0 : 1;
- Error += glm::vec4().length() == 4 ? 0 : 1;
- Error += glm::dvec4().length() == 4 ? 0 : 1;
- Error += glm::vec4::length() == 4 ? 0 : 1;
- Error += glm::dvec4::length() == 4 ? 0 : 1;
-
- return Error;
-}
-
-static int test_swizzle_partial()
-{
- int Error = 0;
-
- glm::vec4 const A(1, 2, 3, 4);
-
-# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
- {
- glm::vec4 B(A.xy, A.zw);
- Error += glm::all(glm::equal(A, B, glm::epsilon<float>())) ? 0 : 1;
- }
- {
- glm::vec4 B(A.xy, 3.0f, 4.0f);
- Error += glm::all(glm::equal(A, B, glm::epsilon<float>())) ? 0 : 1;
- }
- {
- glm::vec4 B(1.0f, A.yz, 4.0f);
- Error += glm::all(glm::equal(A, B, glm::epsilon<float>())) ? 0 : 1;
- }
- {
- glm::vec4 B(1.0f, 2.0f, A.zw);
- Error += glm::all(glm::equal(A, B, glm::epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::vec4 B(A.xyz, 4.0f);
- Error += glm::all(glm::equal(A, B, glm::epsilon<float>())) ? 0 : 1;
- }
- {
- glm::vec4 B(1.0f, A.yzw);
- Error += glm::all(glm::equal(A, B, glm::epsilon<float>())) ? 0 : 1;
- }
-# endif//GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR || GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
-
- return Error;
-}
-
-static int test_swizzle()
-{
- int Error = 0;
-
-# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
- {
- glm::ivec4 A = glm::ivec4(1.0f, 2.0f, 3.0f, 4.0f);
- glm::ivec4 B = A.xyzw;
- glm::ivec4 C(A.xyzw);
- glm::ivec4 D(A.xyzw());
- glm::ivec4 E(A.x, A.yzw);
- glm::ivec4 F(A.x, A.yzw());
- glm::ivec4 G(A.xyz, A.w);
- glm::ivec4 H(A.xyz(), A.w);
- glm::ivec4 I(A.xy, A.zw);
- glm::ivec4 J(A.xy(), A.zw());
- glm::ivec4 K(A.x, A.y, A.zw);
- glm::ivec4 L(A.x, A.yz, A.w);
- glm::ivec4 M(A.xy, A.z, A.w);
-
- Error += glm::all(glm::equal(A, B)) ? 0 : 1;
- Error += glm::all(glm::equal(A, C)) ? 0 : 1;
- Error += glm::all(glm::equal(A, D)) ? 0 : 1;
- Error += glm::all(glm::equal(A, E)) ? 0 : 1;
- Error += glm::all(glm::equal(A, F)) ? 0 : 1;
- Error += glm::all(glm::equal(A, G)) ? 0 : 1;
- Error += glm::all(glm::equal(A, H)) ? 0 : 1;
- Error += glm::all(glm::equal(A, I)) ? 0 : 1;
- Error += glm::all(glm::equal(A, J)) ? 0 : 1;
- Error += glm::all(glm::equal(A, K)) ? 0 : 1;
- Error += glm::all(glm::equal(A, L)) ? 0 : 1;
- Error += glm::all(glm::equal(A, M)) ? 0 : 1;
- }
-# endif//GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
-
-# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR || GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
- {
- glm::vec4 A = glm::vec4(1.0f, 2.0f, 3.0f, 4.0f);
- glm::vec4 B = A.xyzw();
- glm::vec4 C(A.xyzw());
- glm::vec4 D(A.xyzw());
- glm::vec4 E(A.x, A.yzw());
- glm::vec4 F(A.x, A.yzw());
- glm::vec4 G(A.xyz(), A.w);
- glm::vec4 H(A.xyz(), A.w);
- glm::vec4 I(A.xy(), A.zw());
- glm::vec4 J(A.xy(), A.zw());
- glm::vec4 K(A.x, A.y, A.zw());
- glm::vec4 L(A.x, A.yz(), A.w);
- glm::vec4 M(A.xy(), A.z, A.w);
-
- Error += glm::all(glm::equal(A, B, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, C, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, D, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, E, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, F, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, G, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, H, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, I, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, J, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, K, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, L, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(A, M, glm::epsilon<float>())) ? 0 : 1;
- }
-# endif//GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR || GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
-
- return Error;
-}
-
-static int test_operator_increment()
-{
- int Error = 0;
-
- glm::ivec4 v0(1);
- glm::ivec4 v1(v0);
- glm::ivec4 v2(v0);
- glm::ivec4 v3 = ++v1;
- glm::ivec4 v4 = v2++;
-
- Error += glm::all(glm::equal(v0, v4)) ? 0 : 1;
- Error += glm::all(glm::equal(v1, v2)) ? 0 : 1;
- Error += glm::all(glm::equal(v1, v3)) ? 0 : 1;
-
- int i0(1);
- int i1(i0);
- int i2(i0);
- int i3 = ++i1;
- int i4 = i2++;
-
- Error += i0 == i4 ? 0 : 1;
- Error += i1 == i2 ? 0 : 1;
- Error += i1 == i3 ? 0 : 1;
-
- return Error;
-}
-
-struct AoS
-{
- glm::vec4 A;
- glm::vec3 B;
- glm::vec3 C;
- glm::vec2 D;
-};
-
-static int test_perf_AoS(std::size_t Size)
-{
- int Error = 0;
-
- std::vector<AoS> In;
- std::vector<AoS> Out;
- In.resize(Size);
- Out.resize(Size);
-
- std::clock_t StartTime = std::clock();
-
- for(std::size_t i = 0; i < In.size(); ++i)
- Out[i] = In[i];
-
- std::clock_t EndTime = std::clock();
-
- std::printf("AoS: %d\n", static_cast<int>(EndTime - StartTime));
-
- return Error;
-}
-
-static int test_perf_SoA(std::size_t Size)
-{
- int Error = 0;
-
- std::vector<glm::vec4> InA;
- std::vector<glm::vec3> InB;
- std::vector<glm::vec3> InC;
- std::vector<glm::vec2> InD;
- std::vector<glm::vec4> OutA;
- std::vector<glm::vec3> OutB;
- std::vector<glm::vec3> OutC;
- std::vector<glm::vec2> OutD;
-
- InA.resize(Size);
- InB.resize(Size);
- InC.resize(Size);
- InD.resize(Size);
- OutA.resize(Size);
- OutB.resize(Size);
- OutC.resize(Size);
- OutD.resize(Size);
-
- std::clock_t StartTime = std::clock();
-
- for(std::size_t i = 0; i < InA.size(); ++i)
- {
- OutA[i] = InA[i];
- OutB[i] = InB[i];
- OutC[i] = InC[i];
- OutD[i] = InD[i];
- }
-
- std::clock_t EndTime = std::clock();
-
- std::printf("SoA: %d\n", static_cast<int>(EndTime - StartTime));
-
- return Error;
-}
-
-namespace heap
-{
- struct A
- {
- float f;
- };
-
- struct B : public A
- {
- float g;
- glm::vec4 v;
- };
-
- static int test()
- {
- int Error = 0;
-
- A* p = new B;
- p->f = 0.0f;
- delete p;
-
- Error += sizeof(B) == sizeof(glm::vec4) + sizeof(float) * 2 ? 0 : 1;
-
- return Error;
- }
-}//namespace heap
-
-static int test_simd()
-{
- int Error = 0;
-
- glm::vec4 const a(std::clock(), std::clock(), std::clock(), std::clock());
- glm::vec4 const b(std::clock(), std::clock(), std::clock(), std::clock());
-
- glm::vec4 const c(b * a);
- glm::vec4 const d(a + c);
-
- Error += glm::all(glm::greaterThanEqual(d, glm::vec4(0))) ? 0 : 1;
-
- return Error;
-}
-
-static int test_inheritance()
-{
- struct my_vec4 : public glm::vec4
- {
- my_vec4()
- : glm::vec4(76.f, 75.f, 74.f, 73.f)
- , member(82)
- {}
-
- int member;
- };
-
- int Error = 0;
-
- my_vec4 v;
-
- Error += v.member == 82 ? 0 : 1;
- Error += glm::equal(v.x, 76.f, glm::epsilon<float>()) ? 0 : 1;
- Error += glm::equal(v.y, 75.f, glm::epsilon<float>()) ? 0 : 1;
- Error += glm::equal(v.z, 74.f, glm::epsilon<float>()) ? 0 : 1;
- Error += glm::equal(v.w, 73.f, glm::epsilon<float>()) ? 0 : 1;
-
- return Error;
-}
-
-static int test_constexpr()
-{
-#if GLM_HAS_CONSTEXPR
- static_assert(glm::vec4::length() == 4, "GLM: Failed constexpr");
- static_assert(glm::vec4(1.0f).x > 0.0f, "GLM: Failed constexpr");
- static_assert(glm::vec4(1.0f, -1.0f, -1.0f, -1.0f).x > 0.0f, "GLM: Failed constexpr");
- static_assert(glm::vec4(1.0f, -1.0f, -1.0f, -1.0f).y < 0.0f, "GLM: Failed constexpr");
-#endif
-
- return 0;
-}
-/*
-static int test_simd_gen()
-{
- int Error = 0;
-
- int const C = static_cast<int>(std::clock());
- int const D = static_cast<int>(std::clock());
-
- glm::ivec4 const A(C);
- glm::ivec4 const B(D);
-
- Error += A != B ? 0 : 1;
-
- return Error;
-}
-*/
-int main()
-{
- int Error = 0;
-
- //Error += test_simd_gen();
-
-/*
- {
- glm::ivec4 const a1(2);
- glm::ivec4 const b1 = a1 >> 1;
-
- __m128i const e1 = _mm_set1_epi32(2);
- __m128i const f1 = _mm_srli_epi32(e1, 1);
-
- glm::ivec4 const g1 = *reinterpret_cast<glm::ivec4 const* const>(&f1);
-
- glm::ivec4 const a2(-2);
- glm::ivec4 const b2 = a2 >> 1;
-
- __m128i const e2 = _mm_set1_epi32(-1);
- __m128i const f2 = _mm_srli_epi32(e2, 1);
-
- glm::ivec4 const g2 = *reinterpret_cast<glm::ivec4 const* const>(&f2);
-
- std::printf("GNI\n");
- }
-
- {
- glm::uvec4 const a1(2);
- glm::uvec4 const b1 = a1 >> 1u;
-
- __m128i const e1 = _mm_set1_epi32(2);
- __m128i const f1 = _mm_srli_epi32(e1, 1);
-
- glm::uvec4 const g1 = *reinterpret_cast<glm::uvec4 const* const>(&f1);
-
- glm::uvec4 const a2(-1);
- glm::uvec4 const b2 = a2 >> 1u;
-
- __m128i const e2 = _mm_set1_epi32(-1);
- __m128i const f2 = _mm_srli_epi32(e2, 1);
-
- glm::uvec4 const g2 = *reinterpret_cast<glm::uvec4 const* const>(&f2);
-
- std::printf("GNI\n");
- }
-*/
-
-# ifdef NDEBUG
- std::size_t const Size(1000000);
-# else
- std::size_t const Size(1);
-# endif//NDEBUG
-
- Error += test_perf_AoS(Size);
- Error += test_perf_SoA(Size);
-
- Error += test_vec4_ctor();
- Error += test_bvec4_ctor();
- Error += test_size();
- Error += test_operators();
- Error += test_equal();
- Error += test_swizzle();
- Error += test_swizzle_partial();
- Error += test_simd();
- Error += test_operator_increment();
- Error += heap::test();
- Error += test_inheritance();
- Error += test_constexpr();
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/ext/CMakeLists.txt b/3rdparty/glm/source/test/ext/CMakeLists.txt
deleted file mode 100644
index 40c91ba..0000000
--- a/3rdparty/glm/source/test/ext/CMakeLists.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-glmCreateTestGTC(ext_matrix_relational)
-glmCreateTestGTC(ext_matrix_transform)
-glmCreateTestGTC(ext_matrix_common)
-glmCreateTestGTC(ext_matrix_integer)
-glmCreateTestGTC(ext_matrix_int2x2_sized)
-glmCreateTestGTC(ext_matrix_int2x3_sized)
-glmCreateTestGTC(ext_matrix_int2x4_sized)
-glmCreateTestGTC(ext_matrix_int3x2_sized)
-glmCreateTestGTC(ext_matrix_int3x3_sized)
-glmCreateTestGTC(ext_matrix_int3x4_sized)
-glmCreateTestGTC(ext_matrix_int4x2_sized)
-glmCreateTestGTC(ext_matrix_int4x3_sized)
-glmCreateTestGTC(ext_matrix_int4x4_sized)
-glmCreateTestGTC(ext_matrix_uint2x2_sized)
-glmCreateTestGTC(ext_matrix_uint2x3_sized)
-glmCreateTestGTC(ext_matrix_uint2x4_sized)
-glmCreateTestGTC(ext_matrix_uint3x2_sized)
-glmCreateTestGTC(ext_matrix_uint3x3_sized)
-glmCreateTestGTC(ext_matrix_uint3x4_sized)
-glmCreateTestGTC(ext_matrix_uint4x2_sized)
-glmCreateTestGTC(ext_matrix_uint4x3_sized)
-glmCreateTestGTC(ext_matrix_uint4x4_sized)
-glmCreateTestGTC(ext_quaternion_common)
-glmCreateTestGTC(ext_quaternion_exponential)
-glmCreateTestGTC(ext_quaternion_geometric)
-glmCreateTestGTC(ext_quaternion_relational)
-glmCreateTestGTC(ext_quaternion_transform)
-glmCreateTestGTC(ext_quaternion_trigonometric)
-glmCreateTestGTC(ext_quaternion_type)
-glmCreateTestGTC(ext_scalar_common)
-glmCreateTestGTC(ext_scalar_constants)
-glmCreateTestGTC(ext_scalar_int_sized)
-glmCreateTestGTC(ext_scalar_uint_sized)
-glmCreateTestGTC(ext_scalar_integer)
-glmCreateTestGTC(ext_scalar_ulp)
-glmCreateTestGTC(ext_scalar_reciprocal)
-glmCreateTestGTC(ext_scalar_relational)
-glmCreateTestGTC(ext_vec1)
-glmCreateTestGTC(ext_vector_bool1)
-glmCreateTestGTC(ext_vector_common)
-glmCreateTestGTC(ext_vector_iec559)
-glmCreateTestGTC(ext_vector_int1_sized)
-glmCreateTestGTC(ext_vector_int2_sized)
-glmCreateTestGTC(ext_vector_int3_sized)
-glmCreateTestGTC(ext_vector_int4_sized)
-glmCreateTestGTC(ext_vector_integer)
-glmCreateTestGTC(ext_vector_integer_sized)
-glmCreateTestGTC(ext_vector_uint1_sized)
-glmCreateTestGTC(ext_vector_uint2_sized)
-glmCreateTestGTC(ext_vector_uint3_sized)
-glmCreateTestGTC(ext_vector_uint4_sized)
-glmCreateTestGTC(ext_vector_reciprocal)
-glmCreateTestGTC(ext_vector_relational)
-glmCreateTestGTC(ext_vector_ulp)
-
diff --git a/3rdparty/glm/source/test/ext/ext_matrix_clip_space.cpp b/3rdparty/glm/source/test/ext/ext_matrix_clip_space.cpp
deleted file mode 100644
index ca84c19..0000000
--- a/3rdparty/glm/source/test/ext/ext_matrix_clip_space.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <glm/ext/matrix_relational.hpp>
-#include <glm/ext/matrix_clip_space.hpp>
-#include <glm/ext/matrix_float4x4.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/vector_float4.hpp>
-#include <glm/ext/vector_float3.hpp>
-
-int main()
-{
- int Error = 0;
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_matrix_common.cpp b/3rdparty/glm/source/test/ext/ext_matrix_common.cpp
deleted file mode 100644
index df0c3fe..0000000
--- a/3rdparty/glm/source/test/ext/ext_matrix_common.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-#include <glm/ext/matrix_common.hpp>
-#include <glm/ext/matrix_double4x4.hpp>
-#include <glm/ext/matrix_float4x4.hpp>
-#include <glm/ext/matrix_relational.hpp>
-#include <glm/ext/vector_bool4.hpp>
-
-static int test_mix()
-{
- int Error = 0;
-
- {
- glm::mat4 A(2);
- glm::mat4 B(4);
- glm::mat4 C = glm::mix(A, B, 0.5f);
- glm::bvec4 const D = glm::equal(C, glm::mat4(3), 1);
- Error += glm::all(D) ? 0 : 1;
- }
-
- {
- glm::mat4 A(2);
- glm::mat4 B(4);
- glm::mat4 C = glm::mix(A, B, 0.5);
- glm::bvec4 const D = glm::equal(C, glm::mat4(3), 1);
- Error += glm::all(D) ? 0 : 1;
- }
-
- {
- glm::dmat4 A(2);
- glm::dmat4 B(4);
- glm::dmat4 C = glm::mix(A, B, 0.5);
- glm::bvec4 const D = glm::equal(C, glm::dmat4(3), 1);
- Error += glm::all(D) ? 0 : 1;
- }
-
- {
- glm::dmat4 A(2);
- glm::dmat4 B(4);
- glm::dmat4 C = glm::mix(A, B, 0.5f);
- glm::bvec4 const D = glm::equal(C, glm::dmat4(3), 1);
- Error += glm::all(D) ? 0 : 1;
- }
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_mix();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_matrix_int2x2_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_int2x2_sized.cpp
deleted file mode 100644
index 93b6e86..0000000
--- a/3rdparty/glm/source/test/ext/ext_matrix_int2x2_sized.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <glm/ext/matrix_int2x2_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
- static_assert(sizeof(glm::i8mat2x2) == 4, "int8 size isn't 1 byte on this platform");
- static_assert(sizeof(glm::i16mat2x2) == 8, "int16 size isn't 2 bytes on this platform");
- static_assert(sizeof(glm::i32mat2x2) == 16, "int32 size isn't 4 bytes on this platform");
- static_assert(sizeof(glm::i64mat2x2) == 32, "int64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::i8mat2x2) < sizeof(glm::i16mat2x2) ? 0 : 1;
- Error += sizeof(glm::i16mat2x2) < sizeof(glm::i32mat2x2) ? 0 : 1;
- Error += sizeof(glm::i32mat2x2) < sizeof(glm::i64mat2x2) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_matrix_int2x3_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_int2x3_sized.cpp
deleted file mode 100644
index 058f57b..0000000
--- a/3rdparty/glm/source/test/ext/ext_matrix_int2x3_sized.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <glm/ext/matrix_int2x3_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
-static_assert(sizeof(glm::i8mat2x3) == 6, "int8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::i16mat2x3) == 12, "int16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::i32mat2x3) == 24, "int32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::i64mat2x3) == 48, "int64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::i8mat2x3) < sizeof(glm::i16mat2x3) ? 0 : 1;
- Error += sizeof(glm::i16mat2x3) < sizeof(glm::i32mat2x3) ? 0 : 1;
- Error += sizeof(glm::i32mat2x3) < sizeof(glm::i64mat2x3) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_matrix_int2x4_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_int2x4_sized.cpp
deleted file mode 100644
index c20198d..0000000
--- a/3rdparty/glm/source/test/ext/ext_matrix_int2x4_sized.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <glm/ext/matrix_int2x4_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
-static_assert(sizeof(glm::i8mat2x4) == 8, "int8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::i16mat2x4) == 16, "int16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::i32mat2x4) == 32, "int32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::i64mat2x4) == 64, "int64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::i8mat2x4) < sizeof(glm::i16mat2x4) ? 0 : 1;
- Error += sizeof(glm::i16mat2x4) < sizeof(glm::i32mat2x4) ? 0 : 1;
- Error += sizeof(glm::i32mat2x4) < sizeof(glm::i64mat2x4) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_matrix_int3x2_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_int3x2_sized.cpp
deleted file mode 100644
index 1d14029..0000000
--- a/3rdparty/glm/source/test/ext/ext_matrix_int3x2_sized.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <glm/ext/matrix_int3x2_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
-static_assert(sizeof(glm::i8mat3x2) == 6, "int8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::i16mat3x2) == 12, "int16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::i32mat3x2) == 24, "int32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::i64mat3x2) == 48, "int64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::i8mat3x2) < sizeof(glm::i16mat3x2) ? 0 : 1;
- Error += sizeof(glm::i16mat3x2) < sizeof(glm::i32mat3x2) ? 0 : 1;
- Error += sizeof(glm::i32mat3x2) < sizeof(glm::i64mat3x2) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_matrix_int3x3_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_int3x3_sized.cpp
deleted file mode 100644
index d82836c..0000000
--- a/3rdparty/glm/source/test/ext/ext_matrix_int3x3_sized.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <glm/ext/matrix_int3x3_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
-static_assert(sizeof(glm::i8mat3x3) == 9, "int8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::i16mat3x3) == 18, "int16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::i32mat3x3) == 36, "int32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::i64mat3x3) == 72, "int64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::i8mat3x3) < sizeof(glm::i16mat3x3) ? 0 : 1;
- Error += sizeof(glm::i16mat3x3) < sizeof(glm::i32mat3x3) ? 0 : 1;
- Error += sizeof(glm::i32mat3x3) < sizeof(glm::i64mat3x3) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_matrix_int3x4_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_int3x4_sized.cpp
deleted file mode 100644
index 52b7d52..0000000
--- a/3rdparty/glm/source/test/ext/ext_matrix_int3x4_sized.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <glm/ext/matrix_int3x4_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
-static_assert(sizeof(glm::i8mat3x4) == 12, "int8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::i16mat3x4) == 24, "int16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::i32mat3x4) == 48, "int32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::i64mat3x4) == 96, "int64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::i8mat3x4) < sizeof(glm::i16mat3x4) ? 0 : 1;
- Error += sizeof(glm::i16mat3x4) < sizeof(glm::i32mat3x4) ? 0 : 1;
- Error += sizeof(glm::i32mat3x4) < sizeof(glm::i64mat3x4) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_matrix_int4x2_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_int4x2_sized.cpp
deleted file mode 100644
index 3c4566f..0000000
--- a/3rdparty/glm/source/test/ext/ext_matrix_int4x2_sized.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <glm/ext/matrix_int4x2_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
-static_assert(sizeof(glm::i8mat4x2) == 8, "int8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::i16mat4x2) == 16, "int16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::i32mat4x2) == 32, "int32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::i64mat4x2) == 64, "int64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::i8mat4x2) < sizeof(glm::i16mat4x2) ? 0 : 1;
- Error += sizeof(glm::i16mat4x2) < sizeof(glm::i32mat4x2) ? 0 : 1;
- Error += sizeof(glm::i32mat4x2) < sizeof(glm::i64mat4x2) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_matrix_int4x3_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_int4x3_sized.cpp
deleted file mode 100644
index fb882af..0000000
--- a/3rdparty/glm/source/test/ext/ext_matrix_int4x3_sized.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <glm/ext/matrix_int4x3_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
-static_assert(sizeof(glm::i8mat4x3) == 12, "int8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::i16mat4x3) == 24, "int16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::i32mat4x3) == 48, "int32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::i64mat4x3) == 96, "int64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::i8mat4x3) < sizeof(glm::i16mat4x3) ? 0 : 1;
- Error += sizeof(glm::i16mat4x3) < sizeof(glm::i32mat4x3) ? 0 : 1;
- Error += sizeof(glm::i32mat4x3) < sizeof(glm::i64mat4x3) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_matrix_int4x4_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_int4x4_sized.cpp
deleted file mode 100644
index 02769ea..0000000
--- a/3rdparty/glm/source/test/ext/ext_matrix_int4x4_sized.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <glm/ext/matrix_int4x4_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
-static_assert(sizeof(glm::i8mat4x4) == 16, "int8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::i16mat4x4) == 32, "int16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::i32mat4x4) == 64, "int32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::i64mat4x4) == 128, "int64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::i8mat4x4) < sizeof(glm::i16mat4x4) ? 0 : 1;
- Error += sizeof(glm::i16mat4x4) < sizeof(glm::i32mat4x4) ? 0 : 1;
- Error += sizeof(glm::i32mat4x4) < sizeof(glm::i64mat4x4) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_matrix_integer.cpp b/3rdparty/glm/source/test/ext/ext_matrix_integer.cpp
deleted file mode 100644
index c26d557..0000000
--- a/3rdparty/glm/source/test/ext/ext_matrix_integer.cpp
+++ /dev/null
@@ -1,237 +0,0 @@
-#include <glm/ext/matrix_relational.hpp>
-#include <glm/ext/matrix_integer.hpp>
-#include <glm/ext/matrix_int2x2.hpp>
-#include <glm/ext/matrix_int2x3.hpp>
-#include <glm/ext/matrix_int2x4.hpp>
-#include <glm/ext/matrix_int3x2.hpp>
-#include <glm/ext/matrix_int3x3.hpp>
-#include <glm/ext/matrix_int3x4.hpp>
-#include <glm/ext/matrix_int4x2.hpp>
-#include <glm/ext/matrix_int4x3.hpp>
-#include <glm/ext/matrix_int4x4.hpp>
-
-using namespace glm;
-
-int test_matrixCompMult()
-{
- int Error = 0;
-
- {
- imat2 m(0, 1, 2, 3);
- imat2 n = matrixCompMult(m, m);
- imat2 expected = imat2(0, 1, 4, 9);
- Error += all(equal(n, expected)) ? 0 : 1;
- }
-
- {
- imat2x3 m(0, 1, 2, 3, 4, 5);
- imat2x3 n = matrixCompMult(m, m);
- imat2x3 expected = imat2x3(0, 1, 4, 9, 16, 25);
- Error += all(equal(n, expected)) ? 0 : 1;
- }
-
- {
- imat2x4 m(0, 1, 2, 3, 4, 5, 6, 7);
- imat2x4 n = matrixCompMult(m, m);
- imat2x4 expected = imat2x4(0, 1, 4, 9, 16, 25, 36, 49);
- Error += all(equal(n, expected)) ? 0 : 1;
- }
-
- {
- imat3 m(0, 1, 2, 3, 4, 5, 6, 7, 8);
- imat3 n = matrixCompMult(m, m);
- imat3 expected = imat3(0, 1, 4, 9, 16, 25, 36, 49, 64);
- Error += all(equal(n, expected)) ? 0 : 1;
- }
-
- {
- imat3x2 m(0, 1, 2, 3, 4, 5);
- imat3x2 n = matrixCompMult(m, m);
- imat3x2 expected = imat3x2(0, 1, 4, 9, 16, 25);
- Error += all(equal(n, expected)) ? 0 : 1;
- }
-
- {
- imat3x4 m(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);
- imat3x4 n = matrixCompMult(m, m);
- imat3x4 expected = imat3x4(0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121);
- Error += all(equal(n, expected)) ? 0 : 1;
- }
-
- {
- imat4 m(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
- imat4 n = matrixCompMult(m, m);
- imat4 expected = imat4(0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225);
- Error += all(equal(n, expected)) ? 0 : 1;
- }
-
- {
- imat4x2 m(0, 1, 2, 3, 4, 5, 6, 7);
- imat4x2 n = matrixCompMult(m, m);
- imat4x2 expected = imat4x2(0, 1, 4, 9, 16, 25, 36, 49);
- Error += all(equal(n, expected)) ? 0 : 1;
- }
-
- {
- imat4x3 m(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);
- imat4x3 n = matrixCompMult(m, m);
- imat4x3 expected = imat4x3(0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121);
- Error += all(equal(n, expected)) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_outerProduct()
-{
- int Error = 0;
-
- {
- glm::imat2x2 const m = glm::outerProduct(glm::ivec2(1), glm::ivec2(1));
- Error += all(equal(m, glm::imat2x2(1, 1, 1, 1))) ? 0 : 1;
- }
- {
- glm::imat2x3 const m = glm::outerProduct(glm::ivec3(1), glm::ivec2(1));
- Error += all(equal(m, glm::imat2x3(1, 1, 1, 1, 1, 1))) ? 0 : 1;
- }
- {
- glm::imat2x4 const m = glm::outerProduct(glm::ivec4(1), glm::ivec2(1));
- Error += all(equal(m, glm::imat2x4(1, 1, 1, 1, 1, 1, 1, 1))) ? 0 : 1;
- }
-
- {
- glm::imat3x2 const m = glm::outerProduct(glm::ivec2(1), glm::ivec3(1));
- Error += all(equal(m, glm::imat3x2(1, 1, 1, 1, 1, 1))) ? 0 : 1;
- }
- {
- glm::imat3x3 const m = glm::outerProduct(glm::ivec3(1), glm::ivec3(1));
- Error += all(equal(m, glm::imat3x3(1, 1, 1, 1, 1, 1, 1, 1, 1))) ? 0 : 1;
- }
- {
- glm::imat3x4 const m = glm::outerProduct(glm::ivec4(1), glm::ivec3(1));
- Error += all(equal(m, glm::imat3x4(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1))) ? 0 : 1;
- }
-
-
- {
- glm::imat4x2 const m = glm::outerProduct(glm::ivec2(1), glm::ivec4(1));
- Error += all(equal(m, glm::imat4x2(1, 1, 1, 1, 1, 1, 1, 1))) ? 0 : 1;
- }
- {
- glm::imat4x3 const m = glm::outerProduct(glm::ivec3(1), glm::ivec4(1));
- Error += all(equal(m, glm::imat4x3(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1))) ? 0 : 1;
- }
- {
- glm::imat4x4 const m = glm::outerProduct(glm::ivec4(1), glm::ivec4(1));
- Error += all(equal(m, glm::imat4x4(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1))) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_transpose()
-{
- int Error = 0;
-
- {
- imat2 const m(0, 1, 2, 3);
- imat2 const t = transpose(m);
- imat2 const expected = imat2(0, 2, 1, 3);
- Error += all(equal(t, expected)) ? 0 : 1;
- }
-
- {
- imat2x3 m(0, 1, 2, 3, 4, 5);
- imat3x2 t = transpose(m);
- imat3x2 const expected = imat3x2(0, 3, 1, 4, 2, 5);
- Error += all(equal(t, expected)) ? 0 : 1;
- }
-
- {
- imat2x4 m(0, 1, 2, 3, 4, 5, 6, 7);
- imat4x2 t = transpose(m);
- imat4x2 const expected = imat4x2(0, 4, 1, 5, 2, 6, 3, 7);
- Error += all(equal(t, expected)) ? 0 : 1;
- }
-
- {
- imat3 m(0, 1, 2, 3, 4, 5, 6, 7, 8);
- imat3 t = transpose(m);
- imat3 const expected = imat3(0, 3, 6, 1, 4, 7, 2, 5, 8);
- Error += all(equal(t, expected)) ? 0 : 1;
- }
-
- {
- imat3x2 m(0, 1, 2, 3, 4, 5);
- imat2x3 t = transpose(m);
- imat2x3 const expected = imat2x3(0, 2, 4, 1, 3, 5);
- Error += all(equal(t, expected)) ? 0 : 1;
- }
-
- {
- imat3x4 m(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);
- imat4x3 t = transpose(m);
- imat4x3 const expected = imat4x3(0, 4, 8, 1, 5, 9, 2, 6, 10, 3, 7, 11);
- Error += all(equal(t, expected)) ? 0 : 1;
- }
-
- {
- imat4 m(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
- imat4 t = transpose(m);
- imat4 const expected = imat4(0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15);
- Error += all(equal(t, expected)) ? 0 : 1;
- }
-
- {
- imat4x2 m(0, 1, 2, 3, 4, 5, 6, 7);
- imat2x4 t = transpose(m);
- imat2x4 const expected = imat2x4(0, 2, 4, 6, 1, 3, 5, 7);
- Error += all(equal(t, expected)) ? 0 : 1;
- }
-
- {
- imat4x3 m(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);
- imat3x4 t = transpose(m);
- imat3x4 const expected = imat3x4(0, 3, 6, 9, 1, 4, 7, 10, 2, 5, 8, 11);
- Error += all(equal(t, expected)) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_determinant()
-{
- int Error = 0;
-
- {
- imat2 const m(1, 1, 1, 1);
- int const t = determinant(m);
- Error += t == 0 ? 0 : 1;
- }
-
- {
- imat3 m(1, 1, 1, 1, 1, 1, 1, 1, 1);
- int t = determinant(m);
- Error += t == 0 ? 0 : 1;
- }
-
- {
- imat4 m(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
- int t = determinant(m);
- Error += t == 0 ? 0 : 1;
- }
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_matrixCompMult();
- Error += test_outerProduct();
- Error += test_transpose();
- Error += test_determinant();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_matrix_projection.cpp b/3rdparty/glm/source/test/ext/ext_matrix_projection.cpp
deleted file mode 100644
index 88f6ae9..0000000
--- a/3rdparty/glm/source/test/ext/ext_matrix_projection.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <glm/ext/matrix_relational.hpp>
-#include <glm/ext/matrix_projection.hpp>
-#include <glm/ext/matrix_float4x4.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/vector_float4.hpp>
-#include <glm/ext/vector_float3.hpp>
-
-int main()
-{
- int Error = 0;
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_matrix_relational.cpp b/3rdparty/glm/source/test/ext/ext_matrix_relational.cpp
deleted file mode 100644
index 64c0dae..0000000
--- a/3rdparty/glm/source/test/ext/ext_matrix_relational.cpp
+++ /dev/null
@@ -1,163 +0,0 @@
-#include <glm/ext/matrix_relational.hpp>
-#include <glm/ext/matrix_double2x2.hpp>
-#include <glm/ext/matrix_double2x3.hpp>
-#include <glm/ext/matrix_double2x4.hpp>
-#include <glm/ext/matrix_double3x2.hpp>
-#include <glm/ext/matrix_double3x3.hpp>
-#include <glm/ext/matrix_double3x4.hpp>
-#include <glm/ext/matrix_double4x2.hpp>
-#include <glm/ext/matrix_double4x3.hpp>
-#include <glm/ext/matrix_double4x4.hpp>
-#include <glm/ext/vector_double2.hpp>
-#include <glm/ext/vector_double3.hpp>
-#include <glm/ext/vector_double4.hpp>
-#include <glm/ext/matrix_float2x2.hpp>
-#include <glm/ext/matrix_float2x3.hpp>
-#include <glm/ext/matrix_float2x4.hpp>
-#include <glm/ext/matrix_float3x2.hpp>
-#include <glm/ext/matrix_float3x3.hpp>
-#include <glm/ext/matrix_float3x4.hpp>
-#include <glm/ext/matrix_float4x2.hpp>
-#include <glm/ext/matrix_float4x3.hpp>
-#include <glm/ext/matrix_float4x4.hpp>
-#include <glm/ext/vector_float2.hpp>
-#include <glm/ext/vector_float3.hpp>
-#include <glm/ext/vector_float4.hpp>
-#include <glm/ext/scalar_ulp.hpp>
-
-template <typename matType, typename vecType>
-static int test_equal()
-{
- typedef typename matType::value_type valType;
-
- valType const Epsilon = static_cast<valType>(0.001f);
- valType const One = static_cast<valType>(1);
- valType const Two = static_cast<valType>(2);
-
- int Error = 0;
-
- Error += glm::all(glm::equal(matType(One), matType(One), Epsilon)) ? 0 : 1;
- Error += glm::all(glm::equal(matType(One), matType(Two), vecType(Epsilon))) ? 1 : 0;
-
- return Error;
-}
-
-template <typename matType, typename vecType>
-static int test_notEqual()
-{
- typedef typename matType::value_type valType;
-
- valType const Epsilon = static_cast<valType>(0.001f);
- valType const One = static_cast<valType>(1);
- valType const Two = static_cast<valType>(2);
-
- int Error = 0;
-
- Error += !glm::any(glm::notEqual(matType(One), matType(One), Epsilon)) ? 0 : 1;
- Error += !glm::any(glm::notEqual(matType(One), matType(Two), vecType(Epsilon))) ? 1 : 0;
-
- return Error;
-}
-
-
-template <typename T>
-static int test_equal_ulps()
-{
- typedef glm::mat<4, 4, T, glm::defaultp> mat4;
-
- T const One(1);
- mat4 const Ones(1);
-
- int Error = 0;
-
- T const ULP1Plus = glm::nextFloat(One);
- Error += glm::all(glm::equal(Ones, mat4(ULP1Plus), 1)) ? 0 : 1;
-
- T const ULP2Plus = glm::nextFloat(ULP1Plus);
- Error += !glm::all(glm::equal(Ones, mat4(ULP2Plus), 1)) ? 0 : 1;
-
- T const ULP1Minus = glm::prevFloat(One);
- Error += glm::all(glm::equal(Ones, mat4(ULP1Minus), 1)) ? 0 : 1;
-
- T const ULP2Minus = glm::prevFloat(ULP1Minus);
- Error += !glm::all(glm::equal(Ones, mat4(ULP2Minus), 1)) ? 0 : 1;
-
- return Error;
-}
-
-template <typename T>
-static int test_notEqual_ulps()
-{
- typedef glm::mat<4, 4, T, glm::defaultp> mat4;
-
- T const One(1);
- mat4 const Ones(1);
-
- int Error = 0;
-
- T const ULP1Plus = glm::nextFloat(One);
- Error += !glm::all(glm::notEqual(Ones, mat4(ULP1Plus), 1)) ? 0 : 1;
-
- T const ULP2Plus = glm::nextFloat(ULP1Plus);
- Error += glm::all(glm::notEqual(Ones, mat4(ULP2Plus), 1)) ? 0 : 1;
-
- T const ULP1Minus = glm::prevFloat(One);
- Error += !glm::all(glm::notEqual(Ones, mat4(ULP1Minus), 1)) ? 0 : 1;
-
- T const ULP2Minus = glm::prevFloat(ULP1Minus);
- Error += glm::all(glm::notEqual(Ones, mat4(ULP2Minus), 1)) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_equal_ulps<float>();
- Error += test_equal_ulps<double>();
- Error += test_notEqual_ulps<float>();
- Error += test_notEqual_ulps<double>();
-
- Error += test_equal<glm::mat2x2, glm::vec2>();
- Error += test_equal<glm::mat2x3, glm::vec2>();
- Error += test_equal<glm::mat2x4, glm::vec2>();
- Error += test_equal<glm::mat3x2, glm::vec3>();
- Error += test_equal<glm::mat3x3, glm::vec3>();
- Error += test_equal<glm::mat3x4, glm::vec3>();
- Error += test_equal<glm::mat4x2, glm::vec4>();
- Error += test_equal<glm::mat4x3, glm::vec4>();
- Error += test_equal<glm::mat4x4, glm::vec4>();
-
- Error += test_equal<glm::dmat2x2, glm::dvec2>();
- Error += test_equal<glm::dmat2x3, glm::dvec2>();
- Error += test_equal<glm::dmat2x4, glm::dvec2>();
- Error += test_equal<glm::dmat3x2, glm::dvec3>();
- Error += test_equal<glm::dmat3x3, glm::dvec3>();
- Error += test_equal<glm::dmat3x4, glm::dvec3>();
- Error += test_equal<glm::dmat4x2, glm::dvec4>();
- Error += test_equal<glm::dmat4x3, glm::dvec4>();
- Error += test_equal<glm::dmat4x4, glm::dvec4>();
-
- Error += test_notEqual<glm::mat2x2, glm::vec2>();
- Error += test_notEqual<glm::mat2x3, glm::vec2>();
- Error += test_notEqual<glm::mat2x4, glm::vec2>();
- Error += test_notEqual<glm::mat3x2, glm::vec3>();
- Error += test_notEqual<glm::mat3x3, glm::vec3>();
- Error += test_notEqual<glm::mat3x4, glm::vec3>();
- Error += test_notEqual<glm::mat4x2, glm::vec4>();
- Error += test_notEqual<glm::mat4x3, glm::vec4>();
- Error += test_notEqual<glm::mat4x4, glm::vec4>();
-
- Error += test_notEqual<glm::dmat2x2, glm::dvec2>();
- Error += test_notEqual<glm::dmat2x3, glm::dvec2>();
- Error += test_notEqual<glm::dmat2x4, glm::dvec2>();
- Error += test_notEqual<glm::dmat3x2, glm::dvec3>();
- Error += test_notEqual<glm::dmat3x3, glm::dvec3>();
- Error += test_notEqual<glm::dmat3x4, glm::dvec3>();
- Error += test_notEqual<glm::dmat4x2, glm::dvec4>();
- Error += test_notEqual<glm::dmat4x3, glm::dvec4>();
- Error += test_notEqual<glm::dmat4x4, glm::dvec4>();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_matrix_transform.cpp b/3rdparty/glm/source/test/ext/ext_matrix_transform.cpp
deleted file mode 100644
index cf653b7..0000000
--- a/3rdparty/glm/source/test/ext/ext_matrix_transform.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-#include <glm/ext/matrix_relational.hpp>
-#include <glm/ext/matrix_transform.hpp>
-#include <glm/ext/matrix_float4x4.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/vector_float4.hpp>
-#include <glm/ext/vector_float3.hpp>
-
-static int test_translate()
-{
- int Error = 0;
-
- glm::mat4 const M(1.0f);
- glm::vec3 const V(1.0f);
-
- glm::mat4 const T = glm::translate(M, V);
- Error += glm::all(glm::equal(T[3], glm::vec4(1.0f), glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-static int test_scale()
-{
- int Error = 0;
-
- glm::mat4 const M(1.0f);
- glm::vec3 const V(2.0f);
-
- glm::mat4 const S = glm::scale(M, V);
- glm::mat4 const R = glm::mat4(
- glm::vec4(2, 0, 0, 0),
- glm::vec4(0, 2, 0, 0),
- glm::vec4(0, 0, 2, 0),
- glm::vec4(0, 0, 0, 1));
- Error += glm::all(glm::equal(S, R, glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-static int test_rotate()
-{
- int Error = 0;
-
- glm::vec4 const A(1.0f, 0.0f, 0.0f, 1.0f);
-
- glm::mat4 const R = glm::rotate(glm::mat4(1.0f), glm::radians(90.f), glm::vec3(0, 0, 1));
- glm::vec4 const B = R * A;
- Error += glm::all(glm::equal(B, glm::vec4(0.0f, 1.0f, 0.0f, 1.0f), 0.0001f)) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_translate();
- Error += test_scale();
- Error += test_rotate();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_matrix_uint2x2_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_uint2x2_sized.cpp
deleted file mode 100644
index a9bd49c..0000000
--- a/3rdparty/glm/source/test/ext/ext_matrix_uint2x2_sized.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <glm/ext/matrix_uint2x2_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
- static_assert(sizeof(glm::u8mat2x2) == 4, "uint8 size isn't 1 byte on this platform");
- static_assert(sizeof(glm::u16mat2x2) == 8, "uint16 size isn't 2 bytes on this platform");
- static_assert(sizeof(glm::u32mat2x2) == 16, "uint32 size isn't 4 bytes on this platform");
- static_assert(sizeof(glm::u64mat2x2) == 32, "uint64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::u8mat2x2) < sizeof(glm::u16mat2x2) ? 0 : 1;
- Error += sizeof(glm::u16mat2x2) < sizeof(glm::u32mat2x2) ? 0 : 1;
- Error += sizeof(glm::u32mat2x2) < sizeof(glm::u64mat2x2) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_matrix_uint2x3_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_uint2x3_sized.cpp
deleted file mode 100644
index 0b75893..0000000
--- a/3rdparty/glm/source/test/ext/ext_matrix_uint2x3_sized.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <glm/ext/matrix_uint2x3_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
-static_assert(sizeof(glm::u8mat2x3) == 6, "uint8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::u16mat2x3) == 12, "uint16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::u32mat2x3) == 24, "uint32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::u64mat2x3) == 48, "uint64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::u8mat2x3) < sizeof(glm::u16mat2x3) ? 0 : 1;
- Error += sizeof(glm::u16mat2x3) < sizeof(glm::u32mat2x3) ? 0 : 1;
- Error += sizeof(glm::u32mat2x3) < sizeof(glm::u64mat2x3) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_matrix_uint2x4_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_uint2x4_sized.cpp
deleted file mode 100644
index 84af4dd..0000000
--- a/3rdparty/glm/source/test/ext/ext_matrix_uint2x4_sized.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <glm/ext/matrix_uint2x4_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
-static_assert(sizeof(glm::u8mat2x4) == 8, "uint8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::u16mat2x4) == 16, "uint16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::u32mat2x4) == 32, "uint32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::u64mat2x4) == 64, "uint64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::u8mat2x4) < sizeof(glm::u16mat2x4) ? 0 : 1;
- Error += sizeof(glm::u16mat2x4) < sizeof(glm::u32mat2x4) ? 0 : 1;
- Error += sizeof(glm::u32mat2x4) < sizeof(glm::u64mat2x4) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_matrix_uint3x2_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_uint3x2_sized.cpp
deleted file mode 100644
index 3c035e2..0000000
--- a/3rdparty/glm/source/test/ext/ext_matrix_uint3x2_sized.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <glm/ext/matrix_uint3x2_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
-static_assert(sizeof(glm::u8mat3x2) == 6, "uint8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::u16mat3x2) == 12, "uint16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::u32mat3x2) == 24, "uint32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::u64mat3x2) == 48, "uint64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::u8mat3x2) < sizeof(glm::u16mat3x2) ? 0 : 1;
- Error += sizeof(glm::u16mat3x2) < sizeof(glm::u32mat3x2) ? 0 : 1;
- Error += sizeof(glm::u32mat3x2) < sizeof(glm::u64mat3x2) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_matrix_uint3x3_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_uint3x3_sized.cpp
deleted file mode 100644
index 64384ed..0000000
--- a/3rdparty/glm/source/test/ext/ext_matrix_uint3x3_sized.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <glm/ext/matrix_uint3x3_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
-static_assert(sizeof(glm::u8mat3x3) == 9, "uint8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::u16mat3x3) == 18, "uint16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::u32mat3x3) == 36, "uint32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::u64mat3x3) == 72, "uint64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::u8mat3x3) < sizeof(glm::u16mat3x3) ? 0 : 1;
- Error += sizeof(glm::u16mat3x3) < sizeof(glm::u32mat3x3) ? 0 : 1;
- Error += sizeof(glm::u32mat3x3) < sizeof(glm::u64mat3x3) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_matrix_uint3x4_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_uint3x4_sized.cpp
deleted file mode 100644
index 7f743df..0000000
--- a/3rdparty/glm/source/test/ext/ext_matrix_uint3x4_sized.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <glm/ext/matrix_uint3x4_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
-static_assert(sizeof(glm::u8mat3x4) == 12, "uint8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::u16mat3x4) == 24, "uint16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::u32mat3x4) == 48, "uint32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::u64mat3x4) == 96, "uint64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::u8mat3x4) < sizeof(glm::u16mat3x4) ? 0 : 1;
- Error += sizeof(glm::u16mat3x4) < sizeof(glm::u32mat3x4) ? 0 : 1;
- Error += sizeof(glm::u32mat3x4) < sizeof(glm::u64mat3x4) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_matrix_uint4x2_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_uint4x2_sized.cpp
deleted file mode 100644
index 2b4453f..0000000
--- a/3rdparty/glm/source/test/ext/ext_matrix_uint4x2_sized.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <glm/ext/matrix_uint4x2_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
-static_assert(sizeof(glm::u8mat4x2) == 8, "uint8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::u16mat4x2) == 16, "uint16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::u32mat4x2) == 32, "uint32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::u64mat4x2) == 64, "uint64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::u8mat4x2) < sizeof(glm::u16mat4x2) ? 0 : 1;
- Error += sizeof(glm::u16mat4x2) < sizeof(glm::u32mat4x2) ? 0 : 1;
- Error += sizeof(glm::u32mat4x2) < sizeof(glm::u64mat4x2) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_matrix_uint4x3_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_uint4x3_sized.cpp
deleted file mode 100644
index 2820bde..0000000
--- a/3rdparty/glm/source/test/ext/ext_matrix_uint4x3_sized.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <glm/ext/matrix_uint4x3_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
-static_assert(sizeof(glm::u8mat4x3) == 12, "uint8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::u16mat4x3) == 24, "uint16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::u32mat4x3) == 48, "uint32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::u64mat4x3) == 96, "uint64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::u8mat4x3) < sizeof(glm::u16mat4x3) ? 0 : 1;
- Error += sizeof(glm::u16mat4x3) < sizeof(glm::u32mat4x3) ? 0 : 1;
- Error += sizeof(glm::u32mat4x3) < sizeof(glm::u64mat4x3) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_matrix_uint4x4_sized.cpp b/3rdparty/glm/source/test/ext/ext_matrix_uint4x4_sized.cpp
deleted file mode 100644
index 8f9e239..0000000
--- a/3rdparty/glm/source/test/ext/ext_matrix_uint4x4_sized.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <glm/ext/matrix_uint4x4_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
-static_assert(sizeof(glm::u8mat4x4) == 16, "uint8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::u16mat4x4) == 32, "uint16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::u32mat4x4) == 64, "uint32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::u64mat4x4) == 128, "uint64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::u8mat4x4) < sizeof(glm::u16mat4x4) ? 0 : 1;
- Error += sizeof(glm::u16mat4x4) < sizeof(glm::u32mat4x4) ? 0 : 1;
- Error += sizeof(glm::u32mat4x4) < sizeof(glm::u64mat4x4) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_quaternion_common.cpp b/3rdparty/glm/source/test/ext/ext_quaternion_common.cpp
deleted file mode 100644
index 861aa65..0000000
--- a/3rdparty/glm/source/test/ext/ext_quaternion_common.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-#include <glm/ext/vector_float3.hpp>
-#include <glm/ext/quaternion_common.hpp>
-#include <glm/ext/quaternion_float.hpp>
-#include <glm/ext/quaternion_relational.hpp>
-#include <glm/ext/quaternion_trigonometric.hpp>
-#include <glm/ext/scalar_constants.hpp>
-#include <glm/ext/scalar_relational.hpp>
-
-static int test_conjugate()
-{
- int Error = 0;
-
- glm::quat const A(glm::vec3(1, 0, 0), glm::vec3(0, 1, 0));
- glm::quat const C = glm::conjugate(A);
- Error += glm::any(glm::notEqual(A, C, glm::epsilon<float>())) ? 0 : 1;
-
- glm::quat const B = glm::conjugate(C);
- Error += glm::all(glm::equal(A, B, glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-static int test_mix()
-{
- int Error = 0;
-
- glm::quat const Q1(glm::vec3(1, 0, 0), glm::vec3(1, 0, 0));
- glm::quat const Q2(glm::vec3(1, 0, 0), glm::vec3(0, 1, 0));
-
- {
- glm::quat const Q3 = glm::mix(Q1, Q2, 0.5f);
- float const F3 = glm::degrees(glm::angle(Q3));
- Error += glm::equal(F3, 45.0f, 0.001f) ? 0 : 1;
-
- glm::quat const Q4 = glm::mix(Q2, Q1, 0.5f);
- float const F4 = glm::degrees(glm::angle(Q4));
- Error += glm::equal(F4, 45.0f, 0.001f) ? 0 : 1;
- }
-
- {
- glm::quat const Q3 = glm::slerp(Q1, Q2, 0.5f);
- float const F3 = glm::degrees(glm::angle(Q3));
- Error += glm::equal(F3, 45.0f, 0.001f) ? 0 : 1;
-
- glm::quat const Q4 = glm::slerp(Q2, Q1, 0.5f);
- float const F4 = glm::degrees(glm::angle(Q4));
- Error += glm::equal(F4, 45.0f, 0.001f) ? 0 : 1;
- }
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_conjugate();
- Error += test_mix();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_quaternion_exponential.cpp b/3rdparty/glm/source/test/ext/ext_quaternion_exponential.cpp
deleted file mode 100644
index fbcdbef..0000000
--- a/3rdparty/glm/source/test/ext/ext_quaternion_exponential.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-#include <glm/ext/quaternion_exponential.hpp>
-#include <glm/ext/quaternion_float.hpp>
-#include <glm/ext/quaternion_float_precision.hpp>
-#include <glm/ext/quaternion_double.hpp>
-#include <glm/ext/quaternion_double_precision.hpp>
-#include <glm/ext/quaternion_relational.hpp>
-#include <glm/ext/vector_float3.hpp>
-#include <glm/ext/vector_float3_precision.hpp>
-#include <glm/ext/vector_double3.hpp>
-#include <glm/ext/vector_double3_precision.hpp>
-#include <glm/ext/scalar_constants.hpp>
-
-template <typename quaType, typename vecType>
-int test_log()
-{
- typedef typename quaType::value_type T;
-
- T const Epsilon = static_cast<T>(0.001f);
-
- int Error = 0;
-
- quaType const Q(vecType(1, 0, 0), vecType(0, 1, 0));
- quaType const P = glm::log(Q);
- Error += glm::any(glm::notEqual(Q, P, Epsilon)) ? 0 : 1;
-
- quaType const R = glm::exp(P);
- Error += glm::all(glm::equal(Q, R, Epsilon)) ? 0 : 1;
-
- return Error;
-}
-
-template <typename quaType, typename vecType>
-int test_pow()
-{
- typedef typename quaType::value_type T;
-
- T const Epsilon = static_cast<T>(0.001f);
-
- int Error = 0;
-
- quaType const Q(vecType(1, 0, 0), vecType(0, 1, 0));
-
- {
- T const One = static_cast<T>(1.0f);
- quaType const P = glm::pow(Q, One);
- Error += glm::all(glm::equal(Q, P, Epsilon)) ? 0 : 1;
- }
-
- {
- T const Two = static_cast<T>(2.0f);
- quaType const P = glm::pow(Q, Two);
- quaType const R = Q * Q;
- Error += glm::all(glm::equal(P, R, Epsilon)) ? 0 : 1;
-
- quaType const U = glm::sqrt(P);
- Error += glm::all(glm::equal(Q, U, Epsilon)) ? 0 : 1;
- }
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_log<glm::quat, glm::vec3>();
- Error += test_log<glm::lowp_quat, glm::lowp_vec3>();
- Error += test_log<glm::mediump_quat, glm::mediump_vec3>();
- Error += test_log<glm::highp_quat, glm::highp_vec3>();
-
- Error += test_log<glm::dquat, glm::dvec3>();
- Error += test_log<glm::lowp_dquat, glm::lowp_dvec3>();
- Error += test_log<glm::mediump_dquat, glm::mediump_dvec3>();
- Error += test_log<glm::highp_dquat, glm::highp_dvec3>();
-
- Error += test_pow<glm::quat, glm::vec3>();
- Error += test_pow<glm::lowp_quat, glm::lowp_vec3>();
- Error += test_pow<glm::mediump_quat, glm::mediump_vec3>();
- Error += test_pow<glm::highp_quat, glm::highp_vec3>();
-
- Error += test_pow<glm::dquat, glm::dvec3>();
- Error += test_pow<glm::lowp_dquat, glm::lowp_dvec3>();
- Error += test_pow<glm::mediump_dquat, glm::mediump_dvec3>();
- Error += test_pow<glm::highp_dquat, glm::highp_dvec3>();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_quaternion_geometric.cpp b/3rdparty/glm/source/test/ext/ext_quaternion_geometric.cpp
deleted file mode 100644
index 73b5dea..0000000
--- a/3rdparty/glm/source/test/ext/ext_quaternion_geometric.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-#include <glm/gtc/constants.hpp>
-#include <glm/ext/quaternion_geometric.hpp>
-#include <glm/ext/quaternion_float.hpp>
-#include <glm/ext/quaternion_trigonometric.hpp>
-#include <glm/ext/quaternion_float_precision.hpp>
-#include <glm/ext/quaternion_double.hpp>
-#include <glm/ext/quaternion_double_precision.hpp>
-#include <glm/ext/vector_float3.hpp>
-#include <glm/ext/vector_float3_precision.hpp>
-#include <glm/ext/vector_double3.hpp>
-#include <glm/ext/vector_double3_precision.hpp>
-#include <glm/ext/scalar_relational.hpp>
-
-float const Epsilon = 0.001f;
-
-static int test_length()
-{
- int Error = 0;
-
- {
- float const A = glm::length(glm::quat(1, 0, 0, 0));
- Error += glm::equal(A, 1.0f, Epsilon) ? 0 : 1;
- }
-
- {
- float const A = glm::length(glm::quat(1, glm::vec3(0)));
- Error += glm::equal(A, 1.0f, Epsilon) ? 0 : 1;
- }
-
- {
- float const A = glm::length(glm::quat(glm::vec3(1, 0, 0), glm::vec3(0, 1, 0)));
- Error += glm::equal(A, 1.0f, Epsilon) ? 0 : 1;
- }
-
- return Error;
-}
-
-static int test_normalize()
-{
- int Error = 0;
-
- {
- glm::quat const A = glm::quat(1, 0, 0, 0);
- glm::quat const N = glm::normalize(A);
- Error += glm::all(glm::equal(A, N, Epsilon)) ? 0 : 1;
- }
-
- {
- glm::quat const A = glm::quat(1, glm::vec3(0));
- glm::quat const N = glm::normalize(A);
- Error += glm::all(glm::equal(A, N, Epsilon)) ? 0 : 1;
- }
-
- return Error;
-}
-
-static int test_dot()
-{
- int Error = 0;
-
- {
- glm::quat const A = glm::quat(1, 0, 0, 0);
- glm::quat const B = glm::quat(1, 0, 0, 0);
- float const C = glm::dot(A, B);
- Error += glm::equal(C, 1.0f, Epsilon) ? 0 : 1;
- }
-
- return Error;
-}
-
-static int test_cross()
-{
- int Error = 0;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_length();
- Error += test_normalize();
- Error += test_dot();
- Error += test_cross();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_quaternion_relational.cpp b/3rdparty/glm/source/test/ext/ext_quaternion_relational.cpp
deleted file mode 100644
index 7f51fdc..0000000
--- a/3rdparty/glm/source/test/ext/ext_quaternion_relational.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-#include <glm/gtc/constants.hpp>
-#include <glm/ext/quaternion_relational.hpp>
-#include <glm/ext/quaternion_float.hpp>
-#include <glm/ext/quaternion_float_precision.hpp>
-#include <glm/ext/quaternion_double.hpp>
-#include <glm/ext/quaternion_double_precision.hpp>
-#include <glm/ext/vector_float3.hpp>
-#include <glm/ext/vector_float3_precision.hpp>
-#include <glm/ext/vector_double3.hpp>
-#include <glm/ext/vector_double3_precision.hpp>
-
-template <typename quaType>
-static int test_equal()
-{
- int Error = 0;
-
- quaType const Q(1, 0, 0, 0);
- quaType const P(1, 0, 0, 0);
- Error += glm::all(glm::equal(Q, P, glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-template <typename quaType>
-static int test_notEqual()
-{
- int Error = 0;
-
- quaType const Q(1, 0, 0, 0);
- quaType const P(1, 0, 0, 0);
- Error += glm::any(glm::notEqual(Q, P, glm::epsilon<float>())) ? 1 : 0;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_equal<glm::quat>();
- Error += test_equal<glm::lowp_quat>();
- Error += test_equal<glm::mediump_quat>();
- Error += test_equal<glm::highp_quat>();
-
- Error += test_notEqual<glm::quat>();
- Error += test_notEqual<glm::lowp_quat>();
- Error += test_notEqual<glm::mediump_quat>();
- Error += test_notEqual<glm::highp_quat>();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_quaternion_transform.cpp b/3rdparty/glm/source/test/ext/ext_quaternion_transform.cpp
deleted file mode 100644
index fefe88e..0000000
--- a/3rdparty/glm/source/test/ext/ext_quaternion_transform.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-#include <glm/ext/quaternion_transform.hpp>
-#include <glm/ext/quaternion_float.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/scalar_constants.hpp>
-
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/quaternion.hpp>
-
-static int test_lookAt()
-{
- int Error(0);
-
- glm::vec3 eye(0.0f);
- glm::vec3 center(1.1f, -2.0f, 3.1416f);
- glm::vec3 up(-0.17f, 7.23f, -1.744f);
-
- glm::quat test_quat = glm::quatLookAt(glm::normalize(center - eye), up);
- glm::quat test_mat = glm::conjugate(glm::quat_cast(glm::lookAt(eye, center, up)));
-
- Error += static_cast<int>(glm::abs(glm::length(test_quat) - 1.0f) > glm::epsilon<float>());
- Error += static_cast<int>(glm::min(glm::length(test_quat + (-test_mat)), glm::length(test_quat + test_mat)) > glm::epsilon<float>());
-
- // Test left-handed implementation
- glm::quat test_quatLH = glm::quatLookAtLH(glm::normalize(center - eye), up);
- glm::quat test_matLH = glm::conjugate(glm::quat_cast(glm::lookAtLH(eye, center, up)));
- Error += static_cast<int>(glm::abs(glm::length(test_quatLH) - 1.0f) > glm::epsilon<float>());
- Error += static_cast<int>(glm::min(glm::length(test_quatLH - test_matLH), glm::length(test_quatLH + test_matLH)) > glm::epsilon<float>());
-
- // Test right-handed implementation
- glm::quat test_quatRH = glm::quatLookAtRH(glm::normalize(center - eye), up);
- glm::quat test_matRH = glm::conjugate(glm::quat_cast(glm::lookAtRH(eye, center, up)));
- Error += static_cast<int>(glm::abs(glm::length(test_quatRH) - 1.0f) > glm::epsilon<float>());
- Error += static_cast<int>(glm::min(glm::length(test_quatRH - test_matRH), glm::length(test_quatRH + test_matRH)) > glm::epsilon<float>());
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_lookAt();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_quaternion_trigonometric.cpp b/3rdparty/glm/source/test/ext/ext_quaternion_trigonometric.cpp
deleted file mode 100644
index d237125..0000000
--- a/3rdparty/glm/source/test/ext/ext_quaternion_trigonometric.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-#include <glm/ext/quaternion_trigonometric.hpp>
-#include <glm/ext/quaternion_float.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/scalar_relational.hpp>
-
-float const Epsilon = 0.001f;
-
-static int test_angle()
-{
- int Error = 0;
-
- {
- glm::quat const Q = glm::quat(glm::vec3(1, 0, 0), glm::vec3(0, 1, 0));
- float const A = glm::degrees(glm::angle(Q));
- Error += glm::equal(A, 90.0f, Epsilon) ? 0 : 1;
- }
-
- {
- glm::quat const Q = glm::quat(glm::vec3(0, 1, 0), glm::vec3(1, 0, 0));
- float const A = glm::degrees(glm::angle(Q));
- Error += glm::equal(A, 90.0f, Epsilon) ? 0 : 1;
- }
-
- {
- glm::quat const Q = glm::angleAxis(glm::two_pi<float>() - 1.0f, glm::vec3(1, 0, 0));
- float const A = glm::angle(Q);
- Error += glm::equal(A, 1.0f, Epsilon) ? 1 : 0;
- }
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_angle();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_quaternion_type.cpp b/3rdparty/glm/source/test/ext/ext_quaternion_type.cpp
deleted file mode 100644
index 7e61149..0000000
--- a/3rdparty/glm/source/test/ext/ext_quaternion_type.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-#include <glm/gtc/constants.hpp>
-#include <glm/ext/quaternion_relational.hpp>
-#include <glm/ext/quaternion_float.hpp>
-#include <glm/ext/quaternion_float_precision.hpp>
-#include <glm/ext/quaternion_double.hpp>
-#include <glm/ext/quaternion_double_precision.hpp>
-#include <glm/ext/vector_float3.hpp>
-#include <vector>
-
-static int test_ctr()
-{
- int Error(0);
-
-# if GLM_HAS_TRIVIAL_QUERIES
- // Error += std::is_trivially_default_constructible<glm::quat>::value ? 0 : 1;
- // Error += std::is_trivially_default_constructible<glm::dquat>::value ? 0 : 1;
- // Error += std::is_trivially_copy_assignable<glm::quat>::value ? 0 : 1;
- // Error += std::is_trivially_copy_assignable<glm::dquat>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::quat>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::dquat>::value ? 0 : 1;
-
- Error += std::is_copy_constructible<glm::quat>::value ? 0 : 1;
- Error += std::is_copy_constructible<glm::dquat>::value ? 0 : 1;
-# endif
-
-# if GLM_HAS_INITIALIZER_LISTS
- {
- glm::quat A{0, 1, 2, 3};
-
- std::vector<glm::quat> B{
- {0, 1, 2, 3},
- {0, 1, 2, 3}};
- }
-# endif//GLM_HAS_INITIALIZER_LISTS
-
- return Error;
-}
-
-static int test_two_axis_ctr()
-{
- int Error = 0;
-
- glm::quat const q1(glm::vec3(1, 0, 0), glm::vec3(0, 1, 0));
- glm::vec3 const v1 = q1 * glm::vec3(1, 0, 0);
- Error += glm::all(glm::equal(v1, glm::vec3(0, 1, 0), 0.0001f)) ? 0 : 1;
-
- glm::quat const q2 = q1 * q1;
- glm::vec3 const v2 = q2 * glm::vec3(1, 0, 0);
- Error += glm::all(glm::equal(v2, glm::vec3(-1, 0, 0), 0.0001f)) ? 0 : 1;
-
- glm::quat const q3(glm::vec3(1, 0, 0), glm::vec3(-1, 0, 0));
- glm::vec3 const v3 = q3 * glm::vec3(1, 0, 0);
- Error += glm::all(glm::equal(v3, glm::vec3(-1, 0, 0), 0.0001f)) ? 0 : 1;
-
- glm::quat const q4(glm::vec3(0, 1, 0), glm::vec3(0, -1, 0));
- glm::vec3 const v4 = q4 * glm::vec3(0, 1, 0);
- Error += glm::all(glm::equal(v4, glm::vec3(0, -1, 0), 0.0001f)) ? 0 : 1;
-
- glm::quat const q5(glm::vec3(0, 0, 1), glm::vec3(0, 0, -1));
- glm::vec3 const v5 = q5 * glm::vec3(0, 0, 1);
- Error += glm::all(glm::equal(v5, glm::vec3(0, 0, -1), 0.0001f)) ? 0 : 1;
-
- return Error;
-}
-
-static int test_size()
-{
- int Error = 0;
-
- std::size_t const A = sizeof(glm::quat);
- Error += 16 == A ? 0 : 1;
- std::size_t const B = sizeof(glm::dquat);
- Error += 32 == B ? 0 : 1;
- Error += glm::quat().length() == 4 ? 0 : 1;
- Error += glm::dquat().length() == 4 ? 0 : 1;
- Error += glm::quat::length() == 4 ? 0 : 1;
- Error += glm::dquat::length() == 4 ? 0 : 1;
-
- return Error;
-}
-
-static int test_precision()
-{
- int Error = 0;
-
- Error += sizeof(glm::lowp_quat) <= sizeof(glm::mediump_quat) ? 0 : 1;
- Error += sizeof(glm::mediump_quat) <= sizeof(glm::highp_quat) ? 0 : 1;
-
- return Error;
-}
-
-static int test_constexpr()
-{
-#if GLM_HAS_CONSTEXPR
- static_assert(glm::quat::length() == 4, "GLM: Failed constexpr");
- static_assert(glm::quat(1.0f, glm::vec3(0.0f)).w > 0.0f, "GLM: Failed constexpr");
-#endif
-
- return 0;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_ctr();
- Error += test_two_axis_ctr();
- Error += test_size();
- Error += test_precision();
- Error += test_constexpr();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_scalar_common.cpp b/3rdparty/glm/source/test/ext/ext_scalar_common.cpp
deleted file mode 100644
index 917a242..0000000
--- a/3rdparty/glm/source/test/ext/ext_scalar_common.cpp
+++ /dev/null
@@ -1,360 +0,0 @@
-#include <glm/ext/scalar_common.hpp>
-#include <glm/ext/scalar_constants.hpp>
-#include <glm/ext/scalar_relational.hpp>
-#include <glm/common.hpp>
-
-#if ((GLM_LANG & GLM_LANG_CXX11_FLAG) || (GLM_COMPILER & GLM_COMPILER_VC))
-# define GLM_NAN(T) NAN
-#else
-# define GLM_NAN(T) (static_cast<T>(0.0f) / static_cast<T>(0.0f))
-#endif
-
-template <typename T>
-static int test_min()
-{
- int Error = 0;
-
- T const N = static_cast<T>(0);
- T const B = static_cast<T>(1);
- Error += glm::equal(glm::min(N, B), N, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::min(B, N), N, glm::epsilon<T>()) ? 0 : 1;
-
- T const C = static_cast<T>(2);
- Error += glm::equal(glm::min(N, B, C), N, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::min(B, N, C), N, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::min(C, N, B), N, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::min(C, B, N), N, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::min(B, C, N), N, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::min(N, C, B), N, glm::epsilon<T>()) ? 0 : 1;
-
- T const D = static_cast<T>(3);
- Error += glm::equal(glm::min(D, N, B, C), N, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::min(B, D, N, C), N, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::min(C, N, D, B), N, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::min(C, B, D, N), N, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::min(B, C, N, D), N, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::min(N, C, B, D), N, glm::epsilon<T>()) ? 0 : 1;
-
- return Error;
-}
-
-template <typename T>
-static int test_min_nan()
-{
- int Error = 0;
-
- T const B = static_cast<T>(1);
- T const N = static_cast<T>(GLM_NAN(T));
- Error += glm::isnan(glm::min(N, B)) ? 0 : 1;
- Error += !glm::isnan(glm::min(B, N)) ? 0 : 1;
-
- T const C = static_cast<T>(2);
- Error += glm::isnan(glm::min(N, B, C)) ? 0 : 1;
- Error += !glm::isnan(glm::min(B, N, C)) ? 0 : 1;
- Error += !glm::isnan(glm::min(C, N, B)) ? 0 : 1;
- Error += !glm::isnan(glm::min(C, B, N)) ? 0 : 1;
- Error += !glm::isnan(glm::min(B, C, N)) ? 0 : 1;
- Error += glm::isnan(glm::min(N, C, B)) ? 0 : 1;
-
- T const D = static_cast<T>(3);
- Error += !glm::isnan(glm::min(D, N, B, C)) ? 0 : 1;
- Error += !glm::isnan(glm::min(B, D, N, C)) ? 0 : 1;
- Error += !glm::isnan(glm::min(C, N, D, B)) ? 0 : 1;
- Error += !glm::isnan(glm::min(C, B, D, N)) ? 0 : 1;
- Error += !glm::isnan(glm::min(B, C, N, D)) ? 0 : 1;
- Error += glm::isnan(glm::min(N, C, B, D)) ? 0 : 1;
-
- return Error;
-}
-
-template <typename T>
-static int test_max()
-{
- int Error = 0;
-
- T const N = static_cast<T>(0);
- T const B = static_cast<T>(1);
- Error += glm::equal(glm::max(N, B), B, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::max(B, N), B, glm::epsilon<T>()) ? 0 : 1;
-
- T const C = static_cast<T>(2);
- Error += glm::equal(glm::max(N, B, C), C, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::max(B, N, C), C, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::max(C, N, B), C, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::max(C, B, N), C, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::max(B, C, N), C, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::max(N, C, B), C, glm::epsilon<T>()) ? 0 : 1;
-
- T const D = static_cast<T>(3);
- Error += glm::equal(glm::max(D, N, B, C), D, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::max(B, D, N, C), D, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::max(C, N, D, B), D, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::max(C, B, D, N), D, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::max(B, C, N, D), D, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::max(N, C, B, D), D, glm::epsilon<T>()) ? 0 : 1;
-
- return Error;
-}
-
-template <typename T>
-static int test_max_nan()
-{
- int Error = 0;
-
- T const B = static_cast<T>(1);
- T const N = static_cast<T>(GLM_NAN(T));
- Error += glm::isnan(glm::max(N, B)) ? 0 : 1;
- Error += !glm::isnan(glm::max(B, N)) ? 0 : 1;
-
- T const C = static_cast<T>(2);
- Error += glm::isnan(glm::max(N, B, C)) ? 0 : 1;
- Error += !glm::isnan(glm::max(B, N, C)) ? 0 : 1;
- Error += !glm::isnan(glm::max(C, N, B)) ? 0 : 1;
- Error += !glm::isnan(glm::max(C, B, N)) ? 0 : 1;
- Error += !glm::isnan(glm::max(B, C, N)) ? 0 : 1;
- Error += glm::isnan(glm::max(N, C, B)) ? 0 : 1;
-
- T const D = static_cast<T>(3);
- Error += !glm::isnan(glm::max(D, N, B, C)) ? 0 : 1;
- Error += !glm::isnan(glm::max(B, D, N, C)) ? 0 : 1;
- Error += !glm::isnan(glm::max(C, N, D, B)) ? 0 : 1;
- Error += !glm::isnan(glm::max(C, B, D, N)) ? 0 : 1;
- Error += !glm::isnan(glm::max(B, C, N, D)) ? 0 : 1;
- Error += glm::isnan(glm::max(N, C, B, D)) ? 0 : 1;
-
- return Error;
-}
-
-template <typename T>
-static int test_fmin()
-{
- int Error = 0;
-
- T const B = static_cast<T>(1);
- T const N = static_cast<T>(GLM_NAN(T));
- Error += glm::equal(glm::fmin(N, B), B, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::fmin(B, N), B, glm::epsilon<T>()) ? 0 : 1;
-
- T const C = static_cast<T>(2);
- Error += glm::equal(glm::fmin(N, B, C), B, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::fmin(B, N, C), B, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::fmin(C, N, B), B, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::fmin(C, B, N), B, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::fmin(B, C, N), B, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::fmin(N, C, B), B, glm::epsilon<T>()) ? 0 : 1;
-
- T const D = static_cast<T>(3);
- Error += glm::equal(glm::fmin(D, N, B, C), B, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::fmin(B, D, N, C), B, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::fmin(C, N, D, B), B, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::fmin(C, B, D, N), B, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::fmin(B, C, N, D), B, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::fmin(N, C, B, D), B, glm::epsilon<T>()) ? 0 : 1;
-
- return Error;
-}
-
-template <typename T>
-static int test_fmax()
-{
- int Error = 0;
-
- T const B = static_cast<T>(1);
- T const N = static_cast<T>(GLM_NAN(T));
- Error += glm::equal(glm::fmax(N, B), B, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::fmax(B, N), B, glm::epsilon<T>()) ? 0 : 1;
-
- T const C = static_cast<T>(2);
- Error += glm::equal(glm::fmax(N, B, C), C, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::fmax(B, N, C), C, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::fmax(C, N, B), C, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::fmax(C, B, N), C, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::fmax(B, C, N), C, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::fmax(N, C, B), C, glm::epsilon<T>()) ? 0 : 1;
-
- T const D = static_cast<T>(3);
- Error += glm::equal(glm::fmax(D, N, B, C), D, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::fmax(B, D, N, C), D, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::fmax(C, N, D, B), D, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::fmax(C, B, D, N), D, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::fmax(B, C, N, D), D, glm::epsilon<T>()) ? 0 : 1;
- Error += glm::equal(glm::fmax(N, C, B, D), D, glm::epsilon<T>()) ? 0 : 1;
-
- return Error;
-}
-
-static int test_clamp()
-{
- int Error = 0;
-
- float A = glm::clamp(0.5f);
- Error += glm::equal(A, 0.5f, 0.00001f) ? 0 : 1;
-
- float B = glm::clamp(0.0f);
- Error += glm::equal(B, 0.0f, 0.00001f) ? 0 : 1;
-
- float C = glm::clamp(1.0f);
- Error += glm::equal(C, 1.0f, 0.00001f) ? 0 : 1;
-
- float D = glm::clamp(-0.5f);
- Error += glm::equal(D, 0.0f, 0.00001f) ? 0 : 1;
-
- float E = glm::clamp(1.5f);
- Error += glm::equal(E, 1.0f, 0.00001f) ? 0 : 1;
-
- return Error;
-}
-
-static int test_repeat()
-{
- int Error = 0;
-
- float A = glm::repeat(0.5f);
- Error += glm::equal(A, 0.5f, 0.00001f) ? 0 : 1;
-
- float B = glm::repeat(0.0f);
- Error += glm::equal(B, 0.0f, 0.00001f) ? 0 : 1;
-
- float C = glm::repeat(1.0f);
- Error += glm::equal(C, 0.0f, 0.00001f) ? 0 : 1;
-
- float D = glm::repeat(-0.5f);
- Error += glm::equal(D, 0.5f, 0.00001f) ? 0 : 1;
-
- float E = glm::repeat(1.5f);
- Error += glm::equal(E, 0.5f, 0.00001f) ? 0 : 1;
-
- float F = glm::repeat(0.9f);
- Error += glm::equal(F, 0.9f, 0.00001f) ? 0 : 1;
-
- return Error;
-}
-
-static int test_mirrorClamp()
-{
- int Error = 0;
-
- float A = glm::mirrorClamp(0.5f);
- Error += glm::equal(A, 0.5f, 0.00001f) ? 0 : 1;
-
- float B = glm::mirrorClamp(0.0f);
- Error += glm::equal(B, 0.0f, 0.00001f) ? 0 : 1;
-
- float C = glm::mirrorClamp(1.1f);
- Error += glm::equal(C, 0.1f, 0.00001f) ? 0 : 1;
-
- float D = glm::mirrorClamp(-0.5f);
- Error += glm::equal(D, 0.5f, 0.00001f) ? 0 : 1;
-
- float E = glm::mirrorClamp(1.5f);
- Error += glm::equal(E, 0.5f, 0.00001f) ? 0 : 1;
-
- float F = glm::mirrorClamp(0.9f);
- Error += glm::equal(F, 0.9f, 0.00001f) ? 0 : 1;
-
- float G = glm::mirrorClamp(3.1f);
- Error += glm::equal(G, 0.1f, 0.00001f) ? 0 : 1;
-
- float H = glm::mirrorClamp(-3.1f);
- Error += glm::equal(H, 0.1f, 0.00001f) ? 0 : 1;
-
- float I = glm::mirrorClamp(-0.9f);
- Error += glm::equal(I, 0.9f, 0.00001f) ? 0 : 1;
-
- return Error;
-}
-
-static int test_mirrorRepeat()
-{
- int Error = 0;
-
- float A = glm::mirrorRepeat(0.5f);
- Error += glm::equal(A, 0.5f, 0.00001f) ? 0 : 1;
-
- float B = glm::mirrorRepeat(0.0f);
- Error += glm::equal(B, 0.0f, 0.00001f) ? 0 : 1;
-
- float C = glm::mirrorRepeat(1.0f);
- Error += glm::equal(C, 1.0f, 0.00001f) ? 0 : 1;
-
- float D = glm::mirrorRepeat(-0.5f);
- Error += glm::equal(D, 0.5f, 0.00001f) ? 0 : 1;
-
- float E = glm::mirrorRepeat(1.5f);
- Error += glm::equal(E, 0.5f, 0.00001f) ? 0 : 1;
-
- float F = glm::mirrorRepeat(0.9f);
- Error += glm::equal(F, 0.9f, 0.00001f) ? 0 : 1;
-
- float G = glm::mirrorRepeat(3.0f);
- Error += glm::equal(G, 1.0f, 0.00001f) ? 0 : 1;
-
- float H = glm::mirrorRepeat(-3.0f);
- Error += glm::equal(H, 1.0f, 0.00001f) ? 0 : 1;
-
- float I = glm::mirrorRepeat(-1.0f);
- Error += glm::equal(I, 1.0f, 0.00001f) ? 0 : 1;
-
- return Error;
-}
-
-static int test_iround()
-{
- int Error = 0;
-
- for(float f = 0.0f; f < 3.1f; f += 0.05f)
- {
- int RoundFast = static_cast<int>(glm::iround(f));
- int RoundSTD = static_cast<int>(glm::round(f));
- Error += RoundFast == RoundSTD ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-static int test_uround()
-{
- int Error = 0;
-
- for(float f = 0.0f; f < 3.1f; f += 0.05f)
- {
- int RoundFast = static_cast<int>(glm::uround(f));
- int RoundSTD = static_cast<int>(glm::round(f));
- Error += RoundFast == RoundSTD ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_min<float>();
- Error += test_min<double>();
- Error += test_min_nan<float>();
- Error += test_min_nan<double>();
-
- Error += test_max<float>();
- Error += test_max<double>();
- Error += test_max_nan<float>();
- Error += test_max_nan<double>();
-
- Error += test_fmin<float>();
- Error += test_fmin<double>();
-
- Error += test_fmax<float>();
- Error += test_fmax<double>();
-
- Error += test_clamp();
- Error += test_repeat();
- Error += test_mirrorClamp();
- Error += test_mirrorRepeat();
-
- Error += test_iround();
- Error += test_uround();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_scalar_constants.cpp b/3rdparty/glm/source/test/ext/ext_scalar_constants.cpp
deleted file mode 100644
index 3af7099..0000000
--- a/3rdparty/glm/source/test/ext/ext_scalar_constants.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <glm/ext/scalar_constants.hpp>
-
-template <typename valType>
-static int test_epsilon()
-{
- int Error = 0;
-
- valType const Test = glm::epsilon<valType>();
- Error += Test > static_cast<valType>(0) ? 0 : 1;
-
- return Error;
-}
-
-template <typename valType>
-static int test_pi()
-{
- int Error = 0;
-
- valType const Test = glm::pi<valType>();
- Error += Test > static_cast<valType>(3.14) ? 0 : 1;
- Error += Test < static_cast<valType>(3.15) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_epsilon<float>();
- Error += test_epsilon<double>();
- Error += test_pi<float>();
- Error += test_pi<double>();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_scalar_int_sized.cpp b/3rdparty/glm/source/test/ext/ext_scalar_int_sized.cpp
deleted file mode 100644
index b55c6ca..0000000
--- a/3rdparty/glm/source/test/ext/ext_scalar_int_sized.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-#include <glm/ext/scalar_int_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
- static_assert(sizeof(glm::int8) == 1, "int8 size isn't 1 byte on this platform");
- static_assert(sizeof(glm::int16) == 2, "int16 size isn't 2 bytes on this platform");
- static_assert(sizeof(glm::int32) == 4, "int32 size isn't 4 bytes on this platform");
- static_assert(sizeof(glm::int64) == 8, "int64 size isn't 8 bytes on this platform");
- static_assert(sizeof(glm::int16) == sizeof(short), "signed short size isn't 4 bytes on this platform");
- static_assert(sizeof(glm::int32) == sizeof(int), "signed int size isn't 4 bytes on this platform");
-#endif
-
-static int test_size()
-{
- int Error = 0;
-
- Error += sizeof(glm::int8) == 1 ? 0 : 1;
- Error += sizeof(glm::int16) == 2 ? 0 : 1;
- Error += sizeof(glm::int32) == 4 ? 0 : 1;
- Error += sizeof(glm::int64) == 8 ? 0 : 1;
-
- return Error;
-}
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::int8) < sizeof(glm::int16) ? 0 : 1;
- Error += sizeof(glm::int16) < sizeof(glm::int32) ? 0 : 1;
- Error += sizeof(glm::int32) < sizeof(glm::int64) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_size();
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_scalar_integer.cpp b/3rdparty/glm/source/test/ext/ext_scalar_integer.cpp
deleted file mode 100644
index f169e8a..0000000
--- a/3rdparty/glm/source/test/ext/ext_scalar_integer.cpp
+++ /dev/null
@@ -1,686 +0,0 @@
-#include <glm/ext/scalar_integer.hpp>
-#include <glm/ext/scalar_int_sized.hpp>
-#include <glm/ext/scalar_uint_sized.hpp>
-#include <vector>
-#include <ctime>
-#include <cstdio>
-
-#if GLM_LANG & GLM_LANG_CXX11_FLAG
-#include <chrono>
-
-namespace isPowerOfTwo
-{
- template<typename genType>
- struct type
- {
- genType Value;
- bool Return;
- };
-
- int test_int16()
- {
- type<glm::int16> const Data[] =
- {
- {0x0001, true},
- {0x0002, true},
- {0x0004, true},
- {0x0080, true},
- {0x0000, true},
- {0x0003, false}
- };
-
- int Error = 0;
-
- for(std::size_t i = 0, n = sizeof(Data) / sizeof(type<glm::int16>); i < n; ++i)
- {
- bool Result = glm::isPowerOfTwo(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- return Error;
- }
-
- int test_uint16()
- {
- type<glm::uint16> const Data[] =
- {
- {0x0001, true},
- {0x0002, true},
- {0x0004, true},
- {0x0000, true},
- {0x0000, true},
- {0x0003, false}
- };
-
- int Error = 0;
-
- for(std::size_t i = 0, n = sizeof(Data) / sizeof(type<glm::uint16>); i < n; ++i)
- {
- bool Result = glm::isPowerOfTwo(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- return Error;
- }
-
- int test_int32()
- {
- type<int> const Data[] =
- {
- {0x00000001, true},
- {0x00000002, true},
- {0x00000004, true},
- {0x0000000f, false},
- {0x00000000, true},
- {0x00000003, false}
- };
-
- int Error = 0;
-
- for(std::size_t i = 0, n = sizeof(Data) / sizeof(type<int>); i < n; ++i)
- {
- bool Result = glm::isPowerOfTwo(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- return Error;
- }
-
- int test_uint32()
- {
- type<glm::uint> const Data[] =
- {
- {0x00000001, true},
- {0x00000002, true},
- {0x00000004, true},
- {0x80000000, true},
- {0x00000000, true},
- {0x00000003, false}
- };
-
- int Error = 0;
-
- for(std::size_t i = 0, n = sizeof(Data) / sizeof(type<glm::uint>); i < n; ++i)
- {
- bool Result = glm::isPowerOfTwo(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- return Error;
- }
-
- int test()
- {
- int Error = 0;
-
- Error += test_int16();
- Error += test_uint16();
- Error += test_int32();
- Error += test_uint32();
-
- return Error;
- }
-}//isPowerOfTwo
-
-namespace nextPowerOfTwo_advanced
-{
- template<typename genIUType>
- GLM_FUNC_QUALIFIER genIUType highestBitValue(genIUType Value)
- {
- genIUType tmp = Value;
- genIUType result = genIUType(0);
- while(tmp)
- {
- result = (tmp & (~tmp + 1)); // grab lowest bit
- tmp &= ~result; // clear lowest bit
- }
- return result;
- }
-
- template<typename genType>
- GLM_FUNC_QUALIFIER genType nextPowerOfTwo_loop(genType value)
- {
- return glm::isPowerOfTwo(value) ? value : highestBitValue(value) << 1;
- }
-
- template<typename genType>
- struct type
- {
- genType Value;
- genType Return;
- };
-
- int test_int32()
- {
- type<glm::int32> const Data[] =
- {
- {0x0000ffff, 0x00010000},
- {-3, -4},
- {-8, -8},
- {0x00000001, 0x00000001},
- {0x00000002, 0x00000002},
- {0x00000004, 0x00000004},
- {0x00000007, 0x00000008},
- {0x0000fff0, 0x00010000},
- {0x0000f000, 0x00010000},
- {0x08000000, 0x08000000},
- {0x00000000, 0x00000000},
- {0x00000003, 0x00000004}
- };
-
- int Error(0);
-
- for(std::size_t i = 0, n = sizeof(Data) / sizeof(type<glm::int32>); i < n; ++i)
- {
- glm::int32 Result = glm::nextPowerOfTwo(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- return Error;
- }
-
- int test_uint32()
- {
- type<glm::uint32> const Data[] =
- {
- {0x00000001, 0x00000001},
- {0x00000002, 0x00000002},
- {0x00000004, 0x00000004},
- {0x00000007, 0x00000008},
- {0x0000ffff, 0x00010000},
- {0x0000fff0, 0x00010000},
- {0x0000f000, 0x00010000},
- {0x80000000, 0x80000000},
- {0x00000000, 0x00000000},
- {0x00000003, 0x00000004}
- };
-
- int Error(0);
-
- for(std::size_t i = 0, n = sizeof(Data) / sizeof(type<glm::uint32>); i < n; ++i)
- {
- glm::uint32 Result = glm::nextPowerOfTwo(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- return Error;
- }
-
- int perf()
- {
- int Error(0);
-
- std::vector<glm::uint> v;
- v.resize(100000000);
-
- std::clock_t Timestramp0 = std::clock();
-
- for(glm::uint32 i = 0, n = static_cast<glm::uint>(v.size()); i < n; ++i)
- v[i] = nextPowerOfTwo_loop(i);
-
- std::clock_t Timestramp1 = std::clock();
-
- for(glm::uint32 i = 0, n = static_cast<glm::uint>(v.size()); i < n; ++i)
- v[i] = glm::nextPowerOfTwo(i);
-
- std::clock_t Timestramp2 = std::clock();
-
- std::printf("nextPowerOfTwo_loop: %d clocks\n", static_cast<int>(Timestramp1 - Timestramp0));
- std::printf("glm::nextPowerOfTwo: %d clocks\n", static_cast<int>(Timestramp2 - Timestramp1));
-
- return Error;
- }
-
- int test()
- {
- int Error(0);
-
- Error += test_int32();
- Error += test_uint32();
-
- return Error;
- }
-}//namespace nextPowerOfTwo_advanced
-
-namespace prevPowerOfTwo
-{
- template <typename T>
- int run()
- {
- int Error = 0;
-
- T const A = glm::prevPowerOfTwo(static_cast<T>(7));
- Error += A == static_cast<T>(4) ? 0 : 1;
-
- T const B = glm::prevPowerOfTwo(static_cast<T>(15));
- Error += B == static_cast<T>(8) ? 0 : 1;
-
- T const C = glm::prevPowerOfTwo(static_cast<T>(31));
- Error += C == static_cast<T>(16) ? 0 : 1;
-
- T const D = glm::prevPowerOfTwo(static_cast<T>(32));
- Error += D == static_cast<T>(32) ? 0 : 1;
-
- return Error;
- }
-
- int test()
- {
- int Error = 0;
-
- Error += run<glm::int8>();
- Error += run<glm::int16>();
- Error += run<glm::int32>();
- Error += run<glm::int64>();
-
- Error += run<glm::uint8>();
- Error += run<glm::uint16>();
- Error += run<glm::uint32>();
- Error += run<glm::uint64>();
-
- return Error;
- }
-}//namespace prevPowerOfTwo
-
-namespace nextPowerOfTwo
-{
- template <typename T>
- int run()
- {
- int Error = 0;
-
- T const A = glm::nextPowerOfTwo(static_cast<T>(7));
- Error += A == static_cast<T>(8) ? 0 : 1;
-
- T const B = glm::nextPowerOfTwo(static_cast<T>(15));
- Error += B == static_cast<T>(16) ? 0 : 1;
-
- T const C = glm::nextPowerOfTwo(static_cast<T>(31));
- Error += C == static_cast<T>(32) ? 0 : 1;
-
- T const D = glm::nextPowerOfTwo(static_cast<T>(32));
- Error += D == static_cast<T>(32) ? 0 : 1;
-
- return Error;
- }
-
- int test()
- {
- int Error = 0;
-
- Error += run<glm::int8>();
- Error += run<glm::int16>();
- Error += run<glm::int32>();
- Error += run<glm::int64>();
-
- Error += run<glm::uint8>();
- Error += run<glm::uint16>();
- Error += run<glm::uint32>();
- Error += run<glm::uint64>();
-
- return Error;
- }
-}//namespace nextPowerOfTwo
-
-namespace prevMultiple
-{
- template<typename genIUType>
- struct type
- {
- genIUType Source;
- genIUType Multiple;
- genIUType Return;
- };
-
- template <typename T>
- int run()
- {
- type<T> const Data[] =
- {
- {8, 3, 6},
- {7, 7, 7}
- };
-
- int Error = 0;
-
- for(std::size_t i = 0, n = sizeof(Data) / sizeof(type<T>); i < n; ++i)
- {
- T const Result = glm::prevMultiple(Data[i].Source, Data[i].Multiple);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- return Error;
- }
-
- int test()
- {
- int Error = 0;
-
- Error += run<glm::int8>();
- Error += run<glm::int16>();
- Error += run<glm::int32>();
- Error += run<glm::int64>();
-
- Error += run<glm::uint8>();
- Error += run<glm::uint16>();
- Error += run<glm::uint32>();
- Error += run<glm::uint64>();
-
- return Error;
- }
-}//namespace prevMultiple
-
-namespace nextMultiple
-{
- static glm::uint const Multiples = 128;
-
- int perf_nextMultiple(glm::uint Samples)
- {
- std::vector<glm::uint> Results(Samples * Multiples);
-
- std::chrono::high_resolution_clock::time_point t0 = std::chrono::high_resolution_clock::now();
-
- for(glm::uint Source = 0; Source < Samples; ++Source)
- for(glm::uint Multiple = 0; Multiple < Multiples; ++Multiple)
- {
- Results[Source * Multiples + Multiple] = glm::nextMultiple(Source, Multiples);
- }
-
- std::chrono::high_resolution_clock::time_point t1 = std::chrono::high_resolution_clock::now();
-
- std::printf("- glm::nextMultiple Time %d microseconds\n", static_cast<int>(std::chrono::duration_cast<std::chrono::microseconds>(t1 - t0).count()));
-
- glm::uint Result = 0;
- for(std::size_t i = 0, n = Results.size(); i < n; ++i)
- Result += Results[i];
-
- return Result > 0 ? 0 : 1;
- }
-
- template <typename T>
- GLM_FUNC_QUALIFIER T nextMultipleMod(T Source, T Multiple)
- {
- T const Tmp = Source - static_cast<T>(1);
- return Tmp + (Multiple - (Tmp % Multiple));
- }
-
- int perf_nextMultipleMod(glm::uint Samples)
- {
- std::vector<glm::uint> Results(Samples * Multiples);
-
- std::chrono::high_resolution_clock::time_point t0 = std::chrono::high_resolution_clock::now();
-
- for(glm::uint Multiple = 0; Multiple < Multiples; ++Multiple)
- for (glm::uint Source = 0; Source < Samples; ++Source)
- {
- Results[Source * Multiples + Multiple] = nextMultipleMod(Source, Multiples);
- }
-
- std::chrono::high_resolution_clock::time_point t1 = std::chrono::high_resolution_clock::now();
-
- std::printf("- nextMultipleMod Time %d microseconds\n", static_cast<int>(std::chrono::duration_cast<std::chrono::microseconds>(t1 - t0).count()));
-
- glm::uint Result = 0;
- for(std::size_t i = 0, n = Results.size(); i < n; ++i)
- Result += Results[i];
-
- return Result > 0 ? 0 : 1;
- }
-
- template <typename T>
- GLM_FUNC_QUALIFIER T nextMultipleNeg(T Source, T Multiple)
- {
- if(Source > static_cast<T>(0))
- {
- T const Tmp = Source - static_cast<T>(1);
- return Tmp + (Multiple - (Tmp % Multiple));
- }
- else
- return Source + (-Source % Multiple);
- }
-
- int perf_nextMultipleNeg(glm::uint Samples)
- {
- std::vector<glm::uint> Results(Samples * Multiples);
-
- std::chrono::high_resolution_clock::time_point t0 = std::chrono::high_resolution_clock::now();
-
- for(glm::uint Source = 0; Source < Samples; ++Source)
- for(glm::uint Multiple = 0; Multiple < Multiples; ++Multiple)
- {
- Results[Source * Multiples + Multiple] = nextMultipleNeg(Source, Multiples);
- }
-
- std::chrono::high_resolution_clock::time_point t1 = std::chrono::high_resolution_clock::now();
-
- std::printf("- nextMultipleNeg Time %d microseconds\n", static_cast<int>(std::chrono::duration_cast<std::chrono::microseconds>(t1 - t0).count()));
-
- glm::uint Result = 0;
- for (std::size_t i = 0, n = Results.size(); i < n; ++i)
- Result += Results[i];
-
- return Result > 0 ? 0 : 1;
- }
-
- template <typename T>
- GLM_FUNC_QUALIFIER T nextMultipleUFloat(T Source, T Multiple)
- {
- return Source + (Multiple - std::fmod(Source, Multiple));
- }
-
- int perf_nextMultipleUFloat(glm::uint Samples)
- {
- std::vector<float> Results(Samples * Multiples);
-
- std::chrono::high_resolution_clock::time_point t0 = std::chrono::high_resolution_clock::now();
-
- for(glm::uint Source = 0; Source < Samples; ++Source)
- for(glm::uint Multiple = 0; Multiple < Multiples; ++Multiple)
- {
- Results[Source * Multiples + Multiple] = nextMultipleUFloat(static_cast<float>(Source), static_cast<float>(Multiples));
- }
-
- std::chrono::high_resolution_clock::time_point t1 = std::chrono::high_resolution_clock::now();
-
- std::printf("- nextMultipleUFloat Time %d microseconds\n", static_cast<int>(std::chrono::duration_cast<std::chrono::microseconds>(t1 - t0).count()));
-
- float Result = 0;
- for (std::size_t i = 0, n = Results.size(); i < n; ++i)
- Result += Results[i];
-
- return Result > 0.0f ? 0 : 1;
- }
-
- template <typename T>
- GLM_FUNC_QUALIFIER T nextMultipleFloat(T Source, T Multiple)
- {
- if(Source > static_cast<float>(0))
- return Source + (Multiple - std::fmod(Source, Multiple));
- else
- return Source + std::fmod(-Source, Multiple);
- }
-
- int perf_nextMultipleFloat(glm::uint Samples)
- {
- std::vector<float> Results(Samples * Multiples);
-
- std::chrono::high_resolution_clock::time_point t0 = std::chrono::high_resolution_clock::now();
-
- for(glm::uint Source = 0; Source < Samples; ++Source)
- for(glm::uint Multiple = 0; Multiple < Multiples; ++Multiple)
- {
- Results[Source * Multiples + Multiple] = nextMultipleFloat(static_cast<float>(Source), static_cast<float>(Multiples));
- }
-
- std::chrono::high_resolution_clock::time_point t1 = std::chrono::high_resolution_clock::now();
-
- std::printf("- nextMultipleFloat Time %d microseconds\n", static_cast<int>(std::chrono::duration_cast<std::chrono::microseconds>(t1 - t0).count()));
-
- float Result = 0;
- for (std::size_t i = 0, n = Results.size(); i < n; ++i)
- Result += Results[i];
-
- return Result > 0.0f ? 0 : 1;
- }
-
- template<typename genIUType>
- struct type
- {
- genIUType Source;
- genIUType Multiple;
- genIUType Return;
- };
-
- template <typename T>
- int test_uint()
- {
- type<T> const Data[] =
- {
- { 3, 4, 4 },
- { 6, 3, 6 },
- { 5, 3, 6 },
- { 7, 7, 7 },
- { 0, 1, 0 },
- { 8, 3, 9 }
- };
-
- int Error = 0;
-
- for(std::size_t i = 0, n = sizeof(Data) / sizeof(type<T>); i < n; ++i)
- {
- T const Result0 = glm::nextMultiple(Data[i].Source, Data[i].Multiple);
- Error += Data[i].Return == Result0 ? 0 : 1;
- assert(!Error);
-
- T const Result1 = nextMultipleMod(Data[i].Source, Data[i].Multiple);
- Error += Data[i].Return == Result1 ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
- }
-
- int perf()
- {
- int Error = 0;
-
- glm::uint const Samples = 10000;
-
- for(int i = 0; i < 4; ++i)
- {
- std::printf("Run %d :\n", i);
- Error += perf_nextMultiple(Samples);
- Error += perf_nextMultipleMod(Samples);
- Error += perf_nextMultipleNeg(Samples);
- Error += perf_nextMultipleUFloat(Samples);
- Error += perf_nextMultipleFloat(Samples);
- std::printf("\n");
- }
-
- return Error;
- }
-
- int test()
- {
- int Error = 0;
-
- Error += test_uint<glm::int8>();
- Error += test_uint<glm::int16>();
- Error += test_uint<glm::int32>();
- Error += test_uint<glm::int64>();
-
- Error += test_uint<glm::uint8>();
- Error += test_uint<glm::uint16>();
- Error += test_uint<glm::uint32>();
- Error += test_uint<glm::uint64>();
-
- return Error;
- }
-}//namespace nextMultiple
-
-namespace findNSB
-{
- template<typename T>
- struct type
- {
- T Source;
- int SignificantBitCount;
- int Return;
- };
-
- template <typename T>
- int run()
- {
- type<T> const Data[] =
- {
- { 0x00, 1,-1 },
- { 0x01, 2,-1 },
- { 0x02, 2,-1 },
- { 0x06, 3,-1 },
- { 0x01, 1, 0 },
- { 0x03, 1, 0 },
- { 0x03, 2, 1 },
- { 0x07, 2, 1 },
- { 0x05, 2, 2 },
- { 0x0D, 2, 2 }
- };
-
- int Error = 0;
-
- for (std::size_t i = 0, n = sizeof(Data) / sizeof(type<T>); i < n; ++i)
- {
- int const Result0 = glm::findNSB(Data[i].Source, Data[i].SignificantBitCount);
- Error += Data[i].Return == Result0 ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
- }
-
- int test()
- {
- int Error = 0;
-
- Error += run<glm::uint8>();
- Error += run<glm::uint16>();
- Error += run<glm::uint32>();
- Error += run<glm::uint64>();
-
- Error += run<glm::int8>();
- Error += run<glm::int16>();
- Error += run<glm::int32>();
- Error += run<glm::int64>();
-
- return Error;
- }
-}//namespace findNSB
-
-int main()
-{
- int Error = 0;
-
- Error += findNSB::test();
-
- Error += isPowerOfTwo::test();
- Error += prevPowerOfTwo::test();
- Error += nextPowerOfTwo::test();
- Error += nextPowerOfTwo_advanced::test();
- Error += prevMultiple::test();
- Error += nextMultiple::test();
-
-# ifdef NDEBUG
- Error += nextPowerOfTwo_advanced::perf();
- Error += nextMultiple::perf();
-# endif//NDEBUG
-
- return Error;
-}
-
-#else
-
-int main()
-{
- return 0;
-}
-
-#endif
diff --git a/3rdparty/glm/source/test/ext/ext_scalar_packing.cpp b/3rdparty/glm/source/test/ext/ext_scalar_packing.cpp
deleted file mode 100644
index 77616e3..0000000
--- a/3rdparty/glm/source/test/ext/ext_scalar_packing.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <glm/ext/scalar_packing.hpp>
-#include <glm/ext/scalar_relational.hpp>
-
-int test_packUnorm()
-{
- int Error = 0;
-
-
- return Error;
-}
-
-int test_packSnorm()
-{
- int Error = 0;
-
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_packUnorm();
- Error += test_packSnorm();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_scalar_reciprocal.cpp b/3rdparty/glm/source/test/ext/ext_scalar_reciprocal.cpp
deleted file mode 100644
index ebba10d..0000000
--- a/3rdparty/glm/source/test/ext/ext_scalar_reciprocal.cpp
+++ /dev/null
@@ -1,171 +0,0 @@
-#include <glm/ext/scalar_reciprocal.hpp>
-#include <glm/ext/scalar_relational.hpp>
-#include <glm/ext/scalar_constants.hpp>
-
-static int test_sec()
-{
- int Error = 0;
-
- Error += glm::equal(glm::sec(0.0), 1.0, 0.01) ? 0 : 1;
- Error += glm::equal(glm::sec(glm::pi<double>() * 2.0), 1.0, 0.01) ? 0 : 1;
- Error += glm::equal(glm::sec(glm::pi<double>() * -2.0), 1.0, 0.01) ? 0 : 1;
- Error += glm::equal(glm::sec(glm::pi<double>() * 1.0), -1.0, 0.01) ? 0 : 1;
- Error += glm::equal(glm::sec(glm::pi<double>() * -1.0), -1.0, 0.01) ? 0 : 1;
-
- return Error;
-}
-
-static int test_csc()
-{
- int Error = 0;
-
- double const a = glm::csc(glm::pi<double>() * 0.5);
- Error += glm::equal(a, 1.0, 0.01) ? 0 : 1;
- double const b = glm::csc(glm::pi<double>() * -0.5);
- Error += glm::equal(b, -1.0, 0.01) ? 0 : 1;
-
- return Error;
-}
-
-static int test_cot()
-{
- int Error = 0;
-
- double const a = glm::cot(glm::pi<double>() * 0.5);
- Error += glm::equal(a, 0.0, 0.01) ? 0 : 1;
- double const b = glm::cot(glm::pi<double>() * -0.5);
- Error += glm::equal(b, 0.0, 0.01) ? 0 : 1;
-
- return Error;
-}
-
-static int test_asec()
-{
- int Error = 0;
-
- Error += glm::equal(glm::asec(100000.0), glm::pi<double>() * 0.5, 0.01) ? 0 : 1;
- Error += glm::equal(glm::asec(-100000.0), glm::pi<double>() * 0.5, 0.01) ? 0 : 1;
-
- return Error;
-}
-
-static int test_acsc()
-{
- int Error = 0;
-
- Error += glm::equal(glm::acsc(100000.0), 0.0, 0.01) ? 0 : 1;
- Error += glm::equal(glm::acsc(-100000.0), 0.0, 0.01) ? 0 : 1;
-
- return Error;
-}
-
-static int test_acot()
-{
- int Error = 0;
-
- Error += glm::equal(glm::acot(100000.0), 0.0, 0.01) ? 0 : 1;
- Error += glm::equal(glm::acot(-100000.0), glm::pi<double>(), 0.01) ? 0 : 1;
- Error += glm::equal(glm::acot(0.0), glm::pi<double>() * 0.5, 0.01) ? 0 : 1;
-
- return Error;
-}
-
-static int test_sech()
-{
- int Error = 0;
-
- Error += glm::equal(glm::sech(100000.0), 0.0, 0.01) ? 0 : 1;
- Error += glm::equal(glm::sech(-100000.0), 0.0, 0.01) ? 0 : 1;
- Error += glm::equal(glm::sech(0.0), 1.0, 0.01) ? 0 : 1;
-
- return Error;
-}
-
-static int test_csch()
-{
- int Error = 0;
-
- Error += glm::equal(glm::csch(100000.0), 0.0, 0.01) ? 0 : 1;
- Error += glm::equal(glm::csch(-100000.0), 0.0, 0.01) ? 0 : 1;
-
- return Error;
-}
-
-static int test_coth()
-{
- int Error = 0;
-
- double const a = glm::coth(100.0);
- Error += glm::equal(a, 1.0, 0.01) ? 0 : 1;
-
- double const b = glm::coth(-100.0);
- Error += glm::equal(b, -1.0, 0.01) ? 0 : 1;
-
- return Error;
-}
-
-static int test_asech()
-{
- int Error = 0;
-
- double const a = glm::asech(1.0);
- Error += glm::equal(a, 0.0, 0.01) ? 0 : 1;
-
- return Error;
-}
-
-static int test_acsch()
-{
- int Error = 0;
-
- Error += glm::acsch(0.01) > 1.0 ? 0 : 1;
- Error += glm::acsch(-0.01) < -1.0 ? 0 : 1;
-
- Error += glm::equal(glm::acsch(100.0), 0.0, 0.01) ? 0 : 1;
- Error += glm::equal(glm::acsch(-100.0), 0.0, 0.01) ? 0 : 1;
-
- return Error;
-}
-
-static int test_acoth()
-{
- int Error = 0;
-
- double const a = glm::acoth(1.00001);
- Error += a > 6.0 ? 0 : 1;
-
- double const b = glm::acoth(-1.00001);
- Error += b < -6.0 ? 0 : 1;
-
- double const c = glm::acoth(10000.0);
- Error += glm::equal(c, 0.0, 0.01) ? 0 : 1;
-
- double const d = glm::acoth(-10000.0);
- Error += glm::equal(d, 0.0, 0.01) ? 0 : 1;
-
- return Error;
-}
-
-
-int main()
-{
- int Error = 0;
-
- Error += test_sec();
- Error += test_csc();
- Error += test_cot();
-
- Error += test_asec();
- Error += test_acsc();
- Error += test_acot();
-
- Error += test_sech();
- Error += test_csch();
- Error += test_coth();
-
- Error += test_asech();
- Error += test_acsch();
- Error += test_acoth();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_scalar_relational.cpp b/3rdparty/glm/source/test/ext/ext_scalar_relational.cpp
deleted file mode 100644
index 61f1999..0000000
--- a/3rdparty/glm/source/test/ext/ext_scalar_relational.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-#include <glm/ext/scalar_relational.hpp>
-#include <glm/ext/scalar_integer.hpp>
-#include <glm/ext/scalar_ulp.hpp>
-#include <cmath>
-
-static int test_equal_epsilon()
-{
-# if GLM_CONFIG_CONSTEXP == GLM_ENABLE
- static_assert(glm::equal(1.01f, 1.02f, 0.1f), "GLM: Failed constexpr");
- static_assert(!glm::equal(1.01f, 1.02f, 0.001f), "GLM: Failed constexpr");
-# endif
-
- int Error = 0;
-
- Error += glm::equal(1.01f, 1.02f, 0.1f) ? 0 : 1;
- Error += !glm::equal(1.01f, 1.02f, 0.001f) ? 0 : 1;
-
- return Error;
-}
-
-static int test_notEqual_epsilon()
-{
-# if GLM_CONFIG_CONSTEXP == GLM_ENABLE
- static_assert(glm::notEqual(1.01f, 1.02f, 0.001f), "GLM: Failed constexpr");
- static_assert(!glm::notEqual(1.01f, 1.02f, 0.1f), "GLM: Failed constexpr");
-# endif
-
- int Error = 0;
-
- Error += glm::notEqual(1.01f, 1.02f, 0.001f) ? 0 : 1;
- Error += !glm::notEqual(1.01f, 1.02f, 0.1f) ? 0 : 1;
-
- return Error;
-}
-
-static int test_equal_ulps()
-{
- int Error = 0;
-
- float const ULP1Plus = glm::nextFloat(1.0f);
- Error += glm::equal(1.0f, ULP1Plus, 1) ? 0 : 1;
-
- float const ULP2Plus = glm::nextFloat(ULP1Plus);
- Error += !glm::equal(1.0f, ULP2Plus, 1) ? 0 : 1;
-
- float const ULP1Minus = glm::prevFloat(1.0f);
- Error += glm::equal(1.0f, ULP1Minus, 1) ? 0 : 1;
-
- float const ULP2Minus = glm::prevFloat(ULP1Minus);
- Error += !glm::equal(1.0f, ULP2Minus, 1) ? 0 : 1;
-
- return Error;
-}
-
-static int test_notEqual_ulps()
-{
- int Error = 0;
-
- float const ULP1Plus = glm::nextFloat(1.0f);
- Error += !glm::notEqual(1.0f, ULP1Plus, 1) ? 0 : 1;
-
- float const ULP2Plus = glm::nextFloat(ULP1Plus);
- Error += glm::notEqual(1.0f, ULP2Plus, 1) ? 0 : 1;
-
- float const ULP1Minus = glm::prevFloat(1.0f);
- Error += !glm::notEqual(1.0f, ULP1Minus, 1) ? 0 : 1;
-
- float const ULP2Minus = glm::prevFloat(ULP1Minus);
- Error += glm::notEqual(1.0f, ULP2Minus, 1) ? 0 : 1;
-
- return Error;
-}
-
-static int test_equal_sign()
-{
- int Error = 0;
-
- Error += !glm::equal(-0.0f, 0.0f, 2) ? 0 : 1;
- Error += !glm::equal(-0.0, 0.0, 2) ? 0 : 1;
-
- Error += !glm::equal(-1.0f, 2.0f, 2) ? 0 : 1;
- Error += !glm::equal(-1.0, 2.0, 2) ? 0 : 1;
-
- Error += !glm::equal(-0.00001f, 1.00000f, 2) ? 0 : 1;
- Error += !glm::equal(-0.00001, 1.00000, 2) ? 0 : 1;
-
- Error += !glm::equal(-1.0f, 1.0f, 2) ? 0 : 1;
- Error += !glm::equal(-1.0, 1.0, 2) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_equal_epsilon();
- Error += test_notEqual_epsilon();
-
- Error += test_equal_ulps();
- Error += test_notEqual_ulps();
-
- Error += test_equal_sign();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_scalar_uint_sized.cpp b/3rdparty/glm/source/test/ext/ext_scalar_uint_sized.cpp
deleted file mode 100644
index 1122947..0000000
--- a/3rdparty/glm/source/test/ext/ext_scalar_uint_sized.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-#include <glm/ext/scalar_uint_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
- static_assert(sizeof(glm::uint8) == 1, "uint8 size isn't 1 byte on this platform");
- static_assert(sizeof(glm::uint16) == 2, "uint16 size isn't 2 bytes on this platform");
- static_assert(sizeof(glm::uint32) == 4, "uint32 size isn't 4 bytes on this platform");
- static_assert(sizeof(glm::uint64) == 8, "uint64 size isn't 8 bytes on this platform");
- static_assert(sizeof(glm::uint16) == sizeof(unsigned short), "unsigned short size isn't 4 bytes on this platform");
- static_assert(sizeof(glm::uint32) == sizeof(unsigned int), "unsigned int size isn't 4 bytes on this platform");
-#endif
-
-static int test_size()
-{
- int Error = 0;
-
- Error += sizeof(glm::uint8) == 1 ? 0 : 1;
- Error += sizeof(glm::uint16) == 2 ? 0 : 1;
- Error += sizeof(glm::uint32) == 4 ? 0 : 1;
- Error += sizeof(glm::uint64) == 8 ? 0 : 1;
-
- return Error;
-}
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::uint8) < sizeof(glm::uint16) ? 0 : 1;
- Error += sizeof(glm::uint16) < sizeof(glm::uint32) ? 0 : 1;
- Error += sizeof(glm::uint32) < sizeof(glm::uint64) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_size();
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_scalar_ulp.cpp b/3rdparty/glm/source/test/ext/ext_scalar_ulp.cpp
deleted file mode 100644
index a19b774..0000000
--- a/3rdparty/glm/source/test/ext/ext_scalar_ulp.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-#include <glm/ext/scalar_ulp.hpp>
-#include <glm/ext/scalar_relational.hpp>
-
-static int test_ulp_float_dist()
-{
- int Error = 0;
-
- float A = 1.0f;
-
- float B = glm::nextFloat(A);
- Error += glm::notEqual(A, B, 0) ? 0 : 1;
- float C = glm::prevFloat(B);
- Error += glm::equal(A, C, 0) ? 0 : 1;
-
- int D = glm::floatDistance(A, B);
- Error += D == 1 ? 0 : 1;
- int E = glm::floatDistance(A, C);
- Error += E == 0 ? 0 : 1;
-
- return Error;
-}
-
-static int test_ulp_float_step()
-{
- int Error = 0;
-
- float A = 1.0f;
-
- for(int i = 10; i < 1000; i *= 10)
- {
- float B = glm::nextFloat(A, i);
- Error += glm::notEqual(A, B, 0) ? 0 : 1;
- float C = glm::prevFloat(B, i);
- Error += glm::equal(A, C, 0) ? 0 : 1;
-
- int D = glm::floatDistance(A, B);
- Error += D == i ? 0 : 1;
- int E = glm::floatDistance(A, C);
- Error += E == 0 ? 0 : 1;
- }
-
- return Error;
-}
-
-static int test_ulp_double_dist()
-{
- int Error = 0;
-
- double A = 1.0;
-
- double B = glm::nextFloat(A);
- Error += glm::notEqual(A, B, 0) ? 0 : 1;
- double C = glm::prevFloat(B);
- Error += glm::equal(A, C, 0) ? 0 : 1;
-
- glm::int64 const D = glm::floatDistance(A, B);
- Error += D == 1 ? 0 : 1;
- glm::int64 const E = glm::floatDistance(A, C);
- Error += E == 0 ? 0 : 1;
-
- return Error;
-}
-
-static int test_ulp_double_step()
-{
- int Error = 0;
-
- double A = 1.0;
-
- for(int i = 10; i < 1000; i *= 10)
- {
- double B = glm::nextFloat(A, i);
- Error += glm::notEqual(A, B, 0) ? 0 : 1;
- double C = glm::prevFloat(B, i);
- Error += glm::equal(A, C, 0) ? 0 : 1;
-
- glm::int64 const D = glm::floatDistance(A, B);
- Error += D == i ? 0 : 1;
- glm::int64 const E = glm::floatDistance(A, C);
- Error += E == 0 ? 0 : 1;
- }
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_ulp_float_dist();
- Error += test_ulp_float_step();
- Error += test_ulp_double_dist();
- Error += test_ulp_double_step();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_vec1.cpp b/3rdparty/glm/source/test/ext/ext_vec1.cpp
deleted file mode 100644
index fc0b931..0000000
--- a/3rdparty/glm/source/test/ext/ext_vec1.cpp
+++ /dev/null
@@ -1,157 +0,0 @@
-#define GLM_FORCE_SWIZZLE
-#include <glm/vector_relational.hpp>
-#include <glm/gtc/vec1.hpp>
-#include <vector>
-
-static glm::vec1 g1;
-static glm::vec1 g2(1);
-
-static int test_vec1_operators()
-{
- int Error(0);
-
- glm::ivec1 A(1);
- glm::ivec1 B(1);
- {
- bool R = A != B;
- bool S = A == B;
-
- Error += (S && !R) ? 0 : 1;
- }
-
- {
- A *= 1;
- B *= 1;
- A += 1;
- B += 1;
-
- bool R = A != B;
- bool S = A == B;
-
- Error += (S && !R) ? 0 : 1;
- }
-
- return Error;
-}
-
-static int test_vec1_ctor()
-{
- int Error = 0;
-
-# if GLM_HAS_TRIVIAL_QUERIES
- // Error += std::is_trivially_default_constructible<glm::vec1>::value ? 0 : 1;
- // Error += std::is_trivially_copy_assignable<glm::vec1>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::vec1>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::dvec1>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::ivec1>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::uvec1>::value ? 0 : 1;
-
- Error += std::is_copy_constructible<glm::vec1>::value ? 0 : 1;
-# endif
-
-
- {
- glm::ivec1 A = glm::vec1(2.0f);
-
- glm::ivec1 E(glm::dvec1(2.0));
- Error += A == E ? 0 : 1;
-
- glm::ivec1 F(glm::ivec1(2));
- Error += A == F ? 0 : 1;
- }
-
- return Error;
-}
-
-static int test_vec1_size()
-{
- int Error = 0;
-
- Error += sizeof(glm::vec1) == sizeof(glm::mediump_vec1) ? 0 : 1;
- Error += 4 == sizeof(glm::mediump_vec1) ? 0 : 1;
- Error += sizeof(glm::dvec1) == sizeof(glm::highp_dvec1) ? 0 : 1;
- Error += 8 == sizeof(glm::highp_dvec1) ? 0 : 1;
- Error += glm::vec1().length() == 1 ? 0 : 1;
- Error += glm::dvec1().length() == 1 ? 0 : 1;
- Error += glm::vec1::length() == 1 ? 0 : 1;
- Error += glm::dvec1::length() == 1 ? 0 : 1;
-
- GLM_CONSTEXPR std::size_t Length = glm::vec1::length();
- Error += Length == 1 ? 0 : 1;
-
- return Error;
-}
-
-static int test_vec1_operator_increment()
-{
- int Error(0);
-
- glm::ivec1 v0(1);
- glm::ivec1 v1(v0);
- glm::ivec1 v2(v0);
- glm::ivec1 v3 = ++v1;
- glm::ivec1 v4 = v2++;
-
- Error += glm::all(glm::equal(v0, v4)) ? 0 : 1;
- Error += glm::all(glm::equal(v1, v2)) ? 0 : 1;
- Error += glm::all(glm::equal(v1, v3)) ? 0 : 1;
-
- int i0(1);
- int i1(i0);
- int i2(i0);
- int i3 = ++i1;
- int i4 = i2++;
-
- Error += i0 == i4 ? 0 : 1;
- Error += i1 == i2 ? 0 : 1;
- Error += i1 == i3 ? 0 : 1;
-
- return Error;
-}
-
-static int test_bvec1_ctor()
-{
- int Error = 0;
-
- glm::bvec1 const A(true);
- glm::bvec1 const B(true);
- glm::bvec1 const C(false);
- glm::bvec1 const D = A && B;
- glm::bvec1 const E = A && C;
- glm::bvec1 const F = A || C;
-
- Error += D == glm::bvec1(true) ? 0 : 1;
- Error += E == glm::bvec1(false) ? 0 : 1;
- Error += F == glm::bvec1(true) ? 0 : 1;
-
- bool const G = A == C;
- bool const H = A != C;
- Error += !G ? 0 : 1;
- Error += H ? 0 : 1;
-
- return Error;
-}
-
-static int test_constexpr()
-{
-#if GLM_HAS_CONSTEXPR
- static_assert(glm::vec1::length() == 1, "GLM: Failed constexpr");
- static_assert(glm::vec1(1.0f).x > 0.0f, "GLM: Failed constexpr");
-#endif
-
- return 0;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_vec1_size();
- Error += test_vec1_ctor();
- Error += test_bvec1_ctor();
- Error += test_vec1_operators();
- Error += test_vec1_operator_increment();
- Error += test_constexpr();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_vector_bool1.cpp b/3rdparty/glm/source/test/ext/ext_vector_bool1.cpp
deleted file mode 100644
index 43eed57..0000000
--- a/3rdparty/glm/source/test/ext/ext_vector_bool1.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-#include <glm/ext/vector_bool1.hpp>
-#include <glm/ext/vector_bool1_precision.hpp>
-
-template <typename genType>
-static int test_operators()
-{
- int Error = 0;
-
- genType const A(true);
- genType const B(true);
- {
- bool const R = A != B;
- bool const S = A == B;
- Error += (S && !R) ? 0 : 1;
- }
-
- return Error;
-}
-
-template <typename genType>
-static int test_ctor()
-{
- int Error = 0;
-
- glm::bvec1 const A = genType(true);
-
- glm::bvec1 const E(genType(true));
- Error += A == E ? 0 : 1;
-
- glm::bvec1 const F(E);
- Error += A == F ? 0 : 1;
-
- return Error;
-}
-
-template <typename genType>
-static int test_size()
-{
- int Error = 0;
-
- Error += sizeof(glm::bvec1) == sizeof(genType) ? 0 : 1;
- Error += genType().length() == 1 ? 0 : 1;
- Error += genType::length() == 1 ? 0 : 1;
-
- return Error;
-}
-
-template <typename genType>
-static int test_relational()
-{
- int Error = 0;
-
- genType const A(true);
- genType const B(true);
- genType const C(false);
-
- Error += A == B ? 0 : 1;
- Error += (A && B) == A ? 0 : 1;
- Error += (A || C) == A ? 0 : 1;
-
- return Error;
-}
-
-template <typename genType>
-static int test_constexpr()
-{
-# if GLM_HAS_CONSTEXPR
- static_assert(genType::length() == 1, "GLM: Failed constexpr");
-# endif
-
- return 0;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_operators<glm::bvec1>();
- Error += test_operators<glm::lowp_bvec1>();
- Error += test_operators<glm::mediump_bvec1>();
- Error += test_operators<glm::highp_bvec1>();
-
- Error += test_ctor<glm::bvec1>();
- Error += test_ctor<glm::lowp_bvec1>();
- Error += test_ctor<glm::mediump_bvec1>();
- Error += test_ctor<glm::highp_bvec1>();
-
- Error += test_size<glm::bvec1>();
- Error += test_size<glm::lowp_bvec1>();
- Error += test_size<glm::mediump_bvec1>();
- Error += test_size<glm::highp_bvec1>();
-
- Error += test_relational<glm::bvec1>();
- Error += test_relational<glm::lowp_bvec1>();
- Error += test_relational<glm::mediump_bvec1>();
- Error += test_relational<glm::highp_bvec1>();
-
- Error += test_constexpr<glm::bvec1>();
- Error += test_constexpr<glm::lowp_bvec1>();
- Error += test_constexpr<glm::mediump_bvec1>();
- Error += test_constexpr<glm::highp_bvec1>();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_vector_common.cpp b/3rdparty/glm/source/test/ext/ext_vector_common.cpp
deleted file mode 100644
index 211003f..0000000
--- a/3rdparty/glm/source/test/ext/ext_vector_common.cpp
+++ /dev/null
@@ -1,365 +0,0 @@
-#include <glm/ext/vector_common.hpp>
-
-#include <glm/ext/vector_bool1.hpp>
-#include <glm/ext/vector_bool1_precision.hpp>
-#include <glm/ext/vector_bool2.hpp>
-#include <glm/ext/vector_bool2_precision.hpp>
-#include <glm/ext/vector_bool3.hpp>
-#include <glm/ext/vector_bool3_precision.hpp>
-#include <glm/ext/vector_bool4.hpp>
-#include <glm/ext/vector_bool4_precision.hpp>
-
-#include <glm/ext/vector_float1.hpp>
-#include <glm/ext/vector_float1_precision.hpp>
-#include <glm/ext/vector_float2.hpp>
-#include <glm/ext/vector_float2_precision.hpp>
-#include <glm/ext/vector_float3.hpp>
-#include <glm/ext/vector_float3_precision.hpp>
-#include <glm/ext/vector_float4.hpp>
-#include <glm/ext/vector_float4_precision.hpp>
-#include <glm/ext/vector_double1.hpp>
-#include <glm/ext/vector_double1_precision.hpp>
-#include <glm/ext/vector_double2.hpp>
-#include <glm/ext/vector_double2_precision.hpp>
-#include <glm/ext/vector_double3.hpp>
-#include <glm/ext/vector_double3_precision.hpp>
-#include <glm/ext/vector_double4.hpp>
-#include <glm/ext/vector_double4_precision.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/scalar_constants.hpp>
-#include <glm/vector_relational.hpp>
-#include <glm/common.hpp>
-
-#if ((GLM_LANG & GLM_LANG_CXX11_FLAG) || (GLM_COMPILER & GLM_COMPILER_VC))
-# define GLM_NAN(T) NAN
-#else
-# define GLM_NAN(T) (static_cast<T>(0.0f) / static_cast<T>(0.0f))
-#endif
-
-template <typename vecType>
-static int test_min()
-{
- typedef typename vecType::value_type T;
-
- int Error = 0;
-
- vecType const N(static_cast<T>(0));
- vecType const B(static_cast<T>(1));
-
- Error += glm::all(glm::equal(glm::min(N, B), N, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::min(B, N), N, glm::epsilon<T>())) ? 0 : 1;
-
- vecType const C(static_cast<T>(2));
- Error += glm::all(glm::equal(glm::min(N, B, C), N, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::min(B, N, C), N, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::min(C, N, B), N, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::min(C, B, N), N, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::min(B, C, N), N, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::min(N, C, B), N, glm::epsilon<T>())) ? 0 : 1;
-
- vecType const D(static_cast<T>(3));
- Error += glm::all(glm::equal(glm::min(D, N, B, C), N, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::min(B, D, N, C), N, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::min(C, N, D, B), N, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::min(C, B, D, N), N, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::min(B, C, N, D), N, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::min(N, C, B, D), N, glm::epsilon<T>())) ? 0 : 1;
-
- return Error;
-}
-
-template <typename vecType>
-static int test_min_nan()
-{
- typedef typename vecType::value_type T;
-
- int Error = 0;
-
- vecType const B(static_cast<T>(1));
- vecType const N(GLM_NAN(T));
-
- Error += glm::all(glm::isnan(glm::min(N, B))) ? 0 : 1;
- Error += !glm::all(glm::isnan(glm::min(B, N))) ? 0 : 1;
-
- vecType const C(static_cast<T>(2));
- Error += glm::all(glm::isnan(glm::min(N, B, C))) ? 0 : 1;
- Error += !glm::all(glm::isnan(glm::min(B, N, C))) ? 0 : 1;
- Error += !glm::all(glm::isnan(glm::min(C, N, B))) ? 0 : 1;
- Error += !glm::all(glm::isnan(glm::min(C, B, N))) ? 0 : 1;
- Error += !glm::all(glm::isnan(glm::min(B, C, N))) ? 0 : 1;
- Error += glm::all(glm::isnan(glm::min(N, C, B))) ? 0 : 1;
-
- vecType const D(static_cast<T>(3));
- Error += !glm::all(glm::isnan(glm::min(D, N, B, C))) ? 0 : 1;
- Error += !glm::all(glm::isnan(glm::min(B, D, N, C))) ? 0 : 1;
- Error += !glm::all(glm::isnan(glm::min(C, N, D, B))) ? 0 : 1;
- Error += !glm::all(glm::isnan(glm::min(C, B, D, N))) ? 0 : 1;
- Error += !glm::all(glm::isnan(glm::min(B, C, N, D))) ? 0 : 1;
- Error += glm::all(glm::isnan(glm::min(N, C, B, D))) ? 0 : 1;
-
- return Error;
-}
-
-template <typename vecType>
-static int test_max()
-{
- typedef typename vecType::value_type T;
-
- int Error = 0;
-
- vecType const N(static_cast<T>(0));
- vecType const B(static_cast<T>(1));
- Error += glm::all(glm::equal(glm::max(N, B), B, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::max(B, N), B, glm::epsilon<T>())) ? 0 : 1;
-
- vecType const C(static_cast<T>(2));
- Error += glm::all(glm::equal(glm::max(N, B, C), C, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::max(B, N, C), C, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::max(C, N, B), C, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::max(C, B, N), C, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::max(B, C, N), C, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::max(N, C, B), C, glm::epsilon<T>())) ? 0 : 1;
-
- vecType const D(static_cast<T>(3));
- Error += glm::all(glm::equal(glm::max(D, N, B, C), D, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::max(B, D, N, C), D, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::max(C, N, D, B), D, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::max(C, B, D, N), D, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::max(B, C, N, D), D, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::max(N, C, B, D), D, glm::epsilon<T>())) ? 0 : 1;
-
- return Error;
-}
-
-template <typename vecType>
-static int test_max_nan()
-{
- typedef typename vecType::value_type T;
-
- int Error = 0;
-
- vecType const B(static_cast<T>(1));
- vecType const N(GLM_NAN(T));
-
- Error += glm::all(glm::isnan(glm::max(N, B))) ? 0 : 1;
- Error += !glm::all(glm::isnan(glm::max(B, N))) ? 0 : 1;
-
- vecType const C(static_cast<T>(2));
- Error += glm::all(glm::isnan(glm::max(N, B, C))) ? 0 : 1;
- Error += !glm::all(glm::isnan(glm::max(B, N, C))) ? 0 : 1;
- Error += !glm::all(glm::isnan(glm::max(C, N, B))) ? 0 : 1;
- Error += !glm::all(glm::isnan(glm::max(C, B, N))) ? 0 : 1;
- Error += !glm::all(glm::isnan(glm::max(B, C, N))) ? 0 : 1;
- Error += glm::all(glm::isnan(glm::max(N, C, B))) ? 0 : 1;
-
- vecType const D(static_cast<T>(3));
- Error += !glm::all(glm::isnan(glm::max(D, N, B, C))) ? 0 : 1;
- Error += !glm::all(glm::isnan(glm::max(B, D, N, C))) ? 0 : 1;
- Error += !glm::all(glm::isnan(glm::max(C, N, D, B))) ? 0 : 1;
- Error += !glm::all(glm::isnan(glm::max(C, B, D, N))) ? 0 : 1;
- Error += !glm::all(glm::isnan(glm::max(B, C, N, D))) ? 0 : 1;
- Error += glm::all(glm::isnan(glm::max(N, C, B, D))) ? 0 : 1;
-
- return Error;
-}
-
-template <typename vecType>
-static int test_fmin()
-{
- typedef typename vecType::value_type T;
-
- int Error = 0;
-
- vecType const B(static_cast<T>(1));
- vecType const N(GLM_NAN(T));
-
- Error += glm::all(glm::equal(glm::fmin(N, B), B, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::fmin(B, N), B, glm::epsilon<T>())) ? 0 : 1;
-
- vecType const C(static_cast<T>(2));
- Error += glm::all(glm::equal(glm::fmin(N, B, C), B, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::fmin(B, N, C), B, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::fmin(C, N, B), B, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::fmin(C, B, N), B, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::fmin(B, C, N), B, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::fmin(N, C, B), B, glm::epsilon<T>())) ? 0 : 1;
-
- vecType const D(static_cast<T>(3));
- Error += glm::all(glm::equal(glm::fmin(D, N, B, C), B, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::fmin(B, D, N, C), B, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::fmin(C, N, D, B), B, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::fmin(C, B, D, N), B, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::fmin(B, C, N, D), B, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::fmin(N, C, B, D), B, glm::epsilon<T>())) ? 0 : 1;
-
- return Error;
-}
-
-template <typename vecType>
-static int test_fmax()
-{
- typedef typename vecType::value_type T;
-
- int Error = 0;
-
- vecType const B(static_cast<T>(1));
- vecType const N(GLM_NAN(T));
-
- Error += glm::all(glm::equal(glm::fmax(N, B), B, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::fmax(B, N), B, glm::epsilon<T>())) ? 0 : 1;
-
- vecType const C(static_cast<T>(2));
- Error += glm::all(glm::equal(glm::fmax(N, B, C), C, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::fmax(B, N, C), C, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::fmax(C, N, B), C, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::fmax(C, B, N), C, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::fmax(B, C, N), C, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::fmax(N, C, B), C, glm::epsilon<T>())) ? 0 : 1;
-
- vecType const D(static_cast<T>(3));
- Error += glm::all(glm::equal(glm::fmax(D, N, B, C), D, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::fmax(B, D, N, C), D, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::fmax(C, N, D, B), D, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::fmax(C, B, D, N), D, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::fmax(B, C, N, D), D, glm::epsilon<T>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::fmax(N, C, B, D), D, glm::epsilon<T>())) ? 0 : 1;
-
- return Error;
-}
-
-static int test_clamp()
-{
- int Error = 0;
-
- glm::vec2 K = glm::clamp(glm::vec2(0.5f));
- Error += glm::all(glm::equal(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1;
-
- glm::vec3 L = glm::clamp(glm::vec3(0.5f));
- Error += glm::all(glm::equal(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1;
-
- glm::vec4 M = glm::clamp(glm::vec4(0.5f));
- Error += glm::all(glm::equal(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1;
-
- glm::vec1 N = glm::clamp(glm::vec1(0.5f));
- Error += glm::all(glm::equal(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1;
-
- return Error;
-}
-
-static int test_repeat()
-{
- int Error = 0;
-
- glm::vec2 K = glm::repeat(glm::vec2(0.5f));
- Error += glm::all(glm::equal(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1;
-
- glm::vec3 L = glm::repeat(glm::vec3(0.5f));
- Error += glm::all(glm::equal(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1;
-
- glm::vec4 M = glm::repeat(glm::vec4(0.5f));
- Error += glm::all(glm::equal(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1;
-
- glm::vec1 N = glm::repeat(glm::vec1(0.5f));
- Error += glm::all(glm::equal(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1;
-
- return Error;
-}
-
-static int test_mirrorClamp()
-{
- int Error = 0;
-
- glm::vec2 K = glm::mirrorClamp(glm::vec2(0.5f));
- Error += glm::all(glm::equal(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1;
-
- glm::vec3 L = glm::mirrorClamp(glm::vec3(0.5f));
- Error += glm::all(glm::equal(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1;
-
- glm::vec4 M = glm::mirrorClamp(glm::vec4(0.5f));
- Error += glm::all(glm::equal(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1;
-
- glm::vec1 N = glm::mirrorClamp(glm::vec1(0.5f));
- Error += glm::all(glm::equal(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1;
-
- return Error;
-}
-
-static int test_mirrorRepeat()
-{
- int Error = 0;
-
- glm::vec2 K = glm::mirrorRepeat(glm::vec2(0.5f));
- Error += glm::all(glm::equal(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1;
-
- glm::vec3 L = glm::mirrorRepeat(glm::vec3(0.5f));
- Error += glm::all(glm::equal(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1;
-
- glm::vec4 M = glm::mirrorRepeat(glm::vec4(0.5f));
- Error += glm::all(glm::equal(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1;
-
- glm::vec1 N = glm::mirrorRepeat(glm::vec1(0.5f));
- Error += glm::all(glm::equal(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1;
-
- return Error;
-}
-
-static int test_iround()
-{
- int Error = 0;
-
- for(float f = 0.0f; f < 3.1f; f += 0.05f)
- {
- int RoundFast = static_cast<int>(glm::iround(f));
- int RoundSTD = static_cast<int>(glm::round(f));
- Error += RoundFast == RoundSTD ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-static int test_uround()
-{
- int Error = 0;
-
- for(float f = 0.0f; f < 3.1f; f += 0.05f)
- {
- int RoundFast = static_cast<int>(glm::uround(f));
- int RoundSTD = static_cast<int>(glm::round(f));
- Error += RoundFast == RoundSTD ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_min<glm::vec3>();
- Error += test_min<glm::vec2>();
- Error += test_min_nan<glm::vec3>();
- Error += test_min_nan<glm::vec2>();
-
- Error += test_max<glm::vec3>();
- Error += test_max<glm::vec2>();
- Error += test_max_nan<glm::vec3>();
- Error += test_max_nan<glm::vec2>();
-
- Error += test_fmin<glm::vec3>();
- Error += test_fmin<glm::vec2>();
-
- Error += test_fmax<glm::vec3>();
- Error += test_fmax<glm::vec2>();
-
- Error += test_clamp();
- Error += test_repeat();
- Error += test_mirrorClamp();
- Error += test_mirrorRepeat();
-
- Error += test_iround();
- Error += test_uround();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_vector_iec559.cpp b/3rdparty/glm/source/test/ext/ext_vector_iec559.cpp
deleted file mode 100644
index 5a9da50..0000000
--- a/3rdparty/glm/source/test/ext/ext_vector_iec559.cpp
+++ /dev/null
@@ -1,166 +0,0 @@
-#include <glm/gtc/constants.hpp>
-#include <glm/ext/scalar_relational.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/vector_double1.hpp>
-#include <glm/ext/vector_double1_precision.hpp>
-#include <glm/ext/vector_double2.hpp>
-#include <glm/ext/vector_double3.hpp>
-#include <glm/ext/vector_double4.hpp>
-#include <glm/ext/vector_float1.hpp>
-#include <glm/ext/vector_float1_precision.hpp>
-#include <glm/ext/vector_float2.hpp>
-#include <glm/ext/vector_float3.hpp>
-#include <glm/ext/vector_float4.hpp>
-
-template <typename genType>
-static int test_operators()
-{
- typedef typename genType::value_type valType;
-
- int Error = 0;
-
- {
- genType const A(1);
- genType const B(1);
-
- genType const C = A + B;
- Error += glm::all(glm::equal(C, genType(2), glm::epsilon<valType>())) ? 0 : 1;
-
- genType const D = A - B;
- Error += glm::all(glm::equal(D, genType(0), glm::epsilon<valType>())) ? 0 : 1;
-
- genType const E = A * B;
- Error += glm::all(glm::equal(E, genType(1), glm::epsilon<valType>())) ? 0 : 1;
-
- genType const F = A / B;
- Error += glm::all(glm::equal(F, genType(1), glm::epsilon<valType>())) ? 0 : 1;
- }
-
- return Error;
-}
-
-template <typename genType>
-static int test_ctor()
-{
- typedef typename genType::value_type T;
-
- int Error = 0;
-
- glm::vec<1, T> const A = genType(1);
-
- glm::vec<1, T> const E(genType(1));
- Error += glm::all(glm::equal(A, E, glm::epsilon<T>())) ? 0 : 1;
-
- glm::vec<1, T> const F(E);
- Error += glm::all(glm::equal(A, F, glm::epsilon<T>())) ? 0 : 1;
-
- genType const B = genType(1);
- genType const G(glm::vec<2, T>(1));
- Error += glm::all(glm::equal(B, G, glm::epsilon<T>())) ? 0 : 1;
-
- genType const H(glm::vec<3, T>(1));
- Error += glm::all(glm::equal(B, H, glm::epsilon<T>())) ? 0 : 1;
-
- genType const I(glm::vec<4, T>(1));
- Error += glm::all(glm::equal(B, I, glm::epsilon<T>())) ? 0 : 1;
-
- return Error;
-}
-
-template <typename genType>
-static int test_size()
-{
- typedef typename genType::value_type T;
-
- int Error = 0;
-
- Error += sizeof(glm::vec<1, T>) == sizeof(genType) ? 0 : 1;
- Error += genType().length() == 1 ? 0 : 1;
- Error += genType::length() == 1 ? 0 : 1;
-
- return Error;
-}
-
-template <typename genType>
-static int test_relational()
-{
- typedef typename genType::value_type valType;
-
- int Error = 0;
-
- genType const A(1);
- genType const B(1);
- genType const C(0);
-
- Error += all(equal(A, B, glm::epsilon<valType>())) ? 0 : 1;
- Error += any(notEqual(A, C, glm::epsilon<valType>())) ? 0 : 1;
-
- return Error;
-}
-
-template <typename genType>
-static int test_constexpr()
-{
-# if GLM_CONFIG_CONSTEXP == GLM_ENABLE
- static_assert(genType::length() == 1, "GLM: Failed constexpr");
-# endif
-
- return 0;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_operators<glm::dvec1>();
- Error += test_operators<glm::lowp_dvec1>();
- Error += test_operators<glm::mediump_dvec1>();
- Error += test_operators<glm::highp_dvec1>();
-
- Error += test_ctor<glm::dvec1>();
- Error += test_ctor<glm::lowp_dvec1>();
- Error += test_ctor<glm::mediump_dvec1>();
- Error += test_ctor<glm::highp_dvec1>();
-
- Error += test_size<glm::dvec1>();
- Error += test_size<glm::lowp_dvec1>();
- Error += test_size<glm::mediump_dvec1>();
- Error += test_size<glm::highp_dvec1>();
-
- Error += test_relational<glm::dvec1>();
- Error += test_relational<glm::lowp_dvec1>();
- Error += test_relational<glm::mediump_dvec1>();
- Error += test_relational<glm::highp_dvec1>();
-
- Error += test_constexpr<glm::dvec1>();
- Error += test_constexpr<glm::lowp_dvec1>();
- Error += test_constexpr<glm::mediump_dvec1>();
- Error += test_constexpr<glm::highp_dvec1>();
-
- Error += test_operators<glm::vec1>();
- Error += test_operators<glm::lowp_vec1>();
- Error += test_operators<glm::mediump_vec1>();
- Error += test_operators<glm::highp_vec1>();
-
- Error += test_ctor<glm::vec1>();
- Error += test_ctor<glm::lowp_vec1>();
- Error += test_ctor<glm::mediump_vec1>();
- Error += test_ctor<glm::highp_vec1>();
-
- Error += test_size<glm::vec1>();
- Error += test_size<glm::lowp_vec1>();
- Error += test_size<glm::mediump_vec1>();
- Error += test_size<glm::highp_vec1>();
-
- Error += test_relational<glm::vec1>();
- Error += test_relational<glm::lowp_vec1>();
- Error += test_relational<glm::mediump_vec1>();
- Error += test_relational<glm::highp_vec1>();
-
- Error += test_constexpr<glm::vec1>();
- Error += test_constexpr<glm::lowp_vec1>();
- Error += test_constexpr<glm::mediump_vec1>();
- Error += test_constexpr<glm::highp_vec1>();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_vector_int1_sized.cpp b/3rdparty/glm/source/test/ext/ext_vector_int1_sized.cpp
deleted file mode 100644
index c262f49..0000000
--- a/3rdparty/glm/source/test/ext/ext_vector_int1_sized.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <glm/ext/vector_int1_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
- static_assert(sizeof(glm::i8vec1) == 1, "int8 size isn't 1 byte on this platform");
- static_assert(sizeof(glm::i16vec1) == 2, "int16 size isn't 2 bytes on this platform");
- static_assert(sizeof(glm::i32vec1) == 4, "int32 size isn't 4 bytes on this platform");
- static_assert(sizeof(glm::i64vec1) == 8, "int64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_size()
-{
- int Error = 0;
-
- Error += sizeof(glm::i8vec1) == 1 ? 0 : 1;
- Error += sizeof(glm::i16vec1) == 2 ? 0 : 1;
- Error += sizeof(glm::i32vec1) == 4 ? 0 : 1;
- Error += sizeof(glm::i64vec1) == 8 ? 0 : 1;
-
- return Error;
-}
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::i8vec1) < sizeof(glm::i16vec1) ? 0 : 1;
- Error += sizeof(glm::i16vec1) < sizeof(glm::i32vec1) ? 0 : 1;
- Error += sizeof(glm::i32vec1) < sizeof(glm::i64vec1) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_size();
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_vector_int2_sized.cpp b/3rdparty/glm/source/test/ext/ext_vector_int2_sized.cpp
deleted file mode 100644
index f4ad8b6..0000000
--- a/3rdparty/glm/source/test/ext/ext_vector_int2_sized.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <glm/ext/vector_int2_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
- static_assert(sizeof(glm::i8vec2) == 2, "int8 size isn't 1 byte on this platform");
- static_assert(sizeof(glm::i16vec2) == 4, "int16 size isn't 2 bytes on this platform");
- static_assert(sizeof(glm::i32vec2) == 8, "int32 size isn't 4 bytes on this platform");
- static_assert(sizeof(glm::i64vec2) == 16, "int64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_size()
-{
- int Error = 0;
-
- Error += sizeof(glm::i8vec2) == 2 ? 0 : 1;
- Error += sizeof(glm::i16vec2) == 4 ? 0 : 1;
- Error += sizeof(glm::i32vec2) == 8 ? 0 : 1;
- Error += sizeof(glm::i64vec2) == 16 ? 0 : 1;
-
- return Error;
-}
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::i8vec2) < sizeof(glm::i16vec2) ? 0 : 1;
- Error += sizeof(glm::i16vec2) < sizeof(glm::i32vec2) ? 0 : 1;
- Error += sizeof(glm::i32vec2) < sizeof(glm::i64vec2) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_size();
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_vector_int3_sized.cpp b/3rdparty/glm/source/test/ext/ext_vector_int3_sized.cpp
deleted file mode 100644
index c51bfe7..0000000
--- a/3rdparty/glm/source/test/ext/ext_vector_int3_sized.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <glm/ext/vector_int3_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
- static_assert(sizeof(glm::i8vec3) == 3, "int8 size isn't 1 byte on this platform");
- static_assert(sizeof(glm::i16vec3) == 6, "int16 size isn't 2 bytes on this platform");
- static_assert(sizeof(glm::i32vec3) == 12, "int32 size isn't 4 bytes on this platform");
- static_assert(sizeof(glm::i64vec3) == 24, "int64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_size()
-{
- int Error = 0;
-
- Error += sizeof(glm::i8vec3) == 3 ? 0 : 1;
- Error += sizeof(glm::i16vec3) == 6 ? 0 : 1;
- Error += sizeof(glm::i32vec3) == 12 ? 0 : 1;
- Error += sizeof(glm::i64vec3) == 24 ? 0 : 1;
-
- return Error;
-}
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::i8vec3) < sizeof(glm::i16vec3) ? 0 : 1;
- Error += sizeof(glm::i16vec3) < sizeof(glm::i32vec3) ? 0 : 1;
- Error += sizeof(glm::i32vec3) < sizeof(glm::i64vec3) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_size();
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_vector_int4_sized.cpp b/3rdparty/glm/source/test/ext/ext_vector_int4_sized.cpp
deleted file mode 100644
index 93fd9ed..0000000
--- a/3rdparty/glm/source/test/ext/ext_vector_int4_sized.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <glm/ext/vector_int4_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
-static_assert(sizeof(glm::i8vec4) == 4, "int8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::i16vec4) == 8, "int16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::i32vec4) == 16, "int32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::i64vec4) == 32, "int64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_size()
-{
- int Error = 0;
-
- Error += sizeof(glm::i8vec4) == 4 ? 0 : 1;
- Error += sizeof(glm::i16vec4) == 8 ? 0 : 1;
- Error += sizeof(glm::i32vec4) == 16 ? 0 : 1;
- Error += sizeof(glm::i64vec4) == 32 ? 0 : 1;
-
- return Error;
-}
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::i8vec4) < sizeof(glm::i16vec4) ? 0 : 1;
- Error += sizeof(glm::i16vec4) < sizeof(glm::i32vec4) ? 0 : 1;
- Error += sizeof(glm::i32vec4) < sizeof(glm::i64vec4) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_size();
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_vector_integer.cpp b/3rdparty/glm/source/test/ext/ext_vector_integer.cpp
deleted file mode 100644
index d7278d3..0000000
--- a/3rdparty/glm/source/test/ext/ext_vector_integer.cpp
+++ /dev/null
@@ -1,547 +0,0 @@
-#include <glm/ext/vector_integer.hpp>
-#include <glm/ext/scalar_int_sized.hpp>
-#include <glm/ext/scalar_uint_sized.hpp>
-#include <vector>
-#include <ctime>
-#include <cstdio>
-
-namespace isPowerOfTwo
-{
- template<typename genType>
- struct type
- {
- genType Value;
- bool Return;
- };
-
- template <glm::length_t L>
- int test_int16()
- {
- type<glm::int16> const Data[] =
- {
- { 0x0001, true },
- { 0x0002, true },
- { 0x0004, true },
- { 0x0080, true },
- { 0x0000, true },
- { 0x0003, false }
- };
-
- int Error = 0;
-
- for (std::size_t i = 0, n = sizeof(Data) / sizeof(type<glm::int16>); i < n; ++i)
- {
- glm::vec<L, bool> const Result = glm::isPowerOfTwo(glm::vec<L, glm::int16>(Data[i].Value));
- Error += glm::vec<L, bool>(Data[i].Return) == Result ? 0 : 1;
- }
-
- return Error;
- }
-
- template <glm::length_t L>
- int test_uint16()
- {
- type<glm::uint16> const Data[] =
- {
- { 0x0001, true },
- { 0x0002, true },
- { 0x0004, true },
- { 0x0000, true },
- { 0x0000, true },
- { 0x0003, false }
- };
-
- int Error = 0;
-
- for (std::size_t i = 0, n = sizeof(Data) / sizeof(type<glm::uint16>); i < n; ++i)
- {
- glm::vec<L, bool> const Result = glm::isPowerOfTwo(glm::vec<L, glm::uint16>(Data[i].Value));
- Error += glm::vec<L, bool>(Data[i].Return) == Result ? 0 : 1;
- }
-
- return Error;
- }
-
- template <glm::length_t L>
- int test_int32()
- {
- type<int> const Data[] =
- {
- { 0x00000001, true },
- { 0x00000002, true },
- { 0x00000004, true },
- { 0x0000000f, false },
- { 0x00000000, true },
- { 0x00000003, false }
- };
-
- int Error = 0;
-
- for (std::size_t i = 0, n = sizeof(Data) / sizeof(type<int>); i < n; ++i)
- {
- glm::vec<L, bool> const Result = glm::isPowerOfTwo(glm::vec<L, glm::int32>(Data[i].Value));
- Error += glm::vec<L, bool>(Data[i].Return) == Result ? 0 : 1;
- }
-
- return Error;
- }
-
- template <glm::length_t L>
- int test_uint32()
- {
- type<glm::uint> const Data[] =
- {
- { 0x00000001, true },
- { 0x00000002, true },
- { 0x00000004, true },
- { 0x80000000, true },
- { 0x00000000, true },
- { 0x00000003, false }
- };
-
- int Error = 0;
-
- for (std::size_t i = 0, n = sizeof(Data) / sizeof(type<glm::uint>); i < n; ++i)
- {
- glm::vec<L, bool> const Result = glm::isPowerOfTwo(glm::vec<L, glm::uint32>(Data[i].Value));
- Error += glm::vec<L, bool>(Data[i].Return) == Result ? 0 : 1;
- }
-
- return Error;
- }
-
- int test()
- {
- int Error = 0;
-
- Error += test_int16<1>();
- Error += test_int16<2>();
- Error += test_int16<3>();
- Error += test_int16<4>();
-
- Error += test_uint16<1>();
- Error += test_uint16<2>();
- Error += test_uint16<3>();
- Error += test_uint16<4>();
-
- Error += test_int32<1>();
- Error += test_int32<2>();
- Error += test_int32<3>();
- Error += test_int32<4>();
-
- Error += test_uint32<1>();
- Error += test_uint32<2>();
- Error += test_uint32<3>();
- Error += test_uint32<4>();
-
- return Error;
- }
-}//isPowerOfTwo
-
-namespace prevPowerOfTwo
-{
- template <glm::length_t L, typename T>
- int run()
- {
- int Error = 0;
-
- glm::vec<L, T> const A = glm::prevPowerOfTwo(glm::vec<L, T>(7));
- Error += A == glm::vec<L, T>(4) ? 0 : 1;
-
- glm::vec<L, T> const B = glm::prevPowerOfTwo(glm::vec<L, T>(15));
- Error += B == glm::vec<L, T>(8) ? 0 : 1;
-
- glm::vec<L, T> const C = glm::prevPowerOfTwo(glm::vec<L, T>(31));
- Error += C == glm::vec<L, T>(16) ? 0 : 1;
-
- glm::vec<L, T> const D = glm::prevPowerOfTwo(glm::vec<L, T>(32));
- Error += D == glm::vec<L, T>(32) ? 0 : 1;
-
- return Error;
- }
-
- int test()
- {
- int Error = 0;
-
- Error += run<1, glm::int8>();
- Error += run<2, glm::int8>();
- Error += run<3, glm::int8>();
- Error += run<4, glm::int8>();
-
- Error += run<1, glm::int16>();
- Error += run<2, glm::int16>();
- Error += run<3, glm::int16>();
- Error += run<4, glm::int16>();
-
- Error += run<1, glm::int32>();
- Error += run<2, glm::int32>();
- Error += run<3, glm::int32>();
- Error += run<4, glm::int32>();
-
- Error += run<1, glm::int64>();
- Error += run<2, glm::int64>();
- Error += run<3, glm::int64>();
- Error += run<4, glm::int64>();
-
- Error += run<1, glm::uint8>();
- Error += run<2, glm::uint8>();
- Error += run<3, glm::uint8>();
- Error += run<4, glm::uint8>();
-
- Error += run<1, glm::uint16>();
- Error += run<2, glm::uint16>();
- Error += run<3, glm::uint16>();
- Error += run<4, glm::uint16>();
-
- Error += run<1, glm::uint32>();
- Error += run<2, glm::uint32>();
- Error += run<3, glm::uint32>();
- Error += run<4, glm::uint32>();
-
- Error += run<1, glm::uint64>();
- Error += run<2, glm::uint64>();
- Error += run<3, glm::uint64>();
- Error += run<4, glm::uint64>();
-
- return Error;
- }
-}//namespace prevPowerOfTwo
-
-namespace nextPowerOfTwo
-{
- template <glm::length_t L, typename T>
- int run()
- {
- int Error = 0;
-
- glm::vec<L, T> const A = glm::nextPowerOfTwo(glm::vec<L, T>(7));
- Error += A == glm::vec<L, T>(8) ? 0 : 1;
-
- glm::vec<L, T> const B = glm::nextPowerOfTwo(glm::vec<L, T>(15));
- Error += B == glm::vec<L, T>(16) ? 0 : 1;
-
- glm::vec<L, T> const C = glm::nextPowerOfTwo(glm::vec<L, T>(31));
- Error += C == glm::vec<L, T>(32) ? 0 : 1;
-
- glm::vec<L, T> const D = glm::nextPowerOfTwo(glm::vec<L, T>(32));
- Error += D == glm::vec<L, T>(32) ? 0 : 1;
-
- return Error;
- }
-
- int test()
- {
- int Error = 0;
-
- Error += run<1, glm::int8>();
- Error += run<2, glm::int8>();
- Error += run<3, glm::int8>();
- Error += run<4, glm::int8>();
-
- Error += run<1, glm::int16>();
- Error += run<2, glm::int16>();
- Error += run<3, glm::int16>();
- Error += run<4, glm::int16>();
-
- Error += run<1, glm::int32>();
- Error += run<2, glm::int32>();
- Error += run<3, glm::int32>();
- Error += run<4, glm::int32>();
-
- Error += run<1, glm::int64>();
- Error += run<2, glm::int64>();
- Error += run<3, glm::int64>();
- Error += run<4, glm::int64>();
-
- Error += run<1, glm::uint8>();
- Error += run<2, glm::uint8>();
- Error += run<3, glm::uint8>();
- Error += run<4, glm::uint8>();
-
- Error += run<1, glm::uint16>();
- Error += run<2, glm::uint16>();
- Error += run<3, glm::uint16>();
- Error += run<4, glm::uint16>();
-
- Error += run<1, glm::uint32>();
- Error += run<2, glm::uint32>();
- Error += run<3, glm::uint32>();
- Error += run<4, glm::uint32>();
-
- Error += run<1, glm::uint64>();
- Error += run<2, glm::uint64>();
- Error += run<3, glm::uint64>();
- Error += run<4, glm::uint64>();
-
- return Error;
- }
-}//namespace nextPowerOfTwo
-
-namespace prevMultiple
-{
- template<typename genIUType>
- struct type
- {
- genIUType Source;
- genIUType Multiple;
- genIUType Return;
- };
-
- template <glm::length_t L, typename T>
- int run()
- {
- type<T> const Data[] =
- {
- { 8, 3, 6 },
- { 7, 7, 7 }
- };
-
- int Error = 0;
-
- for (std::size_t i = 0, n = sizeof(Data) / sizeof(type<T>); i < n; ++i)
- {
- glm::vec<L, T> const Result0 = glm::prevMultiple(glm::vec<L, T>(Data[i].Source), Data[i].Multiple);
- Error += glm::vec<L, T>(Data[i].Return) == Result0 ? 0 : 1;
-
- glm::vec<L, T> const Result1 = glm::prevMultiple(glm::vec<L, T>(Data[i].Source), glm::vec<L, T>(Data[i].Multiple));
- Error += glm::vec<L, T>(Data[i].Return) == Result1 ? 0 : 1;
- }
-
- return Error;
- }
-
- int test()
- {
- int Error = 0;
-
- Error += run<1, glm::int8>();
- Error += run<2, glm::int8>();
- Error += run<3, glm::int8>();
- Error += run<4, glm::int8>();
-
- Error += run<1, glm::int16>();
- Error += run<2, glm::int16>();
- Error += run<3, glm::int16>();
- Error += run<4, glm::int16>();
-
- Error += run<1, glm::int32>();
- Error += run<2, glm::int32>();
- Error += run<3, glm::int32>();
- Error += run<4, glm::int32>();
-
- Error += run<1, glm::int64>();
- Error += run<2, glm::int64>();
- Error += run<3, glm::int64>();
- Error += run<4, glm::int64>();
-
- Error += run<1, glm::uint8>();
- Error += run<2, glm::uint8>();
- Error += run<3, glm::uint8>();
- Error += run<4, glm::uint8>();
-
- Error += run<1, glm::uint16>();
- Error += run<2, glm::uint16>();
- Error += run<3, glm::uint16>();
- Error += run<4, glm::uint16>();
-
- Error += run<1, glm::uint32>();
- Error += run<2, glm::uint32>();
- Error += run<3, glm::uint32>();
- Error += run<4, glm::uint32>();
-
- Error += run<1, glm::uint64>();
- Error += run<2, glm::uint64>();
- Error += run<3, glm::uint64>();
- Error += run<4, glm::uint64>();
-
- return Error;
- }
-}//namespace prevMultiple
-
-namespace nextMultiple
-{
- template<typename genIUType>
- struct type
- {
- genIUType Source;
- genIUType Multiple;
- genIUType Return;
- };
-
- template <glm::length_t L, typename T>
- int run()
- {
- type<T> const Data[] =
- {
- { 3, 4, 4 },
- { 6, 3, 6 },
- { 5, 3, 6 },
- { 7, 7, 7 },
- { 0, 1, 0 },
- { 8, 3, 9 }
- };
-
- int Error = 0;
-
- for (std::size_t i = 0, n = sizeof(Data) / sizeof(type<T>); i < n; ++i)
- {
- glm::vec<L, T> const Result0 = glm::nextMultiple(glm::vec<L, T>(Data[i].Source), glm::vec<L, T>(Data[i].Multiple));
- Error += glm::vec<L, T>(Data[i].Return) == Result0 ? 0 : 1;
-
- glm::vec<L, T> const Result1 = glm::nextMultiple(glm::vec<L, T>(Data[i].Source), Data[i].Multiple);
- Error += glm::vec<L, T>(Data[i].Return) == Result1 ? 0 : 1;
- }
-
- return Error;
- }
-
- int test()
- {
- int Error = 0;
-
- Error += run<1, glm::int8>();
- Error += run<2, glm::int8>();
- Error += run<3, glm::int8>();
- Error += run<4, glm::int8>();
-
- Error += run<1, glm::int16>();
- Error += run<2, glm::int16>();
- Error += run<3, glm::int16>();
- Error += run<4, glm::int16>();
-
- Error += run<1, glm::int32>();
- Error += run<2, glm::int32>();
- Error += run<3, glm::int32>();
- Error += run<4, glm::int32>();
-
- Error += run<1, glm::int64>();
- Error += run<2, glm::int64>();
- Error += run<3, glm::int64>();
- Error += run<4, glm::int64>();
-
- Error += run<1, glm::uint8>();
- Error += run<2, glm::uint8>();
- Error += run<3, glm::uint8>();
- Error += run<4, glm::uint8>();
-
- Error += run<1, glm::uint16>();
- Error += run<2, glm::uint16>();
- Error += run<3, glm::uint16>();
- Error += run<4, glm::uint16>();
-
- Error += run<1, glm::uint32>();
- Error += run<2, glm::uint32>();
- Error += run<3, glm::uint32>();
- Error += run<4, glm::uint32>();
-
- Error += run<1, glm::uint64>();
- Error += run<2, glm::uint64>();
- Error += run<3, glm::uint64>();
- Error += run<4, glm::uint64>();
-
- return Error;
- }
-}//namespace nextMultiple
-
-namespace findNSB
-{
- template<typename T>
- struct type
- {
- T Source;
- int SignificantBitCount;
- int Return;
- };
-
- template <glm::length_t L, typename T>
- int run()
- {
- type<T> const Data[] =
- {
- { 0x00, 1,-1 },
- { 0x01, 2,-1 },
- { 0x02, 2,-1 },
- { 0x06, 3,-1 },
- { 0x01, 1, 0 },
- { 0x03, 1, 0 },
- { 0x03, 2, 1 },
- { 0x07, 2, 1 },
- { 0x05, 2, 2 },
- { 0x0D, 2, 2 }
- };
-
- int Error = 0;
-
- for (std::size_t i = 0, n = sizeof(Data) / sizeof(type<T>); i < n; ++i)
- {
- glm::vec<L, int> const Result0 = glm::findNSB<L, T, glm::defaultp>(glm::vec<L, T>(Data[i].Source), glm::vec<L, int>(Data[i].SignificantBitCount));
- Error += glm::vec<L, int>(Data[i].Return) == Result0 ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
- }
-
- int test()
- {
- int Error = 0;
-
- Error += run<1, glm::uint8>();
- Error += run<2, glm::uint8>();
- Error += run<3, glm::uint8>();
- Error += run<4, glm::uint8>();
-
- Error += run<1, glm::uint16>();
- Error += run<2, glm::uint16>();
- Error += run<3, glm::uint16>();
- Error += run<4, glm::uint16>();
-
- Error += run<1, glm::uint32>();
- Error += run<2, glm::uint32>();
- Error += run<3, glm::uint32>();
- Error += run<4, glm::uint32>();
-
- Error += run<1, glm::uint64>();
- Error += run<2, glm::uint64>();
- Error += run<3, glm::uint64>();
- Error += run<4, glm::uint64>();
-
- Error += run<1, glm::int8>();
- Error += run<2, glm::int8>();
- Error += run<3, glm::int8>();
- Error += run<4, glm::int8>();
-
- Error += run<1, glm::int16>();
- Error += run<2, glm::int16>();
- Error += run<3, glm::int16>();
- Error += run<4, glm::int16>();
-
- Error += run<1, glm::int32>();
- Error += run<2, glm::int32>();
- Error += run<3, glm::int32>();
- Error += run<4, glm::int32>();
-
- Error += run<1, glm::int64>();
- Error += run<2, glm::int64>();
- Error += run<3, glm::int64>();
- Error += run<4, glm::int64>();
-
-
- return Error;
- }
-}//namespace findNSB
-
-int main()
-{
- int Error = 0;
-
- Error += isPowerOfTwo::test();
- Error += prevPowerOfTwo::test();
- Error += nextPowerOfTwo::test();
- Error += prevMultiple::test();
- Error += nextMultiple::test();
- Error += findNSB::test();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_vector_integer_sized.cpp b/3rdparty/glm/source/test/ext/ext_vector_integer_sized.cpp
deleted file mode 100644
index 52b3f4e..0000000
--- a/3rdparty/glm/source/test/ext/ext_vector_integer_sized.cpp
+++ /dev/null
@@ -1,216 +0,0 @@
-#include <glm/ext/vector_integer.hpp>
-#include <glm/ext/vector_int1.hpp>
-#include <glm/ext/vector_int1_sized.hpp>
-#include <glm/ext/vector_uint1.hpp>
-#include <glm/ext/vector_uint1_sized.hpp>
-
-template <typename genType>
-static int test_operators()
-{
- int Error = 0;
-
- {
- genType const A(1);
- genType const B(1);
-
- bool const R = A != B;
- bool const S = A == B;
- Error += (S && !R) ? 0 : 1;
- }
-
- {
- genType const A(1);
- genType const B(1);
-
- genType const C = A + B;
- Error += C == genType(2) ? 0 : 1;
-
- genType const D = A - B;
- Error += D == genType(0) ? 0 : 1;
-
- genType const E = A * B;
- Error += E == genType(1) ? 0 : 1;
-
- genType const F = A / B;
- Error += F == genType(1) ? 0 : 1;
- }
-
- {
- genType const A(3);
- genType const B(2);
-
- genType const C = A % B;
- Error += C == genType(1) ? 0 : 1;
- }
-
- {
- genType const A(1);
- genType const B(1);
- genType const C(0);
-
- genType const I = A & B;
- Error += I == genType(1) ? 0 : 1;
- genType const D = A & C;
- Error += D == genType(0) ? 0 : 1;
-
- genType const E = A | B;
- Error += E == genType(1) ? 0 : 1;
- genType const F = A | C;
- Error += F == genType(1) ? 0 : 1;
-
- genType const G = A ^ B;
- Error += G == genType(0) ? 0 : 1;
- genType const H = A ^ C;
- Error += H == genType(1) ? 0 : 1;
- }
-
- {
- genType const A(0);
- genType const B(1);
- genType const C(2);
-
- genType const D = B << B;
- Error += D == genType(2) ? 0 : 1;
- genType const E = C >> B;
- Error += E == genType(1) ? 0 : 1;
- }
-
- return Error;
-}
-
-template <typename genType>
-static int test_ctor()
-{
- typedef typename genType::value_type T;
-
- int Error = 0;
-
- genType const A = genType(1);
-
- genType const E(genType(1));
- Error += A == E ? 0 : 1;
-
- genType const F(E);
- Error += A == F ? 0 : 1;
-
- genType const B = genType(1);
- genType const G(glm::vec<2, T>(1));
- Error += B == G ? 0 : 1;
-
- genType const H(glm::vec<3, T>(1));
- Error += B == H ? 0 : 1;
-
- genType const I(glm::vec<4, T>(1));
- Error += B == I ? 0 : 1;
-
- return Error;
-}
-
-template <typename genType>
-static int test_size()
-{
- int Error = 0;
-
- Error += sizeof(typename genType::value_type) == sizeof(genType) ? 0 : 1;
- Error += genType().length() == 1 ? 0 : 1;
- Error += genType::length() == 1 ? 0 : 1;
-
- return Error;
-}
-
-template <typename genType>
-static int test_relational()
-{
- int Error = 0;
-
- genType const A(1);
- genType const B(1);
- genType const C(0);
-
- Error += A == B ? 0 : 1;
- Error += A != C ? 0 : 1;
- Error += all(equal(A, B)) ? 0 : 1;
- Error += any(notEqual(A, C)) ? 0 : 1;
-
- return Error;
-}
-
-template <typename genType>
-static int test_constexpr()
-{
-# if GLM_CONFIG_CONSTEXP == GLM_ENABLE
- static_assert(genType::length() == 1, "GLM: Failed constexpr");
- static_assert(genType(1)[0] == 1, "GLM: Failed constexpr");
- static_assert(genType(1) == genType(1), "GLM: Failed constexpr");
- static_assert(genType(1) != genType(0), "GLM: Failed constexpr");
-# endif
-
- return 0;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_operators<glm::ivec1>();
- Error += test_operators<glm::i8vec1>();
- Error += test_operators<glm::i16vec1>();
- Error += test_operators<glm::i32vec1>();
- Error += test_operators<glm::i64vec1>();
-
- Error += test_ctor<glm::ivec1>();
- Error += test_ctor<glm::i8vec1>();
- Error += test_ctor<glm::i16vec1>();
- Error += test_ctor<glm::i32vec1>();
- Error += test_ctor<glm::i64vec1>();
-
- Error += test_size<glm::ivec1>();
- Error += test_size<glm::i8vec1>();
- Error += test_size<glm::i16vec1>();
- Error += test_size<glm::i32vec1>();
- Error += test_size<glm::i64vec1>();
-
- Error += test_relational<glm::ivec1>();
- Error += test_relational<glm::i8vec1>();
- Error += test_relational<glm::i16vec1>();
- Error += test_relational<glm::i32vec1>();
- Error += test_relational<glm::i64vec1>();
-
- Error += test_constexpr<glm::ivec1>();
- Error += test_constexpr<glm::i8vec1>();
- Error += test_constexpr<glm::i16vec1>();
- Error += test_constexpr<glm::i32vec1>();
- Error += test_constexpr<glm::i64vec1>();
-
- Error += test_operators<glm::uvec1>();
- Error += test_operators<glm::u8vec1>();
- Error += test_operators<glm::u16vec1>();
- Error += test_operators<glm::u32vec1>();
- Error += test_operators<glm::u64vec1>();
-
- Error += test_ctor<glm::uvec1>();
- Error += test_ctor<glm::u8vec1>();
- Error += test_ctor<glm::u16vec1>();
- Error += test_ctor<glm::u32vec1>();
- Error += test_ctor<glm::u64vec1>();
-
- Error += test_size<glm::uvec1>();
- Error += test_size<glm::u8vec1>();
- Error += test_size<glm::u16vec1>();
- Error += test_size<glm::u32vec1>();
- Error += test_size<glm::u64vec1>();
-
- Error += test_relational<glm::uvec1>();
- Error += test_relational<glm::u8vec1>();
- Error += test_relational<glm::u16vec1>();
- Error += test_relational<glm::u32vec1>();
- Error += test_relational<glm::u64vec1>();
-
- Error += test_constexpr<glm::uvec1>();
- Error += test_constexpr<glm::u8vec1>();
- Error += test_constexpr<glm::u16vec1>();
- Error += test_constexpr<glm::u32vec1>();
- Error += test_constexpr<glm::u64vec1>();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_vector_packing.cpp b/3rdparty/glm/source/test/ext/ext_vector_packing.cpp
deleted file mode 100644
index d7cbce2..0000000
--- a/3rdparty/glm/source/test/ext/ext_vector_packing.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-#include <glm/ext/vector_packing.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/vector_uint2_sized.hpp>
-#include <glm/ext/vector_int2_sized.hpp>
-#include <glm/gtc/packing.hpp>
-#include <glm/vec2.hpp>
-#include <vector>
-
-int test_packUnorm()
-{
- int Error = 0;
-
- std::vector<glm::vec2> A;
- A.push_back(glm::vec2(1.0f, 0.7f));
- A.push_back(glm::vec2(0.5f, 0.1f));
-
- for (std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec2 B(A[i]);
- glm::u16vec2 C = glm::packUnorm<glm::uint16>(B);
- glm::vec2 D = glm::unpackUnorm<float>(C);
- Error += glm::all(glm::equal(B, D, 1.0f / 255.f)) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_packSnorm()
-{
- int Error = 0;
-
- std::vector<glm::vec2> A;
- A.push_back(glm::vec2(1.0f, 0.0f));
- A.push_back(glm::vec2(-0.5f, -0.7f));
- A.push_back(glm::vec2(-0.1f, 0.1f));
-
- for (std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec2 B(A[i]);
- glm::i16vec2 C = glm::packSnorm<glm::int16>(B);
- glm::vec2 D = glm::unpackSnorm<float>(C);
- Error += glm::all(glm::equal(B, D, 1.0f / 32767.0f * 2.0f)) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_packUnorm();
- Error += test_packSnorm();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_vector_reciprocal.cpp b/3rdparty/glm/source/test/ext/ext_vector_reciprocal.cpp
deleted file mode 100644
index f4b9f18..0000000
--- a/3rdparty/glm/source/test/ext/ext_vector_reciprocal.cpp
+++ /dev/null
@@ -1,186 +0,0 @@
-#include <glm/ext/vector_reciprocal.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/scalar_constants.hpp>
-#include <glm/ext/vector_double1.hpp>
-
-static int test_sec()
-{
- int Error = 0;
-
- glm::dvec1 const a = glm::sec(glm::dvec1(0.0));
- Error += glm::all(glm::equal(a, glm::dvec1(1.0), 0.01)) ? 0 : 1;
-
- glm::dvec1 const b = glm::sec(glm::dvec1(glm::pi<double>() * 2.0));
- Error += glm::all(glm::equal(b, glm::dvec1(1.0), 0.01)) ? 0 : 1;
-
- glm::dvec1 const c = glm::sec(glm::dvec1(glm::pi<double>() * -2.0));
- Error += glm::all(glm::equal(c, glm::dvec1(1.0), 0.01)) ? 0 : 1;
-
- glm::dvec1 const d = glm::sec(glm::dvec1(glm::pi<double>() * 1.0));
- Error += glm::all(glm::equal(d, -glm::dvec1(1.0), 0.01)) ? 0 : 1;
-
- glm::dvec1 const e = glm::sec(glm::dvec1(glm::pi<double>() * -1.0));
- Error += glm::all(glm::equal(e, -glm::dvec1(1.0), 0.01)) ? 0 : 1;
-
- return Error;
-}
-
-static int test_csc()
-{
- int Error = 0;
-
- glm::dvec1 const a = glm::csc(glm::dvec1(glm::pi<double>() * 0.5));
- Error += glm::all(glm::equal(a, glm::dvec1(1.0), 0.01)) ? 0 : 1;
-
- glm::dvec1 const b = glm::csc(glm::dvec1(glm::pi<double>() * -0.5));
- Error += glm::all(glm::equal(b, glm::dvec1(-1.0), 0.01)) ? 0 : 1;
-
- return Error;
-}
-
-static int test_cot()
-{
- int Error = 0;
-
- glm::dvec1 const a = glm::cot(glm::dvec1(glm::pi<double>() * 0.5));
- Error += glm::all(glm::equal(a, glm::dvec1(0.0), 0.01)) ? 0 : 1;
-
- glm::dvec1 const b = glm::cot(glm::dvec1(glm::pi<double>() * -0.5));
- Error += glm::all(glm::equal(b, glm::dvec1(0.0), 0.01)) ? 0 : 1;
-
- return Error;
-}
-
-static int test_asec()
-{
- int Error = 0;
-
- Error += glm::all(glm::equal(glm::asec(glm::dvec1(100000.0)), glm::dvec1(glm::pi<double>() * 0.5), 0.01)) ? 0 : 1;
- Error += glm::all(glm::equal(glm::asec(glm::dvec1(-100000.0)), glm::dvec1(glm::pi<double>() * 0.5), 0.01)) ? 0 : 1;
-
- return Error;
-}
-
-static int test_acsc()
-{
- int Error = 0;
-
- Error += glm::all(glm::equal(glm::acsc(glm::dvec1(100000.0)), glm::dvec1(0.0), 0.01)) ? 0 : 1;
- Error += glm::all(glm::equal(glm::acsc(glm::dvec1(-100000.0)), glm::dvec1(0.0), 0.01)) ? 0 : 1;
-
- return Error;
-}
-
-static int test_acot()
-{
- int Error = 0;
-
- Error += glm::all(glm::equal(glm::acot(glm::dvec1(100000.0)), glm::dvec1(0.0), 0.01)) ? 0 : 1;
- Error += glm::all(glm::equal(glm::acot(glm::dvec1(-100000.0)), glm::dvec1(glm::pi<double>()), 0.01)) ? 0 : 1;
- Error += glm::all(glm::equal(glm::acot(glm::dvec1(0.0)), glm::dvec1(glm::pi<double>() * 0.5), 0.01)) ? 0 : 1;
-
- return Error;
-}
-
-static int test_sech()
-{
- int Error = 0;
-
- Error += glm::all(glm::equal(glm::sech(glm::dvec1(100000.0)), glm::dvec1(0.0), 0.01)) ? 0 : 1;
- Error += glm::all(glm::equal(glm::sech(glm::dvec1(-100000.0)), glm::dvec1(0.0), 0.01)) ? 0 : 1;
- Error += glm::all(glm::equal(glm::sech(glm::dvec1(0.0)), glm::dvec1(1.0), 0.01)) ? 0 : 1;
-
- return Error;
-}
-
-static int test_csch()
-{
- int Error = 0;
-
- Error += glm::all(glm::equal(glm::csch(glm::dvec1(100000.0)), glm::dvec1(0.0), 0.01)) ? 0 : 1;
- Error += glm::all(glm::equal(glm::csch(glm::dvec1(-100000.0)), glm::dvec1(0.0), 0.01)) ? 0 : 1;
-
- return Error;
-}
-
-static int test_coth()
-{
- int Error = 0;
-
- glm::dvec1 const a = glm::coth(glm::dvec1(100.0));
- Error += glm::all(glm::equal(a, glm::dvec1(1.0), 0.01)) ? 0 : 1;
-
- glm::dvec1 const b = glm::coth(glm::dvec1(-100.0));
- Error += glm::all(glm::equal(b, glm::dvec1(-1.0), 0.01)) ? 0 : 1;
-
- return Error;
-}
-
-static int test_asech()
-{
- int Error = 0;
-
- glm::dvec1 const a = glm::asech(glm::dvec1(1.0));
- Error += glm::all(glm::equal(a, glm::dvec1(0.0), 0.01)) ? 0 : 1;
-
- return Error;
-}
-
-static int test_acsch()
-{
- int Error = 0;
-
- glm::dvec1 const a(glm::acsch(glm::dvec1(0.01)));
- Error += a.x > 1.0 ? 0 : 1;
-
- glm::dvec1 const b(glm::acsch(glm::dvec1(-0.01)));
- Error += b.x < -1.0 ? 0 : 1;
-
- Error += glm::all(glm::equal(glm::acsch(glm::dvec1(100.0)), glm::dvec1(0.0), 0.01)) ? 0 : 1;
- Error += glm::all(glm::equal(glm::acsch(glm::dvec1(-100.0)), glm::dvec1(0.0), 0.01)) ? 0 : 1;
-
- return Error;
-}
-
-static int test_acoth()
-{
- int Error = 0;
-
- glm::dvec1 const a = glm::acoth(glm::dvec1(1.00001));
- Error += a.x > 6.0 ? 0 : 1;
-
- glm::dvec1 const b = glm::acoth(glm::dvec1(-1.00001));
- Error += b.x < -6.0 ? 0 : 1;
-
- glm::dvec1 const c = glm::acoth(glm::dvec1(10000.0));
- Error += glm::all(glm::equal(c, glm::dvec1(0.0), 0.01)) ? 0 : 1;
-
- glm::dvec1 const d = glm::acoth(glm::dvec1(-10000.0));
- Error += glm::all(glm::equal(d, glm::dvec1(0.0), 0.01)) ? 0 : 1;
-
- return Error;
-}
-
-
-int main()
-{
- int Error = 0;
-
- Error += test_sec();
- Error += test_csc();
- Error += test_cot();
-
- Error += test_asec();
- Error += test_acsc();
- Error += test_acot();
-
- Error += test_sech();
- Error += test_csch();
- Error += test_coth();
-
- Error += test_asech();
- Error += test_acsch();
- Error += test_acoth();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_vector_relational.cpp b/3rdparty/glm/source/test/ext/ext_vector_relational.cpp
deleted file mode 100644
index f6cd307..0000000
--- a/3rdparty/glm/source/test/ext/ext_vector_relational.cpp
+++ /dev/null
@@ -1,205 +0,0 @@
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/vector_float1.hpp>
-#include <glm/ext/vector_float1_precision.hpp>
-#include <glm/ext/vector_float2.hpp>
-#include <glm/ext/vector_float2_precision.hpp>
-#include <glm/ext/vector_float3.hpp>
-#include <glm/ext/vector_float3_precision.hpp>
-#include <glm/ext/vector_float4.hpp>
-#include <glm/ext/vector_float4_precision.hpp>
-#include <glm/ext/vector_double1.hpp>
-#include <glm/ext/vector_double1_precision.hpp>
-#include <glm/ext/vector_double2.hpp>
-#include <glm/ext/vector_double2_precision.hpp>
-#include <glm/ext/vector_double3.hpp>
-#include <glm/ext/vector_double3_precision.hpp>
-#include <glm/ext/vector_double4.hpp>
-#include <glm/ext/vector_double4_precision.hpp>
-#include <glm/ext/vector_ulp.hpp>
-
-template <typename vecType>
-static int test_equal()
-{
- typedef typename vecType::value_type valType;
-
- valType const A = static_cast<valType>(1.01f);
- valType const B = static_cast<valType>(1.02f);
- valType const Epsilon1 = static_cast<valType>(0.1f);
- valType const Epsilon2 = static_cast<valType>(0.001f);
-
- int Error = 0;
-
- Error += glm::all(glm::equal(vecType(A), vecType(B), Epsilon1)) ? 0 : 1;
- Error += glm::all(glm::equal(vecType(A), vecType(B), vecType(Epsilon1))) ? 0 : 1;
-
- Error += !glm::any(glm::equal(vecType(A), vecType(B), Epsilon2)) ? 0 : 1;
- Error += !glm::any(glm::equal(vecType(A), vecType(B), vecType(Epsilon2))) ? 0 : 1;
-
- return Error;
-}
-
-template <typename vecType>
-static int test_notEqual()
-{
- typedef typename vecType::value_type valType;
-
- valType const A = static_cast<valType>(1.01f);
- valType const B = static_cast<valType>(1.02f);
- valType const Epsilon1 = static_cast<valType>(0.1f);
- valType const Epsilon2 = static_cast<valType>(0.001f);
-
- int Error = 0;
-
- Error += glm::all(glm::notEqual(vecType(A), vecType(B), Epsilon2)) ? 0 : 1;
- Error += glm::all(glm::notEqual(vecType(A), vecType(B), vecType(Epsilon2))) ? 0 : 1;
-
- Error += !glm::any(glm::notEqual(vecType(A), vecType(B), Epsilon1)) ? 0 : 1;
- Error += !glm::any(glm::notEqual(vecType(A), vecType(B), vecType(Epsilon1))) ? 0 : 1;
-
- return Error;
-}
-
-template <typename genType, typename valType>
-static int test_constexpr()
-{
-# if GLM_CONFIG_CONSTEXP == GLM_ENABLE
- static_assert(glm::all(glm::equal(genType(static_cast<valType>(1.01f)), genType(static_cast<valType>(1.02f)), static_cast<valType>(0.1f))), "GLM: Failed constexpr");
-# endif
-
- return 0;
-}
-
-template <typename T>
-static int test_equal_ulps()
-{
- typedef glm::vec<4, T, glm::defaultp> vec4;
-
- T const One(1);
- vec4 const Ones(1);
-
- int Error = 0;
-
- T const ULP1Plus = glm::nextFloat(One);
- Error += glm::all(glm::equal(Ones, vec4(ULP1Plus), 1)) ? 0 : 1;
-
- T const ULP2Plus = glm::nextFloat(ULP1Plus);
- Error += !glm::all(glm::equal(Ones, vec4(ULP2Plus), 1)) ? 0 : 1;
-
- T const ULP1Minus = glm::prevFloat(One);
- Error += glm::all(glm::equal(Ones, vec4(ULP1Minus), 1)) ? 0 : 1;
-
- T const ULP2Minus = glm::prevFloat(ULP1Minus);
- Error += !glm::all(glm::equal(Ones, vec4(ULP2Minus), 1)) ? 0 : 1;
-
- return Error;
-}
-
-template <typename T>
-static int test_notEqual_ulps()
-{
- typedef glm::vec<4, T, glm::defaultp> vec4;
-
- T const One(1);
- vec4 const Ones(1);
-
- int Error = 0;
-
- T const ULP1Plus = glm::nextFloat(One);
- Error += !glm::all(glm::notEqual(Ones, vec4(ULP1Plus), 1)) ? 0 : 1;
-
- T const ULP2Plus = glm::nextFloat(ULP1Plus);
- Error += glm::all(glm::notEqual(Ones, vec4(ULP2Plus), 1)) ? 0 : 1;
-
- T const ULP1Minus = glm::prevFloat(One);
- Error += !glm::all(glm::notEqual(Ones, vec4(ULP1Minus), 1)) ? 0 : 1;
-
- T const ULP2Minus = glm::prevFloat(ULP1Minus);
- Error += glm::all(glm::notEqual(Ones, vec4(ULP2Minus), 1)) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_equal_ulps<float>();
- Error += test_equal_ulps<double>();
- Error += test_notEqual_ulps<float>();
- Error += test_notEqual_ulps<double>();
-
- Error += test_equal<glm::vec1>();
- Error += test_equal<glm::lowp_vec1>();
- Error += test_equal<glm::mediump_vec1>();
- Error += test_equal<glm::highp_vec1>();
- Error += test_equal<glm::vec2>();
- Error += test_equal<glm::lowp_vec2>();
- Error += test_equal<glm::mediump_vec2>();
- Error += test_equal<glm::highp_vec2>();
- Error += test_equal<glm::vec3>();
- Error += test_equal<glm::lowp_vec3>();
- Error += test_equal<glm::mediump_vec3>();
- Error += test_equal<glm::highp_vec3>();
- Error += test_equal<glm::vec4>();
- Error += test_equal<glm::lowp_vec4>();
- Error += test_equal<glm::mediump_vec4>();
- Error += test_equal<glm::highp_vec4>();
-
- Error += test_equal<glm::dvec1>();
- Error += test_equal<glm::lowp_dvec1>();
- Error += test_equal<glm::mediump_dvec1>();
- Error += test_equal<glm::highp_dvec1>();
- Error += test_equal<glm::dvec2>();
- Error += test_equal<glm::lowp_dvec2>();
- Error += test_equal<glm::mediump_dvec2>();
- Error += test_equal<glm::highp_dvec2>();
- Error += test_equal<glm::dvec3>();
- Error += test_equal<glm::lowp_dvec3>();
- Error += test_equal<glm::mediump_dvec3>();
- Error += test_equal<glm::highp_dvec3>();
- Error += test_equal<glm::dvec4>();
- Error += test_equal<glm::lowp_dvec4>();
- Error += test_equal<glm::mediump_dvec4>();
- Error += test_equal<glm::highp_dvec4>();
-
- Error += test_notEqual<glm::vec1>();
- Error += test_notEqual<glm::lowp_vec1>();
- Error += test_notEqual<glm::mediump_vec1>();
- Error += test_notEqual<glm::highp_vec1>();
- Error += test_notEqual<glm::vec2>();
- Error += test_notEqual<glm::lowp_vec2>();
- Error += test_notEqual<glm::mediump_vec2>();
- Error += test_notEqual<glm::highp_vec2>();
- Error += test_notEqual<glm::vec3>();
- Error += test_notEqual<glm::lowp_vec3>();
- Error += test_notEqual<glm::mediump_vec3>();
- Error += test_notEqual<glm::highp_vec3>();
- Error += test_notEqual<glm::vec4>();
- Error += test_notEqual<glm::lowp_vec4>();
- Error += test_notEqual<glm::mediump_vec4>();
- Error += test_notEqual<glm::highp_vec4>();
-
- Error += test_notEqual<glm::dvec1>();
- Error += test_notEqual<glm::lowp_dvec1>();
- Error += test_notEqual<glm::mediump_dvec1>();
- Error += test_notEqual<glm::highp_dvec1>();
- Error += test_notEqual<glm::dvec2>();
- Error += test_notEqual<glm::lowp_dvec2>();
- Error += test_notEqual<glm::mediump_dvec2>();
- Error += test_notEqual<glm::highp_dvec2>();
- Error += test_notEqual<glm::dvec3>();
- Error += test_notEqual<glm::lowp_dvec3>();
- Error += test_notEqual<glm::mediump_dvec3>();
- Error += test_notEqual<glm::highp_dvec3>();
- Error += test_notEqual<glm::dvec4>();
- Error += test_notEqual<glm::lowp_dvec4>();
- Error += test_notEqual<glm::mediump_dvec4>();
- Error += test_notEqual<glm::highp_dvec4>();
-
- Error += test_constexpr<glm::vec1, float>();
- Error += test_constexpr<glm::vec2, float>();
- Error += test_constexpr<glm::vec3, float>();
- Error += test_constexpr<glm::vec4, float>();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_vector_uint1_sized.cpp b/3rdparty/glm/source/test/ext/ext_vector_uint1_sized.cpp
deleted file mode 100644
index f2e4624..0000000
--- a/3rdparty/glm/source/test/ext/ext_vector_uint1_sized.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <glm/ext/vector_uint1_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
- static_assert(sizeof(glm::u8vec1) == 1, "uint8 size isn't 1 byte on this platform");
- static_assert(sizeof(glm::u16vec1) == 2, "uint16 size isn't 2 bytes on this platform");
- static_assert(sizeof(glm::u32vec1) == 4, "uint32 size isn't 4 bytes on this platform");
- static_assert(sizeof(glm::u64vec1) == 8, "uint64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_size()
-{
- int Error = 0;
-
- Error += sizeof(glm::u8vec1) == 1 ? 0 : 1;
- Error += sizeof(glm::u16vec1) == 2 ? 0 : 1;
- Error += sizeof(glm::u32vec1) == 4 ? 0 : 1;
- Error += sizeof(glm::u64vec1) == 8 ? 0 : 1;
-
- return Error;
-}
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::u8vec1) < sizeof(glm::u16vec1) ? 0 : 1;
- Error += sizeof(glm::u16vec1) < sizeof(glm::u32vec1) ? 0 : 1;
- Error += sizeof(glm::u32vec1) < sizeof(glm::u64vec1) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_size();
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_vector_uint2_sized.cpp b/3rdparty/glm/source/test/ext/ext_vector_uint2_sized.cpp
deleted file mode 100644
index 9c0977e..0000000
--- a/3rdparty/glm/source/test/ext/ext_vector_uint2_sized.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <glm/ext/vector_uint2_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
-static_assert(sizeof(glm::u8vec2) == 2, "int8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::u16vec2) == 4, "int16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::u32vec2) == 8, "int32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::u64vec2) == 16, "int64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_size()
-{
- int Error = 0;
-
- Error += sizeof(glm::u8vec2) == 2 ? 0 : 1;
- Error += sizeof(glm::u16vec2) == 4 ? 0 : 1;
- Error += sizeof(glm::u32vec2) == 8 ? 0 : 1;
- Error += sizeof(glm::u64vec2) == 16 ? 0 : 1;
-
- return Error;
-}
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::u8vec2) < sizeof(glm::u16vec2) ? 0 : 1;
- Error += sizeof(glm::u16vec2) < sizeof(glm::u32vec2) ? 0 : 1;
- Error += sizeof(glm::u32vec2) < sizeof(glm::u64vec2) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_size();
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_vector_uint3_sized.cpp b/3rdparty/glm/source/test/ext/ext_vector_uint3_sized.cpp
deleted file mode 100644
index 4cc2e44..0000000
--- a/3rdparty/glm/source/test/ext/ext_vector_uint3_sized.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <glm/ext/vector_uint3_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
-static_assert(sizeof(glm::u8vec3) == 3, "int8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::u16vec3) == 6, "int16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::u32vec3) == 12, "int32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::u64vec3) == 24, "int64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_size()
-{
- int Error = 0;
-
- Error += sizeof(glm::u8vec3) == 3 ? 0 : 1;
- Error += sizeof(glm::u16vec3) == 6 ? 0 : 1;
- Error += sizeof(glm::u32vec3) == 12 ? 0 : 1;
- Error += sizeof(glm::u64vec3) == 24 ? 0 : 1;
-
- return Error;
-}
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::u8vec3) < sizeof(glm::u16vec3) ? 0 : 1;
- Error += sizeof(glm::u16vec3) < sizeof(glm::u32vec3) ? 0 : 1;
- Error += sizeof(glm::u32vec3) < sizeof(glm::u64vec3) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_size();
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_vector_uint4_sized.cpp b/3rdparty/glm/source/test/ext/ext_vector_uint4_sized.cpp
deleted file mode 100644
index 9e7ffe7..0000000
--- a/3rdparty/glm/source/test/ext/ext_vector_uint4_sized.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <glm/ext/vector_uint4_sized.hpp>
-
-#if GLM_HAS_STATIC_ASSERT
-static_assert(sizeof(glm::u8vec4) == 4, "int8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::u16vec4) == 8, "int16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::u32vec4) == 16, "int32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::u64vec4) == 32, "int64 size isn't 8 bytes on this platform");
-#endif
-
-static int test_size()
-{
- int Error = 0;
-
- Error += sizeof(glm::u8vec4) == 4 ? 0 : 1;
- Error += sizeof(glm::u16vec4) == 8 ? 0 : 1;
- Error += sizeof(glm::u32vec4) == 16 ? 0 : 1;
- Error += sizeof(glm::u64vec4) == 32 ? 0 : 1;
-
- return Error;
-}
-
-static int test_comp()
-{
- int Error = 0;
-
- Error += sizeof(glm::u8vec4) < sizeof(glm::u16vec4) ? 0 : 1;
- Error += sizeof(glm::u16vec4) < sizeof(glm::u32vec4) ? 0 : 1;
- Error += sizeof(glm::u32vec4) < sizeof(glm::u64vec4) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_size();
- Error += test_comp();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/ext/ext_vector_ulp.cpp b/3rdparty/glm/source/test/ext/ext_vector_ulp.cpp
deleted file mode 100644
index 6ebd1a1..0000000
--- a/3rdparty/glm/source/test/ext/ext_vector_ulp.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-#include <glm/ext/vector_ulp.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/vector_float4.hpp>
-#include <glm/ext/vector_double4.hpp>
-#include <glm/ext/vector_int4.hpp>
-
-static int test_ulp_float_dist()
-{
- int Error = 0;
-
- glm::vec4 const A(1.0f);
-
- glm::vec4 const B = glm::nextFloat(A);
- Error += glm::any(glm::notEqual(A, B, 0)) ? 0 : 1;
- glm::vec4 const C = glm::prevFloat(B);
- Error += glm::all(glm::equal(A, C, 0)) ? 0 : 1;
-
- glm::ivec4 const D = glm::floatDistance(A, B);
- Error += D == glm::ivec4(1) ? 0 : 1;
- glm::ivec4 const E = glm::floatDistance(A, C);
- Error += E == glm::ivec4(0) ? 0 : 1;
-
- return Error;
-}
-
-static int test_ulp_float_step()
-{
- int Error = 0;
-
- glm::vec4 const A(1.0f);
-
- for(int i = 10; i < 1000; i *= 10)
- {
- glm::vec4 const B = glm::nextFloat(A, i);
- Error += glm::any(glm::notEqual(A, B, 0)) ? 0 : 1;
- glm::vec4 const C = glm::prevFloat(B, i);
- Error += glm::all(glm::equal(A, C, 0)) ? 0 : 1;
-
- glm::ivec4 const D = glm::floatDistance(A, B);
- Error += D == glm::ivec4(i) ? 0 : 1;
- glm::ivec4 const E = glm::floatDistance(A, C);
- Error += E == glm::ivec4(0) ? 0 : 1;
- }
-
- return Error;
-}
-
-static int test_ulp_double_dist()
-{
- int Error = 0;
-
- glm::dvec4 const A(1.0);
-
- glm::dvec4 const B = glm::nextFloat(A);
- Error += glm::any(glm::notEqual(A, B, 0)) ? 0 : 1;
- glm::dvec4 const C = glm::prevFloat(B);
- Error += glm::all(glm::equal(A, C, 0)) ? 0 : 1;
-
- glm::ivec4 const D(glm::floatDistance(A, B));
- Error += D == glm::ivec4(1) ? 0 : 1;
- glm::ivec4 const E = glm::floatDistance(A, C);
- Error += E == glm::ivec4(0) ? 0 : 1;
-
- return Error;
-}
-
-static int test_ulp_double_step()
-{
- int Error = 0;
-
- glm::dvec4 const A(1.0);
-
- for(int i = 10; i < 1000; i *= 10)
- {
- glm::dvec4 const B = glm::nextFloat(A, i);
- Error += glm::any(glm::notEqual(A, B, 0)) ? 0 : 1;
- glm::dvec4 const C = glm::prevFloat(B, i);
- Error += glm::all(glm::equal(A, C, 0)) ? 0 : 1;
-
- glm::ivec4 const D(glm::floatDistance(A, B));
- Error += D == glm::ivec4(i) ? 0 : 1;
- glm::ivec4 const E(glm::floatDistance(A, C));
- Error += E == glm::ivec4(0) ? 0 : 1;
- }
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_ulp_float_dist();
- Error += test_ulp_float_step();
- Error += test_ulp_double_dist();
- Error += test_ulp_double_step();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/glm.cppcheck b/3rdparty/glm/source/test/glm.cppcheck
deleted file mode 100644
index 12081fe..0000000
--- a/3rdparty/glm/source/test/glm.cppcheck
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="1">
- <includedir>
- <dir name="../glm"/>
- </includedir>
-</project>
diff --git a/3rdparty/glm/source/test/gtc/CMakeLists.txt b/3rdparty/glm/source/test/gtc/CMakeLists.txt
deleted file mode 100644
index 4aef24a..0000000
--- a/3rdparty/glm/source/test/gtc/CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-glmCreateTestGTC(gtc_bitfield)
-glmCreateTestGTC(gtc_color_space)
-glmCreateTestGTC(gtc_constants)
-glmCreateTestGTC(gtc_epsilon)
-glmCreateTestGTC(gtc_integer)
-glmCreateTestGTC(gtc_matrix_access)
-glmCreateTestGTC(gtc_matrix_integer)
-glmCreateTestGTC(gtc_matrix_inverse)
-glmCreateTestGTC(gtc_matrix_transform)
-glmCreateTestGTC(gtc_noise)
-glmCreateTestGTC(gtc_packing)
-glmCreateTestGTC(gtc_quaternion)
-glmCreateTestGTC(gtc_random)
-glmCreateTestGTC(gtc_round)
-glmCreateTestGTC(gtc_reciprocal)
-glmCreateTestGTC(gtc_type_aligned)
-glmCreateTestGTC(gtc_type_precision)
-glmCreateTestGTC(gtc_type_ptr)
-glmCreateTestGTC(gtc_ulp)
-glmCreateTestGTC(gtc_vec1)
diff --git a/3rdparty/glm/source/test/gtc/gtc_bitfield.cpp b/3rdparty/glm/source/test/gtc/gtc_bitfield.cpp
deleted file mode 100644
index 95c41f1..0000000
--- a/3rdparty/glm/source/test/gtc/gtc_bitfield.cpp
+++ /dev/null
@@ -1,936 +0,0 @@
-#include <glm/gtc/bitfield.hpp>
-#include <glm/gtc/type_precision.hpp>
-#include <glm/vector_relational.hpp>
-#include <glm/integer.hpp>
-#include <ctime>
-#include <cstdio>
-#include <vector>
-
-namespace mask
-{
- template<typename genType>
- struct type
- {
- genType Value;
- genType Return;
- };
-
- inline int mask_zero(int Bits)
- {
- return ~((~0) << Bits);
- }
-
- inline int mask_mix(int Bits)
- {
- return Bits >= sizeof(int) * 8 ? 0xffffffff : (static_cast<int>(1) << Bits) - static_cast<int>(1);
- }
-
- inline int mask_half(int Bits)
- {
- // We do the shift in two steps because 1 << 32 on an int is undefined.
-
- int const Half = Bits >> 1;
- int const Fill = ~0;
- int const ShiftHaft = (Fill << Half);
- int const Rest = Bits - Half;
- int const Reversed = ShiftHaft << Rest;
-
- return ~Reversed;
- }
-
- inline int mask_loop(int Bits)
- {
- int Mask = 0;
- for(int Bit = 0; Bit < Bits; ++Bit)
- Mask |= (static_cast<int>(1) << Bit);
- return Mask;
- }
-
- int perf()
- {
- int const Count = 100000000;
-
- std::clock_t Timestamp1 = std::clock();
-
- {
- std::vector<int> Mask;
- Mask.resize(Count);
- for(int i = 0; i < Count; ++i)
- Mask[i] = mask_mix(i % 32);
- }
-
- std::clock_t Timestamp2 = std::clock();
-
- {
- std::vector<int> Mask;
- Mask.resize(Count);
- for(int i = 0; i < Count; ++i)
- Mask[i] = mask_loop(i % 32);
- }
-
- std::clock_t Timestamp3 = std::clock();
-
- {
- std::vector<int> Mask;
- Mask.resize(Count);
- for(int i = 0; i < Count; ++i)
- Mask[i] = glm::mask(i % 32);
- }
-
- std::clock_t Timestamp4 = std::clock();
-
- {
- std::vector<int> Mask;
- Mask.resize(Count);
- for(int i = 0; i < Count; ++i)
- Mask[i] = mask_zero(i % 32);
- }
-
- std::clock_t Timestamp5 = std::clock();
-
- {
- std::vector<int> Mask;
- Mask.resize(Count);
- for(int i = 0; i < Count; ++i)
- Mask[i] = mask_half(i % 32);
- }
-
- std::clock_t Timestamp6 = std::clock();
-
- std::clock_t TimeMix = Timestamp2 - Timestamp1;
- std::clock_t TimeLoop = Timestamp3 - Timestamp2;
- std::clock_t TimeDefault = Timestamp4 - Timestamp3;
- std::clock_t TimeZero = Timestamp5 - Timestamp4;
- std::clock_t TimeHalf = Timestamp6 - Timestamp5;
-
- std::printf("mask[mix]: %d\n", static_cast<unsigned int>(TimeMix));
- std::printf("mask[loop]: %d\n", static_cast<unsigned int>(TimeLoop));
- std::printf("mask[default]: %d\n", static_cast<unsigned int>(TimeDefault));
- std::printf("mask[zero]: %d\n", static_cast<unsigned int>(TimeZero));
- std::printf("mask[half]: %d\n", static_cast<unsigned int>(TimeHalf));
-
- return TimeDefault < TimeLoop ? 0 : 1;
- }
-
- int test_uint()
- {
- type<glm::uint> const Data[] =
- {
- { 0, 0x00000000},
- { 1, 0x00000001},
- { 2, 0x00000003},
- { 3, 0x00000007},
- {31, 0x7fffffff},
- {32, 0xffffffff}
- };
-
- int Error = 0;
-/* mask_zero is sadly not a correct code
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<int>); ++i)
- {
- int Result = mask_zero(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-*/
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<int>); ++i)
- {
- int Result = mask_mix(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<int>); ++i)
- {
- int Result = mask_half(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<int>); ++i)
- {
- int Result = mask_loop(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<int>); ++i)
- {
- int Result = glm::mask(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- return Error;
- }
-
- int test_uvec4()
- {
- type<glm::ivec4> const Data[] =
- {
- {glm::ivec4( 0), glm::ivec4(0x00000000)},
- {glm::ivec4( 1), glm::ivec4(0x00000001)},
- {glm::ivec4( 2), glm::ivec4(0x00000003)},
- {glm::ivec4( 3), glm::ivec4(0x00000007)},
- {glm::ivec4(31), glm::ivec4(0x7fffffff)},
- {glm::ivec4(32), glm::ivec4(0xffffffff)}
- };
-
- int Error(0);
-
- for(std::size_t i = 0, n = sizeof(Data) / sizeof(type<glm::ivec4>); i < n; ++i)
- {
- glm::ivec4 Result = glm::mask(Data[i].Value);
- Error += glm::all(glm::equal(Data[i].Return, Result)) ? 0 : 1;
- }
-
- return Error;
- }
-
- int test()
- {
- int Error(0);
-
- Error += test_uint();
- Error += test_uvec4();
-
- return Error;
- }
-}//namespace mask
-
-namespace bitfieldInterleave3
-{
- template<typename PARAM, typename RET>
- inline RET refBitfieldInterleave(PARAM x, PARAM y, PARAM z)
- {
- RET Result = 0;
- for(RET i = 0; i < sizeof(PARAM) * 8; ++i)
- {
- Result |= ((RET(x) & (RET(1U) << i)) << ((i << 1) + 0));
- Result |= ((RET(y) & (RET(1U) << i)) << ((i << 1) + 1));
- Result |= ((RET(z) & (RET(1U) << i)) << ((i << 1) + 2));
- }
- return Result;
- }
-
- int test()
- {
- int Error(0);
-
- glm::uint16 x_max = 1 << 11;
- glm::uint16 y_max = 1 << 11;
- glm::uint16 z_max = 1 << 11;
-
- for(glm::uint16 z = 0; z < z_max; z += 27)
- for(glm::uint16 y = 0; y < y_max; y += 27)
- for(glm::uint16 x = 0; x < x_max; x += 27)
- {
- glm::uint64 ResultA = refBitfieldInterleave<glm::uint16, glm::uint64>(x, y, z);
- glm::uint64 ResultB = glm::bitfieldInterleave(x, y, z);
- Error += ResultA == ResultB ? 0 : 1;
- }
-
- return Error;
- }
-}
-
-namespace bitfieldInterleave4
-{
- template<typename PARAM, typename RET>
- inline RET loopBitfieldInterleave(PARAM x, PARAM y, PARAM z, PARAM w)
- {
- RET const v[4] = {x, y, z, w};
- RET Result = 0;
- for(RET i = 0; i < sizeof(PARAM) * 8; i++)
- {
- Result |= ((((v[0] >> i) & 1U)) << ((i << 2) + 0));
- Result |= ((((v[1] >> i) & 1U)) << ((i << 2) + 1));
- Result |= ((((v[2] >> i) & 1U)) << ((i << 2) + 2));
- Result |= ((((v[3] >> i) & 1U)) << ((i << 2) + 3));
- }
- return Result;
- }
-
- int test()
- {
- int Error(0);
-
- glm::uint16 x_max = 1 << 11;
- glm::uint16 y_max = 1 << 11;
- glm::uint16 z_max = 1 << 11;
- glm::uint16 w_max = 1 << 11;
-
- for(glm::uint16 w = 0; w < w_max; w += 27)
- for(glm::uint16 z = 0; z < z_max; z += 27)
- for(glm::uint16 y = 0; y < y_max; y += 27)
- for(glm::uint16 x = 0; x < x_max; x += 27)
- {
- glm::uint64 ResultA = loopBitfieldInterleave<glm::uint16, glm::uint64>(x, y, z, w);
- glm::uint64 ResultB = glm::bitfieldInterleave(x, y, z, w);
- Error += ResultA == ResultB ? 0 : 1;
- }
-
- return Error;
- }
-}
-
-namespace bitfieldInterleave
-{
- inline glm::uint64 fastBitfieldInterleave(glm::uint32 x, glm::uint32 y)
- {
- glm::uint64 REG1;
- glm::uint64 REG2;
-
- REG1 = x;
- REG1 = ((REG1 << 16) | REG1) & glm::uint64(0x0000FFFF0000FFFF);
- REG1 = ((REG1 << 8) | REG1) & glm::uint64(0x00FF00FF00FF00FF);
- REG1 = ((REG1 << 4) | REG1) & glm::uint64(0x0F0F0F0F0F0F0F0F);
- REG1 = ((REG1 << 2) | REG1) & glm::uint64(0x3333333333333333);
- REG1 = ((REG1 << 1) | REG1) & glm::uint64(0x5555555555555555);
-
- REG2 = y;
- REG2 = ((REG2 << 16) | REG2) & glm::uint64(0x0000FFFF0000FFFF);
- REG2 = ((REG2 << 8) | REG2) & glm::uint64(0x00FF00FF00FF00FF);
- REG2 = ((REG2 << 4) | REG2) & glm::uint64(0x0F0F0F0F0F0F0F0F);
- REG2 = ((REG2 << 2) | REG2) & glm::uint64(0x3333333333333333);
- REG2 = ((REG2 << 1) | REG2) & glm::uint64(0x5555555555555555);
-
- return REG1 | (REG2 << 1);
- }
-
- inline glm::uint64 interleaveBitfieldInterleave(glm::uint32 x, glm::uint32 y)
- {
- glm::uint64 REG1;
- glm::uint64 REG2;
-
- REG1 = x;
- REG2 = y;
-
- REG1 = ((REG1 << 16) | REG1) & glm::uint64(0x0000FFFF0000FFFF);
- REG2 = ((REG2 << 16) | REG2) & glm::uint64(0x0000FFFF0000FFFF);
-
- REG1 = ((REG1 << 8) | REG1) & glm::uint64(0x00FF00FF00FF00FF);
- REG2 = ((REG2 << 8) | REG2) & glm::uint64(0x00FF00FF00FF00FF);
-
- REG1 = ((REG1 << 4) | REG1) & glm::uint64(0x0F0F0F0F0F0F0F0F);
- REG2 = ((REG2 << 4) | REG2) & glm::uint64(0x0F0F0F0F0F0F0F0F);
-
- REG1 = ((REG1 << 2) | REG1) & glm::uint64(0x3333333333333333);
- REG2 = ((REG2 << 2) | REG2) & glm::uint64(0x3333333333333333);
-
- REG1 = ((REG1 << 1) | REG1) & glm::uint64(0x5555555555555555);
- REG2 = ((REG2 << 1) | REG2) & glm::uint64(0x5555555555555555);
-
- return REG1 | (REG2 << 1);
- }
-/*
- inline glm::uint64 loopBitfieldInterleave(glm::uint32 x, glm::uint32 y)
- {
- static glm::uint64 const Mask[5] =
- {
- 0x5555555555555555,
- 0x3333333333333333,
- 0x0F0F0F0F0F0F0F0F,
- 0x00FF00FF00FF00FF,
- 0x0000FFFF0000FFFF
- };
-
- glm::uint64 REG1 = x;
- glm::uint64 REG2 = y;
- for(int i = 4; i >= 0; --i)
- {
- REG1 = ((REG1 << (1 << i)) | REG1) & Mask[i];
- REG2 = ((REG2 << (1 << i)) | REG2) & Mask[i];
- }
-
- return REG1 | (REG2 << 1);
- }
-*/
-#if GLM_ARCH & GLM_ARCH_SSE2_BIT
- inline glm::uint64 sseBitfieldInterleave(glm::uint32 x, glm::uint32 y)
- {
- __m128i const Array = _mm_set_epi32(0, y, 0, x);
-
- __m128i const Mask4 = _mm_set1_epi32(0x0000FFFF);
- __m128i const Mask3 = _mm_set1_epi32(0x00FF00FF);
- __m128i const Mask2 = _mm_set1_epi32(0x0F0F0F0F);
- __m128i const Mask1 = _mm_set1_epi32(0x33333333);
- __m128i const Mask0 = _mm_set1_epi32(0x55555555);
-
- __m128i Reg1;
- __m128i Reg2;
-
- // REG1 = x;
- // REG2 = y;
- Reg1 = _mm_load_si128(&Array);
-
- //REG1 = ((REG1 << 16) | REG1) & glm::uint64(0x0000FFFF0000FFFF);
- //REG2 = ((REG2 << 16) | REG2) & glm::uint64(0x0000FFFF0000FFFF);
- Reg2 = _mm_slli_si128(Reg1, 2);
- Reg1 = _mm_or_si128(Reg2, Reg1);
- Reg1 = _mm_and_si128(Reg1, Mask4);
-
- //REG1 = ((REG1 << 8) | REG1) & glm::uint64(0x00FF00FF00FF00FF);
- //REG2 = ((REG2 << 8) | REG2) & glm::uint64(0x00FF00FF00FF00FF);
- Reg2 = _mm_slli_si128(Reg1, 1);
- Reg1 = _mm_or_si128(Reg2, Reg1);
- Reg1 = _mm_and_si128(Reg1, Mask3);
-
- //REG1 = ((REG1 << 4) | REG1) & glm::uint64(0x0F0F0F0F0F0F0F0F);
- //REG2 = ((REG2 << 4) | REG2) & glm::uint64(0x0F0F0F0F0F0F0F0F);
- Reg2 = _mm_slli_epi32(Reg1, 4);
- Reg1 = _mm_or_si128(Reg2, Reg1);
- Reg1 = _mm_and_si128(Reg1, Mask2);
-
- //REG1 = ((REG1 << 2) | REG1) & glm::uint64(0x3333333333333333);
- //REG2 = ((REG2 << 2) | REG2) & glm::uint64(0x3333333333333333);
- Reg2 = _mm_slli_epi32(Reg1, 2);
- Reg1 = _mm_or_si128(Reg2, Reg1);
- Reg1 = _mm_and_si128(Reg1, Mask1);
-
- //REG1 = ((REG1 << 1) | REG1) & glm::uint64(0x5555555555555555);
- //REG2 = ((REG2 << 1) | REG2) & glm::uint64(0x5555555555555555);
- Reg2 = _mm_slli_epi32(Reg1, 1);
- Reg1 = _mm_or_si128(Reg2, Reg1);
- Reg1 = _mm_and_si128(Reg1, Mask0);
-
- //return REG1 | (REG2 << 1);
- Reg2 = _mm_slli_epi32(Reg1, 1);
- Reg2 = _mm_srli_si128(Reg2, 8);
- Reg1 = _mm_or_si128(Reg1, Reg2);
-
- __m128i Result;
- _mm_store_si128(&Result, Reg1);
- return *reinterpret_cast<glm::uint64*>(&Result);
- }
-
- inline glm::uint64 sseUnalignedBitfieldInterleave(glm::uint32 x, glm::uint32 y)
- {
- __m128i const Array = _mm_set_epi32(0, y, 0, x);
-
- __m128i const Mask4 = _mm_set1_epi32(0x0000FFFF);
- __m128i const Mask3 = _mm_set1_epi32(0x00FF00FF);
- __m128i const Mask2 = _mm_set1_epi32(0x0F0F0F0F);
- __m128i const Mask1 = _mm_set1_epi32(0x33333333);
- __m128i const Mask0 = _mm_set1_epi32(0x55555555);
-
- __m128i Reg1;
- __m128i Reg2;
-
- // REG1 = x;
- // REG2 = y;
- Reg1 = _mm_loadu_si128(&Array);
-
- //REG1 = ((REG1 << 16) | REG1) & glm::uint64(0x0000FFFF0000FFFF);
- //REG2 = ((REG2 << 16) | REG2) & glm::uint64(0x0000FFFF0000FFFF);
- Reg2 = _mm_slli_si128(Reg1, 2);
- Reg1 = _mm_or_si128(Reg2, Reg1);
- Reg1 = _mm_and_si128(Reg1, Mask4);
-
- //REG1 = ((REG1 << 8) | REG1) & glm::uint64(0x00FF00FF00FF00FF);
- //REG2 = ((REG2 << 8) | REG2) & glm::uint64(0x00FF00FF00FF00FF);
- Reg2 = _mm_slli_si128(Reg1, 1);
- Reg1 = _mm_or_si128(Reg2, Reg1);
- Reg1 = _mm_and_si128(Reg1, Mask3);
-
- //REG1 = ((REG1 << 4) | REG1) & glm::uint64(0x0F0F0F0F0F0F0F0F);
- //REG2 = ((REG2 << 4) | REG2) & glm::uint64(0x0F0F0F0F0F0F0F0F);
- Reg2 = _mm_slli_epi32(Reg1, 4);
- Reg1 = _mm_or_si128(Reg2, Reg1);
- Reg1 = _mm_and_si128(Reg1, Mask2);
-
- //REG1 = ((REG1 << 2) | REG1) & glm::uint64(0x3333333333333333);
- //REG2 = ((REG2 << 2) | REG2) & glm::uint64(0x3333333333333333);
- Reg2 = _mm_slli_epi32(Reg1, 2);
- Reg1 = _mm_or_si128(Reg2, Reg1);
- Reg1 = _mm_and_si128(Reg1, Mask1);
-
- //REG1 = ((REG1 << 1) | REG1) & glm::uint64(0x5555555555555555);
- //REG2 = ((REG2 << 1) | REG2) & glm::uint64(0x5555555555555555);
- Reg2 = _mm_slli_epi32(Reg1, 1);
- Reg1 = _mm_or_si128(Reg2, Reg1);
- Reg1 = _mm_and_si128(Reg1, Mask0);
-
- //return REG1 | (REG2 << 1);
- Reg2 = _mm_slli_epi32(Reg1, 1);
- Reg2 = _mm_srli_si128(Reg2, 8);
- Reg1 = _mm_or_si128(Reg1, Reg2);
-
- __m128i Result;
- _mm_store_si128(&Result, Reg1);
- return *reinterpret_cast<glm::uint64*>(&Result);
- }
-#endif//GLM_ARCH & GLM_ARCH_SSE2_BIT
-
- int test()
- {
- int Error = 0;
-
-/*
- {
- for(glm::uint32 y = 0; y < (1 << 10); ++y)
- for(glm::uint32 x = 0; x < (1 << 10); ++x)
- {
- glm::uint64 A = glm::bitfieldInterleave(x, y);
- glm::uint64 B = fastBitfieldInterleave(x, y);
- //glm::uint64 C = loopBitfieldInterleave(x, y);
- glm::uint64 D = interleaveBitfieldInterleave(x, y);
-
- assert(A == B);
- //assert(A == C);
- assert(A == D);
-
-# if GLM_ARCH & GLM_ARCH_SSE2_BIT
- glm::uint64 E = sseBitfieldInterleave(x, y);
- glm::uint64 F = sseUnalignedBitfieldInterleave(x, y);
- assert(A == E);
- assert(A == F);
-
- __m128i G = glm_i128_interleave(_mm_set_epi32(0, y, 0, x));
- glm::uint64 Result[2];
- _mm_storeu_si128((__m128i*)Result, G);
- assert(A == Result[0]);
-# endif//GLM_ARCH & GLM_ARCH_SSE2_BIT
- }
- }
-*/
- {
- for(glm::uint8 y = 0; y < 127; ++y)
- for(glm::uint8 x = 0; x < 127; ++x)
- {
- glm::uint64 A(glm::bitfieldInterleave(glm::u8vec2(x, y)));
- glm::uint64 B(glm::bitfieldInterleave(glm::u16vec2(x, y)));
- glm::uint64 C(glm::bitfieldInterleave(glm::u32vec2(x, y)));
-
- Error += A == B ? 0 : 1;
- Error += A == C ? 0 : 1;
-
- glm::u32vec2 const& D = glm::bitfieldDeinterleave(C);
- Error += D.x == x ? 0 : 1;
- Error += D.y == y ? 0 : 1;
- }
- }
-
- {
- for(glm::uint8 y = 0; y < 127; ++y)
- for(glm::uint8 x = 0; x < 127; ++x)
- {
- glm::int64 A(glm::bitfieldInterleave(glm::int8(x), glm::int8(y)));
- glm::int64 B(glm::bitfieldInterleave(glm::int16(x), glm::int16(y)));
- glm::int64 C(glm::bitfieldInterleave(glm::int32(x), glm::int32(y)));
-
- Error += A == B ? 0 : 1;
- Error += A == C ? 0 : 1;
- }
- }
-
- return Error;
- }
-
- int perf()
- {
- glm::uint32 x_max = 1 << 11;
- glm::uint32 y_max = 1 << 10;
-
- // ALU
- std::vector<glm::uint64> Data(x_max * y_max);
- std::vector<glm::u32vec2> Param(x_max * y_max);
- for(glm::uint32 i = 0; i < Param.size(); ++i)
- Param[i] = glm::u32vec2(i % x_max, i / y_max);
-
- {
- std::clock_t LastTime = std::clock();
-
- for(std::size_t i = 0; i < Data.size(); ++i)
- Data[i] = glm::bitfieldInterleave(Param[i].x, Param[i].y);
-
- std::clock_t Time = std::clock() - LastTime;
-
- std::printf("glm::bitfieldInterleave Time %d clocks\n", static_cast<int>(Time));
- }
-
- {
- std::clock_t LastTime = std::clock();
-
- for(std::size_t i = 0; i < Data.size(); ++i)
- Data[i] = fastBitfieldInterleave(Param[i].x, Param[i].y);
-
- std::clock_t Time = std::clock() - LastTime;
-
- std::printf("fastBitfieldInterleave Time %d clocks\n", static_cast<int>(Time));
- }
-/*
- {
- std::clock_t LastTime = std::clock();
-
- for(std::size_t i = 0; i < Data.size(); ++i)
- Data[i] = loopBitfieldInterleave(Param[i].x, Param[i].y);
-
- std::clock_t Time = std::clock() - LastTime;
-
- std::printf("loopBitfieldInterleave Time %d clocks\n", static_cast<int>(Time));
- }
-*/
- {
- std::clock_t LastTime = std::clock();
-
- for(std::size_t i = 0; i < Data.size(); ++i)
- Data[i] = interleaveBitfieldInterleave(Param[i].x, Param[i].y);
-
- std::clock_t Time = std::clock() - LastTime;
-
- std::printf("interleaveBitfieldInterleave Time %d clocks\n", static_cast<int>(Time));
- }
-
-# if GLM_ARCH & GLM_ARCH_SSE2_BIT
- {
- std::clock_t LastTime = std::clock();
-
- for(std::size_t i = 0; i < Data.size(); ++i)
- Data[i] = sseBitfieldInterleave(Param[i].x, Param[i].y);
-
- std::clock_t Time = std::clock() - LastTime;
-
- std::printf("sseBitfieldInterleave Time %d clocks\n", static_cast<int>(Time));
- }
-
- {
- std::clock_t LastTime = std::clock();
-
- for(std::size_t i = 0; i < Data.size(); ++i)
- Data[i] = sseUnalignedBitfieldInterleave(Param[i].x, Param[i].y);
-
- std::clock_t Time = std::clock() - LastTime;
-
- std::printf("sseUnalignedBitfieldInterleave Time %d clocks\n", static_cast<int>(Time));
- }
-# endif//GLM_ARCH & GLM_ARCH_SSE2_BIT
-
- {
- std::clock_t LastTime = std::clock();
-
- for(std::size_t i = 0; i < Data.size(); ++i)
- Data[i] = glm::bitfieldInterleave(Param[i].x, Param[i].y, Param[i].x);
-
- std::clock_t Time = std::clock() - LastTime;
-
- std::printf("glm::detail::bitfieldInterleave Time %d clocks\n", static_cast<int>(Time));
- }
-
-# if(GLM_ARCH & GLM_ARCH_SSE2_BIT && !(GLM_COMPILER & GLM_COMPILER_GCC))
- {
- // SIMD
- std::vector<__m128i> SimdData;
- SimdData.resize(static_cast<std::size_t>(x_max * y_max));
- std::vector<__m128i> SimdParam;
- SimdParam.resize(static_cast<std::size_t>(x_max * y_max));
- for(std::size_t i = 0; i < SimdParam.size(); ++i)
- SimdParam[i] = _mm_set_epi32(static_cast<int>(i % static_cast<std::size_t>(x_max)), 0, static_cast<int>(i / static_cast<std::size_t>(y_max)), 0);
-
- std::clock_t LastTime = std::clock();
-
- for(std::size_t i = 0; i < SimdData.size(); ++i)
- SimdData[i] = glm_i128_interleave(SimdParam[i]);
-
- std::clock_t Time = std::clock() - LastTime;
-
- std::printf("_mm_bit_interleave_si128 Time %d clocks\n", static_cast<int>(Time));
- }
-# endif//GLM_ARCH & GLM_ARCH_SSE2_BIT
-
- return 0;
- }
-}//namespace bitfieldInterleave
-
-namespace bitfieldInterleave5
-{
- GLM_FUNC_QUALIFIER glm::uint16 bitfieldInterleave_u8vec2(glm::uint8 x, glm::uint8 y)
- {
- glm::uint32 Result = (glm::uint32(y) << 16) | glm::uint32(x);
- Result = ((Result << 4) | Result) & 0x0F0F0F0F;
- Result = ((Result << 2) | Result) & 0x33333333;
- Result = ((Result << 1) | Result) & 0x55555555;
- return static_cast<glm::uint16>((Result & 0x0000FFFF) | (Result >> 15));
- }
-
- GLM_FUNC_QUALIFIER glm::u8vec2 bitfieldDeinterleave_u8vec2(glm::uint16 InterleavedBitfield)
- {
- glm::uint32 Result(InterleavedBitfield);
- Result = ((Result << 15) | Result) & 0x55555555;
- Result = ((Result >> 1) | Result) & 0x33333333;
- Result = ((Result >> 2) | Result) & 0x0F0F0F0F;
- Result = ((Result >> 4) | Result) & 0x00FF00FF;
- return glm::u8vec2(Result & 0x0000FFFF, Result >> 16);
- }
-
- GLM_FUNC_QUALIFIER glm::uint32 bitfieldInterleave_u8vec4(glm::uint8 x, glm::uint8 y, glm::uint8 z, glm::uint8 w)
- {
- glm::uint64 Result = (glm::uint64(w) << 48) | (glm::uint64(z) << 32) | (glm::uint64(y) << 16) | glm::uint64(x);
- Result = ((Result << 12) | Result) & 0x000F000F000F000Full;
- Result = ((Result << 6) | Result) & 0x0303030303030303ull;
- Result = ((Result << 3) | Result) & 0x1111111111111111ull;
-
- const glm::uint32 a = static_cast<glm::uint32>((Result & 0x000000000000FFFF) >> ( 0 - 0));
- const glm::uint32 b = static_cast<glm::uint32>((Result & 0x00000000FFFF0000) >> (16 - 3));
- const glm::uint32 c = static_cast<glm::uint32>((Result & 0x0000FFFF00000000) >> (32 - 6));
- const glm::uint32 d = static_cast<glm::uint32>((Result & 0xFFFF000000000000) >> (48 - 12));
-
- return a | b | c | d;
- }
-
- GLM_FUNC_QUALIFIER glm::u8vec4 bitfieldDeinterleave_u8vec4(glm::uint32 InterleavedBitfield)
- {
- glm::uint64 Result(InterleavedBitfield);
- Result = ((Result << 15) | Result) & 0x9249249249249249ull;
- Result = ((Result >> 1) | Result) & 0x30C30C30C30C30C3ull;
- Result = ((Result >> 2) | Result) & 0xF00F00F00F00F00Full;
- Result = ((Result >> 4) | Result) & 0x00FF0000FF0000FFull;
- return glm::u8vec4(
- (Result >> 0) & 0x000000000000FFFFull,
- (Result >> 16) & 0x00000000FFFF0000ull,
- (Result >> 32) & 0x0000FFFF00000000ull,
- (Result >> 48) & 0xFFFF000000000000ull);
- }
-
- GLM_FUNC_QUALIFIER glm::uint32 bitfieldInterleave_u16vec2(glm::uint16 x, glm::uint16 y)
- {
- glm::uint64 Result = (glm::uint64(y) << 32) | glm::uint64(x);
- Result = ((Result << 8) | Result) & static_cast<glm::uint32>(0x00FF00FF00FF00FFull);
- Result = ((Result << 4) | Result) & static_cast<glm::uint32>(0x0F0F0F0F0F0F0F0Full);
- Result = ((Result << 2) | Result) & static_cast<glm::uint32>(0x3333333333333333ull);
- Result = ((Result << 1) | Result) & static_cast<glm::uint32>(0x5555555555555555ull);
- return static_cast<glm::uint32>((Result & 0x00000000FFFFFFFFull) | (Result >> 31));
- }
-
- GLM_FUNC_QUALIFIER glm::u16vec2 bitfieldDeinterleave_u16vec2(glm::uint32 InterleavedBitfield)
- {
- glm::uint64 Result(InterleavedBitfield);
- Result = ((Result << 31) | Result) & 0x5555555555555555ull;
- Result = ((Result >> 1) | Result) & 0x3333333333333333ull;
- Result = ((Result >> 2) | Result) & 0x0F0F0F0F0F0F0F0Full;
- Result = ((Result >> 4) | Result) & 0x00FF00FF00FF00FFull;
- Result = ((Result >> 8) | Result) & 0x0000FFFF0000FFFFull;
- return glm::u16vec2(Result & 0x00000000FFFFFFFFull, Result >> 32);
- }
-
- int test()
- {
- int Error = 0;
-
- for(glm::size_t j = 0; j < 256; ++j)
- for(glm::size_t i = 0; i < 256; ++i)
- {
- glm::uint16 A = bitfieldInterleave_u8vec2(glm::uint8(i), glm::uint8(j));
- glm::uint16 B = glm::bitfieldInterleave(glm::uint8(i), glm::uint8(j));
- Error += A == B ? 0 : 1;
-
- glm::u8vec2 C = bitfieldDeinterleave_u8vec2(A);
- Error += C.x == glm::uint8(i) ? 0 : 1;
- Error += C.y == glm::uint8(j) ? 0 : 1;
- }
-
- for(glm::size_t j = 0; j < 256; ++j)
- for(glm::size_t i = 0; i < 256; ++i)
- {
- glm::uint32 A = bitfieldInterleave_u8vec4(glm::uint8(i), glm::uint8(j), glm::uint8(i), glm::uint8(j));
- glm::uint32 B = glm::bitfieldInterleave(glm::uint8(i), glm::uint8(j), glm::uint8(i), glm::uint8(j));
- Error += A == B ? 0 : 1;
-/*
- glm::u8vec4 C = bitfieldDeinterleave_u8vec4(A);
- Error += C.x == glm::uint8(i) ? 0 : 1;
- Error += C.y == glm::uint8(j) ? 0 : 1;
- Error += C.z == glm::uint8(i) ? 0 : 1;
- Error += C.w == glm::uint8(j) ? 0 : 1;
-*/
- }
-
- for(glm::size_t j = 0; j < 256; ++j)
- for(glm::size_t i = 0; i < 256; ++i)
- {
- glm::uint32 A = bitfieldInterleave_u16vec2(glm::uint16(i), glm::uint16(j));
- glm::uint32 B = glm::bitfieldInterleave(glm::uint16(i), glm::uint16(j));
- Error += A == B ? 0 : 1;
- }
-
- return Error;
- }
-
- int perf_old_u8vec2(std::vector<glm::uint16>& Result)
- {
- int Error = 0;
-
- const std::clock_t BeginTime = std::clock();
-
- for(glm::size_t k = 0; k < 10000; ++k)
- for(glm::size_t j = 0; j < 256; ++j)
- for(glm::size_t i = 0; i < 256; ++i)
- Error += Result[j * 256 + i] == glm::bitfieldInterleave(glm::uint8(i), glm::uint8(j)) ? 0 : 1;
-
- const std::clock_t EndTime = std::clock();
-
- std::printf("glm::bitfieldInterleave<u8vec2> Time %d clocks\n", static_cast<int>(EndTime - BeginTime));
-
- return Error;
- }
-
- int perf_new_u8vec2(std::vector<glm::uint16>& Result)
- {
- int Error = 0;
-
- const std::clock_t BeginTime = std::clock();
-
- for(glm::size_t k = 0; k < 10000; ++k)
- for(glm::size_t j = 0; j < 256; ++j)
- for(glm::size_t i = 0; i < 256; ++i)
- Error += Result[j * 256 + i] == bitfieldInterleave_u8vec2(glm::uint8(i), glm::uint8(j)) ? 0 : 1;
-
- const std::clock_t EndTime = std::clock();
-
- std::printf("bitfieldInterleave_u8vec2 Time %d clocks\n", static_cast<int>(EndTime - BeginTime));
-
- return Error;
- }
-
- int perf_old_u8vec4(std::vector<glm::uint32>& Result)
- {
- int Error = 0;
-
- const std::clock_t BeginTime = std::clock();
-
- for(glm::size_t k = 0; k < 10000; ++k)
- for(glm::size_t j = 0; j < 256; ++j)
- for(glm::size_t i = 0; i < 256; ++i)
- Error += Result[j * 256 + i] == glm::bitfieldInterleave(glm::uint8(i), glm::uint8(j), glm::uint8(i), glm::uint8(j)) ? 0 : 1;
-
- const std::clock_t EndTime = std::clock();
-
- std::printf("glm::bitfieldInterleave<u8vec4> Time %d clocks\n", static_cast<int>(EndTime - BeginTime));
-
- return Error;
- }
-
- int perf_new_u8vec4(std::vector<glm::uint32>& Result)
- {
- int Error = 0;
-
- const std::clock_t BeginTime = std::clock();
-
- for(glm::size_t k = 0; k < 10000; ++k)
- for(glm::size_t j = 0; j < 256; ++j)
- for(glm::size_t i = 0; i < 256; ++i)
- Error += Result[j * 256 + i] == bitfieldInterleave_u8vec4(glm::uint8(i), glm::uint8(j), glm::uint8(i), glm::uint8(j)) ? 0 : 1;
-
- const std::clock_t EndTime = std::clock();
-
- std::printf("bitfieldInterleave_u8vec4 Time %d clocks\n", static_cast<int>(EndTime - BeginTime));
-
- return Error;
- }
-
- int perf_old_u16vec2(std::vector<glm::uint32>& Result)
- {
- int Error = 0;
-
- const std::clock_t BeginTime = std::clock();
-
- for(glm::size_t k = 0; k < 10000; ++k)
- for(glm::size_t j = 0; j < 256; ++j)
- for(glm::size_t i = 0; i < 256; ++i)
- Error += Result[j * 256 + i] == glm::bitfieldInterleave(glm::uint16(i), glm::uint16(j)) ? 0 : 1;
-
- const std::clock_t EndTime = std::clock();
-
- std::printf("glm::bitfieldInterleave<u16vec2> Time %d clocks\n", static_cast<int>(EndTime - BeginTime));
-
- return Error;
- }
-
- int perf_new_u16vec2(std::vector<glm::uint32>& Result)
- {
- int Error = 0;
-
- const std::clock_t BeginTime = std::clock();
-
- for(glm::size_t k = 0; k < 10000; ++k)
- for(glm::size_t j = 0; j < 256; ++j)
- for(glm::size_t i = 0; i < 256; ++i)
- Error += Result[j * 256 + i] == bitfieldInterleave_u16vec2(glm::uint16(i), glm::uint16(j)) ? 0 : 1;
-
- const std::clock_t EndTime = std::clock();
-
- std::printf("bitfieldInterleave_u16vec2 Time %d clocks\n", static_cast<int>(EndTime - BeginTime));
-
- return Error;
- }
-
- int perf()
- {
- int Error = 0;
-
- std::printf("bitfieldInterleave perf: init\r");
-
- std::vector<glm::uint16> Result_u8vec2(256 * 256, 0);
- for(glm::size_t j = 0; j < 256; ++j)
- for(glm::size_t i = 0; i < 256; ++i)
- Result_u8vec2[j * 256 + i] = glm::bitfieldInterleave(glm::uint8(i), glm::uint8(j));
-
- Error += perf_old_u8vec2(Result_u8vec2);
- Error += perf_new_u8vec2(Result_u8vec2);
-
- std::vector<glm::uint32> Result_u8vec4(256 * 256, 0);
- for(glm::size_t j = 0; j < 256; ++j)
- for(glm::size_t i = 0; i < 256; ++i)
- Result_u8vec4[j * 256 + i] = glm::bitfieldInterleave(glm::uint8(i), glm::uint8(j), glm::uint8(i), glm::uint8(j));
-
- Error += perf_old_u8vec4(Result_u8vec4);
- Error += perf_new_u8vec4(Result_u8vec4);
-
- std::vector<glm::uint32> Result_u16vec2(256 * 256, 0);
- for(glm::size_t j = 0; j < 256; ++j)
- for(glm::size_t i = 0; i < 256; ++i)
- Result_u16vec2[j * 256 + i] = glm::bitfieldInterleave(glm::uint16(i), glm::uint16(j));
-
- Error += perf_old_u16vec2(Result_u16vec2);
- Error += perf_new_u16vec2(Result_u16vec2);
-
- std::printf("bitfieldInterleave perf: %d Errors\n", Error);
-
- return Error;
- }
-
-}//namespace bitfieldInterleave5
-
-static int test_bitfieldRotateRight()
-{
- glm::ivec4 const A = glm::bitfieldRotateRight(glm::ivec4(2), 1);
- glm::ivec4 const B = glm::ivec4(2) >> 1;
-
- return A == B;
-}
-
-static int test_bitfieldRotateLeft()
-{
- glm::ivec4 const A = glm::bitfieldRotateLeft(glm::ivec4(2), 1);
- glm::ivec4 const B = glm::ivec4(2) << 1;
-
- return A == B;
-}
-
-int main()
-{
- int Error = 0;
-
-/* Tests for a faster and to reserve bitfieldInterleave
- Error += ::bitfieldInterleave5::test();
- Error += ::bitfieldInterleave5::perf();
-*/
- Error += ::mask::test();
- Error += ::bitfieldInterleave3::test();
- Error += ::bitfieldInterleave4::test();
- Error += ::bitfieldInterleave::test();
-
- Error += test_bitfieldRotateRight();
- Error += test_bitfieldRotateLeft();
-
-# ifdef NDEBUG
- Error += ::mask::perf();
- Error += ::bitfieldInterleave::perf();
-# endif//NDEBUG
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtc/gtc_color_space.cpp b/3rdparty/glm/source/test/gtc/gtc_color_space.cpp
deleted file mode 100644
index 67650c5..0000000
--- a/3rdparty/glm/source/test/gtc/gtc_color_space.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-#include <glm/gtc/color_space.hpp>
-#include <glm/gtc/epsilon.hpp>
-#include <glm/gtc/constants.hpp>
-
-namespace srgb
-{
- int test()
- {
- int Error(0);
-
- glm::vec3 const ColorSourceRGB(1.0, 0.5, 0.0);
-
- {
- glm::vec3 const ColorSRGB = glm::convertLinearToSRGB(ColorSourceRGB);
- glm::vec3 const ColorRGB = glm::convertSRGBToLinear(ColorSRGB);
- Error += glm::all(glm::epsilonEqual(ColorSourceRGB, ColorRGB, 0.00001f)) ? 0 : 1;
- }
-
- {
- glm::vec3 const ColorSRGB = glm::convertLinearToSRGB(ColorSourceRGB, 2.8f);
- glm::vec3 const ColorRGB = glm::convertSRGBToLinear(ColorSRGB, 2.8f);
- Error += glm::all(glm::epsilonEqual(ColorSourceRGB, ColorRGB, 0.00001f)) ? 0 : 1;
- }
-
- glm::vec4 const ColorSourceRGBA(1.0, 0.5, 0.0, 1.0);
-
- {
- glm::vec4 const ColorSRGB = glm::convertLinearToSRGB(ColorSourceRGBA);
- glm::vec4 const ColorRGB = glm::convertSRGBToLinear(ColorSRGB);
- Error += glm::all(glm::epsilonEqual(ColorSourceRGBA, ColorRGB, 0.00001f)) ? 0 : 1;
- }
-
- {
- glm::vec4 const ColorSRGB = glm::convertLinearToSRGB(ColorSourceRGBA, 2.8f);
- glm::vec4 const ColorRGB = glm::convertSRGBToLinear(ColorSRGB, 2.8f);
- Error += glm::all(glm::epsilonEqual(ColorSourceRGBA, ColorRGB, 0.00001f)) ? 0 : 1;
- }
-
- glm::vec4 const ColorSourceGNI = glm::vec4(107, 107, 104, 131) / glm::vec4(255);
-
- {
- glm::vec4 const ColorGNA = glm::convertSRGBToLinear(ColorSourceGNI) * glm::vec4(255);
- glm::vec4 const ColorGNE = glm::convertLinearToSRGB(ColorSourceGNI) * glm::vec4(255);
- glm::vec4 const ColorSRGB = glm::convertLinearToSRGB(ColorSourceGNI);
- glm::vec4 const ColorRGB = glm::convertSRGBToLinear(ColorSRGB);
- Error += glm::all(glm::epsilonEqual(ColorSourceGNI, ColorRGB, 0.00001f)) ? 0 : 1;
- }
-
- return Error;
- }
-}//namespace srgb
-
-namespace srgb_lowp
-{
- int test()
- {
- int Error(0);
-
- for(float Color = 0.0f; Color < 1.0f; Color += 0.01f)
- {
- glm::highp_vec3 const HighpSRGB = glm::convertLinearToSRGB(glm::highp_vec3(Color));
- glm::lowp_vec3 const LowpSRGB = glm::convertLinearToSRGB(glm::lowp_vec3(Color));
- Error += glm::all(glm::epsilonEqual(glm::abs(HighpSRGB - glm::highp_vec3(LowpSRGB)), glm::highp_vec3(0), 0.1f)) ? 0 : 1;
- }
-
- return Error;
- }
-}//namespace srgb_lowp
-
-int main()
-{
- int Error(0);
-
- Error += srgb::test();
- Error += srgb_lowp::test();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtc/gtc_constants.cpp b/3rdparty/glm/source/test/gtc/gtc_constants.cpp
deleted file mode 100644
index 3897cd0..0000000
--- a/3rdparty/glm/source/test/gtc/gtc_constants.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-#include <glm/gtc/constants.hpp>
-
-int test_epsilon()
-{
- int Error = 0;
-
- {
- float Test = glm::epsilon<float>();
- Error += Test > 0.0f ? 0 : 1;
- }
-
- {
- double Test = glm::epsilon<double>();
- Error += Test > 0.0 ? 0 : 1;
- }
-
- return Error;
-}
-
-int main()
-{
- int Error(0);
-
- //float MinHalf = 0.0f;
- //while (glm::half(MinHalf) == glm::half(0.0f))
- // MinHalf += std::numeric_limits<float>::epsilon();
- Error += test_epsilon();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtc/gtc_epsilon.cpp b/3rdparty/glm/source/test/gtc/gtc_epsilon.cpp
deleted file mode 100644
index f0e6c8a..0000000
--- a/3rdparty/glm/source/test/gtc/gtc_epsilon.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-#include <glm/gtc/epsilon.hpp>
-#include <glm/gtc/constants.hpp>
-#include <glm/gtc/quaternion.hpp>
-#include <glm/vector_relational.hpp>
-
-int test_defined()
-{
- glm::epsilonEqual(glm::vec2(), glm::vec2(), glm::vec2());
- glm::epsilonEqual(glm::vec3(), glm::vec3(), glm::vec3());
- glm::epsilonEqual(glm::vec4(), glm::vec4(), glm::vec4());
-
- glm::epsilonNotEqual(glm::vec2(), glm::vec2(), glm::vec2());
- glm::epsilonNotEqual(glm::vec3(), glm::vec3(), glm::vec3());
- glm::epsilonNotEqual(glm::vec4(), glm::vec4(), glm::vec4());
-
- glm::epsilonEqual(glm::vec2(), glm::vec2(), 0.0f);
- glm::epsilonEqual(glm::vec3(), glm::vec3(), 0.0f);
- glm::epsilonEqual(glm::vec4(), glm::vec4(), 0.0f);
- glm::epsilonEqual(glm::quat(), glm::quat(), 0.0f);
-
- glm::epsilonNotEqual(glm::vec2(), glm::vec2(), 0.0f);
- glm::epsilonNotEqual(glm::vec3(), glm::vec3(), 0.0f);
- glm::epsilonNotEqual(glm::vec4(), glm::vec4(), 0.0f);
- glm::epsilonNotEqual(glm::quat(), glm::quat(), 0.0f);
-
- return 0;
-}
-
-template<typename T>
-int test_equal()
-{
- int Error(0);
-
- {
- T A = glm::epsilon<T>();
- T B = glm::epsilon<T>();
- Error += glm::epsilonEqual(A, B, glm::epsilon<T>() * T(2)) ? 0 : 1;
- }
-
- {
- T A(0);
- T B = static_cast<T>(0) + glm::epsilon<T>();
- Error += glm::epsilonEqual(A, B, glm::epsilon<T>() * T(2)) ? 0 : 1;
- }
-
- {
- T A(0);
- T B = static_cast<T>(0) - glm::epsilon<T>();
- Error += glm::epsilonEqual(A, B, glm::epsilon<T>() * T(2)) ? 0 : 1;
- }
-
- {
- T A = static_cast<T>(0) + glm::epsilon<T>();
- T B = static_cast<T>(0);
- Error += glm::epsilonEqual(A, B, glm::epsilon<T>() * T(2)) ? 0 : 1;
- }
-
- {
- T A = static_cast<T>(0) - glm::epsilon<T>();
- T B = static_cast<T>(0);
- Error += glm::epsilonEqual(A, B, glm::epsilon<T>() * T(2)) ? 0 : 1;
- }
-
- return Error;
-}
-
-int main()
-{
- int Error(0);
-
- Error += test_defined();
- Error += test_equal<float>();
- Error += test_equal<double>();
-
- return Error;
-}
-
-
diff --git a/3rdparty/glm/source/test/gtc/gtc_integer.cpp b/3rdparty/glm/source/test/gtc/gtc_integer.cpp
deleted file mode 100644
index 769d969..0000000
--- a/3rdparty/glm/source/test/gtc/gtc_integer.cpp
+++ /dev/null
@@ -1,233 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#define GLM_FORCE_INLINE
-#include <glm/gtc/epsilon.hpp>
-#include <glm/gtc/integer.hpp>
-#include <glm/gtc/type_precision.hpp>
-#include <glm/gtc/vec1.hpp>
-#include <glm/gtx/type_aligned.hpp>
-#include <glm/vector_relational.hpp>
-#include <glm/vec2.hpp>
-#include <glm/vec3.hpp>
-#include <glm/vec4.hpp>
-#include <ctime>
-#include <cstdio>
-#include <vector>
-#include <cmath>
-
-namespace log2_
-{
- int test()
- {
- int Error = 0;
-
- int A0 = static_cast<int>(glm::log2(16.f));
- glm::ivec1 B0(glm::log2(glm::vec1(16.f)));
- glm::ivec2 C0(glm::log2(glm::vec2(16.f)));
- glm::ivec3 D0(glm::log2(glm::vec3(16.f)));
- glm::ivec4 E0(glm::log2(glm::vec4(16.f)));
-
- int A1 = glm::log2(int(16));
- glm::ivec1 B1 = glm::log2(glm::ivec1(16));
- glm::ivec2 C1 = glm::log2(glm::ivec2(16));
- glm::ivec3 D1 = glm::log2(glm::ivec3(16));
- glm::ivec4 E1 = glm::log2(glm::ivec4(16));
-
- Error += A0 == A1 ? 0 : 1;
- Error += glm::all(glm::equal(B0, B1)) ? 0 : 1;
- Error += glm::all(glm::equal(C0, C1)) ? 0 : 1;
- Error += glm::all(glm::equal(D0, D1)) ? 0 : 1;
- Error += glm::all(glm::equal(E0, E1)) ? 0 : 1;
-
- glm::uint64 A2 = glm::log2(glm::uint64(16));
- glm::u64vec1 B2 = glm::log2(glm::u64vec1(16));
- glm::u64vec2 C2 = glm::log2(glm::u64vec2(16));
- glm::u64vec3 D2 = glm::log2(glm::u64vec3(16));
- glm::u64vec4 E2 = glm::log2(glm::u64vec4(16));
-
- Error += A2 == glm::uint64(4) ? 0 : 1;
- Error += glm::all(glm::equal(B2, glm::u64vec1(4))) ? 0 : 1;
- Error += glm::all(glm::equal(C2, glm::u64vec2(4))) ? 0 : 1;
- Error += glm::all(glm::equal(D2, glm::u64vec3(4))) ? 0 : 1;
- Error += glm::all(glm::equal(E2, glm::u64vec4(4))) ? 0 : 1;
-
- return Error;
- }
-
- int perf(std::size_t Count)
- {
- int Error = 0;
-
- {
- std::vector<int> Result;
- Result.resize(Count);
-
- std::clock_t Begin = clock();
-
- for(int i = 0; i < static_cast<int>(Count); ++i)
- Result[i] = glm::log2(static_cast<int>(i));
-
- std::clock_t End = clock();
-
- std::printf("glm::log2<int>: %d clocks\n", static_cast<int>(End - Begin));
- }
-
- {
- std::vector<glm::ivec4> Result;
- Result.resize(Count);
-
- std::clock_t Begin = clock();
-
- for(int i = 0; i < static_cast<int>(Count); ++i)
- Result[i] = glm::log2(glm::ivec4(i));
-
- std::clock_t End = clock();
-
- std::printf("glm::log2<ivec4>: %d clocks\n", static_cast<int>(End - Begin));
- }
-
-# if GLM_HAS_BITSCAN_WINDOWS
- {
- std::vector<glm::ivec4> Result;
- Result.resize(Count);
-
- std::clock_t Begin = clock();
-
- for(std::size_t i = 0; i < Count; ++i)
- {
- glm::vec<4, unsigned long, glm::defaultp> Tmp;
- _BitScanReverse(&Tmp.x, i);
- _BitScanReverse(&Tmp.y, i);
- _BitScanReverse(&Tmp.z, i);
- _BitScanReverse(&Tmp.w, i);
- Result[i] = glm::ivec4(Tmp);
- }
-
- std::clock_t End = clock();
-
- std::printf("glm::log2<ivec4> inlined: %d clocks\n", static_cast<int>(End - Begin));
- }
-
-
- {
- std::vector<glm::vec<4, unsigned long, glm::defaultp> > Result;
- Result.resize(Count);
-
- std::clock_t Begin = clock();
-
- for(std::size_t i = 0; i < Count; ++i)
- {
- _BitScanReverse(&Result[i].x, i);
- _BitScanReverse(&Result[i].y, i);
- _BitScanReverse(&Result[i].z, i);
- _BitScanReverse(&Result[i].w, i);
- }
-
- std::clock_t End = clock();
-
- std::printf("glm::log2<ivec4> inlined no cast: %d clocks\n", static_cast<int>(End - Begin));
- }
-
-
- {
- std::vector<glm::ivec4> Result;
- Result.resize(Count);
-
- std::clock_t Begin = clock();
-
- for(std::size_t i = 0; i < Count; ++i)
- {
- _BitScanReverse(reinterpret_cast<unsigned long*>(&Result[i].x), i);
- _BitScanReverse(reinterpret_cast<unsigned long*>(&Result[i].y), i);
- _BitScanReverse(reinterpret_cast<unsigned long*>(&Result[i].z), i);
- _BitScanReverse(reinterpret_cast<unsigned long*>(&Result[i].w), i);
- }
-
- std::clock_t End = clock();
-
- std::printf("glm::log2<ivec4> reinterpret: %d clocks\n", static_cast<int>(End - Begin));
- }
-# endif//GLM_HAS_BITSCAN_WINDOWS
-
- {
- std::vector<float> Result;
- Result.resize(Count);
-
- std::clock_t Begin = clock();
-
- for(std::size_t i = 0; i < Count; ++i)
- Result[i] = glm::log2(static_cast<float>(i));
-
- std::clock_t End = clock();
-
- std::printf("glm::log2<float>: %d clocks\n", static_cast<int>(End - Begin));
- }
-
- {
- std::vector<glm::vec4> Result;
- Result.resize(Count);
-
- std::clock_t Begin = clock();
-
- for(int i = 0; i < static_cast<int>(Count); ++i)
- Result[i] = glm::log2(glm::vec4(static_cast<float>(i)));
-
- std::clock_t End = clock();
-
- std::printf("glm::log2<vec4>: %d clocks\n", static_cast<int>(End - Begin));
- }
-
- return Error;
- }
-}//namespace log2_
-
-namespace iround
-{
- int test()
- {
- int Error = 0;
-
- for(float f = 0.0f; f < 3.1f; f += 0.05f)
- {
- int RoundFast = static_cast<int>(glm::iround(f));
- int RoundSTD = static_cast<int>(glm::round(f));
- Error += RoundFast == RoundSTD ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
- }
-}//namespace iround
-
-namespace uround
-{
- int test()
- {
- int Error = 0;
-
- for(float f = 0.0f; f < 3.1f; f += 0.05f)
- {
- int RoundFast = static_cast<int>(glm::uround(f));
- int RoundSTD = static_cast<int>(glm::round(f));
- Error += RoundFast == RoundSTD ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
- }
-}//namespace uround
-
-int main()
-{
- int Error(0);
-
- Error += ::log2_::test();
- Error += ::iround::test();
- Error += ::uround::test();
-
-# ifdef NDEBUG
- std::size_t const Samples(1000);
- Error += ::log2_::perf(Samples);
-# endif//NDEBUG
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtc/gtc_matrix_access.cpp b/3rdparty/glm/source/test/gtc/gtc_matrix_access.cpp
deleted file mode 100644
index 1b966e2..0000000
--- a/3rdparty/glm/source/test/gtc/gtc_matrix_access.cpp
+++ /dev/null
@@ -1,383 +0,0 @@
-#include <glm/ext/vector_relational.hpp>
-#include <glm/gtc/constants.hpp>
-#include <glm/gtc/matrix_access.hpp>
-#include <glm/mat2x2.hpp>
-#include <glm/mat2x3.hpp>
-#include <glm/mat2x4.hpp>
-#include <glm/mat3x2.hpp>
-#include <glm/mat3x3.hpp>
-#include <glm/mat3x4.hpp>
-#include <glm/mat4x2.hpp>
-#include <glm/mat4x3.hpp>
-#include <glm/mat4x4.hpp>
-
-int test_mat2x2_row_set()
-{
- int Error = 0;
-
- glm::mat2x2 m(1);
-
- m = glm::row(m, 0, glm::vec2( 0, 1));
- m = glm::row(m, 1, glm::vec2( 4, 5));
-
- Error += glm::all(glm::equal(glm::row(m, 0), glm::vec2( 0, 1), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::row(m, 1), glm::vec2( 4, 5), glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-int test_mat2x2_col_set()
-{
- int Error = 0;
-
- glm::mat2x2 m(1);
-
- m = glm::column(m, 0, glm::vec2( 0, 1));
- m = glm::column(m, 1, glm::vec2( 4, 5));
-
- Error += glm::all(glm::equal(glm::column(m, 0), glm::vec2( 0, 1), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::column(m, 1), glm::vec2( 4, 5), glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-int test_mat2x3_row_set()
-{
- int Error = 0;
-
- glm::mat2x3 m(1);
-
- m = glm::row(m, 0, glm::vec2( 0, 1));
- m = glm::row(m, 1, glm::vec2( 4, 5));
- m = glm::row(m, 2, glm::vec2( 8, 9));
-
- Error += glm::all(glm::equal(glm::row(m, 0), glm::vec2( 0, 1), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::row(m, 1), glm::vec2( 4, 5), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::row(m, 2), glm::vec2( 8, 9), glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-int test_mat2x3_col_set()
-{
- int Error = 0;
-
- glm::mat2x3 m(1);
-
- m = glm::column(m, 0, glm::vec3( 0, 1, 2));
- m = glm::column(m, 1, glm::vec3( 4, 5, 6));
-
- Error += glm::all(glm::equal(glm::column(m, 0), glm::vec3( 0, 1, 2), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::column(m, 1), glm::vec3( 4, 5, 6), glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-int test_mat2x4_row_set()
-{
- int Error = 0;
-
- glm::mat2x4 m(1);
-
- m = glm::row(m, 0, glm::vec2( 0, 1));
- m = glm::row(m, 1, glm::vec2( 4, 5));
- m = glm::row(m, 2, glm::vec2( 8, 9));
- m = glm::row(m, 3, glm::vec2(12, 13));
-
- Error += glm::all(glm::equal(glm::row(m, 0), glm::vec2( 0, 1), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::row(m, 1), glm::vec2( 4, 5), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::row(m, 2), glm::vec2( 8, 9), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::row(m, 3), glm::vec2(12, 13), glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-int test_mat2x4_col_set()
-{
- int Error = 0;
-
- glm::mat2x4 m(1);
-
- m = glm::column(m, 0, glm::vec4( 0, 1, 2, 3));
- m = glm::column(m, 1, glm::vec4( 4, 5, 6, 7));
-
- Error += glm::all(glm::equal(glm::column(m, 0), glm::vec4( 0, 1, 2, 3), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::column(m, 1), glm::vec4( 4, 5, 6, 7), glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-int test_mat3x2_row_set()
-{
- int Error = 0;
-
- glm::mat3x2 m(1);
-
- m = glm::row(m, 0, glm::vec3( 0, 1, 2));
- m = glm::row(m, 1, glm::vec3( 4, 5, 6));
-
- Error += glm::all(glm::equal(glm::row(m, 0), glm::vec3( 0, 1, 2), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::row(m, 1), glm::vec3( 4, 5, 6), glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-int test_mat3x2_col_set()
-{
- int Error = 0;
-
- glm::mat3x2 m(1);
-
- m = glm::column(m, 0, glm::vec2( 0, 1));
- m = glm::column(m, 1, glm::vec2( 4, 5));
- m = glm::column(m, 2, glm::vec2( 8, 9));
-
- Error += glm::all(glm::equal(glm::column(m, 0), glm::vec2( 0, 1), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::column(m, 1), glm::vec2( 4, 5), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::column(m, 2), glm::vec2( 8, 9), glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-int test_mat3x3_row_set()
-{
- int Error = 0;
-
- glm::mat3x3 m(1);
-
- m = glm::row(m, 0, glm::vec3( 0, 1, 2));
- m = glm::row(m, 1, glm::vec3( 4, 5, 6));
- m = glm::row(m, 2, glm::vec3( 8, 9, 10));
-
- Error += glm::all(glm::equal(glm::row(m, 0), glm::vec3( 0, 1, 2), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::row(m, 1), glm::vec3( 4, 5, 6), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::row(m, 2), glm::vec3( 8, 9, 10), glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-int test_mat3x3_col_set()
-{
- int Error = 0;
-
- glm::mat3x3 m(1);
-
- m = glm::column(m, 0, glm::vec3( 0, 1, 2));
- m = glm::column(m, 1, glm::vec3( 4, 5, 6));
- m = glm::column(m, 2, glm::vec3( 8, 9, 10));
-
- Error += glm::all(glm::equal(glm::column(m, 0), glm::vec3( 0, 1, 2), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::column(m, 1), glm::vec3( 4, 5, 6), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::column(m, 2), glm::vec3( 8, 9, 10), glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-int test_mat3x4_row_set()
-{
- int Error = 0;
-
- glm::mat3x4 m(1);
-
- m = glm::row(m, 0, glm::vec3( 0, 1, 2));
- m = glm::row(m, 1, glm::vec3( 4, 5, 6));
- m = glm::row(m, 2, glm::vec3( 8, 9, 10));
- m = glm::row(m, 3, glm::vec3(12, 13, 14));
-
- Error += glm::all(glm::equal(glm::row(m, 0), glm::vec3( 0, 1, 2), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::row(m, 1), glm::vec3( 4, 5, 6), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::row(m, 2), glm::vec3( 8, 9, 10), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::row(m, 3), glm::vec3(12, 13, 14), glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-int test_mat3x4_col_set()
-{
- int Error = 0;
-
- glm::mat3x4 m(1);
-
- m = glm::column(m, 0, glm::vec4( 0, 1, 2, 3));
- m = glm::column(m, 1, glm::vec4( 4, 5, 6, 7));
- m = glm::column(m, 2, glm::vec4( 8, 9, 10, 11));
-
- Error += glm::all(glm::equal(glm::column(m, 0), glm::vec4( 0, 1, 2, 3), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::column(m, 1), glm::vec4( 4, 5, 6, 7), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::column(m, 2), glm::vec4( 8, 9, 10, 11), glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-int test_mat4x2_row_set()
-{
- int Error = 0;
-
- glm::mat4x2 m(1);
-
- m = glm::row(m, 0, glm::vec4( 0, 1, 2, 3));
- m = glm::row(m, 1, glm::vec4( 4, 5, 6, 7));
-
- Error += glm::all(glm::equal(glm::row(m, 0), glm::vec4( 0, 1, 2, 3), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::row(m, 1), glm::vec4( 4, 5, 6, 7), glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-int test_mat4x2_col_set()
-{
- int Error = 0;
-
- glm::mat4x2 m(1);
-
- m = glm::column(m, 0, glm::vec2( 0, 1));
- m = glm::column(m, 1, glm::vec2( 4, 5));
- m = glm::column(m, 2, glm::vec2( 8, 9));
- m = glm::column(m, 3, glm::vec2(12, 13));
-
- Error += glm::all(glm::equal(glm::column(m, 0), glm::vec2( 0, 1), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::column(m, 1), glm::vec2( 4, 5), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::column(m, 2), glm::vec2( 8, 9), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::column(m, 3), glm::vec2(12, 13), glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-int test_mat4x3_row_set()
-{
- int Error = 0;
-
- glm::mat4x3 m(1);
-
- m = glm::row(m, 0, glm::vec4( 0, 1, 2, 3));
- m = glm::row(m, 1, glm::vec4( 4, 5, 6, 7));
- m = glm::row(m, 2, glm::vec4( 8, 9, 10, 11));
-
- Error += glm::all(glm::equal(glm::row(m, 0), glm::vec4( 0, 1, 2, 3), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::row(m, 1), glm::vec4( 4, 5, 6, 7), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::row(m, 2), glm::vec4( 8, 9, 10, 11), glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-int test_mat4x3_col_set()
-{
- int Error = 0;
-
- glm::mat4x3 m(1);
-
- m = glm::column(m, 0, glm::vec3( 0, 1, 2));
- m = glm::column(m, 1, glm::vec3( 4, 5, 6));
- m = glm::column(m, 2, glm::vec3( 8, 9, 10));
- m = glm::column(m, 3, glm::vec3(12, 13, 14));
-
- Error += glm::all(glm::equal(glm::column(m, 0), glm::vec3( 0, 1, 2), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::column(m, 1), glm::vec3( 4, 5, 6), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::column(m, 2), glm::vec3( 8, 9, 10), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::column(m, 3), glm::vec3(12, 13, 14), glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-int test_mat4x4_row_set()
-{
- int Error = 0;
-
- glm::mat4 m(1);
-
- m = glm::row(m, 0, glm::vec4( 0, 1, 2, 3));
- m = glm::row(m, 1, glm::vec4( 4, 5, 6, 7));
- m = glm::row(m, 2, glm::vec4( 8, 9, 10, 11));
- m = glm::row(m, 3, glm::vec4(12, 13, 14, 15));
-
- Error += glm::all(glm::equal(glm::row(m, 0), glm::vec4( 0, 1, 2, 3), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::row(m, 1), glm::vec4( 4, 5, 6, 7), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::row(m, 2), glm::vec4( 8, 9, 10, 11), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::row(m, 3), glm::vec4(12, 13, 14, 15), glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-int test_mat4x4_col_set()
-{
- int Error = 0;
-
- glm::mat4 m(1);
-
- m = glm::column(m, 0, glm::vec4( 0, 1, 2, 3));
- m = glm::column(m, 1, glm::vec4( 4, 5, 6, 7));
- m = glm::column(m, 2, glm::vec4( 8, 9, 10, 11));
- m = glm::column(m, 3, glm::vec4(12, 13, 14, 15));
-
- Error += glm::all(glm::equal(glm::column(m, 0), glm::vec4( 0, 1, 2, 3), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::column(m, 1), glm::vec4( 4, 5, 6, 7), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::column(m, 2), glm::vec4( 8, 9, 10, 11), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(glm::column(m, 3), glm::vec4(12, 13, 14, 15), glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-int test_mat4x4_row_get()
-{
- int Error = 0;
-
- glm::mat4 m(1);
-
- glm::vec4 A = glm::row(m, 0);
- Error += glm::all(glm::equal(A, glm::vec4(1, 0, 0, 0), glm::epsilon<float>())) ? 0 : 1;
- glm::vec4 B = glm::row(m, 1);
- Error += glm::all(glm::equal(B, glm::vec4(0, 1, 0, 0), glm::epsilon<float>())) ? 0 : 1;
- glm::vec4 C = glm::row(m, 2);
- Error += glm::all(glm::equal(C, glm::vec4(0, 0, 1, 0), glm::epsilon<float>())) ? 0 : 1;
- glm::vec4 D = glm::row(m, 3);
- Error += glm::all(glm::equal(D, glm::vec4(0, 0, 0, 1), glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-int test_mat4x4_col_get()
-{
- int Error = 0;
-
- glm::mat4 m(1);
-
- glm::vec4 A = glm::column(m, 0);
- Error += glm::all(glm::equal(A, glm::vec4(1, 0, 0, 0), glm::epsilon<float>())) ? 0 : 1;
- glm::vec4 B = glm::column(m, 1);
- Error += glm::all(glm::equal(B, glm::vec4(0, 1, 0, 0), glm::epsilon<float>())) ? 0 : 1;
- glm::vec4 C = glm::column(m, 2);
- Error += glm::all(glm::equal(C, glm::vec4(0, 0, 1, 0), glm::epsilon<float>())) ? 0 : 1;
- glm::vec4 D = glm::column(m, 3);
- Error += glm::all(glm::equal(D, glm::vec4(0, 0, 0, 1), glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_mat2x2_row_set();
- Error += test_mat2x2_col_set();
- Error += test_mat2x3_row_set();
- Error += test_mat2x3_col_set();
- Error += test_mat2x4_row_set();
- Error += test_mat2x4_col_set();
- Error += test_mat3x2_row_set();
- Error += test_mat3x2_col_set();
- Error += test_mat3x3_row_set();
- Error += test_mat3x3_col_set();
- Error += test_mat3x4_row_set();
- Error += test_mat3x4_col_set();
- Error += test_mat4x2_row_set();
- Error += test_mat4x2_col_set();
- Error += test_mat4x3_row_set();
- Error += test_mat4x3_col_set();
- Error += test_mat4x4_row_set();
- Error += test_mat4x4_col_set();
-
- Error += test_mat4x4_row_get();
- Error += test_mat4x4_col_get();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtc/gtc_matrix_integer.cpp b/3rdparty/glm/source/test/gtc/gtc_matrix_integer.cpp
deleted file mode 100644
index 108016a..0000000
--- a/3rdparty/glm/source/test/gtc/gtc_matrix_integer.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <glm/gtc/matrix_integer.hpp>
-
-int main()
-{
- int Error = 0;
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtc/gtc_matrix_inverse.cpp b/3rdparty/glm/source/test/gtc/gtc_matrix_inverse.cpp
deleted file mode 100644
index eaec6e1..0000000
--- a/3rdparty/glm/source/test/gtc/gtc_matrix_inverse.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-#include <glm/gtc/matrix_inverse.hpp>
-#include <glm/gtc/epsilon.hpp>
-
-int test_affine()
-{
- int Error = 0;
-
- {
- glm::mat3 const M(
- 2.f, 0.f, 0.f,
- 0.f, 2.f, 0.f,
- 0.f, 0.f, 1.f);
- glm::mat3 const A = glm::affineInverse(M);
- glm::mat3 const I = glm::inverse(M);
- glm::mat3 const R = glm::affineInverse(A);
-
- for(glm::length_t i = 0; i < A.length(); ++i)
- {
- Error += glm::all(glm::epsilonEqual(M[i], R[i], 0.01f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(A[i], I[i], 0.01f)) ? 0 : 1;
- }
- }
-
- {
- glm::mat4 const M(
- 2.f, 0.f, 0.f, 0.f,
- 0.f, 2.f, 0.f, 0.f,
- 0.f, 0.f, 2.f, 0.f,
- 0.f, 0.f, 0.f, 1.f);
- glm::mat4 const A = glm::affineInverse(M);
- glm::mat4 const I = glm::inverse(M);
- glm::mat4 const R = glm::affineInverse(A);
-
- for(glm::length_t i = 0; i < A.length(); ++i)
- {
- Error += glm::all(glm::epsilonEqual(M[i], R[i], 0.01f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(A[i], I[i], 0.01f)) ? 0 : 1;
- }
- }
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_affine();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtc/gtc_matrix_transform.cpp b/3rdparty/glm/source/test/gtc/gtc_matrix_transform.cpp
deleted file mode 100644
index b50666e..0000000
--- a/3rdparty/glm/source/test/gtc/gtc_matrix_transform.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-#include <glm/gtc/matrix_transform.hpp>
-#include <glm/gtc/constants.hpp>
-#include <glm/ext/matrix_relational.hpp>
-
-int test_perspective()
-{
- int Error = 0;
-
- glm::mat4 Projection = glm::perspective(glm::pi<float>() * 0.25f, 4.0f / 3.0f, 0.1f, 100.0f);
-
- return Error;
-}
-
-int test_pick()
-{
- int Error = 0;
-
- glm::mat4 Pick = glm::pickMatrix(glm::vec2(1, 2), glm::vec2(3, 4), glm::ivec4(0, 0, 320, 240));
-
- return Error;
-}
-
-int test_tweakedInfinitePerspective()
-{
- int Error = 0;
-
- glm::mat4 ProjectionA = glm::tweakedInfinitePerspective(45.f, 640.f/480.f, 1.0f);
- glm::mat4 ProjectionB = glm::tweakedInfinitePerspective(45.f, 640.f/480.f, 1.0f, 0.001f);
-
-
- return Error;
-}
-
-int test_translate()
-{
- int Error = 0;
-
- glm::lowp_vec3 v(1.0);
- glm::lowp_mat4 m(0);
- glm::lowp_mat4 t = glm::translate(m, v);
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_translate();
- Error += test_tweakedInfinitePerspective();
- Error += test_pick();
- Error += test_perspective();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtc/gtc_noise.cpp b/3rdparty/glm/source/test/gtc/gtc_noise.cpp
deleted file mode 100644
index 6ecec22..0000000
--- a/3rdparty/glm/source/test/gtc/gtc_noise.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtc/noise.hpp>
-#include <glm/gtc/type_precision.hpp>
-#include <glm/gtx/raw_data.hpp>
-
-static int test_simplex_float()
-{
- int Error = 0;
-
- glm::u8vec4 const PixelSimplex2D(glm::byte(glm::abs(glm::simplex(glm::vec2(0.f, 0.f))) * 255.f));
- glm::u8vec4 const PixelSimplex3D(glm::byte(glm::abs(glm::simplex(glm::vec3(0.f, 0.f, 0.f))) * 255.f));
- glm::u8vec4 const PixelSimplex4D(glm::byte(glm::abs(glm::simplex(glm::vec4(0.f, 0.f, 0.f, 0.f))) * 255.f));
-
- return Error;
-}
-
-static int test_simplex_double()
-{
- int Error = 0;
-
- glm::u8vec4 const PixelSimplex2D(glm::byte(glm::abs(glm::simplex(glm::dvec2(0.f, 0.f))) * 255.));
- glm::u8vec4 const PixelSimplex3D(glm::byte(glm::abs(glm::simplex(glm::dvec3(0.f, 0.f, 0.f))) * 255.));
- glm::u8vec4 const PixelSimplex4D(glm::byte(glm::abs(glm::simplex(glm::dvec4(0.f, 0.f, 0.f, 0.f))) * 255.));
-
- return Error;
-}
-
-static int test_perlin_float()
-{
- int Error = 0;
-
- glm::u8vec4 const PixelPerlin2D(glm::byte(glm::abs(glm::perlin(glm::vec2(0.f, 0.f))) * 255.f));
- glm::u8vec4 const PixelPerlin3D(glm::byte(glm::abs(glm::perlin(glm::vec3(0.f, 0.f, 0.f))) * 255.f));
- glm::u8vec4 const PixelPerlin4D(glm::byte(glm::abs(glm::perlin(glm::vec4(0.f, 0.f, 0.f, 0.f))) * 255.f));
-
- return Error;
-}
-
-static int test_perlin_double()
-{
- int Error = 0;
-
- glm::u8vec4 const PixelPerlin2D(glm::byte(glm::abs(glm::perlin(glm::dvec2(0.f, 0.f))) * 255.));
- glm::u8vec4 const PixelPerlin3D(glm::byte(glm::abs(glm::perlin(glm::dvec3(0.f, 0.f, 0.f))) * 255.));
- glm::u8vec4 const PixelPerlin4D(glm::byte(glm::abs(glm::perlin(glm::dvec4(0.f, 0.f, 0.f, 0.f))) * 255.));
-
- return Error;
-}
-
-static int test_perlin_pedioric_float()
-{
- int Error = 0;
-
- glm::u8vec4 const PixelPeriodic2D(glm::byte(glm::abs(glm::perlin(glm::vec2(0.f, 0.f), glm::vec2(2.0f))) * 255.f));
- glm::u8vec4 const PixelPeriodic3D(glm::byte(glm::abs(glm::perlin(glm::vec3(0.f, 0.f, 0.f), glm::vec3(2.0f))) * 255.f));
- glm::u8vec4 const PixelPeriodic4D(glm::byte(glm::abs(glm::perlin(glm::vec4(0.f, 0.f, 0.f, 0.f), glm::vec4(2.0f))) * 255.f));
-
- return Error;
-}
-
-static int test_perlin_pedioric_double()
-{
- int Error = 0;
-
- glm::u8vec4 const PixelPeriodic2D(glm::byte(glm::abs(glm::perlin(glm::dvec2(0.f, 0.f), glm::dvec2(2.0))) * 255.));
- glm::u8vec4 const PixelPeriodic3D(glm::byte(glm::abs(glm::perlin(glm::dvec3(0.f, 0.f, 0.f), glm::dvec3(2.0))) * 255.));
- glm::u8vec4 const PixelPeriodic4D(glm::byte(glm::abs(glm::perlin(glm::dvec4(0.f, 0.f, 0.f, 0.f), glm::dvec4(2.0))) * 255.));
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_simplex_float();
- Error += test_simplex_double();
-
- Error += test_perlin_float();
- Error += test_perlin_double();
-
- Error += test_perlin_pedioric_float();
- Error += test_perlin_pedioric_double();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtc/gtc_packing.cpp b/3rdparty/glm/source/test/gtc/gtc_packing.cpp
deleted file mode 100644
index df5b3bb..0000000
--- a/3rdparty/glm/source/test/gtc/gtc_packing.cpp
+++ /dev/null
@@ -1,878 +0,0 @@
-#include <glm/packing.hpp>
-#include <glm/gtc/packing.hpp>
-#include <glm/gtc/epsilon.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <cstdio>
-#include <vector>
-
-void print_bits(float const& s)
-{
- union
- {
- float f;
- unsigned int i;
- } uif;
-
- uif.f = s;
-
- std::printf("f32: ");
- for(std::size_t j = sizeof(s) * 8; j > 0; --j)
- {
- if(j == 23 || j == 31)
- std::printf(" ");
- std::printf("%d", (uif.i & (1 << (j - 1))) ? 1 : 0);
- }
-}
-
-void print_10bits(glm::uint const& s)
-{
- std::printf("10b: ");
- for(std::size_t j = 10; j > 0; --j)
- {
- if(j == 5)
- std::printf(" ");
- std::printf("%d", (s & (1 << (j - 1))) ? 1 : 0);
- }
-}
-
-void print_11bits(glm::uint const& s)
-{
- std::printf("11b: ");
- for(std::size_t j = 11; j > 0; --j)
- {
- if(j == 6)
- std::printf(" ");
- std::printf("%d", (s & (1 << (j - 1))) ? 1 : 0);
- }
-}
-
-void print_value(float const& s)
-{
- std::printf("%2.5f, ", static_cast<double>(s));
- print_bits(s);
- std::printf(", ");
-// print_11bits(detail::floatTo11bit(s));
-// std::printf(", ");
-// print_10bits(detail::floatTo10bit(s));
- std::printf("\n");
-}
-
-int test_Half1x16()
-{
- int Error = 0;
-
- std::vector<float> Tests;
- Tests.push_back(0.0f);
- Tests.push_back(1.0f);
- Tests.push_back(-1.0f);
- Tests.push_back(2.0f);
- Tests.push_back(-2.0f);
- Tests.push_back(1.9f);
-
- for(std::size_t i = 0; i < Tests.size(); ++i)
- {
- glm::uint16 p0 = glm::packHalf1x16(Tests[i]);
- float v0 = glm::unpackHalf1x16(p0);
- glm::uint16 p1 = glm::packHalf1x16(v0);
- float v1 = glm::unpackHalf1x16(p1);
- Error += glm::epsilonEqual(v0, v1, glm::epsilon<float>()) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_Half4x16()
-{
- int Error = 0;
-
- std::vector<glm::vec4> Tests;
- Tests.push_back(glm::vec4(1.0f));
- Tests.push_back(glm::vec4(0.0f));
- Tests.push_back(glm::vec4(2.0f));
- Tests.push_back(glm::vec4(0.1f));
- Tests.push_back(glm::vec4(0.5f));
- Tests.push_back(glm::vec4(-0.9f));
-
- for(std::size_t i = 0; i < Tests.size(); ++i)
- {
- glm::uint64 p0 = glm::packHalf4x16(Tests[i]);
- glm::vec4 v0 = glm::unpackHalf4x16(p0);
- glm::uint64 p1 = glm::packHalf4x16(v0);
- glm::vec4 v1 = glm::unpackHalf4x16(p1);
- glm::u16vec4 p2 = glm::packHalf(v0);
- glm::vec4 v2 = glm::unpackHalf(p2);
-
- Error += glm::all(glm::equal(v0, v1, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(v0, v2, glm::epsilon<float>())) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_I3x10_1x2()
-{
- int Error = 0;
-
- std::vector<glm::ivec4> Tests;
- Tests.push_back(glm::ivec4(0));
- Tests.push_back(glm::ivec4(1));
- Tests.push_back(glm::ivec4(-1));
- Tests.push_back(glm::ivec4(2));
- Tests.push_back(glm::ivec4(-2));
- Tests.push_back(glm::ivec4(3));
-
- for(std::size_t i = 0; i < Tests.size(); ++i)
- {
- glm::uint32 p0 = glm::packI3x10_1x2(Tests[i]);
- glm::ivec4 v0 = glm::unpackI3x10_1x2(p0);
- glm::uint32 p1 = glm::packI3x10_1x2(v0);
- glm::ivec4 v1 = glm::unpackI3x10_1x2(p1);
- Error += glm::all(glm::equal(v0, v1)) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_U3x10_1x2()
-{
- int Error = 0;
-
- std::vector<glm::uvec4> Tests;
- Tests.push_back(glm::uvec4(0));
- Tests.push_back(glm::uvec4(1));
- Tests.push_back(glm::uvec4(2));
- Tests.push_back(glm::uvec4(3));
- Tests.push_back(glm::uvec4(4));
- Tests.push_back(glm::uvec4(5));
-
- for(std::size_t i = 0; i < Tests.size(); ++i)
- {
- glm::uint32 p0 = glm::packU3x10_1x2(Tests[i]);
- glm::uvec4 v0 = glm::unpackU3x10_1x2(p0);
- glm::uint32 p1 = glm::packU3x10_1x2(v0);
- glm::uvec4 v1 = glm::unpackU3x10_1x2(p1);
- Error += glm::all(glm::equal(v0, v1)) ? 0 : 1;
- }
-
- glm::u8vec4 const v0(0xff, 0x77, 0x0, 0x33);
- glm::uint32 const p0 = *reinterpret_cast<glm::uint32 const*>(&v0[0]);
- glm::uint32 const r0 = 0x330077ff;
-
- Error += p0 == r0 ? 0 : 1;
-
- glm::uvec4 const v1(0xff, 0x77, 0x0, 0x33);
- glm::uint32 const p1 = glm::packU3x10_1x2(v1);
- glm::uint32 const r1 = 0xc001dcff;
-
- Error += p1 == r1 ? 0 : 1;
-
- return Error;
-}
-
-int test_Snorm3x10_1x2()
-{
- int Error = 0;
-
- std::vector<glm::vec4> Tests;
- Tests.push_back(glm::vec4(1.0f));
- Tests.push_back(glm::vec4(0.0f));
- Tests.push_back(glm::vec4(2.0f));
- Tests.push_back(glm::vec4(0.1f));
- Tests.push_back(glm::vec4(0.5f));
- Tests.push_back(glm::vec4(0.9f));
-
- for(std::size_t i = 0; i < Tests.size(); ++i)
- {
- glm::uint32 p0 = glm::packSnorm3x10_1x2(Tests[i]);
- glm::vec4 v0 = glm::unpackSnorm3x10_1x2(p0);
- glm::uint32 p1 = glm::packSnorm3x10_1x2(v0);
- glm::vec4 v1 = glm::unpackSnorm3x10_1x2(p1);
-
- Error += glm::all(glm::epsilonEqual(v0, v1, 0.01f)) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_Unorm3x10_1x2()
-{
- int Error = 0;
-
- std::vector<glm::vec4> Tests;
- Tests.push_back(glm::vec4(1.0f));
- Tests.push_back(glm::vec4(0.0f));
- Tests.push_back(glm::vec4(2.0f));
- Tests.push_back(glm::vec4(0.1f));
- Tests.push_back(glm::vec4(0.5f));
- Tests.push_back(glm::vec4(0.9f));
-
- for(std::size_t i = 0; i < Tests.size(); ++i)
- {
- glm::uint32 p0 = glm::packUnorm3x10_1x2(Tests[i]);
- glm::vec4 v0 = glm::unpackUnorm3x10_1x2(p0);
- glm::uint32 p1 = glm::packUnorm3x10_1x2(v0);
- glm::vec4 v1 = glm::unpackUnorm3x10_1x2(p1);
-
- Error += glm::all(glm::epsilonEqual(v0, v1, 0.001f)) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_F2x11_1x10()
-{
- int Error = 0;
-
- std::vector<glm::vec3> Tests;
- Tests.push_back(glm::vec3(1.0f));
- Tests.push_back(glm::vec3(0.0f));
- Tests.push_back(glm::vec3(2.0f));
- Tests.push_back(glm::vec3(0.1f));
- Tests.push_back(glm::vec3(0.5f));
- Tests.push_back(glm::vec3(0.9f));
-
- for(std::size_t i = 0; i < Tests.size(); ++i)
- {
- glm::uint32 p0 = glm::packF2x11_1x10(Tests[i]);
- glm::vec3 v0 = glm::unpackF2x11_1x10(p0);
- glm::uint32 p1 = glm::packF2x11_1x10(v0);
- glm::vec3 v1 = glm::unpackF2x11_1x10(p1);
- Error += glm::all(glm::equal(v0, v1, glm::epsilon<float>())) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_F3x9_E1x5()
-{
- int Error = 0;
-
- std::vector<glm::vec3> Tests;
- Tests.push_back(glm::vec3(1.0f));
- Tests.push_back(glm::vec3(0.0f));
- Tests.push_back(glm::vec3(2.0f));
- Tests.push_back(glm::vec3(0.1f));
- Tests.push_back(glm::vec3(0.5f));
- Tests.push_back(glm::vec3(0.9f));
-
- for(std::size_t i = 0; i < Tests.size(); ++i)
- {
- glm::uint32 p0 = glm::packF3x9_E1x5(Tests[i]);
- glm::vec3 v0 = glm::unpackF3x9_E1x5(p0);
- glm::uint32 p1 = glm::packF3x9_E1x5(v0);
- glm::vec3 v1 = glm::unpackF3x9_E1x5(p1);
- Error += glm::all(glm::equal(v0, v1, glm::epsilon<float>())) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_RGBM()
-{
- int Error = 0;
-
- for(std::size_t i = 0; i < 1024; ++i)
- {
- glm::vec3 const Color(static_cast<float>(i));
- glm::vec4 const RGBM = glm::packRGBM(Color);
- glm::vec3 const Result= glm::unpackRGBM(RGBM);
-
- Error += glm::all(glm::equal(Color, Result, 0.01f)) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_packUnorm1x16()
-{
- int Error = 0;
-
- std::vector<glm::vec1> A;
- A.push_back(glm::vec1(1.0f));
- A.push_back(glm::vec1(0.5f));
- A.push_back(glm::vec1(0.1f));
- A.push_back(glm::vec1(0.0f));
-
- for(std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec1 B(A[i]);
- glm::uint16 C = glm::packUnorm1x16(B.x);
- glm::vec1 D(glm::unpackUnorm1x16(C));
- Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 65535.f)) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_packSnorm1x16()
-{
- int Error = 0;
-
- std::vector<glm::vec1> A;
- A.push_back(glm::vec1( 1.0f));
- A.push_back(glm::vec1( 0.0f));
- A.push_back(glm::vec1(-0.5f));
- A.push_back(glm::vec1(-0.1f));
-
- for(std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec1 B(A[i]);
- glm::uint16 C = glm::packSnorm1x16(B.x);
- glm::vec1 D(glm::unpackSnorm1x16(C));
- Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 32767.0f * 2.0f)) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_packUnorm2x16()
-{
- int Error = 0;
-
- std::vector<glm::vec2> A;
- A.push_back(glm::vec2(1.0f, 0.0f));
- A.push_back(glm::vec2(0.5f, 0.7f));
- A.push_back(glm::vec2(0.1f, 0.2f));
-
- for(std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec2 B(A[i]);
- glm::uint32 C = glm::packUnorm2x16(B);
- glm::vec2 D = glm::unpackUnorm2x16(C);
- Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 65535.f)) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_packSnorm2x16()
-{
- int Error = 0;
-
- std::vector<glm::vec2> A;
- A.push_back(glm::vec2( 1.0f, 0.0f));
- A.push_back(glm::vec2(-0.5f,-0.7f));
- A.push_back(glm::vec2(-0.1f, 0.1f));
-
- for(std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec2 B(A[i]);
- glm::uint32 C = glm::packSnorm2x16(B);
- glm::vec2 D = glm::unpackSnorm2x16(C);
- Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 32767.0f * 2.0f)) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_packUnorm4x16()
-{
- int Error = 0;
-
- std::vector<glm::vec4> A;
- A.push_back(glm::vec4(1.0f));
- A.push_back(glm::vec4(0.5f));
- A.push_back(glm::vec4(0.1f));
- A.push_back(glm::vec4(0.0f));
-
- for(std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec4 B(A[i]);
- glm::uint64 C = glm::packUnorm4x16(B);
- glm::vec4 D(glm::unpackUnorm4x16(C));
- Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 65535.f)) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_packSnorm4x16()
-{
- int Error = 0;
-
- std::vector<glm::vec4> A;
- A.push_back(glm::vec4( 1.0f, 0.0f, -0.5f, 0.5f));
- A.push_back(glm::vec4(-0.3f,-0.7f, 0.3f, 0.7f));
- A.push_back(glm::vec4(-0.1f, 0.1f, -0.2f, 0.2f));
-
- for(std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec4 B(A[i]);
- glm::uint64 C = glm::packSnorm4x16(B);
- glm::vec4 D(glm::unpackSnorm4x16(C));
- Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 32767.0f * 2.0f)) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_packUnorm1x8()
-{
- int Error = 0;
-
- std::vector<glm::vec1> A;
- A.push_back(glm::vec1(1.0f));
- A.push_back(glm::vec1(0.5f));
- A.push_back(glm::vec1(0.0f));
-
- for(std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec1 B(A[i]);
- glm::uint8 C = glm::packUnorm1x8(B.x);
- glm::vec1 D(glm::unpackUnorm1x8(C));
- Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 255.f)) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_packSnorm1x8()
-{
- int Error = 0;
-
- std::vector<glm::vec1> A;
- A.push_back(glm::vec1( 1.0f));
- A.push_back(glm::vec1(-0.7f));
- A.push_back(glm::vec1(-1.0f));
-
- for(std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec1 B(A[i]);
- glm::uint8 C = glm::packSnorm1x8(B.x);
- glm::vec1 D(glm::unpackSnorm1x8(C));
- Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 127.f)) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_packUnorm2x8()
-{
- int Error = 0;
-
- std::vector<glm::vec2> A;
- A.push_back(glm::vec2(1.0f, 0.7f));
- A.push_back(glm::vec2(0.5f, 0.1f));
-
- for(std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec2 B(A[i]);
- glm::uint16 C = glm::packUnorm2x8(B);
- glm::vec2 D = glm::unpackUnorm2x8(C);
- Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 255.f)) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_packSnorm2x8()
-{
- int Error = 0;
-
- std::vector<glm::vec2> A;
- A.push_back(glm::vec2( 1.0f, 0.0f));
- A.push_back(glm::vec2(-0.7f,-0.1f));
-
- for(std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec2 B(A[i]);
- glm::uint16 C = glm::packSnorm2x8(B);
- glm::vec2 D = glm::unpackSnorm2x8(C);
- Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 127.f)) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_packUnorm4x8()
-{
- int Error = 0;
-
- std::vector<glm::vec4> A;
- A.push_back(glm::vec4(1.0f, 0.7f, 0.3f, 0.0f));
- A.push_back(glm::vec4(0.5f, 0.1f, 0.2f, 0.3f));
-
- for(std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec4 B(A[i]);
- glm::uint32 C = glm::packUnorm4x8(B);
- glm::vec4 D = glm::unpackUnorm4x8(C);
- Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 255.f)) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_packSnorm4x8()
-{
- int Error = 0;
-
- std::vector<glm::vec4> A;
- A.push_back(glm::vec4( 1.0f, 0.0f,-0.5f,-1.0f));
- A.push_back(glm::vec4(-0.7f,-0.1f, 0.1f, 0.7f));
-
- for(std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec4 B(A[i]);
- glm::uint32 C = glm::packSnorm4x8(B);
- glm::vec4 D = glm::unpackSnorm4x8(C);
- Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 127.f)) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_packUnorm()
-{
- int Error = 0;
-
- std::vector<glm::vec2> A;
- A.push_back(glm::vec2(1.0f, 0.7f));
- A.push_back(glm::vec2(0.5f, 0.1f));
-
- for(std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec2 B(A[i]);
- glm::u16vec2 C = glm::packUnorm<glm::uint16>(B);
- glm::vec2 D = glm::unpackUnorm<float>(C);
- Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 255.f)) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_packSnorm()
-{
- int Error = 0;
-
- std::vector<glm::vec2> A;
- A.push_back(glm::vec2( 1.0f, 0.0f));
- A.push_back(glm::vec2(-0.5f,-0.7f));
- A.push_back(glm::vec2(-0.1f, 0.1f));
-
- for(std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec2 B(A[i]);
- glm::i16vec2 C = glm::packSnorm<glm::int16>(B);
- glm::vec2 D = glm::unpackSnorm<float>(C);
- Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 32767.0f * 2.0f)) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_packUnorm2x4()
-{
- int Error = 0;
-
- std::vector<glm::vec2> A;
- A.push_back(glm::vec2(1.0f, 0.7f));
- A.push_back(glm::vec2(0.5f, 0.0f));
-
- for(std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec2 B(A[i]);
- glm::uint8 C = glm::packUnorm2x4(B);
- glm::vec2 D = glm::unpackUnorm2x4(C);
- Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 15.f)) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_packUnorm4x4()
-{
- int Error = 0;
-
- std::vector<glm::vec4> A;
- A.push_back(glm::vec4(1.0f, 0.7f, 0.5f, 0.0f));
- A.push_back(glm::vec4(0.5f, 0.1f, 0.0f, 1.0f));
-
- for(std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec4 B(A[i]);
- glm::uint16 C = glm::packUnorm4x4(B);
- glm::vec4 D = glm::unpackUnorm4x4(C);
- Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 15.f)) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_packUnorm3x5_1x1()
-{
- int Error = 0;
-
- std::vector<glm::vec4> A;
- A.push_back(glm::vec4(1.0f, 0.7f, 0.5f, 0.0f));
- A.push_back(glm::vec4(0.5f, 0.1f, 0.0f, 1.0f));
-
- for(std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec4 B(A[i]);
- glm::uint16 C = glm::packUnorm3x5_1x1(B);
- glm::vec4 D = glm::unpackUnorm3x5_1x1(C);
- Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 15.f)) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_packUnorm1x5_1x6_1x5()
-{
- int Error = 0;
-
- std::vector<glm::vec3> A;
- A.push_back(glm::vec3(1.0f, 0.7f, 0.5f));
- A.push_back(glm::vec3(0.5f, 0.1f, 0.0f));
-
- for(std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec3 B(A[i]);
- glm::uint16 C = glm::packUnorm1x5_1x6_1x5(B);
- glm::vec3 D = glm::unpackUnorm1x5_1x6_1x5(C);
- Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 15.f)) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_packUnorm2x3_1x2()
-{
- int Error = 0;
-
- std::vector<glm::vec3> A;
- A.push_back(glm::vec3(1.0f, 0.7f, 0.5f));
- A.push_back(glm::vec3(0.5f, 0.1f, 0.0f));
-
- for(std::size_t i = 0; i < A.size(); ++i)
- {
- glm::vec3 B(A[i]);
- glm::uint8 C = glm::packUnorm2x3_1x2(B);
- glm::vec3 D = glm::unpackUnorm2x3_1x2(C);
- Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 3.f)) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_packUint2x8()
-{
- int Error = 0;
-
- glm::u8vec2 const Source(1, 2);
-
- glm::uint16 const Packed = glm::packUint2x8(Source);
- Error += Packed != 0 ? 0 : 1;
-
- glm::u8vec2 const Unpacked = glm::unpackUint2x8(Packed);
- Error += Source == Unpacked ? 0 : 1;
-
- return Error;
-}
-
-int test_packUint4x8()
-{
- int Error = 0;
-
- glm::u8vec4 const Source(1, 2, 3, 4);
-
- glm::uint32 const Packed = glm::packUint4x8(Source);
- Error += Packed != 0 ? 0 : 1;
-
- glm::u8vec4 const Unpacked = glm::unpackUint4x8(Packed);
- Error += Source == Unpacked ? 0 : 1;
-
- return Error;
-}
-
-int test_packUint2x16()
-{
- int Error = 0;
-
- glm::u16vec2 const Source(1, 2);
-
- glm::uint32 const Packed = glm::packUint2x16(Source);
- Error += Packed != 0 ? 0 : 1;
-
- glm::u16vec2 const Unpacked = glm::unpackUint2x16(Packed);
- Error += Source == Unpacked ? 0 : 1;
-
- return Error;
-}
-
-int test_packUint4x16()
-{
- int Error = 0;
-
- glm::u16vec4 const Source(1, 2, 3, 4);
-
- glm::uint64 const Packed = glm::packUint4x16(Source);
- Error += Packed != 0 ? 0 : 1;
-
- glm::u16vec4 const Unpacked = glm::unpackUint4x16(Packed);
- Error += Source == Unpacked ? 0 : 1;
-
- return Error;
-}
-
-int test_packUint2x32()
-{
- int Error = 0;
-
- glm::u32vec2 const Source(1, 2);
-
- glm::uint64 const Packed = glm::packUint2x32(Source);
- Error += Packed != 0 ? 0 : 1;
-
- glm::u32vec2 const Unpacked = glm::unpackUint2x32(Packed);
- Error += Source == Unpacked ? 0 : 1;
-
- return Error;
-}
-
-int test_packInt2x8()
-{
- int Error = 0;
-
- glm::i8vec2 const Source(1, 2);
-
- glm::int16 const Packed = glm::packInt2x8(Source);
- Error += Packed != 0 ? 0 : 1;
-
- glm::i8vec2 const Unpacked = glm::unpackInt2x8(Packed);
- Error += Source == Unpacked ? 0 : 1;
-
- return Error;
-}
-
-int test_packInt4x8()
-{
- int Error = 0;
-
- glm::i8vec4 const Source(1, 2, 3, 4);
-
- glm::int32 const Packed = glm::packInt4x8(Source);
- Error += Packed != 0 ? 0 : 1;
-
- glm::i8vec4 const Unpacked = glm::unpackInt4x8(Packed);
- Error += Source == Unpacked ? 0 : 1;
-
- return Error;
-}
-
-int test_packInt2x16()
-{
- int Error = 0;
-
- glm::i16vec2 const Source(1, 2);
-
- glm::int32 const Packed = glm::packInt2x16(Source);
- Error += Packed != 0 ? 0 : 1;
-
- glm::i16vec2 const Unpacked = glm::unpackInt2x16(Packed);
- Error += Source == Unpacked ? 0 : 1;
-
- return Error;
-}
-
-int test_packInt4x16()
-{
- int Error = 0;
-
- glm::i16vec4 const Source(1, 2, 3, 4);
-
- glm::int64 const Packed = glm::packInt4x16(Source);
- Error += Packed != 0 ? 0 : 1;
-
- glm::i16vec4 const Unpacked = glm::unpackInt4x16(Packed);
- Error += Source == Unpacked ? 0 : 1;
-
- return Error;
-}
-
-int test_packInt2x32()
-{
- int Error = 0;
-
- glm::i32vec2 const Source(1, 2);
-
- glm::int64 const Packed = glm::packInt2x32(Source);
- Error += Packed != 0 ? 0 : 1;
-
- glm::i32vec2 const Unpacked = glm::unpackInt2x32(Packed);
- Error += Source == Unpacked ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_packUnorm();
- Error += test_packSnorm();
-
- Error += test_packSnorm1x16();
- Error += test_packSnorm2x16();
- Error += test_packSnorm4x16();
-
- Error += test_packSnorm1x8();
- Error += test_packSnorm2x8();
- Error += test_packSnorm4x8();
-
- Error += test_packUnorm1x16();
- Error += test_packUnorm2x16();
- Error += test_packUnorm4x16();
-
- Error += test_packUnorm1x8();
- Error += test_packUnorm2x8();
- Error += test_packUnorm4x8();
-
- Error += test_packUnorm2x4();
- Error += test_packUnorm4x4();
- Error += test_packUnorm3x5_1x1();
- Error += test_packUnorm1x5_1x6_1x5();
- Error += test_packUnorm2x3_1x2();
-
- Error += test_packUint2x8();
- Error += test_packUint4x8();
- Error += test_packUint2x16();
- Error += test_packUint4x16();
- Error += test_packUint2x32();
-
- Error += test_packInt2x8();
- Error += test_packInt4x8();
- Error += test_packInt2x16();
- Error += test_packInt4x16();
- Error += test_packInt2x32();
-
- Error += test_F2x11_1x10();
- Error += test_F3x9_E1x5();
- Error += test_RGBM();
- Error += test_Unorm3x10_1x2();
- Error += test_Snorm3x10_1x2();
-
- Error += test_I3x10_1x2();
- Error += test_U3x10_1x2();
- Error += test_Half1x16();
- Error += test_Half4x16();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtc/gtc_quaternion.cpp b/3rdparty/glm/source/test/gtc/gtc_quaternion.cpp
deleted file mode 100644
index 540ca42..0000000
--- a/3rdparty/glm/source/test/gtc/gtc_quaternion.cpp
+++ /dev/null
@@ -1,345 +0,0 @@
-#include <glm/gtc/constants.hpp>
-#include <glm/gtc/quaternion.hpp>
-#include <glm/gtc/matrix_transform.hpp>
-#include <glm/ext/matrix_relational.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/scalar_relational.hpp>
-#include <glm/glm.hpp>
-#include <vector>
-
-int test_quat_angle()
-{
- int Error = 0;
-
- {
- glm::quat Q = glm::angleAxis(glm::pi<float>() * 0.25f, glm::vec3(0, 0, 1));
- glm::quat N = glm::normalize(Q);
- float L = glm::length(N);
- Error += glm::equal(L, 1.0f, 0.01f) ? 0 : 1;
- float A = glm::angle(N);
- Error += glm::equal(A, glm::pi<float>() * 0.25f, 0.01f) ? 0 : 1;
- }
- {
- glm::quat Q = glm::angleAxis(glm::pi<float>() * 0.25f, glm::normalize(glm::vec3(0, 1, 1)));
- glm::quat N = glm::normalize(Q);
- float L = glm::length(N);
- Error += glm::equal(L, 1.0f, 0.01f) ? 0 : 1;
- float A = glm::angle(N);
- Error += glm::equal(A, glm::pi<float>() * 0.25f, 0.01f) ? 0 : 1;
- }
- {
- glm::quat Q = glm::angleAxis(glm::pi<float>() * 0.25f, glm::normalize(glm::vec3(1, 2, 3)));
- glm::quat N = glm::normalize(Q);
- float L = glm::length(N);
- Error += glm::equal(L, 1.0f, 0.01f) ? 0 : 1;
- float A = glm::angle(N);
- Error += glm::equal(A, glm::pi<float>() * 0.25f, 0.01f) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_quat_angleAxis()
-{
- int Error = 0;
-
- glm::quat A = glm::angleAxis(0.f, glm::vec3(0.f, 0.f, 1.f));
- glm::quat B = glm::angleAxis(glm::pi<float>() * 0.5f, glm::vec3(0, 0, 1));
- glm::quat C = glm::mix(A, B, 0.5f);
- glm::quat D = glm::angleAxis(glm::pi<float>() * 0.25f, glm::vec3(0, 0, 1));
-
- Error += glm::equal(C.x, D.x, 0.01f) ? 0 : 1;
- Error += glm::equal(C.y, D.y, 0.01f) ? 0 : 1;
- Error += glm::equal(C.z, D.z, 0.01f) ? 0 : 1;
- Error += glm::equal(C.w, D.w, 0.01f) ? 0 : 1;
-
- return Error;
-}
-
-int test_quat_mix()
-{
- int Error = 0;
-
- glm::quat A = glm::angleAxis(0.f, glm::vec3(0.f, 0.f, 1.f));
- glm::quat B = glm::angleAxis(glm::pi<float>() * 0.5f, glm::vec3(0, 0, 1));
- glm::quat C = glm::mix(A, B, 0.5f);
- glm::quat D = glm::angleAxis(glm::pi<float>() * 0.25f, glm::vec3(0, 0, 1));
-
- Error += glm::equal(C.x, D.x, 0.01f) ? 0 : 1;
- Error += glm::equal(C.y, D.y, 0.01f) ? 0 : 1;
- Error += glm::equal(C.z, D.z, 0.01f) ? 0 : 1;
- Error += glm::equal(C.w, D.w, 0.01f) ? 0 : 1;
-
- return Error;
-}
-
-int test_quat_normalize()
-{
- int Error(0);
-
- {
- glm::quat Q = glm::angleAxis(glm::pi<float>() * 0.25f, glm::vec3(0, 0, 1));
- glm::quat N = glm::normalize(Q);
- float L = glm::length(N);
- Error += glm::equal(L, 1.0f, 0.000001f) ? 0 : 1;
- }
- {
- glm::quat Q = glm::angleAxis(glm::pi<float>() * 0.25f, glm::vec3(0, 0, 2));
- glm::quat N = glm::normalize(Q);
- float L = glm::length(N);
- Error += glm::equal(L, 1.0f, 0.000001f) ? 0 : 1;
- }
- {
- glm::quat Q = glm::angleAxis(glm::pi<float>() * 0.25f, glm::vec3(1, 2, 3));
- glm::quat N = glm::normalize(Q);
- float L = glm::length(N);
- Error += glm::equal(L, 1.0f, 0.000001f) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_quat_euler()
-{
- int Error = 0;
-
- {
- glm::quat q(1.0f, 0.0f, 0.0f, 1.0f);
- float Roll = glm::roll(q);
- float Pitch = glm::pitch(q);
- float Yaw = glm::yaw(q);
- glm::vec3 Angles = glm::eulerAngles(q);
- Error += glm::all(glm::equal(Angles, glm::vec3(Pitch, Yaw, Roll), 0.000001f)) ? 0 : 1;
- }
-
- {
- glm::dquat q(1.0, 0.0, 0.0, 1.0);
- double Roll = glm::roll(q);
- double Pitch = glm::pitch(q);
- double Yaw = glm::yaw(q);
- glm::dvec3 Angles = glm::eulerAngles(q);
- Error += glm::all(glm::equal(Angles, glm::dvec3(Pitch, Yaw, Roll), 0.000001)) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_quat_slerp()
-{
- int Error = 0;
-
- float const Epsilon = 0.0001f;//glm::epsilon<float>();
-
- float sqrt2 = std::sqrt(2.0f)/2.0f;
- glm::quat id(static_cast<float>(1), static_cast<float>(0), static_cast<float>(0), static_cast<float>(0));
- glm::quat Y90rot(sqrt2, 0.0f, sqrt2, 0.0f);
- glm::quat Y180rot(0.0f, 0.0f, 1.0f, 0.0f);
-
- // Testing a == 0
- // Must be id
- glm::quat id2 = glm::slerp(id, Y90rot, 0.0f);
- Error += glm::all(glm::equal(id, id2, Epsilon)) ? 0 : 1;
-
- // Testing a == 1
- // Must be 90� rotation on Y : 0 0.7 0 0.7
- glm::quat Y90rot2 = glm::slerp(id, Y90rot, 1.0f);
- Error += glm::all(glm::equal(Y90rot, Y90rot2, Epsilon)) ? 0 : 1;
-
- // Testing standard, easy case
- // Must be 45� rotation on Y : 0 0.38 0 0.92
- glm::quat Y45rot1 = glm::slerp(id, Y90rot, 0.5f);
-
- // Testing reverse case
- // Must be 45� rotation on Y : 0 0.38 0 0.92
- glm::quat Ym45rot2 = glm::slerp(Y90rot, id, 0.5f);
-
- // Testing against full circle around the sphere instead of shortest path
- // Must be 45� rotation on Y
- // certainly not a 135� rotation
- glm::quat Y45rot3 = glm::slerp(id , -Y90rot, 0.5f);
- float Y45angle3 = glm::angle(Y45rot3);
- Error += glm::equal(Y45angle3, glm::pi<float>() * 0.25f, Epsilon) ? 0 : 1;
- Error += glm::all(glm::equal(Ym45rot2, Y45rot3, Epsilon)) ? 0 : 1;
-
- // Same, but inverted
- // Must also be 45� rotation on Y : 0 0.38 0 0.92
- // -0 -0.38 -0 -0.92 is ok too
- glm::quat Y45rot4 = glm::slerp(-Y90rot, id, 0.5f);
- Error += glm::all(glm::equal(Ym45rot2, -Y45rot4, Epsilon)) ? 0 : 1;
-
- // Testing q1 = q2
- // Must be 90� rotation on Y : 0 0.7 0 0.7
- glm::quat Y90rot3 = glm::slerp(Y90rot, Y90rot, 0.5f);
- Error += glm::all(glm::equal(Y90rot, Y90rot3, Epsilon)) ? 0 : 1;
-
- // Testing 180� rotation
- // Must be 90� rotation on almost any axis that is on the XZ plane
- glm::quat XZ90rot = glm::slerp(id, -Y90rot, 0.5f);
- float XZ90angle = glm::angle(XZ90rot); // Must be PI/4 = 0.78;
- Error += glm::equal(XZ90angle, glm::pi<float>() * 0.25f, Epsilon) ? 0 : 1;
-
- // Testing almost equal quaternions (this test should pass through the linear interpolation)
- // Must be 0 0.00X 0 0.99999
- glm::quat almostid = glm::slerp(id, glm::angleAxis(0.1f, glm::vec3(0.0f, 1.0f, 0.0f)), 0.5f);
-
- // Testing quaternions with opposite sign
- {
- glm::quat a(-1, 0, 0, 0);
-
- glm::quat result = glm::slerp(a, id, 0.5f);
-
- Error += glm::equal(glm::pow(glm::dot(id, result), 2.f), 1.f, 0.01f) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_quat_slerp_spins()
-{
- int Error = 0;
-
- float const Epsilon = 0.0001f;//glm::epsilon<float>();
-
- float sqrt2 = std::sqrt(2.0f) / 2.0f;
- glm::quat id(static_cast<float>(1), static_cast<float>(0), static_cast<float>(0), static_cast<float>(0));
- glm::quat Y90rot(sqrt2, 0.0f, sqrt2, 0.0f);
- glm::quat Y180rot(0.0f, 0.0f, 1.0f, 0.0f);
-
- // Testing a == 0, k == 1
- // Must be id
- glm::quat id2 = glm::slerp(id, id, 1.0f, 1);
- Error += glm::all(glm::equal(id, id2, Epsilon)) ? 0 : 1;
-
- // Testing a == 1, k == 2
- // Must be id
- glm::quat id3 = glm::slerp(id, id, 1.0f, 2);
- Error += glm::all(glm::equal(id, id3, Epsilon)) ? 0 : 1;
-
- // Testing a == 1, k == 1
- // Must be 90� rotation on Y : 0 0.7 0 0.7
- // Negative quaternion is representing same orientation
- glm::quat Y90rot2 = glm::slerp(id, Y90rot, 1.0f, 1);
- Error += glm::all(glm::equal(Y90rot, -Y90rot2, Epsilon)) ? 0 : 1;
-
- // Testing a == 1, k == 2
- // Must be id
- glm::quat Y90rot3 = glm::slerp(id, Y90rot, 8.0f / 9.0f, 2);
- Error += glm::all(glm::equal(id, Y90rot3, Epsilon)) ? 0 : 1;
-
- // Testing a == 1, k == 1
- // Must be 90� rotation on Y : 0 0.7 0 0.7
- glm::quat Y90rot4 = glm::slerp(id, Y90rot, 0.2f, 1);
- Error += glm::all(glm::equal(Y90rot, Y90rot4, Epsilon)) ? 0 : 1;
-
- // Testing reverse case
- // Must be 45� rotation on Y : 0 0.38 0 0.92
- // Negative quaternion is representing same orientation
- glm::quat Ym45rot2 = glm::slerp(Y90rot, id, 0.9f, 1);
- glm::quat Ym45rot3 = glm::slerp(Y90rot, id, 0.5f);
- Error += glm::all(glm::equal(-Ym45rot2, Ym45rot3, Epsilon)) ? 0 : 1;
-
- // Testing against full circle around the sphere instead of shortest path
- // Must be 45� rotation on Y
- // certainly not a 135� rotation
- glm::quat Y45rot3 = glm::slerp(id, -Y90rot, 0.5f, 0);
- float Y45angle3 = glm::angle(Y45rot3);
- Error += glm::equal(Y45angle3, glm::pi<float>() * 0.25f, Epsilon) ? 0 : 1;
- Error += glm::all(glm::equal(Ym45rot3, Y45rot3, Epsilon)) ? 0 : 1;
-
- // Same, but inverted
- // Must also be 45� rotation on Y : 0 0.38 0 0.92
- // -0 -0.38 -0 -0.92 is ok too
- glm::quat Y45rot4 = glm::slerp(-Y90rot, id, 0.5f, 0);
- Error += glm::all(glm::equal(Ym45rot2, Y45rot4, Epsilon)) ? 0 : 1;
-
- // Testing q1 = q2 k == 2
- // Must be 90� rotation on Y : 0 0.7 0 0.7
- glm::quat Y90rot5 = glm::slerp(Y90rot, Y90rot, 0.5f, 2);
- Error += glm::all(glm::equal(Y90rot, Y90rot5, Epsilon)) ? 0 : 1;
-
- // Testing 180� rotation
- // Must be 90� rotation on almost any axis that is on the XZ plane
- glm::quat XZ90rot = glm::slerp(id, -Y90rot, 0.5f, 1);
- float XZ90angle = glm::angle(XZ90rot); // Must be PI/4 = 0.78;
- Error += glm::equal(XZ90angle, glm::pi<float>() * 1.25f, Epsilon) ? 0 : 1;
-
- // Testing rotation over long arc
- // Distance from id to 90� is 270�, so 2/3 of it should be 180�
- // Negative quaternion is representing same orientation
- glm::quat Neg90rot = glm::slerp(id, Y90rot, 2.0f / 3.0f, -1);
- Error += glm::all(glm::equal(Y180rot, -Neg90rot, Epsilon)) ? 0 : 1;
-
- return Error;
-}
-
-static int test_quat_mul_vec()
-{
- int Error(0);
-
- glm::quat q = glm::angleAxis(glm::pi<float>() * 0.5f, glm::vec3(0, 0, 1));
- glm::vec3 v(1, 0, 0);
- glm::vec3 u(q * v);
- glm::vec3 w(u * q);
-
- Error += glm::all(glm::equal(v, w, 0.01f)) ? 0 : 1;
-
- return Error;
-}
-
-static int test_mul()
-{
- int Error = 0;
-
- glm::quat temp1 = glm::normalize(glm::quat(1.0f, glm::vec3(0.0, 1.0, 0.0)));
- glm::quat temp2 = glm::normalize(glm::quat(0.5f, glm::vec3(1.0, 0.0, 0.0)));
-
- glm::vec3 transformed0 = (temp1 * glm::vec3(0.0, 1.0, 0.0) * glm::inverse(temp1));
- glm::vec3 temp4 = temp2 * transformed0 * glm::inverse(temp2);
-
- glm::quat temp5 = glm::normalize(temp1 * temp2);
- glm::vec3 temp6 = temp5 * glm::vec3(0.0, 1.0, 0.0) * glm::inverse(temp5);
-
- glm::quat temp7(1.0f, glm::vec3(0.0, 1.0, 0.0));
-
- temp7 *= temp5;
- temp7 *= glm::inverse(temp5);
-
- Error += glm::any(glm::notEqual(temp7, glm::quat(1.0f, glm::vec3(0.0, 1.0, 0.0)), glm::epsilon<float>())) ? 1 : 0;
-
- return Error;
-}
-
-int test_identity()
-{
- int Error = 0;
-
- glm::quat const Q = glm::identity<glm::quat>();
-
- Error += glm::all(glm::equal(Q, glm::quat(1, 0, 0, 0), 0.0001f)) ? 0 : 1;
- Error += glm::any(glm::notEqual(Q, glm::quat(1, 0, 0, 0), 0.0001f)) ? 1 : 0;
-
- glm::mat4 const M = glm::identity<glm::mat4x4>();
- glm::mat4 const N(1.0f);
-
- Error += glm::all(glm::equal(M, N, 0.0001f)) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_mul();
- Error += test_quat_mul_vec();
- Error += test_quat_angle();
- Error += test_quat_angleAxis();
- Error += test_quat_mix();
- Error += test_quat_normalize();
- Error += test_quat_euler();
- Error += test_quat_slerp();
- Error += test_quat_slerp_spins();
- Error += test_identity();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtc/gtc_random.cpp b/3rdparty/glm/source/test/gtc/gtc_random.cpp
deleted file mode 100644
index 60fb60c..0000000
--- a/3rdparty/glm/source/test/gtc/gtc_random.cpp
+++ /dev/null
@@ -1,381 +0,0 @@
-#define GLM_FORCE_DEFAULT_ALIGNED_GENTYPES
-#include <glm/gtc/random.hpp>
-#include <glm/gtc/epsilon.hpp>
-#include <glm/gtc/type_precision.hpp>
-#if GLM_LANG & GLM_LANG_CXX0X_FLAG
-# include <array>
-#endif
-
-std::size_t const TestSamples = 10000;
-
-int test_linearRand()
-{
- int Error = 0;
-
- glm::int32 const Min = 16;
- glm::int32 const Max = 32;
-
- {
- glm::u8vec2 AMin(std::numeric_limits<glm::u8>::max());
- glm::u8vec2 AMax(std::numeric_limits<glm::u8>::min());
- {
- for(std::size_t i = 0; i < TestSamples; ++i)
- {
- glm::u8vec2 A = glm::linearRand(glm::u8vec2(Min), glm::u8vec2(Max));
- AMin = glm::min(AMin, A);
- AMax = glm::max(AMax, A);
-
- if(!glm::all(glm::lessThanEqual(A, glm::u8vec2(Max))))
- ++Error;
- if(!glm::all(glm::greaterThanEqual(A, glm::u8vec2(Min))))
- ++Error;
- assert(!Error);
- }
-
- Error += glm::all(glm::equal(AMin, glm::u8vec2(Min))) ? 0 : 1;
- Error += glm::all(glm::equal(AMax, glm::u8vec2(Max))) ? 0 : 1;
- assert(!Error);
- }
-
- glm::u16vec2 BMin(std::numeric_limits<glm::u16>::max());
- glm::u16vec2 BMax(std::numeric_limits<glm::u16>::min());
- {
- for(std::size_t i = 0; i < TestSamples; ++i)
- {
- glm::u16vec2 B = glm::linearRand(glm::u16vec2(Min), glm::u16vec2(Max));
- BMin = glm::min(BMin, B);
- BMax = glm::max(BMax, B);
-
- if(!glm::all(glm::lessThanEqual(B, glm::u16vec2(Max))))
- ++Error;
- if(!glm::all(glm::greaterThanEqual(B, glm::u16vec2(Min))))
- ++Error;
- assert(!Error);
- }
-
- Error += glm::all(glm::equal(BMin, glm::u16vec2(Min))) ? 0 : 1;
- Error += glm::all(glm::equal(BMax, glm::u16vec2(Max))) ? 0 : 1;
- assert(!Error);
- }
-
- glm::u32vec2 CMin(std::numeric_limits<glm::u32>::max());
- glm::u32vec2 CMax(std::numeric_limits<glm::u32>::min());
- {
- for(std::size_t i = 0; i < TestSamples; ++i)
- {
- glm::u32vec2 C = glm::linearRand(glm::u32vec2(Min), glm::u32vec2(Max));
- CMin = glm::min(CMin, C);
- CMax = glm::max(CMax, C);
-
- if(!glm::all(glm::lessThanEqual(C, glm::u32vec2(Max))))
- ++Error;
- if(!glm::all(glm::greaterThanEqual(C, glm::u32vec2(Min))))
- ++Error;
- assert(!Error);
- }
-
- Error += glm::all(glm::equal(CMin, glm::u32vec2(Min))) ? 0 : 1;
- Error += glm::all(glm::equal(CMax, glm::u32vec2(Max))) ? 0 : 1;
- assert(!Error);
- }
-
- glm::u64vec2 DMin(std::numeric_limits<glm::u64>::max());
- glm::u64vec2 DMax(std::numeric_limits<glm::u64>::min());
- {
- for(std::size_t i = 0; i < TestSamples; ++i)
- {
- glm::u64vec2 D = glm::linearRand(glm::u64vec2(Min), glm::u64vec2(Max));
- DMin = glm::min(DMin, D);
- DMax = glm::max(DMax, D);
-
- if(!glm::all(glm::lessThanEqual(D, glm::u64vec2(Max))))
- ++Error;
- if(!glm::all(glm::greaterThanEqual(D, glm::u64vec2(Min))))
- ++Error;
- assert(!Error);
- }
-
- Error += glm::all(glm::equal(DMin, glm::u64vec2(Min))) ? 0 : 1;
- Error += glm::all(glm::equal(DMax, glm::u64vec2(Max))) ? 0 : 1;
- assert(!Error);
- }
- }
-
- {
- glm::i8vec2 AMin(std::numeric_limits<glm::i8>::max());
- glm::i8vec2 AMax(std::numeric_limits<glm::i8>::min());
- {
- for(std::size_t i = 0; i < TestSamples; ++i)
- {
- glm::i8vec2 A = glm::linearRand(glm::i8vec2(Min), glm::i8vec2(Max));
- AMin = glm::min(AMin, A);
- AMax = glm::max(AMax, A);
-
- if(!glm::all(glm::lessThanEqual(A, glm::i8vec2(Max))))
- ++Error;
- if(!glm::all(glm::greaterThanEqual(A, glm::i8vec2(Min))))
- ++Error;
- assert(!Error);
- }
-
- Error += glm::all(glm::equal(AMin, glm::i8vec2(Min))) ? 0 : 1;
- Error += glm::all(glm::equal(AMax, glm::i8vec2(Max))) ? 0 : 1;
- assert(!Error);
- }
-
- glm::i16vec2 BMin(std::numeric_limits<glm::i16>::max());
- glm::i16vec2 BMax(std::numeric_limits<glm::i16>::min());
- {
- for(std::size_t i = 0; i < TestSamples; ++i)
- {
- glm::i16vec2 B = glm::linearRand(glm::i16vec2(Min), glm::i16vec2(Max));
- BMin = glm::min(BMin, B);
- BMax = glm::max(BMax, B);
-
- if(!glm::all(glm::lessThanEqual(B, glm::i16vec2(Max))))
- ++Error;
- if(!glm::all(glm::greaterThanEqual(B, glm::i16vec2(Min))))
- ++Error;
- assert(!Error);
- }
-
- Error += glm::all(glm::equal(BMin, glm::i16vec2(Min))) ? 0 : 1;
- Error += glm::all(glm::equal(BMax, glm::i16vec2(Max))) ? 0 : 1;
- assert(!Error);
- }
-
- glm::i32vec2 CMin(std::numeric_limits<glm::i32>::max());
- glm::i32vec2 CMax(std::numeric_limits<glm::i32>::min());
- {
- for(std::size_t i = 0; i < TestSamples; ++i)
- {
- glm::i32vec2 C = glm::linearRand(glm::i32vec2(Min), glm::i32vec2(Max));
- CMin = glm::min(CMin, C);
- CMax = glm::max(CMax, C);
-
- if(!glm::all(glm::lessThanEqual(C, glm::i32vec2(Max))))
- ++Error;
- if(!glm::all(glm::greaterThanEqual(C, glm::i32vec2(Min))))
- ++Error;
- assert(!Error);
- }
-
- Error += glm::all(glm::equal(CMin, glm::i32vec2(Min))) ? 0 : 1;
- Error += glm::all(glm::equal(CMax, glm::i32vec2(Max))) ? 0 : 1;
- assert(!Error);
- }
-
- glm::i64vec2 DMin(std::numeric_limits<glm::i64>::max());
- glm::i64vec2 DMax(std::numeric_limits<glm::i64>::min());
- {
- for(std::size_t i = 0; i < TestSamples; ++i)
- {
- glm::i64vec2 D = glm::linearRand(glm::i64vec2(Min), glm::i64vec2(Max));
- DMin = glm::min(DMin, D);
- DMax = glm::max(DMax, D);
-
- if(!glm::all(glm::lessThanEqual(D, glm::i64vec2(Max))))
- ++Error;
- if(!glm::all(glm::greaterThanEqual(D, glm::i64vec2(Min))))
- ++Error;
- assert(!Error);
- }
-
- Error += glm::all(glm::equal(DMin, glm::i64vec2(Min))) ? 0 : 1;
- Error += glm::all(glm::equal(DMax, glm::i64vec2(Max))) ? 0 : 1;
- assert(!Error);
- }
- }
-
- for(std::size_t i = 0; i < TestSamples; ++i)
- {
- glm::f32vec2 const A(glm::linearRand(glm::f32vec2(static_cast<float>(Min)), glm::f32vec2(static_cast<float>(Max))));
- if(!glm::all(glm::lessThanEqual(A, glm::f32vec2(static_cast<float>(Max)))))
- ++Error;
- if(!glm::all(glm::greaterThanEqual(A, glm::f32vec2(static_cast<float>(Min)))))
- ++Error;
-
- glm::f64vec2 const B(glm::linearRand(glm::f64vec2(Min), glm::f64vec2(Max)));
- if(!glm::all(glm::lessThanEqual(B, glm::f64vec2(Max))))
- ++Error;
- if(!glm::all(glm::greaterThanEqual(B, glm::f64vec2(Min))))
- ++Error;
- assert(!Error);
- }
-
- {
- float ResultFloat = 0.0f;
- double ResultDouble = 0.0;
- for(std::size_t i = 0; i < TestSamples; ++i)
- {
- ResultFloat += glm::linearRand(-1.0f, 1.0f);
- ResultDouble += glm::linearRand(-1.0, 1.0);
- }
-
- Error += glm::epsilonEqual(ResultFloat, 0.0f, 0.0001f);
- Error += glm::epsilonEqual(ResultDouble, 0.0, 0.0001);
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_circularRand()
-{
- int Error = 0;
-
- {
- std::size_t Max = TestSamples;
- float ResultFloat = 0.0f;
- double ResultDouble = 0.0;
- double Radius = 2.0;
-
- for(std::size_t i = 0; i < Max; ++i)
- {
- ResultFloat += glm::length(glm::circularRand(1.0f));
- ResultDouble += glm::length(glm::circularRand(Radius));
- }
-
- Error += glm::epsilonEqual(ResultFloat, float(Max), 0.01f) ? 0 : 1;
- Error += glm::epsilonEqual(ResultDouble, double(Max) * double(Radius), 0.01) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_sphericalRand()
-{
- int Error = 0;
-
- {
- std::size_t Max = TestSamples;
- float ResultFloatA = 0.0f;
- float ResultFloatB = 0.0f;
- float ResultFloatC = 0.0f;
- double ResultDoubleA = 0.0;
- double ResultDoubleB = 0.0;
- double ResultDoubleC = 0.0;
-
- for(std::size_t i = 0; i < Max; ++i)
- {
- ResultFloatA += glm::length(glm::sphericalRand(1.0f));
- ResultDoubleA += glm::length(glm::sphericalRand(1.0));
- ResultFloatB += glm::length(glm::sphericalRand(2.0f));
- ResultDoubleB += glm::length(glm::sphericalRand(2.0));
- ResultFloatC += glm::length(glm::sphericalRand(3.0f));
- ResultDoubleC += glm::length(glm::sphericalRand(3.0));
- }
-
- Error += glm::epsilonEqual(ResultFloatA, float(Max), 0.01f) ? 0 : 1;
- Error += glm::epsilonEqual(ResultDoubleA, double(Max), 0.0001) ? 0 : 1;
- Error += glm::epsilonEqual(ResultFloatB, float(Max * 2), 0.01f) ? 0 : 1;
- Error += glm::epsilonEqual(ResultDoubleB, double(Max * 2), 0.0001) ? 0 : 1;
- Error += glm::epsilonEqual(ResultFloatC, float(Max * 3), 0.01f) ? 0 : 1;
- Error += glm::epsilonEqual(ResultDoubleC, double(Max * 3), 0.01) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_diskRand()
-{
- int Error = 0;
-
- {
- float ResultFloat = 0.0f;
- double ResultDouble = 0.0;
-
- for(std::size_t i = 0; i < TestSamples; ++i)
- {
- ResultFloat += glm::length(glm::diskRand(2.0f));
- ResultDouble += glm::length(glm::diskRand(2.0));
- }
-
- Error += ResultFloat < float(TestSamples) * 2.f ? 0 : 1;
- Error += ResultDouble < double(TestSamples) * 2.0 ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_ballRand()
-{
- int Error = 0;
-
- {
- float ResultFloat = 0.0f;
- double ResultDouble = 0.0;
-
- for(std::size_t i = 0; i < TestSamples; ++i)
- {
- ResultFloat += glm::length(glm::ballRand(2.0f));
- ResultDouble += glm::length(glm::ballRand(2.0));
- }
-
- Error += ResultFloat < float(TestSamples) * 2.f ? 0 : 1;
- Error += ResultDouble < double(TestSamples) * 2.0 ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-/*
-#if(GLM_LANG & GLM_LANG_CXX0X_FLAG)
-int test_grid()
-{
- int Error = 0;
-
- typedef std::array<int, 8> colors;
- typedef std::array<int, 8 * 8> grid;
-
- grid Grid;
- colors Colors;
-
- grid GridBest;
- colors ColorsBest;
-
- while(true)
- {
- for(std::size_t i = 0; i < Grid.size(); ++i)
- Grid[i] = int(glm::linearRand(0.0, 8.0 * 8.0 * 8.0 - 1.0) / 64.0);
-
- for(std::size_t i = 0; i < Grid.size(); ++i)
- ++Colors[Grid[i]];
-
- bool Exit = true;
- for(std::size_t i = 0; i < Colors.size(); ++i)
- {
- if(Colors[i] == 8)
- continue;
-
- Exit = false;
- break;
- }
-
- if(Exit == true)
- break;
- }
-
- return Error;
-}
-#endif
-*/
-int main()
-{
- int Error = 0;
-
- Error += test_linearRand();
- Error += test_circularRand();
- Error += test_sphericalRand();
- Error += test_diskRand();
- Error += test_ballRand();
-/*
-#if(GLM_LANG & GLM_LANG_CXX0X_FLAG)
- Error += test_grid();
-#endif
-*/
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtc/gtc_reciprocal.cpp b/3rdparty/glm/source/test/gtc/gtc_reciprocal.cpp
deleted file mode 100644
index 5158413..0000000
--- a/3rdparty/glm/source/test/gtc/gtc_reciprocal.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <glm/gtc/reciprocal.hpp>
-#include <ctime>
-
-int main()
-{
- return 0;
-}
-
diff --git a/3rdparty/glm/source/test/gtc/gtc_round.cpp b/3rdparty/glm/source/test/gtc/gtc_round.cpp
deleted file mode 100644
index 60d9a85..0000000
--- a/3rdparty/glm/source/test/gtc/gtc_round.cpp
+++ /dev/null
@@ -1,458 +0,0 @@
-#include <glm/gtc/round.hpp>
-#include <glm/gtc/type_precision.hpp>
-#include <glm/gtc/vec1.hpp>
-#include <glm/gtc/epsilon.hpp>
-#include <vector>
-#include <ctime>
-#include <cstdio>
-
-namespace isPowerOfTwo
-{
- template<typename genType>
- struct type
- {
- genType Value;
- bool Return;
- };
-
- int test_int16()
- {
- type<glm::int16> const Data[] =
- {
- {0x0001, true},
- {0x0002, true},
- {0x0004, true},
- {0x0080, true},
- {0x0000, true},
- {0x0003, false}
- };
-
- int Error(0);
-
- for(std::size_t i = 0, n = sizeof(Data) / sizeof(type<glm::int16>); i < n; ++i)
- {
- bool Result = glm::isPowerOfTwo(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- return Error;
- }
-
- int test_uint16()
- {
- type<glm::uint16> const Data[] =
- {
- {0x0001, true},
- {0x0002, true},
- {0x0004, true},
- {0x0000, true},
- {0x0000, true},
- {0x0003, false}
- };
-
- int Error(0);
-
- for(std::size_t i = 0, n = sizeof(Data) / sizeof(type<glm::uint16>); i < n; ++i)
- {
- bool Result = glm::isPowerOfTwo(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- return Error;
- }
-
- int test_int32()
- {
- type<int> const Data[] =
- {
- {0x00000001, true},
- {0x00000002, true},
- {0x00000004, true},
- {0x0000000f, false},
- {0x00000000, true},
- {0x00000003, false}
- };
-
- int Error(0);
-
- for(std::size_t i = 0, n = sizeof(Data) / sizeof(type<int>); i < n; ++i)
- {
- bool Result = glm::isPowerOfTwo(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- for(std::size_t i = 0, n = sizeof(Data) / sizeof(type<int>); i < n; ++i)
- {
- glm::bvec1 Result = glm::isPowerOfTwo(glm::ivec1(Data[i].Value));
- Error += glm::all(glm::equal(glm::bvec1(Data[i].Return), Result)) ? 0 : 1;
- }
-
- for(std::size_t i = 0, n = sizeof(Data) / sizeof(type<int>); i < n; ++i)
- {
- glm::bvec2 Result = glm::isPowerOfTwo(glm::ivec2(Data[i].Value));
- Error += glm::all(glm::equal(glm::bvec2(Data[i].Return), Result)) ? 0 : 1;
- }
-
- for(std::size_t i = 0, n = sizeof(Data) / sizeof(type<int>); i < n; ++i)
- {
- glm::bvec3 Result = glm::isPowerOfTwo(glm::ivec3(Data[i].Value));
- Error += glm::all(glm::equal(glm::bvec3(Data[i].Return), Result)) ? 0 : 1;
- }
-
- for(std::size_t i = 0, n = sizeof(Data) / sizeof(type<int>); i < n; ++i)
- {
- glm::bvec4 Result = glm::isPowerOfTwo(glm::ivec4(Data[i].Value));
- Error += glm::all(glm::equal(glm::bvec4(Data[i].Return), Result)) ? 0 : 1;
- }
-
- return Error;
- }
-
- int test_uint32()
- {
- type<glm::uint> const Data[] =
- {
- {0x00000001, true},
- {0x00000002, true},
- {0x00000004, true},
- {0x80000000, true},
- {0x00000000, true},
- {0x00000003, false}
- };
-
- int Error(0);
-
- for(std::size_t i = 0, n = sizeof(Data) / sizeof(type<glm::uint>); i < n; ++i)
- {
- bool Result = glm::isPowerOfTwo(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- return Error;
- }
-
- int test()
- {
- int Error(0);
-
- Error += test_int16();
- Error += test_uint16();
- Error += test_int32();
- Error += test_uint32();
-
- return Error;
- }
-}//isPowerOfTwo
-
-namespace ceilPowerOfTwo_advanced
-{
- template<typename genIUType>
- GLM_FUNC_QUALIFIER genIUType highestBitValue(genIUType Value)
- {
- genIUType tmp = Value;
- genIUType result = genIUType(0);
- while(tmp)
- {
- result = (tmp & (~tmp + 1)); // grab lowest bit
- tmp &= ~result; // clear lowest bit
- }
- return result;
- }
-
- template<typename genType>
- GLM_FUNC_QUALIFIER genType ceilPowerOfTwo_loop(genType value)
- {
- return glm::isPowerOfTwo(value) ? value : highestBitValue(value) << 1;
- }
-
- template<typename genType>
- struct type
- {
- genType Value;
- genType Return;
- };
-
- int test_int32()
- {
- type<glm::int32> const Data[] =
- {
- {0x0000ffff, 0x00010000},
- {-3, -4},
- {-8, -8},
- {0x00000001, 0x00000001},
- {0x00000002, 0x00000002},
- {0x00000004, 0x00000004},
- {0x00000007, 0x00000008},
- {0x0000fff0, 0x00010000},
- {0x0000f000, 0x00010000},
- {0x08000000, 0x08000000},
- {0x00000000, 0x00000000},
- {0x00000003, 0x00000004}
- };
-
- int Error(0);
-
- for(std::size_t i = 0, n = sizeof(Data) / sizeof(type<glm::int32>); i < n; ++i)
- {
- glm::int32 Result = glm::ceilPowerOfTwo(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- return Error;
- }
-
- int test_uint32()
- {
- type<glm::uint32> const Data[] =
- {
- {0x00000001, 0x00000001},
- {0x00000002, 0x00000002},
- {0x00000004, 0x00000004},
- {0x00000007, 0x00000008},
- {0x0000ffff, 0x00010000},
- {0x0000fff0, 0x00010000},
- {0x0000f000, 0x00010000},
- {0x80000000, 0x80000000},
- {0x00000000, 0x00000000},
- {0x00000003, 0x00000004}
- };
-
- int Error(0);
-
- for(std::size_t i = 0, n = sizeof(Data) / sizeof(type<glm::uint32>); i < n; ++i)
- {
- glm::uint32 Result = glm::ceilPowerOfTwo(Data[i].Value);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- return Error;
- }
-
- int perf()
- {
- int Error(0);
-
- std::vector<glm::uint> v;
- v.resize(100000000);
-
- std::clock_t Timestramp0 = std::clock();
-
- for(glm::uint32 i = 0, n = static_cast<glm::uint>(v.size()); i < n; ++i)
- v[i] = ceilPowerOfTwo_loop(i);
-
- std::clock_t Timestramp1 = std::clock();
-
- for(glm::uint32 i = 0, n = static_cast<glm::uint>(v.size()); i < n; ++i)
- v[i] = glm::ceilPowerOfTwo(i);
-
- std::clock_t Timestramp2 = std::clock();
-
- std::printf("ceilPowerOfTwo_loop: %d clocks\n", static_cast<int>(Timestramp1 - Timestramp0));
- std::printf("glm::ceilPowerOfTwo: %d clocks\n", static_cast<int>(Timestramp2 - Timestramp1));
-
- return Error;
- }
-
- int test()
- {
- int Error(0);
-
- Error += test_int32();
- Error += test_uint32();
-
- return Error;
- }
-}//namespace ceilPowerOfTwo_advanced
-
-namespace roundPowerOfTwo
-{
- int test()
- {
- int Error = 0;
-
- glm::uint32 const A = glm::roundPowerOfTwo(7u);
- Error += A == 8u ? 0 : 1;
-
- glm::uint32 const B = glm::roundPowerOfTwo(15u);
- Error += B == 16u ? 0 : 1;
-
- glm::uint32 const C = glm::roundPowerOfTwo(31u);
- Error += C == 32u ? 0 : 1;
-
- glm::uint32 const D = glm::roundPowerOfTwo(9u);
- Error += D == 8u ? 0 : 1;
-
- glm::uint32 const E = glm::roundPowerOfTwo(17u);
- Error += E == 16u ? 0 : 1;
-
- glm::uint32 const F = glm::roundPowerOfTwo(33u);
- Error += F == 32u ? 0 : 1;
-
- return Error;
- }
-}//namespace roundPowerOfTwo
-
-namespace floorPowerOfTwo
-{
- int test()
- {
- int Error = 0;
-
- glm::uint32 const A = glm::floorPowerOfTwo(7u);
- Error += A == 4u ? 0 : 1;
-
- glm::uint32 const B = glm::floorPowerOfTwo(15u);
- Error += B == 8u ? 0 : 1;
-
- glm::uint32 const C = glm::floorPowerOfTwo(31u);
- Error += C == 16u ? 0 : 1;
-
- return Error;
- }
-}//namespace floorPowerOfTwo
-
-namespace ceilPowerOfTwo
-{
- int test()
- {
- int Error = 0;
-
- glm::uint32 const A = glm::ceilPowerOfTwo(7u);
- Error += A == 8u ? 0 : 1;
-
- glm::uint32 const B = glm::ceilPowerOfTwo(15u);
- Error += B == 16u ? 0 : 1;
-
- glm::uint32 const C = glm::ceilPowerOfTwo(31u);
- Error += C == 32u ? 0 : 1;
-
- return Error;
- }
-}//namespace ceilPowerOfTwo
-
-namespace floorMultiple
-{
- template<typename genType>
- struct type
- {
- genType Source;
- genType Multiple;
- genType Return;
- genType Epsilon;
- };
-
- int test_float()
- {
- type<glm::float64> const Data[] =
- {
- {3.4, 0.3, 3.3, 0.0001},
- {-1.4, 0.3, -1.5, 0.0001},
- };
-
- int Error(0);
-
- for(std::size_t i = 0, n = sizeof(Data) / sizeof(type<glm::float64>); i < n; ++i)
- {
- glm::float64 Result = glm::floorMultiple(Data[i].Source, Data[i].Multiple);
- Error += glm::epsilonEqual(Data[i].Return, Result, Data[i].Epsilon) ? 0 : 1;
- }
-
- return Error;
- }
-
- int test()
- {
- int Error(0);
-
- Error += test_float();
-
- return Error;
- }
-}//namespace floorMultiple
-
-namespace ceilMultiple
-{
- template<typename genType>
- struct type
- {
- genType Source;
- genType Multiple;
- genType Return;
- genType Epsilon;
- };
-
- int test_float()
- {
- type<glm::float64> const Data[] =
- {
- {3.4, 0.3, 3.6, 0.0001},
- {-1.4, 0.3, -1.2, 0.0001},
- };
-
- int Error(0);
-
- for(std::size_t i = 0, n = sizeof(Data) / sizeof(type<glm::float64>); i < n; ++i)
- {
- glm::float64 Result = glm::ceilMultiple(Data[i].Source, Data[i].Multiple);
- Error += glm::epsilonEqual(Data[i].Return, Result, Data[i].Epsilon) ? 0 : 1;
- }
-
- return Error;
- }
-
- int test_int()
- {
- type<int> const Data[] =
- {
- {3, 4, 4, 0},
- {7, 4, 8, 0},
- {5, 4, 8, 0},
- {1, 4, 4, 0},
- {1, 3, 3, 0},
- {4, 3, 6, 0},
- {4, 1, 4, 0},
- {1, 1, 1, 0},
- {7, 1, 7, 0},
- };
-
- int Error(0);
-
- for(std::size_t i = 0, n = sizeof(Data) / sizeof(type<int>); i < n; ++i)
- {
- int Result = glm::ceilMultiple(Data[i].Source, Data[i].Multiple);
- Error += Data[i].Return == Result ? 0 : 1;
- }
-
- return Error;
- }
-
- int test()
- {
- int Error(0);
-
- Error += test_int();
- Error += test_float();
-
- return Error;
- }
-}//namespace ceilMultiple
-
-int main()
-{
- int Error(0);
-
- Error += isPowerOfTwo::test();
- Error += floorPowerOfTwo::test();
- Error += roundPowerOfTwo::test();
- Error += ceilPowerOfTwo::test();
- Error += ceilPowerOfTwo_advanced::test();
-
-# ifdef NDEBUG
- Error += ceilPowerOfTwo_advanced::perf();
-# endif//NDEBUG
-
- Error += floorMultiple::test();
- Error += ceilMultiple::test();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtc/gtc_type_aligned.cpp b/3rdparty/glm/source/test/gtc/gtc_type_aligned.cpp
deleted file mode 100644
index 3c071ef..0000000
--- a/3rdparty/glm/source/test/gtc/gtc_type_aligned.cpp
+++ /dev/null
@@ -1,181 +0,0 @@
-#include <glm/glm.hpp>
-
-#if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE
-#include <glm/gtc/type_aligned.hpp>
-#include <glm/gtc/type_precision.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/matrix_relational.hpp>
-
-GLM_STATIC_ASSERT(glm::detail::is_aligned<glm::aligned_lowp>::value, "aligned_lowp is not aligned");
-GLM_STATIC_ASSERT(glm::detail::is_aligned<glm::aligned_mediump>::value, "aligned_mediump is not aligned");
-GLM_STATIC_ASSERT(glm::detail::is_aligned<glm::aligned_highp>::value, "aligned_highp is not aligned");
-GLM_STATIC_ASSERT(!glm::detail::is_aligned<glm::packed_highp>::value, "packed_highp is aligned");
-GLM_STATIC_ASSERT(!glm::detail::is_aligned<glm::packed_mediump>::value, "packed_mediump is aligned");
-GLM_STATIC_ASSERT(!glm::detail::is_aligned<glm::packed_lowp>::value, "packed_lowp is aligned");
-
-struct my_vec4_packed
-{
- glm::uint32 a;
- glm::vec4 b;
-};
-GLM_STATIC_ASSERT(sizeof(my_vec4_packed) == sizeof(glm::uint32) + sizeof(glm::vec4), "glm::vec4 packed is not correct");
-
-struct my_vec4_aligned
-{
- glm::uint32 a;
- glm::aligned_vec4 b;
-};
-GLM_STATIC_ASSERT(sizeof(my_vec4_aligned) == sizeof(glm::aligned_vec4) * 2, "glm::vec4 aligned is not correct");
-
-struct my_dvec4_packed
-{
- glm::uint64 a;
- glm::dvec4 b;
-};
-GLM_STATIC_ASSERT(sizeof(my_dvec4_packed) == sizeof(glm::uint64) + sizeof(glm::dvec4), "glm::dvec4 packed is not correct");
-
-struct my_dvec4_aligned
-{
- glm::uint64 a;
- glm::aligned_dvec4 b;
-};
-//GLM_STATIC_ASSERT(sizeof(my_dvec4_aligned) == sizeof(glm::aligned_dvec4) * 2, "glm::dvec4 aligned is not correct");
-
-struct my_ivec4_packed
-{
- glm::uint32 a;
- glm::ivec4 b;
-};
-GLM_STATIC_ASSERT(sizeof(my_ivec4_packed) == sizeof(glm::uint32) + sizeof(glm::ivec4), "glm::ivec4 packed is not correct");
-
-struct my_ivec4_aligned
-{
- glm::uint32 a;
- glm::aligned_ivec4 b;
-};
-GLM_STATIC_ASSERT(sizeof(my_ivec4_aligned) == sizeof(glm::aligned_ivec4) * 2, "glm::ivec4 aligned is not correct");
-
-struct my_u8vec4_packed
-{
- glm::uint32 a;
- glm::u8vec4 b;
-};
-GLM_STATIC_ASSERT(sizeof(my_u8vec4_packed) == sizeof(glm::uint32) + sizeof(glm::u8vec4), "glm::u8vec4 packed is not correct");
-
-static int test_copy()
-{
- int Error = 0;
-
- {
- glm::aligned_ivec4 const a(1, 2, 3, 4);
- glm::ivec4 const u(a);
-
- Error += a.x == u.x ? 0 : 1;
- Error += a.y == u.y ? 0 : 1;
- Error += a.z == u.z ? 0 : 1;
- Error += a.w == u.w ? 0 : 1;
- }
-
- {
- my_ivec4_aligned a;
- a.b = glm::ivec4(1, 2, 3, 4);
-
- my_ivec4_packed u;
- u.b = a.b;
-
- Error += a.b.x == u.b.x ? 0 : 1;
- Error += a.b.y == u.b.y ? 0 : 1;
- Error += a.b.z == u.b.z ? 0 : 1;
- Error += a.b.w == u.b.w ? 0 : 1;
- }
-
- return Error;
-}
-
-static int test_ctor()
-{
- int Error = 0;
-
-# if GLM_HAS_CONSTEXPR
- {
- constexpr glm::aligned_ivec4 v(1);
-
- Error += v.x == 1 ? 0 : 1;
- Error += v.y == 1 ? 0 : 1;
- Error += v.z == 1 ? 0 : 1;
- Error += v.w == 1 ? 0 : 1;
- }
-
- {
- constexpr glm::packed_ivec4 v(1);
-
- Error += v.x == 1 ? 0 : 1;
- Error += v.y == 1 ? 0 : 1;
- Error += v.z == 1 ? 0 : 1;
- Error += v.w == 1 ? 0 : 1;
- }
-
- {
- constexpr glm::ivec4 v(1);
-
- Error += v.x == 1 ? 0 : 1;
- Error += v.y == 1 ? 0 : 1;
- Error += v.z == 1 ? 0 : 1;
- Error += v.w == 1 ? 0 : 1;
- }
-# endif//GLM_HAS_CONSTEXPR
-
- return Error;
-}
-
-static int test_aligned_ivec4()
-{
- int Error = 0;
-
- glm::aligned_ivec4 const v(1, 2, 3, 4);
- Error += glm::all(glm::equal(v, glm::aligned_ivec4(1, 2, 3, 4))) ? 0 : 1;
-
- glm::aligned_ivec4 const u = v * 2;
- Error += glm::all(glm::equal(u, glm::aligned_ivec4(2, 4, 6, 8))) ? 0 : 1;
-
- return Error;
-}
-
-static int test_aligned_mat4()
-{
- int Error = 0;
-
- glm::aligned_vec4 const u(1.f, 2.f, 3.f, 4.f);
- Error += glm::all(glm::equal(u, glm::aligned_vec4(1.f, 2.f, 3.f, 4.f), 0.0001f)) ? 0 : 1;
-
- glm::aligned_vec4 const v(1, 2, 3, 4);
- Error += glm::all(glm::equal(v, glm::aligned_vec4(1.f, 2.f, 3.f, 4.f), 0.0001f)) ? 0 : 1;
-
- glm::aligned_mat4 const m(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
- glm::aligned_mat4 const t = glm::transpose(m);
- glm::aligned_mat4 const expected = glm::mat4(0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15);
- Error += glm::all(glm::equal(t, expected, 0.0001f)) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_ctor();
- Error += test_copy();
- Error += test_aligned_ivec4();
- Error += test_aligned_mat4();
-
- return Error;
-}
-
-#else
-
-int main()
-{
- return 0;
-}
-
-#endif
diff --git a/3rdparty/glm/source/test/gtc/gtc_type_precision.cpp b/3rdparty/glm/source/test/gtc/gtc_type_precision.cpp
deleted file mode 100644
index 77f0686..0000000
--- a/3rdparty/glm/source/test/gtc/gtc_type_precision.cpp
+++ /dev/null
@@ -1,1041 +0,0 @@
-#include <glm/gtc/type_precision.hpp>
-#include <glm/gtc/quaternion.hpp>
-#include <glm/gtc/constants.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <vector>
-#if GLM_HAS_OPENMP
-# include <omp.h>
-#endif
-
-#if GLM_HAS_STATIC_ASSERT
-static_assert(sizeof(glm::lowp_u8vec1) == 1, "uint8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::mediump_u8vec1) == 1, "uint8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::highp_u8vec1) == 1, "uint8 size isn't 1 byte on this platform");
-
-static_assert(sizeof(glm::lowp_u16vec1) == 2, "uint16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::mediump_u16vec1) == 2, "uint16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::highp_u16vec1) == 2, "uint16 size isn't 2 bytes on this platform");
-
-static_assert(sizeof(glm::lowp_u32vec1) == 4, "uint32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::mediump_u32vec1) == 4, "uint32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::highp_u32vec1) == 4, "uint32 size isn't 4 bytes on this platform");
-
-static_assert(sizeof(glm::lowp_u64vec1) == 8, "uint64 size isn't 8 bytes on this platform");
-static_assert(sizeof(glm::mediump_u64vec1) == 8, "uint64 size isn't 8 bytes on this platform");
-static_assert(sizeof(glm::highp_u64vec1) == 8, "uint64 size isn't 8 bytes on this platform");
-
-
-static_assert(sizeof(glm::lowp_u8vec2) == 2, "uint8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::mediump_u8vec2) == 2, "uint8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::highp_u8vec2) == 2, "uint8 size isn't 1 byte on this platform");
-
-static_assert(sizeof(glm::lowp_u16vec2) == 4, "uint16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::mediump_u16vec2) == 4, "uint16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::highp_u16vec2) == 4, "uint16 size isn't 2 bytes on this platform");
-
-static_assert(sizeof(glm::lowp_u32vec2) == 8, "uint32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::mediump_u32vec2) == 8, "uint32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::highp_u32vec2) == 8, "uint32 size isn't 4 bytes on this platform");
-
-static_assert(sizeof(glm::lowp_u64vec2) == 16, "uint64 size isn't 8 bytes on this platform");
-static_assert(sizeof(glm::mediump_u64vec2) == 16, "uint64 size isn't 8 bytes on this platform");
-static_assert(sizeof(glm::highp_u64vec2) == 16, "uint64 size isn't 8 bytes on this platform");
-
-
-static_assert(sizeof(glm::lowp_u8vec3) == 3, "uint8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::mediump_u8vec3) == 3, "uint8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::highp_u8vec3) == 3, "uint8 size isn't 1 byte on this platform");
-
-static_assert(sizeof(glm::lowp_u16vec3) == 6, "uint16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::mediump_u16vec3) == 6, "uint16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::highp_u16vec3) == 6, "uint16 size isn't 2 bytes on this platform");
-
-static_assert(sizeof(glm::lowp_u32vec3) == 12, "uint32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::mediump_u32vec3) == 12, "uint32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::highp_u32vec3) == 12, "uint32 size isn't 4 bytes on this platform");
-
-static_assert(sizeof(glm::lowp_u64vec3) == 24, "uint64 size isn't 8 bytes on this platform");
-static_assert(sizeof(glm::mediump_u64vec3) == 24, "uint64 size isn't 8 bytes on this platform");
-static_assert(sizeof(glm::highp_u64vec3) == 24, "uint64 size isn't 8 bytes on this platform");
-
-
-static_assert(sizeof(glm::lowp_u8vec4) == 4, "int8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::mediump_u8vec4) == 4, "int8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::highp_u8vec4) == 4, "int8 size isn't 1 byte on this platform");
-
-static_assert(sizeof(glm::lowp_u16vec4) == 8, "int16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::mediump_u16vec4) == 8, "int16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::highp_u16vec4) == 8, "int16 size isn't 2 bytes on this platform");
-
-static_assert(sizeof(glm::lowp_u32vec4) == 16, "int32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::mediump_u32vec4) == 16, "int32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::highp_u32vec4) == 16, "int32 size isn't 4 bytes on this platform");
-
-static_assert(sizeof(glm::lowp_u64vec4) == 32, "int64 size isn't 8 bytes on this platform");
-static_assert(sizeof(glm::mediump_u64vec4) == 32, "int64 size isn't 8 bytes on this platform");
-static_assert(sizeof(glm::highp_u64vec4) == 32, "int64 size isn't 8 bytes on this platform");
-
-
-static_assert(sizeof(glm::lowp_u8vec1) == 1, "uint8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::mediump_u8vec1) == 1, "uint8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::highp_u8vec1) == 1, "uint8 size isn't 1 byte on this platform");
-
-static_assert(sizeof(glm::lowp_u16vec1) == 2, "uint16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::mediump_u16vec1) == 2, "uint16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::highp_u16vec1) == 2, "uint16 size isn't 2 bytes on this platform");
-
-static_assert(sizeof(glm::lowp_u32vec1) == 4, "uint32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::mediump_u32vec1) == 4, "uint32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::highp_u32vec1) == 4, "uint32 size isn't 4 bytes on this platform");
-
-static_assert(sizeof(glm::lowp_u64vec1) == 8, "uint64 size isn't 8 bytes on this platform");
-static_assert(sizeof(glm::mediump_u64vec1) == 8, "uint64 size isn't 8 bytes on this platform");
-static_assert(sizeof(glm::highp_u64vec1) == 8, "uint64 size isn't 8 bytes on this platform");
-
-
-static_assert(sizeof(glm::lowp_u8vec2) == 2, "uint8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::mediump_u8vec2) == 2, "uint8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::highp_u8vec2) == 2, "uint8 size isn't 1 byte on this platform");
-
-static_assert(sizeof(glm::lowp_u16vec2) == 4, "uint16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::mediump_u16vec2) == 4, "uint16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::highp_u16vec2) == 4, "uint16 size isn't 2 bytes on this platform");
-
-static_assert(sizeof(glm::lowp_u32vec2) == 8, "uint32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::mediump_u32vec2) == 8, "uint32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::highp_u32vec2) == 8, "uint32 size isn't 4 bytes on this platform");
-
-static_assert(sizeof(glm::lowp_u64vec2) == 16, "uint64 size isn't 8 bytes on this platform");
-static_assert(sizeof(glm::mediump_u64vec2) == 16, "uint64 size isn't 8 bytes on this platform");
-static_assert(sizeof(glm::highp_u64vec2) == 16, "uint64 size isn't 8 bytes on this platform");
-
-
-static_assert(sizeof(glm::lowp_u8vec3) == 3, "uint8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::mediump_u8vec3) == 3, "uint8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::highp_u8vec3) == 3, "uint8 size isn't 1 byte on this platform");
-
-static_assert(sizeof(glm::lowp_u16vec3) == 6, "uint16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::mediump_u16vec3) == 6, "uint16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::highp_u16vec3) == 6, "uint16 size isn't 2 bytes on this platform");
-
-static_assert(sizeof(glm::lowp_u32vec3) == 12, "uint32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::mediump_u32vec3) == 12, "uint32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::highp_u32vec3) == 12, "uint32 size isn't 4 bytes on this platform");
-
-static_assert(sizeof(glm::lowp_u64vec3) == 24, "uint64 size isn't 8 bytes on this platform");
-static_assert(sizeof(glm::mediump_u64vec3) == 24, "uint64 size isn't 8 bytes on this platform");
-static_assert(sizeof(glm::highp_u64vec3) == 24, "uint64 size isn't 8 bytes on this platform");
-
-
-static_assert(sizeof(glm::lowp_u8vec4) == 4, "uint8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::mediump_u8vec4) == 4, "uint8 size isn't 1 byte on this platform");
-static_assert(sizeof(glm::highp_u8vec4) == 4, "uint8 size isn't 1 byte on this platform");
-
-static_assert(sizeof(glm::lowp_u16vec4) == 8, "uint16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::mediump_u16vec4) == 8, "uint16 size isn't 2 bytes on this platform");
-static_assert(sizeof(glm::highp_u16vec4) == 8, "uint16 size isn't 2 bytes on this platform");
-
-static_assert(sizeof(glm::lowp_u32vec4) == 16, "uint32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::mediump_u32vec4) == 16, "uint32 size isn't 4 bytes on this platform");
-static_assert(sizeof(glm::highp_u32vec4) == 16, "uint32 size isn't 4 bytes on this platform");
-
-static_assert(sizeof(glm::lowp_u64vec4) == 32, "uint64 size isn't 8 bytes on this platform");
-static_assert(sizeof(glm::mediump_u64vec4) == 32, "uint64 size isn't 8 bytes on this platform");
-static_assert(sizeof(glm::highp_u64vec4) == 32, "uint64 size isn't 8 bytes on this platform");
-
-#endif
-
-static int test_scalar_size()
-{
- int Error = 0;
-
- Error += sizeof(glm::int8) != 1;
- Error += sizeof(glm::int16) != 2;
- Error += sizeof(glm::int32) != 4;
- Error += sizeof(glm::int64) != 8;
- Error += sizeof(glm::uint8) != 1;
- Error += sizeof(glm::uint16) != 2;
- Error += sizeof(glm::uint32) != 4;
- Error += sizeof(glm::uint64) != 8;
- Error += sizeof(glm::float32) != 4;
- Error += sizeof(glm::float64) != 8;
-
- Error += sizeof(glm::lowp_int8) != 1;
- Error += sizeof(glm::lowp_int16) != 2;
- Error += sizeof(glm::lowp_int32) != 4;
- Error += sizeof(glm::lowp_int64) != 8;
- Error += sizeof(glm::lowp_uint8) != 1;
- Error += sizeof(glm::lowp_uint16) != 2;
- Error += sizeof(glm::lowp_uint32) != 4;
- Error += sizeof(glm::lowp_uint64) != 8;
- Error += sizeof(glm::lowp_float32) != 4;
- Error += sizeof(glm::lowp_float64) != 8;
-
- Error += sizeof(glm::mediump_int8) != 1;
- Error += sizeof(glm::mediump_int16) != 2;
- Error += sizeof(glm::mediump_int32) != 4;
- Error += sizeof(glm::mediump_int64) != 8;
- Error += sizeof(glm::mediump_uint8) != 1;
- Error += sizeof(glm::mediump_uint16) != 2;
- Error += sizeof(glm::mediump_uint32) != 4;
- Error += sizeof(glm::mediump_uint64) != 8;
- Error += sizeof(glm::mediump_float32) != 4;
- Error += sizeof(glm::mediump_float64) != 8;
-
- Error += sizeof(glm::highp_int8) != 1;
- Error += sizeof(glm::highp_int16) != 2;
- Error += sizeof(glm::highp_int32) != 4;
- Error += sizeof(glm::highp_int64) != 8;
- Error += sizeof(glm::highp_uint8) != 1;
- Error += sizeof(glm::highp_uint16) != 2;
- Error += sizeof(glm::highp_uint32) != 4;
- Error += sizeof(glm::highp_uint64) != 8;
- Error += sizeof(glm::highp_float32) != 4;
- Error += sizeof(glm::highp_float64) != 8;
-
- return Error;
-}
-
-static int test_fvec_size()
-{
- int Error = 0;
-
- Error += sizeof(glm::f32vec2) != 8;
- Error += sizeof(glm::f32vec3) != 12;
- Error += sizeof(glm::f32vec4) != 16;
- Error += sizeof(glm::f64vec2) != 16;
- Error += sizeof(glm::f64vec3) != 24;
- Error += sizeof(glm::f64vec4) != 32;
-
- Error += sizeof(glm::lowp_f32vec2) != 8;
- Error += sizeof(glm::lowp_f32vec3) != 12;
- Error += sizeof(glm::lowp_f32vec4) != 16;
- Error += sizeof(glm::lowp_f64vec2) != 16;
- Error += sizeof(glm::lowp_f64vec3) != 24;
- Error += sizeof(glm::lowp_f64vec4) != 32;
-
- Error += sizeof(glm::mediump_f32vec2) != 8;
- Error += sizeof(glm::mediump_f32vec3) != 12;
- Error += sizeof(glm::mediump_f32vec4) != 16;
- Error += sizeof(glm::mediump_f64vec2) != 16;
- Error += sizeof(glm::mediump_f64vec3) != 24;
- Error += sizeof(glm::mediump_f64vec4) != 32;
-
- Error += sizeof(glm::highp_f32vec2) != 8;
- Error += sizeof(glm::highp_f32vec3) != 12;
- Error += sizeof(glm::highp_f32vec4) != 16;
- Error += sizeof(glm::highp_f64vec2) != 16;
- Error += sizeof(glm::highp_f64vec3) != 24;
- Error += sizeof(glm::highp_f64vec4) != 32;
-
- return Error;
-}
-
-static int test_fvec_precision()
-{
- int Error = 0;
-
- {
- glm::f32vec2 v1(1.f);
- glm::lowp_f32vec2 v2(v1);
- glm::mediump_f32vec2 v3(v1);
- glm::highp_f32vec2 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::f32vec2(v2), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::f32vec2(v3), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::f32vec2(v4), glm::epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::f32vec3 v1(1.f);
- glm::lowp_f32vec3 v2(v1);
- glm::mediump_f32vec3 v3(v1);
- glm::highp_f32vec3 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::f32vec3(v2), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::f32vec3(v3), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::f32vec3(v4), glm::epsilon<float>())) ? 0 : 1;
- }
-
- {
- glm::f32vec4 v1(1.f);
- glm::lowp_f32vec4 v2(v1);
- glm::mediump_f32vec4 v3(v1);
- glm::highp_f32vec4 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::f32vec4(v2), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::f32vec4(v3), glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::f32vec4(v4), glm::epsilon<float>())) ? 0 : 1;
- }
-
- return Error;
-}
-
-static int test_dvec_precision()
-{
- int Error = 0;
-
- {
- glm::f64vec2 v1(1.0);
- glm::lowp_f64vec2 v2(v1);
- glm::mediump_f64vec2 v3(v1);
- glm::highp_f64vec2 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::f64vec2(v2), glm::epsilon<double>())) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::f64vec2(v3), glm::epsilon<double>())) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::f64vec2(v4), glm::epsilon<double>())) ? 0 : 1;
- }
-
- {
- glm::f64vec3 v1(1.0);
- glm::lowp_f64vec3 v2(v1);
- glm::mediump_f64vec3 v3(v1);
- glm::highp_f64vec3 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::f64vec3(v2), glm::epsilon<double>())) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::f64vec3(v3), glm::epsilon<double>())) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::f64vec3(v4), glm::epsilon<double>())) ? 0 : 1;
- }
-
- {
- glm::f64vec4 v1(1.0);
- glm::lowp_f64vec4 v2(v1);
- glm::mediump_f64vec4 v3(v1);
- glm::highp_f64vec4 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::f64vec4(v2), glm::epsilon<double>())) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::f64vec4(v3), glm::epsilon<double>())) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::f64vec4(v4), glm::epsilon<double>())) ? 0 : 1;
- }
-
- return Error;
-}
-
-static int test_ivec_size()
-{
- int Error = 0;
-
- Error += sizeof(glm::i8vec2) != 2;
- Error += sizeof(glm::i8vec3) != 3;
- Error += sizeof(glm::i8vec4) != 4;
- Error += sizeof(glm::i16vec2) != 4;
- Error += sizeof(glm::i16vec3) != 6;
- Error += sizeof(glm::i16vec4) != 8;
- Error += sizeof(glm::i32vec2) != 8;
- Error += sizeof(glm::i32vec3) != 12;
- Error += sizeof(glm::i32vec4) != 16;
- Error += sizeof(glm::i64vec2) != 16;
- Error += sizeof(glm::i64vec3) != 24;
- Error += sizeof(glm::i64vec4) != 32;
-
- Error += sizeof(glm::lowp_i8vec2) != 2;
- Error += sizeof(glm::lowp_i8vec3) != 3;
- Error += sizeof(glm::lowp_i8vec4) != 4;
- Error += sizeof(glm::lowp_i16vec2) != 4;
- Error += sizeof(glm::lowp_i16vec3) != 6;
- Error += sizeof(glm::lowp_i16vec4) != 8;
- Error += sizeof(glm::lowp_i32vec2) != 8;
- Error += sizeof(glm::lowp_i32vec3) != 12;
- Error += sizeof(glm::lowp_i32vec4) != 16;
- Error += sizeof(glm::lowp_i64vec2) != 16;
- Error += sizeof(glm::lowp_i64vec3) != 24;
- Error += sizeof(glm::lowp_i64vec4) != 32;
-
- Error += sizeof(glm::mediump_i8vec2) != 2;
- Error += sizeof(glm::mediump_i8vec3) != 3;
- Error += sizeof(glm::mediump_i8vec4) != 4;
- Error += sizeof(glm::mediump_i16vec2) != 4;
- Error += sizeof(glm::mediump_i16vec3) != 6;
- Error += sizeof(glm::mediump_i16vec4) != 8;
- Error += sizeof(glm::mediump_i32vec2) != 8;
- Error += sizeof(glm::mediump_i32vec3) != 12;
- Error += sizeof(glm::mediump_i32vec4) != 16;
- Error += sizeof(glm::mediump_i64vec2) != 16;
- Error += sizeof(glm::mediump_i64vec3) != 24;
- Error += sizeof(glm::mediump_i64vec4) != 32;
-
- Error += sizeof(glm::highp_i8vec2) != 2;
- Error += sizeof(glm::highp_i8vec3) != 3;
- Error += sizeof(glm::highp_i8vec4) != 4;
- Error += sizeof(glm::highp_i16vec2) != 4;
- Error += sizeof(glm::highp_i16vec3) != 6;
- Error += sizeof(glm::highp_i16vec4) != 8;
- Error += sizeof(glm::highp_i32vec2) != 8;
- Error += sizeof(glm::highp_i32vec3) != 12;
- Error += sizeof(glm::highp_i32vec4) != 16;
- Error += sizeof(glm::highp_i64vec2) != 16;
- Error += sizeof(glm::highp_i64vec3) != 24;
- Error += sizeof(glm::highp_i64vec4) != 32;
-
- return Error;
-}
-
-static int test_ivec_precision()
-{
- int Error = 0;
-
- {
- glm::i8vec2 v1(0);
- glm::lowp_i8vec2 v2(v1);
- glm::mediump_i8vec2 v3(v1);
- glm::highp_i8vec2 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::i8vec2(v2))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::i8vec2(v3))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::i8vec2(v4))) ? 0 : 1;
- }
-
- {
- glm::i8vec3 v1(0);
- glm::lowp_i8vec3 v2(v1);
- glm::mediump_i8vec3 v3(v1);
- glm::highp_i8vec3 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::i8vec3(v2))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::i8vec3(v3))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::i8vec3(v4))) ? 0 : 1;
- }
-
- {
- glm::i8vec4 v1(0);
- glm::lowp_i8vec4 v2(v1);
- glm::mediump_i8vec4 v3(v1);
- glm::highp_i8vec4 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::i8vec4(v2))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::i8vec4(v3))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::i8vec4(v4))) ? 0 : 1;
- }
-
- {
- glm::i16vec2 v1(0);
- glm::lowp_i16vec2 v2(v1);
- glm::mediump_i16vec2 v3(v1);
- glm::highp_i16vec2 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::i16vec2(v2))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::i16vec2(v3))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::i16vec2(v4))) ? 0 : 1;
- }
-
- {
- glm::i16vec3 v1(0);
- glm::lowp_i16vec3 v2(v1);
- glm::mediump_i16vec3 v3(v1);
- glm::highp_i16vec3 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::i16vec3(v2))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::i16vec3(v3))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::i16vec3(v4))) ? 0 : 1;
- }
-
- {
- glm::i16vec4 v1(0);
- glm::lowp_i16vec4 v2(v1);
- glm::mediump_i16vec4 v3(v1);
- glm::highp_i16vec4 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::i16vec4(v2))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::i16vec4(v3))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::i16vec4(v4))) ? 0 : 1;
- }
-
- {
- glm::i32vec2 v1(0);
- glm::lowp_i32vec2 v2(v1);
- glm::mediump_i32vec2 v3(v1);
- glm::highp_i32vec2 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::i32vec2(v2))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::i32vec2(v3))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::i32vec2(v4))) ? 0 : 1;
- }
-
- {
- glm::i32vec3 v1(0);
- glm::lowp_i32vec3 v2(v1);
- glm::mediump_i32vec3 v3(v1);
- glm::highp_i32vec3 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::i32vec3(v2))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::i32vec3(v3))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::i32vec3(v4))) ? 0 : 1;
- }
-
- {
- glm::i32vec4 v1(0);
- glm::lowp_i32vec4 v2(v1);
- glm::mediump_i32vec4 v3(v1);
- glm::highp_i32vec4 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::i32vec4(v2))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::i32vec4(v3))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::i32vec4(v4))) ? 0 : 1;
- }
-
- {
- glm::i64vec2 v1(0);
- glm::lowp_i64vec2 v2(v1);
- glm::mediump_i64vec2 v3(v1);
- glm::highp_i64vec2 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::i64vec2(v2))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::i64vec2(v3))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::i64vec2(v4))) ? 0 : 1;
- }
-
- {
- glm::i64vec3 v1(0);
- glm::lowp_i64vec3 v2(v1);
- glm::mediump_i64vec3 v3(v1);
- glm::highp_i64vec3 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::i64vec3(v2))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::i64vec3(v3))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::i64vec3(v4))) ? 0 : 1;
- }
-
- {
- glm::i64vec4 v1(0);
- glm::lowp_i64vec4 v2(v1);
- glm::mediump_i64vec4 v3(v1);
- glm::highp_i64vec4 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::i64vec4(v2))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::i64vec4(v3))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::i64vec4(v4))) ? 0 : 1;
- }
-
- return Error;
-}
-
-static int test_uvec_size()
-{
- int Error = 0;
-
- Error += sizeof(glm::u8vec2) != 2;
- Error += sizeof(glm::u8vec3) != 3;
- Error += sizeof(glm::u8vec4) != 4;
- Error += sizeof(glm::u16vec2) != 4;
- Error += sizeof(glm::u16vec3) != 6;
- Error += sizeof(glm::u16vec4) != 8;
- Error += sizeof(glm::u32vec2) != 8;
- Error += sizeof(glm::u32vec3) != 12;
- Error += sizeof(glm::u32vec4) != 16;
- Error += sizeof(glm::u64vec2) != 16;
- Error += sizeof(glm::u64vec3) != 24;
- Error += sizeof(glm::u64vec4) != 32;
-
- Error += sizeof(glm::lowp_u8vec2) != 2;
- Error += sizeof(glm::lowp_u8vec3) != 3;
- Error += sizeof(glm::lowp_u8vec4) != 4;
- Error += sizeof(glm::lowp_u16vec2) != 4;
- Error += sizeof(glm::lowp_u16vec3) != 6;
- Error += sizeof(glm::lowp_u16vec4) != 8;
- Error += sizeof(glm::lowp_u32vec2) != 8;
- Error += sizeof(glm::lowp_u32vec3) != 12;
- Error += sizeof(glm::lowp_u32vec4) != 16;
- Error += sizeof(glm::lowp_u64vec2) != 16;
- Error += sizeof(glm::lowp_u64vec3) != 24;
- Error += sizeof(glm::lowp_u64vec4) != 32;
-
- Error += sizeof(glm::mediump_u8vec2) != 2;
- Error += sizeof(glm::mediump_u8vec3) != 3;
- Error += sizeof(glm::mediump_u8vec4) != 4;
- Error += sizeof(glm::mediump_u16vec2) != 4;
- Error += sizeof(glm::mediump_u16vec3) != 6;
- Error += sizeof(glm::mediump_u16vec4) != 8;
- Error += sizeof(glm::mediump_u32vec2) != 8;
- Error += sizeof(glm::mediump_u32vec3) != 12;
- Error += sizeof(glm::mediump_u32vec4) != 16;
- Error += sizeof(glm::mediump_u64vec2) != 16;
- Error += sizeof(glm::mediump_u64vec3) != 24;
- Error += sizeof(glm::mediump_u64vec4) != 32;
-
- Error += sizeof(glm::highp_u8vec2) != 2;
- Error += sizeof(glm::highp_u8vec3) != 3;
- Error += sizeof(glm::highp_u8vec4) != 4;
- Error += sizeof(glm::highp_u16vec2) != 4;
- Error += sizeof(glm::highp_u16vec3) != 6;
- Error += sizeof(glm::highp_u16vec4) != 8;
- Error += sizeof(glm::highp_u32vec2) != 8;
- Error += sizeof(glm::highp_u32vec3) != 12;
- Error += sizeof(glm::highp_u32vec4) != 16;
- Error += sizeof(glm::highp_u64vec2) != 16;
- Error += sizeof(glm::highp_u64vec3) != 24;
- Error += sizeof(glm::highp_u64vec4) != 32;
-
- return Error;
-}
-
-static int test_uvec_precision()
-{
- int Error = 0;
-
- {
- glm::u8vec2 v1(0);
- glm::lowp_u8vec2 v2(v1);
- glm::mediump_u8vec2 v3(v1);
- glm::highp_u8vec2 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::u8vec2(v2))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::u8vec2(v3))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::u8vec2(v4))) ? 0 : 1;
- }
-
- {
- glm::u8vec3 v1(0);
- glm::lowp_u8vec3 v2(v1);
- glm::mediump_u8vec3 v3(v1);
- glm::highp_u8vec3 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::u8vec3(v2))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::u8vec3(v3))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::u8vec3(v4))) ? 0 : 1;
- }
-
- {
- glm::u8vec4 v1(0);
- glm::lowp_u8vec4 v2(v1);
- glm::mediump_u8vec4 v3(v1);
- glm::highp_u8vec4 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::u8vec4(v2))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::u8vec4(v3))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::u8vec4(v4))) ? 0 : 1;
- }
-
- {
- glm::u16vec2 v1(0);
- glm::lowp_u16vec2 v2(v1);
- glm::mediump_u16vec2 v3(v1);
- glm::highp_u16vec2 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::u16vec2(v2))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::u16vec2(v3))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::u16vec2(v4))) ? 0 : 1;
- }
-
- {
- glm::u16vec3 v1(0);
- glm::lowp_u16vec3 v2(v1);
- glm::mediump_u16vec3 v3(v1);
- glm::highp_u16vec3 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::u16vec3(v2))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::u16vec3(v3))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::u16vec3(v4))) ? 0 : 1;
- }
-
- {
- glm::u16vec4 v1(0);
- glm::lowp_u16vec4 v2(v1);
- glm::mediump_u16vec4 v3(v1);
- glm::highp_u16vec4 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::u16vec4(v2))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::u16vec4(v3))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::u16vec4(v4))) ? 0 : 1;
- }
-
- {
- glm::u32vec2 v1(0);
- glm::lowp_u32vec2 v2(v1);
- glm::mediump_u32vec2 v3(v1);
- glm::highp_u32vec2 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::u32vec2(v2))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::u32vec2(v3))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::u32vec2(v4))) ? 0 : 1;
- }
-
- {
- glm::u32vec3 v1(0);
- glm::lowp_u32vec3 v2(v1);
- glm::mediump_u32vec3 v3(v1);
- glm::highp_u32vec3 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::u32vec3(v2))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::u32vec3(v3))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::u32vec3(v4))) ? 0 : 1;
- }
-
- {
- glm::u32vec4 v1(0);
- glm::lowp_u32vec4 v2(v1);
- glm::mediump_u32vec4 v3(v1);
- glm::highp_u32vec4 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::u32vec4(v2))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::u32vec4(v3))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::u32vec4(v4))) ? 0 : 1;
- }
-
- {
- glm::u64vec2 v1(0);
- glm::lowp_u64vec2 v2(v1);
- glm::mediump_u64vec2 v3(v1);
- glm::highp_u64vec2 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::u64vec2(v2))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::u64vec2(v3))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::u64vec2(v4))) ? 0 : 1;
- }
-
- {
- glm::u64vec3 v1(0);
- glm::lowp_u64vec3 v2(v1);
- glm::mediump_u64vec3 v3(v1);
- glm::highp_u64vec3 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::u64vec3(v2))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::u64vec3(v3))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::u64vec3(v4))) ? 0 : 1;
- }
-
- {
- glm::u64vec4 v1(0);
- glm::lowp_u64vec4 v2(v1);
- glm::mediump_u64vec4 v3(v1);
- glm::highp_u64vec4 v4(v1);
-
- Error += glm::all(glm::equal(v1, glm::u64vec4(v2))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::u64vec4(v3))) ? 0 : 1;
- Error += glm::all(glm::equal(v1, glm::u64vec4(v4))) ? 0 : 1;
- }
-
- return Error;
-}
-
-static int test_fmat_size()
-{
- int Error = 0;
-
- Error += sizeof(glm::mat2) != 16;
- Error += sizeof(glm::mat3) != 36;
- Error += sizeof(glm::mat4) != 64;
- Error += sizeof(glm::mat2x2) != 16;
- Error += sizeof(glm::mat2x3) != 24;
- Error += sizeof(glm::mat2x4) != 32;
- Error += sizeof(glm::mat3x2) != 24;
- Error += sizeof(glm::mat3x3) != 36;
- Error += sizeof(glm::mat3x4) != 48;
- Error += sizeof(glm::mat4x2) != 32;
- Error += sizeof(glm::mat4x3) != 48;
- Error += sizeof(glm::mat4x4) != 64;
-
- Error += sizeof(glm::fmat2) != 16;
- Error += sizeof(glm::fmat3) != 36;
- Error += sizeof(glm::fmat4) != 64;
- Error += sizeof(glm::fmat2x2) != 16;
- Error += sizeof(glm::fmat2x3) != 24;
- Error += sizeof(glm::fmat2x4) != 32;
- Error += sizeof(glm::fmat3x2) != 24;
- Error += sizeof(glm::fmat3x3) != 36;
- Error += sizeof(glm::fmat3x4) != 48;
- Error += sizeof(glm::fmat4x2) != 32;
- Error += sizeof(glm::fmat4x3) != 48;
- Error += sizeof(glm::fmat4x4) != 64;
-
- Error += sizeof(glm::f32mat2) != 16;
- Error += sizeof(glm::f32mat3) != 36;
- Error += sizeof(glm::f32mat4) != 64;
- Error += sizeof(glm::f32mat2x2) != 16;
- Error += sizeof(glm::f32mat2x3) != 24;
- Error += sizeof(glm::f32mat2x4) != 32;
- Error += sizeof(glm::f32mat3x2) != 24;
- Error += sizeof(glm::f32mat3x3) != 36;
- Error += sizeof(glm::f32mat3x4) != 48;
- Error += sizeof(glm::f32mat4x2) != 32;
- Error += sizeof(glm::f32mat4x3) != 48;
- Error += sizeof(glm::f32mat4x4) != 64;
-
-
- Error += sizeof(glm::lowp_mat2) != 16;
- Error += sizeof(glm::lowp_mat3) != 36;
- Error += sizeof(glm::lowp_mat4) != 64;
- Error += sizeof(glm::lowp_mat2x2) != 16;
- Error += sizeof(glm::lowp_mat2x3) != 24;
- Error += sizeof(glm::lowp_mat2x4) != 32;
- Error += sizeof(glm::lowp_mat3x2) != 24;
- Error += sizeof(glm::lowp_mat3x3) != 36;
- Error += sizeof(glm::lowp_mat3x4) != 48;
- Error += sizeof(glm::lowp_mat4x2) != 32;
- Error += sizeof(glm::lowp_mat4x3) != 48;
- Error += sizeof(glm::lowp_mat4x4) != 64;
-
- Error += sizeof(glm::lowp_fmat2) != 16;
- Error += sizeof(glm::lowp_fmat3) != 36;
- Error += sizeof(glm::lowp_fmat4) != 64;
- Error += sizeof(glm::lowp_fmat2x2) != 16;
- Error += sizeof(glm::lowp_fmat2x3) != 24;
- Error += sizeof(glm::lowp_fmat2x4) != 32;
- Error += sizeof(glm::lowp_fmat3x2) != 24;
- Error += sizeof(glm::lowp_fmat3x3) != 36;
- Error += sizeof(glm::lowp_fmat3x4) != 48;
- Error += sizeof(glm::lowp_fmat4x2) != 32;
- Error += sizeof(glm::lowp_fmat4x3) != 48;
- Error += sizeof(glm::lowp_fmat4x4) != 64;
-
- Error += sizeof(glm::lowp_f32mat2) != 16;
- Error += sizeof(glm::lowp_f32mat3) != 36;
- Error += sizeof(glm::lowp_f32mat4) != 64;
- Error += sizeof(glm::lowp_f32mat2x2) != 16;
- Error += sizeof(glm::lowp_f32mat2x3) != 24;
- Error += sizeof(glm::lowp_f32mat2x4) != 32;
- Error += sizeof(glm::lowp_f32mat3x2) != 24;
- Error += sizeof(glm::lowp_f32mat3x3) != 36;
- Error += sizeof(glm::lowp_f32mat3x4) != 48;
- Error += sizeof(glm::lowp_f32mat4x2) != 32;
- Error += sizeof(glm::lowp_f32mat4x3) != 48;
- Error += sizeof(glm::lowp_f32mat4x4) != 64;
-
- Error += sizeof(glm::mediump_mat2) != 16;
- Error += sizeof(glm::mediump_mat3) != 36;
- Error += sizeof(glm::mediump_mat4) != 64;
- Error += sizeof(glm::mediump_mat2x2) != 16;
- Error += sizeof(glm::mediump_mat2x3) != 24;
- Error += sizeof(glm::mediump_mat2x4) != 32;
- Error += sizeof(glm::mediump_mat3x2) != 24;
- Error += sizeof(glm::mediump_mat3x3) != 36;
- Error += sizeof(glm::mediump_mat3x4) != 48;
- Error += sizeof(glm::mediump_mat4x2) != 32;
- Error += sizeof(glm::mediump_mat4x3) != 48;
- Error += sizeof(glm::mediump_mat4x4) != 64;
-
- Error += sizeof(glm::mediump_fmat2) != 16;
- Error += sizeof(glm::mediump_fmat3) != 36;
- Error += sizeof(glm::mediump_fmat4) != 64;
- Error += sizeof(glm::mediump_fmat2x2) != 16;
- Error += sizeof(glm::mediump_fmat2x3) != 24;
- Error += sizeof(glm::mediump_fmat2x4) != 32;
- Error += sizeof(glm::mediump_fmat3x2) != 24;
- Error += sizeof(glm::mediump_fmat3x3) != 36;
- Error += sizeof(glm::mediump_fmat3x4) != 48;
- Error += sizeof(glm::mediump_fmat4x2) != 32;
- Error += sizeof(glm::mediump_fmat4x3) != 48;
- Error += sizeof(glm::mediump_fmat4x4) != 64;
-
- Error += sizeof(glm::mediump_f32mat2) != 16;
- Error += sizeof(glm::mediump_f32mat3) != 36;
- Error += sizeof(glm::mediump_f32mat4) != 64;
- Error += sizeof(glm::mediump_f32mat2x2) != 16;
- Error += sizeof(glm::mediump_f32mat2x3) != 24;
- Error += sizeof(glm::mediump_f32mat2x4) != 32;
- Error += sizeof(glm::mediump_f32mat3x2) != 24;
- Error += sizeof(glm::mediump_f32mat3x3) != 36;
- Error += sizeof(glm::mediump_f32mat3x4) != 48;
- Error += sizeof(glm::mediump_f32mat4x2) != 32;
- Error += sizeof(glm::mediump_f32mat4x3) != 48;
- Error += sizeof(glm::mediump_f32mat4x4) != 64;
-
- Error += sizeof(glm::highp_mat2) != 16;
- Error += sizeof(glm::highp_mat3) != 36;
- Error += sizeof(glm::highp_mat4) != 64;
- Error += sizeof(glm::highp_mat2x2) != 16;
- Error += sizeof(glm::highp_mat2x3) != 24;
- Error += sizeof(glm::highp_mat2x4) != 32;
- Error += sizeof(glm::highp_mat3x2) != 24;
- Error += sizeof(glm::highp_mat3x3) != 36;
- Error += sizeof(glm::highp_mat3x4) != 48;
- Error += sizeof(glm::highp_mat4x2) != 32;
- Error += sizeof(glm::highp_mat4x3) != 48;
- Error += sizeof(glm::highp_mat4x4) != 64;
-
- Error += sizeof(glm::highp_fmat2) != 16;
- Error += sizeof(glm::highp_fmat3) != 36;
- Error += sizeof(glm::highp_fmat4) != 64;
- Error += sizeof(glm::highp_fmat2x2) != 16;
- Error += sizeof(glm::highp_fmat2x3) != 24;
- Error += sizeof(glm::highp_fmat2x4) != 32;
- Error += sizeof(glm::highp_fmat3x2) != 24;
- Error += sizeof(glm::highp_fmat3x3) != 36;
- Error += sizeof(glm::highp_fmat3x4) != 48;
- Error += sizeof(glm::highp_fmat4x2) != 32;
- Error += sizeof(glm::highp_fmat4x3) != 48;
- Error += sizeof(glm::highp_fmat4x4) != 64;
-
- Error += sizeof(glm::highp_f32mat2) != 16;
- Error += sizeof(glm::highp_f32mat3) != 36;
- Error += sizeof(glm::highp_f32mat4) != 64;
- Error += sizeof(glm::highp_f32mat2x2) != 16;
- Error += sizeof(glm::highp_f32mat2x3) != 24;
- Error += sizeof(glm::highp_f32mat2x4) != 32;
- Error += sizeof(glm::highp_f32mat3x2) != 24;
- Error += sizeof(glm::highp_f32mat3x3) != 36;
- Error += sizeof(glm::highp_f32mat3x4) != 48;
- Error += sizeof(glm::highp_f32mat4x2) != 32;
- Error += sizeof(glm::highp_f32mat4x3) != 48;
- Error += sizeof(glm::highp_f32mat4x4) != 64;
-
- return Error;
-}
-
-static int test_dmat_size()
-{
- int Error = 0;
-
- Error += sizeof(glm::f64mat2) != 32;
- Error += sizeof(glm::f64mat3) != 72;
- Error += sizeof(glm::f64mat4) != 128;
- Error += sizeof(glm::f64mat2x2) != 32;
- Error += sizeof(glm::f64mat2x3) != 48;
- Error += sizeof(glm::f64mat2x4) != 64;
- Error += sizeof(glm::f64mat3x2) != 48;
- Error += sizeof(glm::f64mat3x3) != 72;
- Error += sizeof(glm::f64mat3x4) != 96;
- Error += sizeof(glm::f64mat4x2) != 64;
- Error += sizeof(glm::f64mat4x3) != 96;
- Error += sizeof(glm::f64mat4x4) != 128;
-
- Error += sizeof(glm::lowp_f64mat2) != 32;
- Error += sizeof(glm::lowp_f64mat3) != 72;
- Error += sizeof(glm::lowp_f64mat4) != 128;
- Error += sizeof(glm::lowp_f64mat2x2) != 32;
- Error += sizeof(glm::lowp_f64mat2x3) != 48;
- Error += sizeof(glm::lowp_f64mat2x4) != 64;
- Error += sizeof(glm::lowp_f64mat3x2) != 48;
- Error += sizeof(glm::lowp_f64mat3x3) != 72;
- Error += sizeof(glm::lowp_f64mat3x4) != 96;
- Error += sizeof(glm::lowp_f64mat4x2) != 64;
- Error += sizeof(glm::lowp_f64mat4x3) != 96;
- Error += sizeof(glm::lowp_f64mat4x4) != 128;
-
- Error += sizeof(glm::mediump_f64mat2) != 32;
- Error += sizeof(glm::mediump_f64mat3) != 72;
- Error += sizeof(glm::mediump_f64mat4) != 128;
- Error += sizeof(glm::mediump_f64mat2x2) != 32;
- Error += sizeof(glm::mediump_f64mat2x3) != 48;
- Error += sizeof(glm::mediump_f64mat2x4) != 64;
- Error += sizeof(glm::mediump_f64mat3x2) != 48;
- Error += sizeof(glm::mediump_f64mat3x3) != 72;
- Error += sizeof(glm::mediump_f64mat3x4) != 96;
- Error += sizeof(glm::mediump_f64mat4x2) != 64;
- Error += sizeof(glm::mediump_f64mat4x3) != 96;
- Error += sizeof(glm::mediump_f64mat4x4) != 128;
-
- Error += sizeof(glm::highp_f64mat2) != 32;
- Error += sizeof(glm::highp_f64mat3) != 72;
- Error += sizeof(glm::highp_f64mat4) != 128;
- Error += sizeof(glm::highp_f64mat2x2) != 32;
- Error += sizeof(glm::highp_f64mat2x3) != 48;
- Error += sizeof(glm::highp_f64mat2x4) != 64;
- Error += sizeof(glm::highp_f64mat3x2) != 48;
- Error += sizeof(glm::highp_f64mat3x3) != 72;
- Error += sizeof(glm::highp_f64mat3x4) != 96;
- Error += sizeof(glm::highp_f64mat4x2) != 64;
- Error += sizeof(glm::highp_f64mat4x3) != 96;
- Error += sizeof(glm::highp_f64mat4x4) != 128;
-
- return Error;
-}
-
-static int test_quat_size()
-{
- int Error = 0;
-
- Error += sizeof(glm::f32quat) != 16;
- Error += sizeof(glm::f64quat) != 32;
-
- Error += sizeof(glm::lowp_f32quat) != 16;
- Error += sizeof(glm::lowp_f64quat) != 32;
-
- Error += sizeof(glm::mediump_f32quat) != 16;
- Error += sizeof(glm::mediump_f64quat) != 32;
-
- Error += sizeof(glm::highp_f32quat) != 16;
- Error += sizeof(glm::highp_f64quat) != 32;
-
- return Error;
-}
-
-static int test_quat_precision()
-{
- int Error = 0;
-
- {
- glm::f32quat q1(0.f, glm::vec3(0.f, 0.f, 1.f));
- glm::lowp_f32quat qA(q1);
- glm::mediump_f32quat qB(q1);
- glm::highp_f32quat qC(q1);
- glm::f32quat q2(qA);
- glm::f32quat q3(qB);
- glm::f32quat q4(qC);
-
- Error += glm::all(glm::equal(q1, q2, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(q1, q3, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(q1, q4, glm::epsilon<float>())) ? 0 : 1;
- }
-
- return Error;
-}
-
-static int test_fvec_conversion()
-{
- int Error(0);
-
- {
- glm::highp_vec4 a = glm::vec4(1, 2, 3, 4);
- glm::mediump_vec4 b = glm::vec4(1, 2, 3, 4);
- glm::lowp_vec4 c = b;
- glm::mediump_vec4 d = c;
- glm::lowp_ivec4 e = glm::ivec4(d);
- glm::lowp_ivec3 f = glm::ivec3(e);
-
- Error += glm::all(glm::equal(b, d, glm::epsilon<float>())) ? 0 : 1;
- }
-
- return Error;
-}
-
-#if GLM_HAS_OPENMP
-static int test_openmp()
-{
- std::vector<glm::u8vec3> VectorA(1000);
- std::vector<glm::u8vec3> VectorB(1000);
- std::vector<glm::u8vec3> VectorC(1000);
-
- for (std::size_t i = 0; i < VectorA.size(); ++i)
- {
- VectorA[i] = glm::u8vec3(1, 1, 1);
- VectorB[i] = glm::u8vec3(1, 1, 1);
- }
-
- #pragma omp parallel for default(none) shared(VectorA, VectorB, VectorC)
- for (int i = 0; i < static_cast<int>(VectorC.size()); ++i)
- {
- VectorC[i] = VectorA[i] + VectorB[i];
- }
-
- return 0;
-}
-#endif//GLM_HAS_OPENMP
-
-int main()
-{
- int Error = 0;
-
- Error += test_scalar_size();
- Error += test_fvec_size();
-
- Error += test_fvec_precision();
- Error += test_fvec_conversion();
-
- Error += test_dvec_precision();
-
- Error += test_uvec_size();
- Error += test_uvec_precision();
- Error += test_ivec_size();
- Error += test_ivec_precision();
-
- Error += test_fmat_size();
- Error += test_dmat_size();
- Error += test_quat_size();
- Error += test_quat_precision();
-
-# if GLM_HAS_OPENMP
- Error += test_openmp();
-# endif//
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtc/gtc_type_ptr.cpp b/3rdparty/glm/source/test/gtc/gtc_type_ptr.cpp
deleted file mode 100644
index 6fcd305..0000000
--- a/3rdparty/glm/source/test/gtc/gtc_type_ptr.cpp
+++ /dev/null
@@ -1,335 +0,0 @@
-#include <glm/gtc/type_ptr.hpp>
-#include <glm/gtc/vec1.hpp>
-#include <glm/gtc/constants.hpp>
-#include <glm/ext/vector_relational.hpp>
-
-int test_value_ptr_vec()
-{
- int Error = 0;
-
- {
- glm::vec2 v(1.0);
- float * p = glm::value_ptr(v);
- Error += p == &v[0] ? 0 : 1;
- }
- {
- glm::vec3 v(1.0);
- float * p = glm::value_ptr(v);
- Error += p == &v[0] ? 0 : 1;
- }
- {
- glm::vec4 v(1.0);
- float * p = glm::value_ptr(v);
- Error += p == &v[0] ? 0 : 1;
- }
-
- {
- glm::dvec2 v(1.0);
- double * p = glm::value_ptr(v);
- Error += p == &v[0] ? 0 : 1;
- }
- {
- glm::dvec3 v(1.0);
- double * p = glm::value_ptr(v);
- Error += p == &v[0] ? 0 : 1;
- }
- {
- glm::dvec4 v(1.0);
- double * p = glm::value_ptr(v);
- Error += p == &v[0] ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_value_ptr_vec_const()
-{
- int Error = 0;
-
- {
- glm::vec2 const v(1.0);
- float const * p = glm::value_ptr(v);
- Error += p == &v[0] ? 0 : 1;
- }
- {
- glm::vec3 const v(1.0);
- float const * p = glm::value_ptr(v);
- Error += p == &v[0] ? 0 : 1;
- }
- {
- glm::vec4 const v(1.0);
- float const * p = glm::value_ptr(v);
- Error += p == &v[0] ? 0 : 1;
- }
-
- {
- glm::dvec2 const v(1.0);
- double const * p = glm::value_ptr(v);
- Error += p == &v[0] ? 0 : 1;
- }
- {
- glm::dvec3 const v(1.0);
- double const * p = glm::value_ptr(v);
- Error += p == &v[0] ? 0 : 1;
- }
- {
- glm::dvec4 const v(1.0);
- double const * p = glm::value_ptr(v);
- Error += p == &v[0] ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_value_ptr_mat()
-{
- int Error = 0;
-
- {
- glm::mat2x2 m(1.0);
- float * p = glm::value_ptr(m);
- Error += p == &m[0][0] ? 0 : 1;
- }
- {
- glm::mat2x3 m(1.0);
- float * p = glm::value_ptr(m);
- Error += p == &m[0][0] ? 0 : 1;
- }
- {
- glm::mat2x4 m(1.0);
- float * p = glm::value_ptr(m);
- Error += p == &m[0][0] ? 0 : 1;
- }
- {
- glm::mat3x2 m(1.0);
- float * p = glm::value_ptr(m);
- Error += p == &m[0][0] ? 0 : 1;
- }
- {
- glm::mat3x3 m(1.0);
- float * p = glm::value_ptr(m);
- Error += p == &m[0][0] ? 0 : 1;
- }
- {
- glm::mat3x4 m(1.0);
- float * p = glm::value_ptr(m);
- Error += p == &m[0][0] ? 0 : 1;
- }
- {
- glm::mat4x2 m(1.0);
- float * p = glm::value_ptr(m);
- Error += p == &m[0][0] ? 0 : 1;
- }
- {
- glm::mat4x3 m(1.0);
- float * p = glm::value_ptr(m);
- Error += p == &m[0][0] ? 0 : 1;
- }
- {
- glm::mat4x4 m(1.0);
- float * p = glm::value_ptr(m);
- Error += p == &m[0][0] ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_value_ptr_mat_const()
-{
- int Error = 0;
-
- {
- glm::mat2x2 const m(1.0);
- float const * p = glm::value_ptr(m);
- Error += p == &m[0][0] ? 0 : 1;
- }
- {
- glm::mat2x3 const m(1.0);
- float const * p = glm::value_ptr(m);
- Error += p == &m[0][0] ? 0 : 1;
- }
- {
- glm::mat2x4 const m(1.0);
- float const * p = glm::value_ptr(m);
- Error += p == &m[0][0] ? 0 : 1;
- }
- {
- glm::mat3x2 const m(1.0);
- float const * p = glm::value_ptr(m);
- Error += p == &m[0][0] ? 0 : 1;
- }
- {
- glm::mat3x3 const m(1.0);
- float const * p = glm::value_ptr(m);
- Error += p == &m[0][0] ? 0 : 1;
- }
- {
- glm::mat3x4 const m(1.0);
- float const * p = glm::value_ptr(m);
- Error += p == &m[0][0] ? 0 : 1;
- }
- {
- glm::mat4x2 const m(1.0);
- float const * p = glm::value_ptr(m);
- Error += p == &m[0][0] ? 0 : 1;
- }
- {
- glm::mat4x3 const m(1.0);
- float const * p = glm::value_ptr(m);
- Error += p == &m[0][0] ? 0 : 1;
- }
- {
- glm::mat4x4 const m(1.0);
- float const * p = glm::value_ptr(m);
- Error += p == &m[0][0] ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_make_pointer_mat()
-{
- int Error = 0;
-
- float ArrayA[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
- double ArrayB[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
-
- glm::mat2x2 Mat2x2A = glm::make_mat2x2(ArrayA);
- glm::mat2x3 Mat2x3A = glm::make_mat2x3(ArrayA);
- glm::mat2x4 Mat2x4A = glm::make_mat2x4(ArrayA);
- glm::mat3x2 Mat3x2A = glm::make_mat3x2(ArrayA);
- glm::mat3x3 Mat3x3A = glm::make_mat3x3(ArrayA);
- glm::mat3x4 Mat3x4A = glm::make_mat3x4(ArrayA);
- glm::mat4x2 Mat4x2A = glm::make_mat4x2(ArrayA);
- glm::mat4x3 Mat4x3A = glm::make_mat4x3(ArrayA);
- glm::mat4x4 Mat4x4A = glm::make_mat4x4(ArrayA);
-
- glm::dmat2x2 Mat2x2B = glm::make_mat2x2(ArrayB);
- glm::dmat2x3 Mat2x3B = glm::make_mat2x3(ArrayB);
- glm::dmat2x4 Mat2x4B = glm::make_mat2x4(ArrayB);
- glm::dmat3x2 Mat3x2B = glm::make_mat3x2(ArrayB);
- glm::dmat3x3 Mat3x3B = glm::make_mat3x3(ArrayB);
- glm::dmat3x4 Mat3x4B = glm::make_mat3x4(ArrayB);
- glm::dmat4x2 Mat4x2B = glm::make_mat4x2(ArrayB);
- glm::dmat4x3 Mat4x3B = glm::make_mat4x3(ArrayB);
- glm::dmat4x4 Mat4x4B = glm::make_mat4x4(ArrayB);
-
- return Error;
-}
-
-int test_make_pointer_vec()
-{
- int Error = 0;
-
- float ArrayA[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
- int ArrayB[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
- bool ArrayC[] = {true, false, true, false, true, false, true, false, true, false, true, false, true, false, true, false};
-
- glm::vec2 Vec2A = glm::make_vec2(ArrayA);
- glm::vec3 Vec3A = glm::make_vec3(ArrayA);
- glm::vec4 Vec4A = glm::make_vec4(ArrayA);
-
- glm::ivec2 Vec2B = glm::make_vec2(ArrayB);
- glm::ivec3 Vec3B = glm::make_vec3(ArrayB);
- glm::ivec4 Vec4B = glm::make_vec4(ArrayB);
-
- glm::bvec2 Vec2C = glm::make_vec2(ArrayC);
- glm::bvec3 Vec3C = glm::make_vec3(ArrayC);
- glm::bvec4 Vec4C = glm::make_vec4(ArrayC);
-
- return Error;
-}
-
-int test_make_vec1()
-{
- int Error = 0;
-
- glm::ivec1 const v1 = glm::make_vec1(glm::ivec1(2));
- Error += v1 == glm::ivec1(2) ? 0 : 1;
-
- glm::ivec1 const v2 = glm::make_vec1(glm::ivec2(2));
- Error += v2 == glm::ivec1(2) ? 0 : 1;
-
- glm::ivec1 const v3 = glm::make_vec1(glm::ivec3(2));
- Error += v3 == glm::ivec1(2) ? 0 : 1;
-
- glm::ivec1 const v4 = glm::make_vec1(glm::ivec4(2));
- Error += v3 == glm::ivec1(2) ? 0 : 1;
-
- return Error;
-}
-
-int test_make_vec2()
-{
- int Error = 0;
-
- glm::ivec2 const v1 = glm::make_vec2(glm::ivec1(2));
- Error += v1 == glm::ivec2(2, 0) ? 0 : 1;
-
- glm::ivec2 const v2 = glm::make_vec2(glm::ivec2(2));
- Error += v2 == glm::ivec2(2, 2) ? 0 : 1;
-
- glm::ivec2 const v3 = glm::make_vec2(glm::ivec3(2));
- Error += v3 == glm::ivec2(2, 2) ? 0 : 1;
-
- glm::ivec2 const v4 = glm::make_vec2(glm::ivec4(2));
- Error += v3 == glm::ivec2(2, 2) ? 0 : 1;
-
- return Error;
-}
-
-int test_make_vec3()
-{
- int Error = 0;
-
- glm::ivec3 const v1 = glm::make_vec3(glm::ivec1(2));
- Error += v1 == glm::ivec3(2, 0, 0) ? 0 : 1;
-
- glm::ivec3 const v2 = glm::make_vec3(glm::ivec2(2));
- Error += v2 == glm::ivec3(2, 2, 0) ? 0 : 1;
-
- glm::ivec3 const v3 = glm::make_vec3(glm::ivec3(2));
- Error += v3 == glm::ivec3(2, 2, 2) ? 0 : 1;
-
- glm::ivec3 const v4 = glm::make_vec3(glm::ivec4(2));
- Error += v3 == glm::ivec3(2, 2, 2) ? 0 : 1;
-
- return Error;
-}
-
-int test_make_vec4()
-{
- int Error = 0;
-
- glm::ivec4 const v1 = glm::make_vec4(glm::ivec1(2));
- Error += v1 == glm::ivec4(2, 0, 0, 1) ? 0 : 1;
-
- glm::ivec4 const v2 = glm::make_vec4(glm::ivec2(2));
- Error += v2 == glm::ivec4(2, 2, 0, 1) ? 0 : 1;
-
- glm::ivec4 const v3 = glm::make_vec4(glm::ivec3(2));
- Error += v3 == glm::ivec4(2, 2, 2, 1) ? 0 : 1;
-
- glm::ivec4 const v4 = glm::make_vec4(glm::ivec4(2));
- Error += v4 == glm::ivec4(2, 2, 2, 2) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_make_vec1();
- Error += test_make_vec2();
- Error += test_make_vec3();
- Error += test_make_vec4();
- Error += test_make_pointer_vec();
- Error += test_make_pointer_mat();
- Error += test_value_ptr_vec();
- Error += test_value_ptr_vec_const();
- Error += test_value_ptr_mat();
- Error += test_value_ptr_mat_const();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtc/gtc_ulp.cpp b/3rdparty/glm/source/test/gtc/gtc_ulp.cpp
deleted file mode 100644
index d5074a3..0000000
--- a/3rdparty/glm/source/test/gtc/gtc_ulp.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-#include <glm/gtc/ulp.hpp>
-#include <glm/ext/scalar_relational.hpp>
-#include <limits>
-
-int test_ulp_float_dist()
-{
- int Error = 0;
-
- float A = 1.0f;
-
- float B = glm::next_float(A);
- Error += glm::notEqual(A, B, 0) ? 0 : 1;
- float C = glm::prev_float(B);
- Error += glm::equal(A, C, 0) ? 0 : 1;
-
- int D = glm::float_distance(A, B);
- Error += D == 1 ? 0 : 1;
- int E = glm::float_distance(A, C);
- Error += E == 0 ? 0 : 1;
-
- return Error;
-}
-
-int test_ulp_float_step()
-{
- int Error = 0;
-
- float A = 1.0f;
-
- for(int i = 10; i < 1000; i *= 10)
- {
- float B = glm::next_float(A, i);
- Error += glm::notEqual(A, B, 0) ? 0 : 1;
- float C = glm::prev_float(B, i);
- Error += glm::equal(A, C, 0) ? 0 : 1;
-
- int D = glm::float_distance(A, B);
- Error += D == i ? 0 : 1;
- int E = glm::float_distance(A, C);
- Error += E == 0 ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_ulp_double_dist()
-{
- int Error = 0;
-
- double A = 1.0;
-
- double B = glm::next_float(A);
- Error += glm::notEqual(A, B, 0) ? 0 : 1;
- double C = glm::prev_float(B);
- Error += glm::equal(A, C, 0) ? 0 : 1;
-
- glm::int64 const D = glm::float_distance(A, B);
- Error += D == 1 ? 0 : 1;
- glm::int64 const E = glm::float_distance(A, C);
- Error += E == 0 ? 0 : 1;
-
- return Error;
-}
-
-int test_ulp_double_step()
-{
- int Error = 0;
-
- double A = 1.0;
-
- for(int i = 10; i < 1000; i *= 10)
- {
- double B = glm::next_float(A, i);
- Error += glm::notEqual(A, B, 0) ? 0 : 1;
- double C = glm::prev_float(B, i);
- Error += glm::equal(A, C, 0) ? 0 : 1;
-
- glm::int64 const D = glm::float_distance(A, B);
- Error += D == i ? 0 : 1;
- glm::int64 const E = glm::float_distance(A, C);
- Error += E == 0 ? 0 : 1;
- }
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_ulp_float_dist();
- Error += test_ulp_float_step();
- Error += test_ulp_double_dist();
- Error += test_ulp_double_step();
-
- return Error;
-}
-
-
diff --git a/3rdparty/glm/source/test/gtc/gtc_user_defined_types.cpp b/3rdparty/glm/source/test/gtc/gtc_user_defined_types.cpp
deleted file mode 100644
index af39620..0000000
--- a/3rdparty/glm/source/test/gtc/gtc_user_defined_types.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////////////////////////
-// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
-///////////////////////////////////////////////////////////////////////////////////////////////////
-// Created : 2010-09-16
-// Updated : 2011-05-27
-// Licence : This source is under MIT licence
-// File : test/gtc/type_ptr.cpp
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-#define GLM_FORCE_RADIANS
-#include <glm/gtc/user_defined_type.hpp>
-
-int test_make_pointer_vec()
-{
- int Error = 0;
-
- glm::func();
- //func();
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_make_pointer_vec();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtc/gtc_vec1.cpp b/3rdparty/glm/source/test/gtc/gtc_vec1.cpp
deleted file mode 100644
index 268d95e..0000000
--- a/3rdparty/glm/source/test/gtc/gtc_vec1.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <glm/gtc/vec1.hpp>
-
-int main()
-{
- int Error = 0;
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/CMakeLists.txt b/3rdparty/glm/source/test/gtx/CMakeLists.txt
deleted file mode 100644
index ad7bf49..0000000
--- a/3rdparty/glm/source/test/gtx/CMakeLists.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-glmCreateTestGTC(gtx)
-glmCreateTestGTC(gtx_associated_min_max)
-glmCreateTestGTC(gtx_closest_point)
-glmCreateTestGTC(gtx_color_encoding)
-glmCreateTestGTC(gtx_color_space_YCoCg)
-glmCreateTestGTC(gtx_color_space)
-glmCreateTestGTC(gtx_common)
-glmCreateTestGTC(gtx_compatibility)
-glmCreateTestGTC(gtx_component_wise)
-glmCreateTestGTC(gtx_easing)
-glmCreateTestGTC(gtx_euler_angle)
-glmCreateTestGTC(gtx_extend)
-glmCreateTestGTC(gtx_extended_min_max)
-glmCreateTestGTC(gtx_exterior_product)
-glmCreateTestGTC(gtx_fast_exponential)
-glmCreateTestGTC(gtx_fast_square_root)
-glmCreateTestGTC(gtx_fast_trigonometry)
-glmCreateTestGTC(gtx_functions)
-glmCreateTestGTC(gtx_gradient_paint)
-glmCreateTestGTC(gtx_handed_coordinate_space)
-glmCreateTestGTC(gtx_integer)
-glmCreateTestGTC(gtx_intersect)
-glmCreateTestGTC(gtx_io)
-glmCreateTestGTC(gtx_load)
-glmCreateTestGTC(gtx_log_base)
-glmCreateTestGTC(gtx_matrix_cross_product)
-glmCreateTestGTC(gtx_matrix_decompose)
-glmCreateTestGTC(gtx_matrix_factorisation)
-glmCreateTestGTC(gtx_matrix_interpolation)
-glmCreateTestGTC(gtx_matrix_major_storage)
-glmCreateTestGTC(gtx_matrix_operation)
-glmCreateTestGTC(gtx_matrix_query)
-glmCreateTestGTC(gtx_matrix_transform_2d)
-glmCreateTestGTC(gtx_norm)
-glmCreateTestGTC(gtx_normal)
-glmCreateTestGTC(gtx_normalize_dot)
-glmCreateTestGTC(gtx_number_precision)
-glmCreateTestGTC(gtx_orthonormalize)
-glmCreateTestGTC(gtx_optimum_pow)
-glmCreateTestGTC(gtx_pca)
-glmCreateTestGTC(gtx_perpendicular)
-glmCreateTestGTC(gtx_polar_coordinates)
-glmCreateTestGTC(gtx_projection)
-glmCreateTestGTC(gtx_quaternion)
-glmCreateTestGTC(gtx_dual_quaternion)
-glmCreateTestGTC(gtx_range)
-glmCreateTestGTC(gtx_rotate_normalized_axis)
-glmCreateTestGTC(gtx_rotate_vector)
-glmCreateTestGTC(gtx_scalar_multiplication)
-glmCreateTestGTC(gtx_scalar_relational)
-glmCreateTestGTC(gtx_spline)
-glmCreateTestGTC(gtx_string_cast)
-glmCreateTestGTC(gtx_texture)
-glmCreateTestGTC(gtx_type_aligned)
-glmCreateTestGTC(gtx_type_trait)
-glmCreateTestGTC(gtx_vec_swizzle)
-glmCreateTestGTC(gtx_vector_angle)
-glmCreateTestGTC(gtx_vector_query)
-glmCreateTestGTC(gtx_wrap)
diff --git a/3rdparty/glm/source/test/gtx/gtx.cpp b/3rdparty/glm/source/test/gtx/gtx.cpp
deleted file mode 100644
index 1b143b6..0000000
--- a/3rdparty/glm/source/test/gtx/gtx.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <glm/ext.hpp>
-
-int main()
-{
- int Error = 0;
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_associated_min_max.cpp b/3rdparty/glm/source/test/gtx/gtx_associated_min_max.cpp
deleted file mode 100644
index 9007f8a..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_associated_min_max.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtc/type_precision.hpp>
-#include <glm/gtx/associated_min_max.hpp>
-
-int main()
-{
- int Error(0);
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_closest_point.cpp b/3rdparty/glm/source/test/gtx/gtx_closest_point.cpp
deleted file mode 100644
index 0f6303a..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_closest_point.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/closest_point.hpp>
-
-int main()
-{
- int Error(0);
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_color_encoding.cpp b/3rdparty/glm/source/test/gtx/gtx_color_encoding.cpp
deleted file mode 100644
index 8b499be..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_color_encoding.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-#include <glm/gtx/color_encoding.hpp>
-#include <glm/gtc/color_space.hpp>
-#include <glm/gtc/epsilon.hpp>
-#include <glm/gtc/constants.hpp>
-
-namespace srgb
-{
- int test()
- {
- int Error(0);
-
- glm::vec3 const ColorSourceRGB(1.0, 0.5, 0.0);
-/*
- {
- glm::vec3 const ColorSRGB = glm::convertLinearSRGBToD65XYZ(ColorSourceRGB);
- glm::vec3 const ColorRGB = glm::convertD65XYZToLinearSRGB(ColorSRGB);
- Error += glm::all(glm::epsilonEqual(ColorSourceRGB, ColorRGB, 0.00001f)) ? 0 : 1;
- }
-*/
- {
- glm::vec3 const ColorSRGB = glm::convertLinearToSRGB(ColorSourceRGB, 2.8f);
- glm::vec3 const ColorRGB = glm::convertSRGBToLinear(ColorSRGB, 2.8f);
- Error += glm::all(glm::epsilonEqual(ColorSourceRGB, ColorRGB, 0.00001f)) ? 0 : 1;
- }
-
- glm::vec4 const ColorSourceRGBA(1.0, 0.5, 0.0, 1.0);
-
- {
- glm::vec4 const ColorSRGB = glm::convertLinearToSRGB(ColorSourceRGBA);
- glm::vec4 const ColorRGB = glm::convertSRGBToLinear(ColorSRGB);
- Error += glm::all(glm::epsilonEqual(ColorSourceRGBA, ColorRGB, 0.00001f)) ? 0 : 1;
- }
-
- {
- glm::vec4 const ColorSRGB = glm::convertLinearToSRGB(ColorSourceRGBA, 2.8f);
- glm::vec4 const ColorRGB = glm::convertSRGBToLinear(ColorSRGB, 2.8f);
- Error += glm::all(glm::epsilonEqual(ColorSourceRGBA, ColorRGB, 0.00001f)) ? 0 : 1;
- }
-
- return Error;
- }
-}//namespace srgb
-
-int main()
-{
- int Error(0);
-
- Error += srgb::test();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_color_space.cpp b/3rdparty/glm/source/test/gtx/gtx_color_space.cpp
deleted file mode 100644
index a23d2c8..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_color_space.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/color_space.hpp>
-
-int test_saturation()
-{
- int Error(0);
-
- glm::vec4 Color = glm::saturation(1.0f, glm::vec4(1.0, 0.5, 0.0, 1.0));
-
- return Error;
-}
-
-int main()
-{
- int Error(0);
-
- Error += test_saturation();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_color_space_YCoCg.cpp b/3rdparty/glm/source/test/gtx/gtx_color_space_YCoCg.cpp
deleted file mode 100644
index 2ca131d..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_color_space_YCoCg.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/color_space_YCoCg.hpp>
-
-int main()
-{
- int Error(0);
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_common.cpp b/3rdparty/glm/source/test/gtx/gtx_common.cpp
deleted file mode 100644
index fd4fa99..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_common.cpp
+++ /dev/null
@@ -1,161 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/common.hpp>
-#include <glm/gtc/integer.hpp>
-#include <glm/gtc/epsilon.hpp>
-#include <glm/vector_relational.hpp>
-#include <glm/common.hpp>
-
-namespace fmod_
-{
- template<typename genType>
- GLM_FUNC_QUALIFIER genType modTrunc(genType a, genType b)
- {
- return a - b * glm::trunc(a / b);
- }
-
- int test()
- {
- int Error(0);
-
- {
- float A0(3.0);
- float B0(2.0f);
- float C0 = glm::fmod(A0, B0);
-
- Error += glm::abs(C0 - 1.0f) < 0.00001f ? 0 : 1;
-
- glm::vec4 A1(3.0);
- float B1(2.0f);
- glm::vec4 C1 = glm::fmod(A1, B1);
-
- Error += glm::all(glm::epsilonEqual(C1, glm::vec4(1.0f), 0.00001f)) ? 0 : 1;
-
- glm::vec4 A2(3.0);
- glm::vec4 B2(2.0f);
- glm::vec4 C2 = glm::fmod(A2, B2);
-
- Error += glm::all(glm::epsilonEqual(C2, glm::vec4(1.0f), 0.00001f)) ? 0 : 1;
-
- glm::ivec4 A3(3);
- int B3(2);
- glm::ivec4 C3 = glm::fmod(A3, B3);
-
- Error += glm::all(glm::equal(C3, glm::ivec4(1))) ? 0 : 1;
-
- glm::ivec4 A4(3);
- glm::ivec4 B4(2);
- glm::ivec4 C4 = glm::fmod(A4, B4);
-
- Error += glm::all(glm::equal(C4, glm::ivec4(1))) ? 0 : 1;
- }
-
- {
- float A0(22.0);
- float B0(-10.0f);
- float C0 = glm::fmod(A0, B0);
-
- Error += glm::abs(C0 - 2.0f) < 0.00001f ? 0 : 1;
-
- glm::vec4 A1(22.0);
- float B1(-10.0f);
- glm::vec4 C1 = glm::fmod(A1, B1);
-
- Error += glm::all(glm::epsilonEqual(C1, glm::vec4(2.0f), 0.00001f)) ? 0 : 1;
-
- glm::vec4 A2(22.0);
- glm::vec4 B2(-10.0f);
- glm::vec4 C2 = glm::fmod(A2, B2);
-
- Error += glm::all(glm::epsilonEqual(C2, glm::vec4(2.0f), 0.00001f)) ? 0 : 1;
-
- glm::ivec4 A3(22);
- int B3(-10);
- glm::ivec4 C3 = glm::fmod(A3, B3);
-
- Error += glm::all(glm::equal(C3, glm::ivec4(2))) ? 0 : 1;
-
- glm::ivec4 A4(22);
- glm::ivec4 B4(-10);
- glm::ivec4 C4 = glm::fmod(A4, B4);
-
- Error += glm::all(glm::equal(C4, glm::ivec4(2))) ? 0 : 1;
- }
-
- // http://stackoverflow.com/questions/7610631/glsl-mod-vs-hlsl-fmod
- {
- for (float y = -10.0f; y < 10.0f; y += 0.1f)
- for (float x = -10.0f; x < 10.0f; x += 0.1f)
- {
- float const A(std::fmod(x, y));
- //float const B(std::remainder(x, y));
- float const C(glm::fmod(x, y));
- float const D(modTrunc(x, y));
-
- //Error += glm::epsilonEqual(A, B, 0.0001f) ? 0 : 1;
- //assert(!Error);
- Error += glm::epsilonEqual(A, C, 0.0001f) ? 0 : 1;
- assert(!Error);
- Error += glm::epsilonEqual(A, D, 0.00001f) ? 0 : 1;
- assert(!Error);
- }
- }
-
- return Error;
- }
-}//namespace fmod_
-
-int test_isdenormal()
-{
- int Error = 0;
-
- bool A = glm::isdenormal(1.0f);
- Error += !A ? 0 : 1;
-
- glm::bvec1 B = glm::isdenormal(glm::vec1(1.0f));
- Error += !glm::any(B) ? 0 : 1;
-
- glm::bvec2 C = glm::isdenormal(glm::vec2(1.0f));
- Error += !glm::any(C) ? 0 : 1;
-
- glm::bvec3 D = glm::isdenormal(glm::vec3(1.0f));
- Error += !glm::any(D) ? 0 : 1;
-
- glm::bvec4 E = glm::isdenormal(glm::vec4(1.0f));
- Error += !glm::any(E) ? 0 : 1;
-
- return Error;
-}
-
-int test_openBounded()
-{
- int Error = 0;
-
- Error += glm::all(glm::openBounded(glm::ivec2(2), glm::ivec2(1), glm::ivec2(3))) ? 0 : 1;
- Error += !glm::all(glm::openBounded(glm::ivec2(1), glm::ivec2(1), glm::ivec2(3))) ? 0 : 1;
- Error += !glm::all(glm::openBounded(glm::ivec2(3), glm::ivec2(1), glm::ivec2(3))) ? 0 : 1;
-
- return Error;
-}
-
-int test_closeBounded()
-{
- int Error = 0;
-
- Error += glm::all(glm::closeBounded(glm::ivec2(2), glm::ivec2(1), glm::ivec2(3))) ? 0 : 1;
- Error += glm::all(glm::closeBounded(glm::ivec2(1), glm::ivec2(1), glm::ivec2(3))) ? 0 : 1;
- Error += glm::all(glm::closeBounded(glm::ivec2(3), glm::ivec2(1), glm::ivec2(3))) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_isdenormal();
- Error += ::fmod_::test();
- Error += test_openBounded();
- Error += test_closeBounded();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_compatibility.cpp b/3rdparty/glm/source/test/gtx/gtx_compatibility.cpp
deleted file mode 100644
index e5351ce..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_compatibility.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/compatibility.hpp>
-
-int main()
-{
- int Error(0);
-
- Error += glm::isfinite(1.0f) ? 0 : 1;
- Error += glm::isfinite(1.0) ? 0 : 1;
- Error += glm::isfinite(-1.0f) ? 0 : 1;
- Error += glm::isfinite(-1.0) ? 0 : 1;
-
- Error += glm::all(glm::isfinite(glm::vec4(1.0f))) ? 0 : 1;
- Error += glm::all(glm::isfinite(glm::dvec4(1.0))) ? 0 : 1;
- Error += glm::all(glm::isfinite(glm::vec4(-1.0f))) ? 0 : 1;
- Error += glm::all(glm::isfinite(glm::dvec4(-1.0))) ? 0 : 1;
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_component_wise.cpp b/3rdparty/glm/source/test/gtx/gtx_component_wise.cpp
deleted file mode 100644
index 29c81af..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_component_wise.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/component_wise.hpp>
-#include <glm/gtc/type_precision.hpp>
-#include <glm/gtc/epsilon.hpp>
-#include <glm/gtc/constants.hpp>
-#include <limits>
-
-namespace compNormalize
-{
- int run()
- {
- int Error(0);
-
- {
- glm::vec4 const A = glm::compNormalize<float>(glm::u8vec4(0, 127, 128, 255));
-
- Error += glm::epsilonEqual(A.x, 0.0f, glm::epsilon<float>()) ? 0 : 1;
- Error += A.y < 0.5f ? 0 : 1;
- Error += A.z > 0.5f ? 0 : 1;
- Error += glm::epsilonEqual(A.w, 1.0f, glm::epsilon<float>()) ? 0 : 1;
- }
-
- {
- glm::vec4 const A = glm::compNormalize<float>(glm::i8vec4(-128, -1, 0, 127));
-
- Error += glm::epsilonEqual(A.x,-1.0f, glm::epsilon<float>()) ? 0 : 1;
- Error += A.y < 0.0f ? 0 : 1;
- Error += A.z > 0.0f ? 0 : 1;
- Error += glm::epsilonEqual(A.w, 1.0f, glm::epsilon<float>()) ? 0 : 1;
- }
-
- {
- glm::vec4 const A = glm::compNormalize<float>(glm::u16vec4(
- std::numeric_limits<glm::u16>::min(),
- (std::numeric_limits<glm::u16>::max() >> 1) + 0,
- (std::numeric_limits<glm::u16>::max() >> 1) + 1,
- std::numeric_limits<glm::u16>::max()));
-
- Error += glm::epsilonEqual(A.x, 0.0f, glm::epsilon<float>()) ? 0 : 1;
- Error += A.y < 0.5f ? 0 : 1;
- Error += A.z > 0.5f ? 0 : 1;
- Error += glm::epsilonEqual(A.w, 1.0f, glm::epsilon<float>()) ? 0 : 1;
- }
-
- {
- glm::vec4 const A = glm::compNormalize<float>(glm::i16vec4(
- std::numeric_limits<glm::i16>::min(),
- static_cast<glm::i16>(-1),
- static_cast<glm::i16>(0),
- std::numeric_limits<glm::i16>::max()));
-
- Error += glm::epsilonEqual(A.x,-1.0f, glm::epsilon<float>()) ? 0 : 1;
- Error += A.y < 0.0f ? 0 : 1;
- Error += A.z > 0.0f ? 0 : 1;
- Error += glm::epsilonEqual(A.w, 1.0f, glm::epsilon<float>()) ? 0 : 1;
- }
-
- return Error;
- }
-}//namespace compNormalize
-
-namespace compScale
-{
- int run()
- {
- int Error(0);
-
- {
- glm::u8vec4 const A = glm::compScale<glm::u8>(glm::vec4(0.0f, 0.2f, 0.5f, 1.0f));
-
- Error += A.x == std::numeric_limits<glm::u8>::min() ? 0 : 1;
- Error += A.y < (std::numeric_limits<glm::u8>::max() >> 2) ? 0 : 1;
- Error += A.z == 127 ? 0 : 1;
- Error += A.w == 255 ? 0 : 1;
- }
-
- {
- glm::i8vec4 const A = glm::compScale<glm::i8>(glm::vec4(0.0f,-1.0f, 0.5f, 1.0f));
-
- Error += A.x == 0 ? 0 : 1;
- Error += A.y == -128 ? 0 : 1;
- Error += A.z == 63 ? 0 : 1;
- Error += A.w == 127 ? 0 : 1;
- }
-
- {
- glm::u16vec4 const A = glm::compScale<glm::u16>(glm::vec4(0.0f, 0.2f, 0.5f, 1.0f));
-
- Error += A.x == std::numeric_limits<glm::u16>::min() ? 0 : 1;
- Error += A.y < (std::numeric_limits<glm::u16>::max() >> 2) ? 0 : 1;
- Error += A.z == 32767 ? 0 : 1;
- Error += A.w == 65535 ? 0 : 1;
- }
-
- {
- glm::i16vec4 const A = glm::compScale<glm::i16>(glm::vec4(0.0f,-1.0f, 0.5f, 1.0f));
-
- Error += A.x == 0 ? 0 : 1;
- Error += A.y == -32768 ? 0 : 1;
- Error += A.z == 16383 ? 0 : 1;
- Error += A.w == 32767 ? 0 : 1;
- }
-
- return Error;
- }
-}// compScale
-
-int main()
-{
- int Error(0);
-
- Error += compNormalize::run();
- Error += compScale::run();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_dual_quaternion.cpp b/3rdparty/glm/source/test/gtx/gtx_dual_quaternion.cpp
deleted file mode 100644
index ceedc2c..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_dual_quaternion.cpp
+++ /dev/null
@@ -1,205 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#define GLM_FORCE_CTOR_INIT
-#include <glm/gtx/dual_quaternion.hpp>
-#include <glm/gtc/matrix_transform.hpp>
-#include <glm/gtc/epsilon.hpp>
-#include <glm/gtx/euler_angles.hpp>
-#include <glm/vector_relational.hpp>
-#if GLM_HAS_TRIVIAL_QUERIES
-# include <type_traits>
-#endif
-
-int myrand()
-{
- static int holdrand = 1;
- return (((holdrand = holdrand * 214013L + 2531011L) >> 16) & 0x7fff);
-}
-
-float myfrand() // returns values from -1 to 1 inclusive
-{
- return float(double(myrand()) / double( 0x7ffff )) * 2.0f - 1.0f;
-}
-
-int test_dquat_type()
-{
- glm::dvec3 vA;
- glm::dquat dqA, dqB;
- glm::ddualquat C(dqA, dqB);
- glm::ddualquat B(dqA);
- glm::ddualquat D(dqA, vA);
- return 0;
-}
-
-int test_scalars()
-{
- float const Epsilon = 0.0001f;
-
- int Error(0);
-
- glm::quat src_q1 = glm::quat(1.0f,2.0f,3.0f,4.0f);
- glm::quat src_q2 = glm::quat(5.0f,6.0f,7.0f,8.0f);
- glm::dualquat src1(src_q1,src_q2);
-
- {
- glm::dualquat dst1 = src1 * 2.0f;
- glm::dualquat dst2 = 2.0f * src1;
- glm::dualquat dst3 = src1;
- dst3 *= 2.0f;
- glm::dualquat dstCmp(src_q1 * 2.0f,src_q2 * 2.0f);
- Error += glm::all(glm::epsilonEqual(dst1.real,dstCmp.real, Epsilon)) && glm::all(glm::epsilonEqual(dst1.dual,dstCmp.dual, Epsilon)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(dst2.real,dstCmp.real, Epsilon)) && glm::all(glm::epsilonEqual(dst2.dual,dstCmp.dual, Epsilon)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(dst3.real,dstCmp.real, Epsilon)) && glm::all(glm::epsilonEqual(dst3.dual,dstCmp.dual, Epsilon)) ? 0 : 1;
- }
-
- {
- glm::dualquat dst1 = src1 / 2.0f;
- glm::dualquat dst2 = src1;
- dst2 /= 2.0f;
- glm::dualquat dstCmp(src_q1 / 2.0f,src_q2 / 2.0f);
- Error += glm::all(glm::epsilonEqual(dst1.real,dstCmp.real, Epsilon)) && glm::all(glm::epsilonEqual(dst1.dual,dstCmp.dual, Epsilon)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(dst2.real,dstCmp.real, Epsilon)) && glm::all(glm::epsilonEqual(dst2.dual,dstCmp.dual, Epsilon)) ? 0 : 1;
- }
- return Error;
-}
-
-int test_inverse()
-{
- int Error(0);
-
- float const Epsilon = 0.0001f;
-
- glm::dualquat dqid = glm::dual_quat_identity<float, glm::defaultp>();
- glm::mat4x4 mid(1.0f);
-
- for (int j = 0; j < 100; ++j)
- {
- glm::mat4x4 rot = glm::yawPitchRoll(myfrand() * 360.0f, myfrand() * 360.0f, myfrand() * 360.0f);
- glm::vec3 vt = glm::vec3(myfrand() * 10.0f, myfrand() * 10.0f, myfrand() * 10.0f);
-
- glm::mat4x4 m = glm::translate(mid, vt) * rot;
-
- glm::quat qr = glm::quat_cast(m);
-
- glm::dualquat dq(qr);
-
- glm::dualquat invdq = glm::inverse(dq);
-
- glm::dualquat r1 = invdq * dq;
- glm::dualquat r2 = dq * invdq;
-
- Error += glm::all(glm::epsilonEqual(r1.real, dqid.real, Epsilon)) && glm::all(glm::epsilonEqual(r1.dual, dqid.dual, Epsilon)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(r2.real, dqid.real, Epsilon)) && glm::all(glm::epsilonEqual(r2.dual, dqid.dual, Epsilon)) ? 0 : 1;
-
- // testing commutative property
- glm::dualquat r ( glm::quat( myfrand() * glm::pi<float>() * 2.0f, myfrand(), myfrand(), myfrand() ),
- glm::vec3(myfrand() * 10.0f, myfrand() * 10.0f, myfrand() * 10.0f) );
- glm::dualquat riq = (r * invdq) * dq;
- glm::dualquat rqi = (r * dq) * invdq;
-
- Error += glm::all(glm::epsilonEqual(riq.real, rqi.real, Epsilon)) && glm::all(glm::epsilonEqual(riq.dual, rqi.dual, Epsilon)) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_mul()
-{
- int Error(0);
-
- float const Epsilon = 0.0001f;
-
- glm::mat4x4 mid(1.0f);
-
- for (int j = 0; j < 100; ++j)
- {
- // generate random rotations and translations and compare transformed by matrix and dualquats random points
- glm::vec3 vt1 = glm::vec3(myfrand() * 10.0f, myfrand() * 10.0f, myfrand() * 10.0f);
- glm::vec3 vt2 = glm::vec3(myfrand() * 10.0f, myfrand() * 10.0f, myfrand() * 10.0f);
-
- glm::mat4x4 rot1 = glm::yawPitchRoll(myfrand() * 360.0f, myfrand() * 360.0f, myfrand() * 360.0f);
- glm::mat4x4 rot2 = glm::yawPitchRoll(myfrand() * 360.0f, myfrand() * 360.0f, myfrand() * 360.0f);
- glm::mat4x4 m1 = glm::translate(mid, vt1) * rot1;
- glm::mat4x4 m2 = glm::translate(mid, vt2) * rot2;
- glm::mat4x4 m3 = m2 * m1;
- glm::mat4x4 m4 = m1 * m2;
-
- glm::quat qrot1 = glm::quat_cast(rot1);
- glm::quat qrot2 = glm::quat_cast(rot2);
-
- glm::dualquat dq1 = glm::dualquat(qrot1,vt1);
- glm::dualquat dq2 = glm::dualquat(qrot2,vt2);
- glm::dualquat dq3 = dq2 * dq1;
- glm::dualquat dq4 = dq1 * dq2;
-
- for (int i = 0; i < 100; ++i)
- {
- glm::vec4 src_pt = glm::vec4(myfrand() * 4.0f, myfrand() * 5.0f, myfrand() * 3.0f,1.0f);
- // test both multiplication orders
- glm::vec4 dst_pt_m3 = m3 * src_pt;
- glm::vec4 dst_pt_dq3 = dq3 * src_pt;
-
- glm::vec4 dst_pt_m3_i = glm::inverse(m3) * src_pt;
- glm::vec4 dst_pt_dq3_i = src_pt * dq3;
-
- glm::vec4 dst_pt_m4 = m4 * src_pt;
- glm::vec4 dst_pt_dq4 = dq4 * src_pt;
-
- glm::vec4 dst_pt_m4_i = glm::inverse(m4) * src_pt;
- glm::vec4 dst_pt_dq4_i = src_pt * dq4;
-
- Error += glm::all(glm::epsilonEqual(dst_pt_m3, dst_pt_dq3, Epsilon)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(dst_pt_m4, dst_pt_dq4, Epsilon)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(dst_pt_m3_i, dst_pt_dq3_i, Epsilon)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(dst_pt_m4_i, dst_pt_dq4_i, Epsilon)) ? 0 : 1;
- }
- }
-
- return Error;
-}
-
-int test_dual_quat_ctr()
-{
- int Error(0);
-
-# if GLM_HAS_TRIVIAL_QUERIES
- // Error += std::is_trivially_default_constructible<glm::dualquat>::value ? 0 : 1;
- // Error += std::is_trivially_default_constructible<glm::ddualquat>::value ? 0 : 1;
- // Error += std::is_trivially_copy_assignable<glm::dualquat>::value ? 0 : 1;
- // Error += std::is_trivially_copy_assignable<glm::ddualquat>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::dualquat>::value ? 0 : 1;
- Error += std::is_trivially_copyable<glm::ddualquat>::value ? 0 : 1;
-
- Error += std::is_copy_constructible<glm::dualquat>::value ? 0 : 1;
- Error += std::is_copy_constructible<glm::ddualquat>::value ? 0 : 1;
-# endif
-
- return Error;
-}
-
-int test_size()
-{
- int Error = 0;
-
- Error += 32 == sizeof(glm::dualquat) ? 0 : 1;
- Error += 64 == sizeof(glm::ddualquat) ? 0 : 1;
- Error += glm::dualquat().length() == 2 ? 0 : 1;
- Error += glm::ddualquat().length() == 2 ? 0 : 1;
- Error += glm::dualquat::length() == 2 ? 0 : 1;
- Error += glm::ddualquat::length() == 2 ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_dual_quat_ctr();
- Error += test_dquat_type();
- Error += test_scalars();
- Error += test_inverse();
- Error += test_mul();
- Error += test_size();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_easing.cpp b/3rdparty/glm/source/test/gtx/gtx_easing.cpp
deleted file mode 100644
index 0e98cd5..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_easing.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/glm.hpp>
-#include <glm/gtx/quaternion.hpp>
-#include <glm/gtx/easing.hpp>
-
-namespace
-{
-
- template<typename T>
- void _test_easing()
- {
- T a = static_cast<T>(0.5);
- T r;
-
- r = glm::linearInterpolation(a);
-
- r = glm::quadraticEaseIn(a);
- r = glm::quadraticEaseOut(a);
- r = glm::quadraticEaseInOut(a);
-
- r = glm::cubicEaseIn(a);
- r = glm::cubicEaseOut(a);
- r = glm::cubicEaseInOut(a);
-
- r = glm::quarticEaseIn(a);
- r = glm::quarticEaseOut(a);
- r = glm::quinticEaseInOut(a);
-
- r = glm::sineEaseIn(a);
- r = glm::sineEaseOut(a);
- r = glm::sineEaseInOut(a);
-
- r = glm::circularEaseIn(a);
- r = glm::circularEaseOut(a);
- r = glm::circularEaseInOut(a);
-
- r = glm::exponentialEaseIn(a);
- r = glm::exponentialEaseOut(a);
- r = glm::exponentialEaseInOut(a);
-
- r = glm::elasticEaseIn(a);
- r = glm::elasticEaseOut(a);
- r = glm::elasticEaseInOut(a);
-
- r = glm::backEaseIn(a);
- r = glm::backEaseOut(a);
- r = glm::backEaseInOut(a);
-
- r = glm::bounceEaseIn(a);
- r = glm::bounceEaseOut(a);
- r = glm::bounceEaseInOut(a);
- }
-
-}
-
-int main()
-{
- int Error = 0;
-
- _test_easing<float>();
- _test_easing<double>();
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/gtx/gtx_euler_angle.cpp b/3rdparty/glm/source/test/gtx/gtx_euler_angle.cpp
deleted file mode 100644
index 348f581..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_euler_angle.cpp
+++ /dev/null
@@ -1,539 +0,0 @@
-// Code sample from Filippo Ramaciotti
-
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtc/matrix_transform.hpp>
-#include <glm/gtx/matrix_cross_product.hpp>
-#include <glm/gtx/matrix_operation.hpp>
-#include <glm/gtc/epsilon.hpp>
-#include <glm/gtx/string_cast.hpp>
-#include <glm/gtx/euler_angles.hpp>
-#include <cstdio>
-#include <vector>
-#include <utility>
-
-namespace test_eulerAngleX
-{
- int test()
- {
- int Error = 0;
-
- float const Angle(glm::pi<float>() * 0.5f);
- glm::vec3 const X(1.0f, 0.0f, 0.0f);
-
- glm::vec4 const Y(0.0f, 1.0f, 0.0f, 1.0f);
- glm::vec4 const Y1 = glm::rotate(glm::mat4(1.0f), Angle, X) * Y;
- glm::vec4 const Y2 = glm::eulerAngleX(Angle) * Y;
- glm::vec4 const Y3 = glm::eulerAngleXY(Angle, 0.0f) * Y;
- glm::vec4 const Y4 = glm::eulerAngleYX(0.0f, Angle) * Y;
- glm::vec4 const Y5 = glm::eulerAngleXZ(Angle, 0.0f) * Y;
- glm::vec4 const Y6 = glm::eulerAngleZX(0.0f, Angle) * Y;
- glm::vec4 const Y7 = glm::eulerAngleYXZ(0.0f, Angle, 0.0f) * Y;
- Error += glm::all(glm::epsilonEqual(Y1, Y2, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(Y1, Y3, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(Y1, Y4, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(Y1, Y5, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(Y1, Y6, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(Y1, Y7, 0.00001f)) ? 0 : 1;
-
- glm::vec4 const Z(0.0f, 0.0f, 1.0f, 1.0f);
- glm::vec4 const Z1 = glm::rotate(glm::mat4(1.0f), Angle, X) * Z;
- glm::vec4 const Z2 = glm::eulerAngleX(Angle) * Z;
- glm::vec4 const Z3 = glm::eulerAngleXY(Angle, 0.0f) * Z;
- glm::vec4 const Z4 = glm::eulerAngleYX(0.0f, Angle) * Z;
- glm::vec4 const Z5 = glm::eulerAngleXZ(Angle, 0.0f) * Z;
- glm::vec4 const Z6 = glm::eulerAngleZX(0.0f, Angle) * Z;
- glm::vec4 const Z7 = glm::eulerAngleYXZ(0.0f, Angle, 0.0f) * Z;
- Error += glm::all(glm::epsilonEqual(Z1, Z2, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(Z1, Z3, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(Z1, Z4, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(Z1, Z5, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(Z1, Z6, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(Z1, Z7, 0.00001f)) ? 0 : 1;
-
- return Error;
- }
-}//namespace test_eulerAngleX
-
-namespace test_eulerAngleY
-{
- int test()
- {
- int Error = 0;
-
- float const Angle(glm::pi<float>() * 0.5f);
- glm::vec3 const Y(0.0f, 1.0f, 0.0f);
-
- glm::vec4 const X(1.0f, 0.0f, 0.0f, 1.0f);
- glm::vec4 const X1 = glm::rotate(glm::mat4(1.0f), Angle, Y) * X;
- glm::vec4 const X2 = glm::eulerAngleY(Angle) * X;
- glm::vec4 const X3 = glm::eulerAngleYX(Angle, 0.0f) * X;
- glm::vec4 const X4 = glm::eulerAngleXY(0.0f, Angle) * X;
- glm::vec4 const X5 = glm::eulerAngleYZ(Angle, 0.0f) * X;
- glm::vec4 const X6 = glm::eulerAngleZY(0.0f, Angle) * X;
- glm::vec4 const X7 = glm::eulerAngleYXZ(Angle, 0.0f, 0.0f) * X;
- Error += glm::all(glm::epsilonEqual(X1, X2, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(X1, X3, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(X1, X4, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(X1, X5, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(X1, X6, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(X1, X7, 0.00001f)) ? 0 : 1;
-
- glm::vec4 const Z(0.0f, 0.0f, 1.0f, 1.0f);
- glm::vec4 const Z1 = glm::eulerAngleY(Angle) * Z;
- glm::vec4 const Z2 = glm::rotate(glm::mat4(1.0f), Angle, Y) * Z;
- glm::vec4 const Z3 = glm::eulerAngleYX(Angle, 0.0f) * Z;
- glm::vec4 const Z4 = glm::eulerAngleXY(0.0f, Angle) * Z;
- glm::vec4 const Z5 = glm::eulerAngleYZ(Angle, 0.0f) * Z;
- glm::vec4 const Z6 = glm::eulerAngleZY(0.0f, Angle) * Z;
- glm::vec4 const Z7 = glm::eulerAngleYXZ(Angle, 0.0f, 0.0f) * Z;
- Error += glm::all(glm::epsilonEqual(Z1, Z2, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(Z1, Z3, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(Z1, Z4, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(Z1, Z5, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(Z1, Z6, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(Z1, Z7, 0.00001f)) ? 0 : 1;
-
- return Error;
- }
-}//namespace test_eulerAngleY
-
-namespace test_eulerAngleZ
-{
- int test()
- {
- int Error = 0;
-
- float const Angle(glm::pi<float>() * 0.5f);
- glm::vec3 const Z(0.0f, 0.0f, 1.0f);
-
- glm::vec4 const X(1.0f, 0.0f, 0.0f, 1.0f);
- glm::vec4 const X1 = glm::rotate(glm::mat4(1.0f), Angle, Z) * X;
- glm::vec4 const X2 = glm::eulerAngleZ(Angle) * X;
- glm::vec4 const X3 = glm::eulerAngleZX(Angle, 0.0f) * X;
- glm::vec4 const X4 = glm::eulerAngleXZ(0.0f, Angle) * X;
- glm::vec4 const X5 = glm::eulerAngleZY(Angle, 0.0f) * X;
- glm::vec4 const X6 = glm::eulerAngleYZ(0.0f, Angle) * X;
- glm::vec4 const X7 = glm::eulerAngleYXZ(0.0f, 0.0f, Angle) * X;
- Error += glm::all(glm::epsilonEqual(X1, X2, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(X1, X3, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(X1, X4, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(X1, X5, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(X1, X6, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(X1, X7, 0.00001f)) ? 0 : 1;
-
- glm::vec4 const Y(1.0f, 0.0f, 0.0f, 1.0f);
- glm::vec4 const Z1 = glm::rotate(glm::mat4(1.0f), Angle, Z) * Y;
- glm::vec4 const Z2 = glm::eulerAngleZ(Angle) * Y;
- glm::vec4 const Z3 = glm::eulerAngleZX(Angle, 0.0f) * Y;
- glm::vec4 const Z4 = glm::eulerAngleXZ(0.0f, Angle) * Y;
- glm::vec4 const Z5 = glm::eulerAngleZY(Angle, 0.0f) * Y;
- glm::vec4 const Z6 = glm::eulerAngleYZ(0.0f, Angle) * Y;
- glm::vec4 const Z7 = glm::eulerAngleYXZ(0.0f, 0.0f, Angle) * Y;
- Error += glm::all(glm::epsilonEqual(Z1, Z2, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(Z1, Z3, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(Z1, Z4, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(Z1, Z5, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(Z1, Z6, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(Z1, Z7, 0.00001f)) ? 0 : 1;
-
- return Error;
- }
-}//namespace test_eulerAngleZ
-
-namespace test_derivedEulerAngles
-{
- bool epsilonEqual(glm::mat4 const& mat1, glm::mat4 const& mat2, glm::mat4::value_type const& epsilon)
- {
- return glm::all(glm::epsilonEqual(mat1[0], mat2[0], epsilon)) ?
- (
- glm::all(glm::epsilonEqual(mat1[1], mat2[1], epsilon)) ?
- (
- glm::all(glm::epsilonEqual(mat1[2], mat2[2], epsilon)) ?
- (
- glm::all(glm::epsilonEqual(mat1[3], mat2[3], epsilon)) ? true : false
- ) : false
- ) : false
- ) : false;
- }
-
- template<typename RotationFunc, typename TestDerivedFunc>
- int test(RotationFunc rotationFunc, TestDerivedFunc testDerivedFunc, const glm::vec3& basis)
- {
- int Error = 0;
-
- typedef glm::vec3::value_type value;
- value const zeroAngle(0.0f);
- value const Angle(glm::pi<float>() * 0.75f);
- value const negativeAngle(-Angle);
- value const zeroAngleVelocity(0.0f);
- value const AngleVelocity(glm::pi<float>() * 0.27f);
- value const negativeAngleVelocity(-AngleVelocity);
-
- typedef std::pair<value,value> AngleAndAngleVelocity;
- std::vector<AngleAndAngleVelocity> testPairs;
- testPairs.push_back(AngleAndAngleVelocity(zeroAngle, zeroAngleVelocity));
- testPairs.push_back(AngleAndAngleVelocity(zeroAngle, AngleVelocity));
- testPairs.push_back(AngleAndAngleVelocity(zeroAngle, negativeAngleVelocity));
- testPairs.push_back(AngleAndAngleVelocity(Angle, zeroAngleVelocity));
- testPairs.push_back(AngleAndAngleVelocity(Angle, AngleVelocity));
- testPairs.push_back(AngleAndAngleVelocity(Angle, negativeAngleVelocity));
- testPairs.push_back(AngleAndAngleVelocity(negativeAngle, zeroAngleVelocity));
- testPairs.push_back(AngleAndAngleVelocity(negativeAngle, AngleVelocity));
- testPairs.push_back(AngleAndAngleVelocity(negativeAngle, negativeAngleVelocity));
-
- for (size_t i = 0, size = testPairs.size(); i < size; ++i)
- {
- AngleAndAngleVelocity const& pair = testPairs.at(i);
-
- glm::mat4 const W = glm::matrixCross4(basis * pair.second);
- glm::mat4 const rotMt = glm::transpose(rotationFunc(pair.first));
- glm::mat4 const derivedRotM = testDerivedFunc(pair.first, pair.second);
-
- Error += epsilonEqual(W, derivedRotM * rotMt, 0.00001f) ? 0 : 1;
- }
-
- return Error;
- }
-}//namespace test_derivedEulerAngles
-
-namespace test_eulerAngleXY
-{
- int test()
- {
- int Error = 0;
-
- glm::vec4 const V(1.0f);
-
- float const AngleX(glm::pi<float>() * 0.5f);
- float const AngleY(glm::pi<float>() * 0.25f);
-
- glm::vec3 const axisX(1.0f, 0.0f, 0.0f);
- glm::vec3 const axisY(0.0f, 1.0f, 0.0f);
-
- glm::vec4 const V1 = (glm::rotate(glm::mat4(1.0f), AngleX, axisX) * glm::rotate(glm::mat4(1.0f), AngleY, axisY)) * V;
- glm::vec4 const V2 = glm::eulerAngleXY(AngleX, AngleY) * V;
- glm::vec4 const V3 = glm::eulerAngleX(AngleX) * glm::eulerAngleY(AngleY) * V;
- Error += glm::all(glm::epsilonEqual(V1, V2, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(V1, V3, 0.00001f)) ? 0 : 1;
-
- return Error;
- }
-}//namespace test_eulerAngleXY
-
-namespace test_eulerAngleYX
-{
- int test()
- {
- int Error = 0;
-
- glm::vec4 const V(1.0f);
-
- float const AngleX(glm::pi<float>() * 0.5f);
- float const AngleY(glm::pi<float>() * 0.25f);
-
- glm::vec3 const axisX(1.0f, 0.0f, 0.0f);
- glm::vec3 const axisY(0.0f, 1.0f, 0.0f);
-
- glm::vec4 const V1 = (glm::rotate(glm::mat4(1.0f), AngleY, axisY) * glm::rotate(glm::mat4(1.0f), AngleX, axisX)) * V;
- glm::vec4 const V2 = glm::eulerAngleYX(AngleY, AngleX) * V;
- glm::vec4 const V3 = glm::eulerAngleY(AngleY) * glm::eulerAngleX(AngleX) * V;
- Error += glm::all(glm::epsilonEqual(V1, V2, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(V1, V3, 0.00001f)) ? 0 : 1;
-
- return Error;
- }
-}//namespace test_eulerAngleYX
-
-namespace test_eulerAngleXZ
-{
- int test()
- {
- int Error = 0;
-
- glm::vec4 const V(1.0f);
-
- float const AngleX(glm::pi<float>() * 0.5f);
- float const AngleZ(glm::pi<float>() * 0.25f);
-
- glm::vec3 const axisX(1.0f, 0.0f, 0.0f);
- glm::vec3 const axisZ(0.0f, 0.0f, 1.0f);
-
- glm::vec4 const V1 = (glm::rotate(glm::mat4(1.0f), AngleX, axisX) * glm::rotate(glm::mat4(1.0f), AngleZ, axisZ)) * V;
- glm::vec4 const V2 = glm::eulerAngleXZ(AngleX, AngleZ) * V;
- glm::vec4 const V3 = glm::eulerAngleX(AngleX) * glm::eulerAngleZ(AngleZ) * V;
- Error += glm::all(glm::epsilonEqual(V1, V2, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(V1, V3, 0.00001f)) ? 0 : 1;
-
- return Error;
- }
-}//namespace test_eulerAngleXZ
-
-namespace test_eulerAngleZX
-{
- int test()
- {
- int Error = 0;
-
- glm::vec4 const V(1.0f);
-
- float const AngleX(glm::pi<float>() * 0.5f);
- float const AngleZ(glm::pi<float>() * 0.25f);
-
- glm::vec3 const axisX(1.0f, 0.0f, 0.0f);
- glm::vec3 const axisZ(0.0f, 0.0f, 1.0f);
-
- glm::vec4 const V1 = (glm::rotate(glm::mat4(1.0f), AngleZ, axisZ) * glm::rotate(glm::mat4(1.0f), AngleX, axisX)) * V;
- glm::vec4 const V2 = glm::eulerAngleZX(AngleZ, AngleX) * V;
- glm::vec4 const V3 = glm::eulerAngleZ(AngleZ) * glm::eulerAngleX(AngleX) * V;
- Error += glm::all(glm::epsilonEqual(V1, V2, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(V1, V3, 0.00001f)) ? 0 : 1;
-
- return Error;
- }
-}//namespace test_eulerAngleZX
-
-namespace test_eulerAngleYZ
-{
- int test()
- {
- int Error = 0;
-
- glm::vec4 const V(1.0f);
-
- float const AngleY(glm::pi<float>() * 0.5f);
- float const AngleZ(glm::pi<float>() * 0.25f);
-
- glm::vec3 const axisX(1.0f, 0.0f, 0.0f);
- glm::vec3 const axisY(0.0f, 1.0f, 0.0f);
- glm::vec3 const axisZ(0.0f, 0.0f, 1.0f);
-
- glm::vec4 const V1 = (glm::rotate(glm::mat4(1.0f), AngleY, axisY) * glm::rotate(glm::mat4(1.0f), AngleZ, axisZ)) * V;
- glm::vec4 const V2 = glm::eulerAngleYZ(AngleY, AngleZ) * V;
- glm::vec4 const V3 = glm::eulerAngleY(AngleY) * glm::eulerAngleZ(AngleZ) * V;
- Error += glm::all(glm::epsilonEqual(V1, V2, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(V1, V3, 0.00001f)) ? 0 : 1;
-
- return Error;
- }
-}//namespace test_eulerAngleYZ
-
-namespace test_eulerAngleZY
-{
- int test()
- {
- int Error = 0;
-
- glm::vec4 const V(1.0f);
-
- float const AngleY(glm::pi<float>() * 0.5f);
- float const AngleZ(glm::pi<float>() * 0.25f);
-
- glm::vec3 const axisX(1.0f, 0.0f, 0.0f);
- glm::vec3 const axisY(0.0f, 1.0f, 0.0f);
- glm::vec3 const axisZ(0.0f, 0.0f, 1.0f);
-
- glm::vec4 const V1 = (glm::rotate(glm::mat4(1.0f), AngleZ, axisZ) * glm::rotate(glm::mat4(1.0f), AngleY, axisY)) * V;
- glm::vec4 const V2 = glm::eulerAngleZY(AngleZ, AngleY) * V;
- glm::vec4 const V3 = glm::eulerAngleZ(AngleZ) * glm::eulerAngleY(AngleY) * V;
- Error += glm::all(glm::epsilonEqual(V1, V2, 0.00001f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(V1, V3, 0.00001f)) ? 0 : 1;
-
- return Error;
- }
-}//namespace test_eulerAngleZY
-
-namespace test_eulerAngleYXZ
-{
- int test()
- {
- glm::f32 first = 1.046f;
- glm::f32 second = 0.52f;
- glm::f32 third = -0.785f;
-
- glm::fmat4 rotationEuler = glm::eulerAngleYXZ(first, second, third);
-
- glm::fmat4 rotationInvertedY = glm::eulerAngleY(-1.f*first) * glm::eulerAngleX(second) * glm::eulerAngleZ(third);
- glm::fmat4 rotationDumb = glm::fmat4();
- rotationDumb = glm::rotate(rotationDumb, first, glm::fvec3(0,1,0));
- rotationDumb = glm::rotate(rotationDumb, second, glm::fvec3(1,0,0));
- rotationDumb = glm::rotate(rotationDumb, third, glm::fvec3(0,0,1));
-
- std::printf("%s\n", glm::to_string(glm::fmat3(rotationEuler)).c_str());
- std::printf("%s\n", glm::to_string(glm::fmat3(rotationDumb)).c_str());
- std::printf("%s\n", glm::to_string(glm::fmat3(rotationInvertedY)).c_str());
-
- std::printf("\nRESIDUAL\n");
- std::printf("%s\n", glm::to_string(glm::fmat3(rotationEuler-(rotationDumb))).c_str());
- std::printf("%s\n", glm::to_string(glm::fmat3(rotationEuler-(rotationInvertedY))).c_str());
-
- return 0;
- }
-}//namespace eulerAngleYXZ
-
-namespace test_eulerAngles
-{
- template<typename TestRotationFunc>
- int test(TestRotationFunc testRotationFunc, glm::vec3 const& I, glm::vec3 const& J, glm::vec3 const& K)
- {
- int Error = 0;
-
- typedef glm::mat4::value_type value;
- value const minAngle(-glm::pi<value>());
- value const maxAngle(glm::pi<value>());
- value const maxAngleWithDelta(maxAngle - 0.0000001f);
- value const minMidAngle(-glm::pi<value>() * 0.5f);
- value const maxMidAngle(glm::pi<value>() * 0.5f);
-
- std::vector<glm::vec3> testEulerAngles;
- testEulerAngles.push_back(glm::vec3(1.046f, 0.52f, -0.785f));
- testEulerAngles.push_back(glm::vec3(minAngle, minMidAngle, minAngle));
- testEulerAngles.push_back(glm::vec3(minAngle, minMidAngle, maxAngle));
- testEulerAngles.push_back(glm::vec3(minAngle, minMidAngle, maxAngleWithDelta));
- testEulerAngles.push_back(glm::vec3(minAngle, maxMidAngle, minAngle));
- testEulerAngles.push_back(glm::vec3(minAngle, maxMidAngle, maxAngle));
- testEulerAngles.push_back(glm::vec3(minAngle, maxMidAngle, maxAngleWithDelta));
- testEulerAngles.push_back(glm::vec3(maxAngle, minMidAngle, minAngle));
- testEulerAngles.push_back(glm::vec3(maxAngle, minMidAngle, maxAngle));
- testEulerAngles.push_back(glm::vec3(maxAngle, minMidAngle, maxAngleWithDelta));
- testEulerAngles.push_back(glm::vec3(maxAngleWithDelta, minMidAngle, maxAngle));
- testEulerAngles.push_back(glm::vec3(maxAngleWithDelta, minMidAngle, maxAngleWithDelta));
- testEulerAngles.push_back(glm::vec3(maxAngle, maxMidAngle, minAngle));
- testEulerAngles.push_back(glm::vec3(maxAngleWithDelta, maxMidAngle, minAngle));
- testEulerAngles.push_back(glm::vec3(maxAngle, maxMidAngle, maxAngle));
- testEulerAngles.push_back(glm::vec3(maxAngle, maxMidAngle, maxAngleWithDelta));
- testEulerAngles.push_back(glm::vec3(maxAngleWithDelta, maxMidAngle, maxAngle));
- testEulerAngles.push_back(glm::vec3(maxAngleWithDelta, maxMidAngle, maxAngleWithDelta));
- testEulerAngles.push_back(glm::vec3(minAngle, 0.0f, minAngle));
- testEulerAngles.push_back(glm::vec3(minAngle, 0.0f, maxAngle));
- testEulerAngles.push_back(glm::vec3(maxAngle, maxAngle, minAngle));
- testEulerAngles.push_back(glm::vec3(maxAngle, maxAngle, maxAngle));
-
- for (size_t i = 0, size = testEulerAngles.size(); i < size; ++i)
- {
- glm::vec3 const& angles = testEulerAngles.at(i);
- glm::mat4 const rotationEuler = testRotationFunc(angles.x, angles.y, angles.z);
-
- glm::mat4 rotationDumb = glm::diagonal4x4(glm::mat4::col_type(1.0f));
- rotationDumb = glm::rotate(rotationDumb, angles.x, I);
- rotationDumb = glm::rotate(rotationDumb, angles.y, J);
- rotationDumb = glm::rotate(rotationDumb, angles.z, K);
-
- glm::vec4 const V(1.0f,1.0f,1.0f,1.0f);
- glm::vec4 const V1 = rotationEuler * V;
- glm::vec4 const V2 = rotationDumb * V;
-
- Error += glm::all(glm::epsilonEqual(V1, V2, 0.00001f)) ? 0 : 1;
- }
-
- return Error;
- }
-}//namespace test_extractsEulerAngles
-
-namespace test_extractsEulerAngles
-{
- template<typename RotationFunc, typename TestExtractionFunc>
- int test(RotationFunc rotationFunc, TestExtractionFunc testExtractionFunc)
- {
- int Error = 0;
-
- typedef glm::mat4::value_type value;
- value const minAngle(-glm::pi<value>());
- value const maxAngle(glm::pi<value>());
- value const maxAngleWithDelta(maxAngle - 0.0000001f);
- value const minMidAngle(-glm::pi<value>() * 0.5f);
- value const maxMidAngle(glm::pi<value>() * 0.5f);
-
- std::vector<glm::vec3> testEulerAngles;
- testEulerAngles.push_back(glm::vec3(1.046f, 0.52f, -0.785f));
- testEulerAngles.push_back(glm::vec3(minAngle, minMidAngle, minAngle));
- testEulerAngles.push_back(glm::vec3(minAngle, minMidAngle, maxAngle));
- testEulerAngles.push_back(glm::vec3(minAngle, minMidAngle, maxAngleWithDelta));
- testEulerAngles.push_back(glm::vec3(minAngle, maxMidAngle, minAngle));
- testEulerAngles.push_back(glm::vec3(minAngle, maxMidAngle, maxAngle));
- testEulerAngles.push_back(glm::vec3(minAngle, maxMidAngle, maxAngleWithDelta));
- testEulerAngles.push_back(glm::vec3(maxAngle, minMidAngle, minAngle));
- testEulerAngles.push_back(glm::vec3(maxAngle, minMidAngle, maxAngle));
- testEulerAngles.push_back(glm::vec3(maxAngle, minMidAngle, maxAngleWithDelta));
- testEulerAngles.push_back(glm::vec3(maxAngleWithDelta, minMidAngle, maxAngle));
- testEulerAngles.push_back(glm::vec3(maxAngleWithDelta, minMidAngle, maxAngleWithDelta));
- testEulerAngles.push_back(glm::vec3(maxAngle, maxMidAngle, minAngle));
- testEulerAngles.push_back(glm::vec3(maxAngleWithDelta, maxMidAngle, minAngle));
- testEulerAngles.push_back(glm::vec3(maxAngle, maxMidAngle, maxAngle));
- testEulerAngles.push_back(glm::vec3(maxAngle, maxMidAngle, maxAngleWithDelta));
- testEulerAngles.push_back(glm::vec3(maxAngleWithDelta, maxMidAngle, maxAngle));
- testEulerAngles.push_back(glm::vec3(maxAngleWithDelta, maxMidAngle, maxAngleWithDelta));
- testEulerAngles.push_back(glm::vec3(minAngle, 0.0f, minAngle));
- testEulerAngles.push_back(glm::vec3(minAngle, 0.0f, maxAngle));
- testEulerAngles.push_back(glm::vec3(maxAngle, maxAngle, minAngle));
- testEulerAngles.push_back(glm::vec3(maxAngle, maxAngle, maxAngle));
-
- for (size_t i = 0, size = testEulerAngles.size(); i < size; ++i)
- {
- glm::vec3 const& angles = testEulerAngles.at(i);
- glm::mat4 const rotation = rotationFunc(angles.x, angles.y, angles.z);
-
- glm::vec3 extractedEulerAngles(0.0f);
- testExtractionFunc(rotation, extractedEulerAngles.x, extractedEulerAngles.y, extractedEulerAngles.z);
- glm::mat4 const extractedRotation = rotationFunc(extractedEulerAngles.x, extractedEulerAngles.y, extractedEulerAngles.z);
-
- glm::vec4 const V(1.0f,1.0f,1.0f,1.0f);
- glm::vec4 const V1 = rotation * V;
- glm::vec4 const V2 = extractedRotation * V;
-
- Error += glm::all(glm::epsilonEqual(V1, V2, 0.00001f)) ? 0 : 1;
- }
-
- return Error;
- }
-}//namespace test_extractsEulerAngles
-
-int main()
-{
- int Error = 0;
-
- typedef glm::mat4::value_type value;
- glm::vec3 const X(1.0f, 0.0f, 0.0f);
- glm::vec3 const Y(0.0f, 1.0f, 0.0f);
- glm::vec3 const Z(0.0f, 0.0f, 1.0f);
-
- Error += test_eulerAngleX::test();
- Error += test_eulerAngleY::test();
- Error += test_eulerAngleZ::test();
-
- Error += test_derivedEulerAngles::test(glm::eulerAngleX<value>, glm::derivedEulerAngleX<value>, X);
- Error += test_derivedEulerAngles::test(glm::eulerAngleY<value>, glm::derivedEulerAngleY<value>, Y);
- Error += test_derivedEulerAngles::test(glm::eulerAngleZ<value>, glm::derivedEulerAngleZ<value>, Z);
-
- Error += test_eulerAngleXY::test();
- Error += test_eulerAngleYX::test();
- Error += test_eulerAngleXZ::test();
- Error += test_eulerAngleZX::test();
- Error += test_eulerAngleYZ::test();
- Error += test_eulerAngleZY::test();
- Error += test_eulerAngleYXZ::test();
-
- Error += test_eulerAngles::test(glm::eulerAngleXZX<value>, X, Z, X);
- Error += test_eulerAngles::test(glm::eulerAngleXYX<value>, X, Y, X);
- Error += test_eulerAngles::test(glm::eulerAngleYXY<value>, Y, X, Y);
- Error += test_eulerAngles::test(glm::eulerAngleYZY<value>, Y, Z, Y);
- Error += test_eulerAngles::test(glm::eulerAngleZYZ<value>, Z, Y, Z);
- Error += test_eulerAngles::test(glm::eulerAngleZXZ<value>, Z, X, Z);
- Error += test_eulerAngles::test(glm::eulerAngleXZY<value>, X, Z, Y);
- Error += test_eulerAngles::test(glm::eulerAngleYZX<value>, Y, Z, X);
- Error += test_eulerAngles::test(glm::eulerAngleZYX<value>, Z, Y, X);
- Error += test_eulerAngles::test(glm::eulerAngleZXY<value>, Z, X, Y);
-
- Error += test_extractsEulerAngles::test(glm::eulerAngleYXZ<value>, glm::extractEulerAngleYXZ<value>);
- Error += test_extractsEulerAngles::test(glm::eulerAngleXZX<value>, glm::extractEulerAngleXZX<value>);
- Error += test_extractsEulerAngles::test(glm::eulerAngleXYX<value>, glm::extractEulerAngleXYX<value>);
- Error += test_extractsEulerAngles::test(glm::eulerAngleYXY<value>, glm::extractEulerAngleYXY<value>);
- Error += test_extractsEulerAngles::test(glm::eulerAngleYZY<value>, glm::extractEulerAngleYZY<value>);
- Error += test_extractsEulerAngles::test(glm::eulerAngleZYZ<value>, glm::extractEulerAngleZYZ<value>);
- Error += test_extractsEulerAngles::test(glm::eulerAngleZXZ<value>, glm::extractEulerAngleZXZ<value>);
- Error += test_extractsEulerAngles::test(glm::eulerAngleXZY<value>, glm::extractEulerAngleXZY<value>);
- Error += test_extractsEulerAngles::test(glm::eulerAngleYZX<value>, glm::extractEulerAngleYZX<value>);
- Error += test_extractsEulerAngles::test(glm::eulerAngleZYX<value>, glm::extractEulerAngleZYX<value>);
- Error += test_extractsEulerAngles::test(glm::eulerAngleZXY<value>, glm::extractEulerAngleZXY<value>);
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_extend.cpp b/3rdparty/glm/source/test/gtx/gtx_extend.cpp
deleted file mode 100644
index 0c37df5..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_extend.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/extend.hpp>
-
-int main()
-{
- int Error(0);
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_extended_min_max.cpp b/3rdparty/glm/source/test/gtx/gtx_extended_min_max.cpp
deleted file mode 100644
index 3d20f10..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_extended_min_max.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-
-#include <glm/gtx/extended_min_max.hpp>
-#include <glm/gtc/vec1.hpp>
-#include <glm/gtc/constants.hpp>
-#include <glm/ext/scalar_relational.hpp>
-#include <glm/ext/vector_relational.hpp>
-
-// This file has divisions by zero to test isnan
-#if GLM_COMPILER & GLM_COMPILER_VC
-# pragma warning(disable : 4723)
-#endif
-
-namespace fmin_
-{
- static int test()
- {
- int Error = 0;
-
- float Zero_f = 0.0f;
- glm::vec1 A0 = glm::fmin(glm::vec1(1), glm::vec1(Zero_f / 0.0f));
- Error += glm::equal(A0.x, 1.0f, glm::epsilon<float>()) ? 0 : 1;
-
- glm::vec1 A1 = glm::fmin(glm::vec1(Zero_f / 0.0f), glm::vec1(1));
- Error += glm::equal(A1.x, 1.0f, glm::epsilon<float>()) ? 0 : 1;
-
- glm::vec2 B0 = glm::fmin(glm::vec2(1), glm::vec2(1));
- glm::vec2 B1 = glm::fmin(glm::vec2(1), 1.0f);
- bool B2 = glm::all(glm::equal(B0, B1, glm::epsilon<float>()));
- Error += B2 ? 0 : 1;
-
- glm::vec3 C0 = glm::fmin(glm::vec3(1), glm::vec3(1));
- glm::vec3 C1 = glm::fmin(glm::vec3(1), 1.0f);
- bool C2 = glm::all(glm::equal(C0, C1, glm::epsilon<float>()));
- Error += C2 ? 0 : 1;
-
- glm::vec4 D0 = glm::fmin(glm::vec4(1), glm::vec4(1));
- glm::vec4 D1 = glm::fmin(glm::vec4(1), 1.0f);
- bool D2 = glm::all(glm::equal(D0, D1, glm::epsilon<float>()));
- Error += D2 ? 0 : 1;
-
- return Error;
- }
-}//namespace fmin_
-
-namespace fmax_
-{
- static int test()
- {
- int Error = 0;
-
- float Zero_f = 0.0f;
- glm::vec1 A0 = glm::fmax(glm::vec1(1), glm::vec1(Zero_f / 0.0f));
- Error += glm::equal(A0.x, 1.0f, glm::epsilon<float>()) ? 0 : 1;
-
- glm::vec1 A1 = glm::fmax(glm::vec1(Zero_f / 0.0f), glm::vec1(1));
- Error += glm::equal(A0.x, 1.0f, glm::epsilon<float>()) ? 0 : 1;
-
- glm::vec2 B0 = glm::fmax(glm::vec2(1), glm::vec2(1));
- glm::vec2 B1 = glm::fmax(glm::vec2(1), 1.0f);
- bool B2 = glm::all(glm::equal(B0, B1, glm::epsilon<float>()));
- Error += B2 ? 0 : 1;
-
- glm::vec3 C0 = glm::fmax(glm::vec3(1), glm::vec3(1));
- glm::vec3 C1 = glm::fmax(glm::vec3(1), 1.0f);
- bool C2 = glm::all(glm::equal(C0, C1, glm::epsilon<float>()));
- Error += C2 ? 0 : 1;
-
- glm::vec4 D0 = glm::fmax(glm::vec4(1), glm::vec4(1));
- glm::vec4 D1 = glm::fmax(glm::vec4(1), 1.0f);
- bool D2 = glm::all(glm::equal(D0, D1, glm::epsilon<float>()));
- Error += D2 ? 0 : 1;
-
- return Error;
- }
-}//namespace fmax_
-
-namespace fclamp_
-{
- static int test()
- {
- int Error = 0;
-
- float Zero_f = 0.0f;
- glm::vec1 A0 = glm::fclamp(glm::vec1(1), glm::vec1(Zero_f / 0.0f), glm::vec1(2.0f));
- Error += glm::equal(A0.x, 1.0f, glm::epsilon<float>()) ? 0 : 1;
-
- return Error;
- }
-}//namespace fclamp_
-
-int main()
-{
- int Error = 0;
-
- Error += fmin_::test();
- Error += fmax_::test();
- Error += fclamp_::test();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_extented_min_max.cpp b/3rdparty/glm/source/test/gtx/gtx_extented_min_max.cpp
deleted file mode 100644
index c8c7847..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_extented_min_max.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////////
-/// OpenGL Mathematics (glm.g-truc.net)
-///
-/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
-/// Permission is hereby granted, free of charge, to any person obtaining a copy
-/// of this software and associated documentation files (the "Software"), to deal
-/// in the Software without restriction, including without limitation the rights
-/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-/// copies of the Software, and to permit persons to whom the Software is
-/// furnished to do so, subject to the following conditions:
-///
-/// The above copyright notice and this permission notice shall be included in
-/// all copies or substantial portions of the Software.
-///
-/// Restrictions:
-/// By making use of the Software for military purposes, you choose to make
-/// a Bunny unhappy.
-///
-/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-/// THE SOFTWARE.
-///
-/// @file test/gtx/gtx_extented_min_max.cpp
-/// @date 2013-10-25 / 2014-11-25
-/// @author Christophe Riccio
-///////////////////////////////////////////////////////////////////////////////////
-
-#include <glm/gtx/extended_min_max.hpp>
-
-int main()
-{
- int Error(0);
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_exterior_product.cpp b/3rdparty/glm/source/test/gtx/gtx_exterior_product.cpp
deleted file mode 100644
index a02c983..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_exterior_product.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <glm/gtx/exterior_product.hpp>
-#include <glm/gtc/epsilon.hpp>
-#include <glm/vec2.hpp>
-
-int main()
-{
- int Error = 0;
-
- float const f = glm::cross(glm::vec2(1.0f, 1.0f), glm::vec2(1.0f, 1.0f));
- Error += glm::epsilonEqual(f, 0.0f, 0.001f) ? 0 : 1;
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/gtx/gtx_fast_exponential.cpp b/3rdparty/glm/source/test/gtx/gtx_fast_exponential.cpp
deleted file mode 100644
index 341e26e..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_fast_exponential.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/fast_exponential.hpp>
-
-int main()
-{
- int Error(0);
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_fast_square_root.cpp b/3rdparty/glm/source/test/gtx/gtx_fast_square_root.cpp
deleted file mode 100644
index 80d7fe4..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_fast_square_root.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/fast_square_root.hpp>
-#include <glm/gtc/type_precision.hpp>
-#include <glm/gtc/epsilon.hpp>
-#include <glm/vector_relational.hpp>
-
-int test_fastInverseSqrt()
-{
- int Error = 0;
-
- Error += glm::epsilonEqual(glm::fastInverseSqrt(1.0f), 1.0f, 0.01f) ? 0 : 1;
- Error += glm::epsilonEqual(glm::fastInverseSqrt(1.0), 1.0, 0.01) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(glm::fastInverseSqrt(glm::vec2(1.0f)), glm::vec2(1.0f), 0.01f)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(glm::fastInverseSqrt(glm::dvec3(1.0)), glm::dvec3(1.0), 0.01)) ? 0 : 1;
- Error += glm::all(glm::epsilonEqual(glm::fastInverseSqrt(glm::dvec4(1.0)), glm::dvec4(1.0), 0.01)) ? 0 : 1;
-
- return Error;
-}
-
-int test_fastDistance()
-{
- int Error = 0;
-
- float const A = glm::fastDistance(0.0f, 1.0f);
- float const B = glm::fastDistance(glm::vec2(0.0f), glm::vec2(1.0f, 0.0f));
- float const C = glm::fastDistance(glm::vec3(0.0f), glm::vec3(1.0f, 0.0f, 0.0f));
- float const D = glm::fastDistance(glm::vec4(0.0f), glm::vec4(1.0f, 0.0f, 0.0f, 0.0f));
-
- Error += glm::epsilonEqual(A, 1.0f, 0.01f) ? 0 : 1;
- Error += glm::epsilonEqual(B, 1.0f, 0.01f) ? 0 : 1;
- Error += glm::epsilonEqual(C, 1.0f, 0.01f) ? 0 : 1;
- Error += glm::epsilonEqual(D, 1.0f, 0.01f) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_fastInverseSqrt();
- Error += test_fastDistance();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_fast_trigonometry.cpp b/3rdparty/glm/source/test/gtx/gtx_fast_trigonometry.cpp
deleted file mode 100644
index 8bf86ba..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_fast_trigonometry.cpp
+++ /dev/null
@@ -1,564 +0,0 @@
-#include <glm/ext/scalar_ulp.hpp>
-
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtc/type_precision.hpp>
-#include <glm/gtx/fast_trigonometry.hpp>
-#include <glm/gtx/integer.hpp>
-#include <glm/gtx/common.hpp>
-#include <glm/gtc/constants.hpp>
-#include <glm/gtc/vec1.hpp>
-#include <glm/trigonometric.hpp>
-#include <cmath>
-#include <ctime>
-#include <cstdio>
-#include <vector>
-
-namespace fastCos
-{
- int perf(bool NextFloat)
- {
- const float begin = -glm::pi<float>();
- const float end = glm::pi<float>();
- float result = 0.f;
-
- const std::clock_t timestamp1 = std::clock();
- for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
- result = glm::fastCos(i);
-
- const std::clock_t timestamp2 = std::clock();
- for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
- result = glm::cos(i);
-
- const std::clock_t timestamp3 = std::clock();
- const std::clock_t time_fast = timestamp2 - timestamp1;
- const std::clock_t time_default = timestamp3 - timestamp2;
- std::printf("fastCos Time %d clocks\n", static_cast<int>(time_fast));
- std::printf("cos Time %d clocks\n", static_cast<int>(time_default));
-
- return time_fast <= time_default ? 0 : 1;
- }
-}//namespace fastCos
-
-namespace fastSin
-{
- /*
- float sin(float x) {
- float temp;
- temp = (x + M_PI) / ((2 * M_PI) - M_PI);
- return limited_sin((x + M_PI) - ((2 * M_PI) - M_PI) * temp));
- }
- */
-
- int perf(bool NextFloat)
- {
- const float begin = -glm::pi<float>();
- const float end = glm::pi<float>();
- float result = 0.f;
-
- const std::clock_t timestamp1 = std::clock();
- for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
- result = glm::fastSin(i);
-
- const std::clock_t timestamp2 = std::clock();
- for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
- result = glm::sin(i);
-
- const std::clock_t timestamp3 = std::clock();
- const std::clock_t time_fast = timestamp2 - timestamp1;
- const std::clock_t time_default = timestamp3 - timestamp2;
- std::printf("fastSin Time %d clocks\n", static_cast<int>(time_fast));
- std::printf("sin Time %d clocks\n", static_cast<int>(time_default));
-
- return time_fast <= time_default ? 0 : 1;
- }
-}//namespace fastSin
-
-namespace fastTan
-{
- int perf(bool NextFloat)
- {
- const float begin = -glm::pi<float>();
- const float end = glm::pi<float>();
- float result = 0.f;
-
- const std::clock_t timestamp1 = std::clock();
- for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
- result = glm::fastTan(i);
-
- const std::clock_t timestamp2 = std::clock();
- for (float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
- result = glm::tan(i);
-
- const std::clock_t timestamp3 = std::clock();
- const std::clock_t time_fast = timestamp2 - timestamp1;
- const std::clock_t time_default = timestamp3 - timestamp2;
- std::printf("fastTan Time %d clocks\n", static_cast<int>(time_fast));
- std::printf("tan Time %d clocks\n", static_cast<int>(time_default));
-
- return time_fast <= time_default ? 0 : 1;
- }
-}//namespace fastTan
-
-namespace fastAcos
-{
- int perf(bool NextFloat)
- {
- const float begin = -glm::pi<float>();
- const float end = glm::pi<float>();
- float result = 0.f;
-
- const std::clock_t timestamp1 = std::clock();
- for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
- result = glm::fastAcos(i);
-
- const std::clock_t timestamp2 = std::clock();
- for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
- result = glm::acos(i);
-
- const std::clock_t timestamp3 = std::clock();
- const std::clock_t time_fast = timestamp2 - timestamp1;
- const std::clock_t time_default = timestamp3 - timestamp2;
-
- std::printf("fastAcos Time %d clocks\n", static_cast<int>(time_fast));
- std::printf("acos Time %d clocks\n", static_cast<int>(time_default));
-
- return time_fast <= time_default ? 0 : 1;
- }
-}//namespace fastAcos
-
-namespace fastAsin
-{
- int perf(bool NextFloat)
- {
- const float begin = -glm::pi<float>();
- const float end = glm::pi<float>();
- float result = 0.f;
- const std::clock_t timestamp1 = std::clock();
- for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
- result = glm::fastAsin(i);
- const std::clock_t timestamp2 = std::clock();
- for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
- result = glm::asin(i);
- const std::clock_t timestamp3 = std::clock();
- const std::clock_t time_fast = timestamp2 - timestamp1;
- const std::clock_t time_default = timestamp3 - timestamp2;
- std::printf("fastAsin Time %d clocks\n", static_cast<int>(time_fast));
- std::printf("asin Time %d clocks\n", static_cast<int>(time_default));
-
- return time_fast <= time_default ? 0 : 1;
- }
-}//namespace fastAsin
-
-namespace fastAtan
-{
- int perf(bool NextFloat)
- {
- const float begin = -glm::pi<float>();
- const float end = glm::pi<float>();
- float result = 0.f;
- const std::clock_t timestamp1 = std::clock();
- for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
- result = glm::fastAtan(i);
- const std::clock_t timestamp2 = std::clock();
- for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
- result = glm::atan(i);
- const std::clock_t timestamp3 = std::clock();
- const std::clock_t time_fast = timestamp2 - timestamp1;
- const std::clock_t time_default = timestamp3 - timestamp2;
- std::printf("fastAtan Time %d clocks\n", static_cast<int>(time_fast));
- std::printf("atan Time %d clocks\n", static_cast<int>(time_default));
-
- return time_fast <= time_default ? 0 : 1;
- }
-}//namespace fastAtan
-
-namespace taylorCos
-{
- using glm::qualifier;
- using glm::length_t;
-
- glm::vec4 const AngleShift(0.0f, glm::half_pi<float>(), glm::pi<float>(), glm::three_over_two_pi<float>());
-
- template<length_t L, typename T, qualifier Q>
- GLM_FUNC_QUALIFIER glm::vec<L, T, Q> taylorSeriesNewCos(glm::vec<L, T, Q> const& x)
- {
- glm::vec<L, T, Q> const Powed2(x * x);
- glm::vec<L, T, Q> const Powed4(Powed2 * Powed2);
- glm::vec<L, T, Q> const Powed6(Powed4 * Powed2);
- glm::vec<L, T, Q> const Powed8(Powed4 * Powed4);
-
- return static_cast<T>(1)
- - Powed2 * static_cast<T>(0.5)
- + Powed4 * static_cast<T>(0.04166666666666666666666666666667)
- - Powed6 * static_cast<T>(0.00138888888888888888888888888889)
- + Powed8 * static_cast<T>(2.4801587301587301587301587301587e-5);
- }
-
- template<length_t L, typename T, qualifier Q>
- GLM_FUNC_QUALIFIER glm::vec<L, T, Q> taylorSeriesNewCos6(glm::vec<L, T, Q> const& x)
- {
- glm::vec<L, T, Q> const Powed2(x * x);
- glm::vec<L, T, Q> const Powed4(Powed2 * Powed2);
- glm::vec<L, T, Q> const Powed6(Powed4 * Powed2);
-
- return static_cast<T>(1)
- - Powed2 * static_cast<T>(0.5)
- + Powed4 * static_cast<T>(0.04166666666666666666666666666667)
- - Powed6 * static_cast<T>(0.00138888888888888888888888888889);
- }
-
- template<glm::length_t L, qualifier Q>
- GLM_FUNC_QUALIFIER glm::vec<L, float, Q> fastAbs(glm::vec<L, float, Q> x)
- {
- int* Pointer = reinterpret_cast<int*>(&x[0]);
- Pointer[0] &= 0x7fffffff;
- Pointer[1] &= 0x7fffffff;
- Pointer[2] &= 0x7fffffff;
- Pointer[3] &= 0x7fffffff;
- return x;
- }
-
- template<glm::length_t L, typename T, qualifier Q>
- GLM_FUNC_QUALIFIER glm::vec<L, T, Q> fastCosNew(glm::vec<L, T, Q> const& x)
- {
- glm::vec<L, T, Q> const Angle0_PI(fastAbs(fmod(x + glm::pi<T>(), glm::two_pi<T>()) - glm::pi<T>()));
- return taylorSeriesNewCos6(x);
-/*
- vec<L, bool, Q> const FirstQuarterPi(lessThanEqual(Angle0_PI, vec<L, T, Q>(glm::half_pi<T>())));
-
- vec<L, T, Q> const RevertAngle(mix(vec<L, T, Q>(glm::pi<T>()), vec<L, T, Q>(0), FirstQuarterPi));
- vec<L, T, Q> const ReturnSign(mix(vec<L, T, Q>(-1), vec<L, T, Q>(1), FirstQuarterPi));
- vec<L, T, Q> const SectionAngle(RevertAngle - Angle0_PI);
-
- return ReturnSign * taylorSeriesNewCos(SectionAngle);
-*/
- }
-
- int perf_fastCosNew(float Begin, float End, std::size_t Samples)
- {
- std::vector<glm::vec4> Results;
- Results.resize(Samples);
-
- float const Steps = (End - Begin) / static_cast<float>(Samples);
-
- std::clock_t const TimeStampBegin = std::clock();
-
- for(std::size_t i = 0; i < Samples; ++i)
- Results[i] = fastCosNew(AngleShift + glm::vec4(Begin + Steps * static_cast<float>(i)));
-
- std::clock_t const TimeStampEnd = std::clock();
-
- std::printf("fastCosNew %d clocks\n", static_cast<int>(TimeStampEnd - TimeStampBegin));
-
- int Error = 0;
- for(std::size_t i = 0; i < Samples; ++i)
- Error += Results[i].x >= -1.0f && Results[i].x <= 1.0f ? 0 : 1;
- return Error;
- }
-
- template<length_t L, typename T, qualifier Q>
- GLM_FUNC_QUALIFIER glm::vec<L, T, Q> deterministic_fmod(glm::vec<L, T, Q> const& x, T y)
- {
- return x - y * trunc(x / y);
- }
-
- template<length_t L, typename T, qualifier Q>
- GLM_FUNC_QUALIFIER glm::vec<L, T, Q> fastCosDeterminisctic(glm::vec<L, T, Q> const& x)
- {
- glm::vec<L, T, Q> const Angle0_PI(abs(deterministic_fmod(x + glm::pi<T>(), glm::two_pi<T>()) - glm::pi<T>()));
- glm::vec<L, bool, Q> const FirstQuarterPi(lessThanEqual(Angle0_PI, glm::vec<L, T, Q>(glm::half_pi<T>())));
-
- glm::vec<L, T, Q> const RevertAngle(mix(glm::vec<L, T, Q>(glm::pi<T>()), glm::vec<L, T, Q>(0), FirstQuarterPi));
- glm::vec<L, T, Q> const ReturnSign(mix(glm::vec<L, T, Q>(-1), glm::vec<L, T, Q>(1), FirstQuarterPi));
- glm::vec<L, T, Q> const SectionAngle(RevertAngle - Angle0_PI);
-
- return ReturnSign * taylorSeriesNewCos(SectionAngle);
- }
-
- int perf_fastCosDeterminisctic(float Begin, float End, std::size_t Samples)
- {
- std::vector<glm::vec4> Results;
- Results.resize(Samples);
-
- float const Steps = (End - Begin) / static_cast<float>(Samples);
-
- std::clock_t const TimeStampBegin = std::clock();
-
- for(std::size_t i = 0; i < Samples; ++i)
- Results[i] = taylorCos::fastCosDeterminisctic(AngleShift + glm::vec4(Begin + Steps * static_cast<float>(i)));
-
- std::clock_t const TimeStampEnd = std::clock();
-
- std::printf("fastCosDeterminisctic %d clocks\n", static_cast<int>(TimeStampEnd - TimeStampBegin));
-
- int Error = 0;
- for(std::size_t i = 0; i < Samples; ++i)
- Error += Results[i].x >= -1.0f && Results[i].x <= 1.0f ? 0 : 1;
- return Error;
- }
-
- template<length_t L, typename T, qualifier Q>
- GLM_FUNC_QUALIFIER glm::vec<L, T, Q> taylorSeriesRefCos(glm::vec<L, T, Q> const& x)
- {
- return static_cast<T>(1)
- - (x * x) / glm::factorial(static_cast<T>(2))
- + (x * x * x * x) / glm::factorial(static_cast<T>(4))
- - (x * x * x * x * x * x) / glm::factorial(static_cast<T>(6))
- + (x * x * x * x * x * x * x * x) / glm::factorial(static_cast<T>(8));
- }
-
- template<length_t L, typename T, qualifier Q>
- GLM_FUNC_QUALIFIER glm::vec<L, T, Q> fastRefCos(glm::vec<L, T, Q> const& x)
- {
- glm::vec<L, T, Q> const Angle0_PI(glm::abs(fmod(x + glm::pi<T>(), glm::two_pi<T>()) - glm::pi<T>()));
-// return taylorSeriesRefCos(Angle0_PI);
-
- glm::vec<L, bool, Q> const FirstQuarterPi(lessThanEqual(Angle0_PI, glm::vec<L, T, Q>(glm::half_pi<T>())));
-
- glm::vec<L, T, Q> const RevertAngle(mix(glm::vec<L, T, Q>(glm::pi<T>()), glm::vec<L, T, Q>(0), FirstQuarterPi));
- glm::vec<L, T, Q> const ReturnSign(mix(glm::vec<L, T, Q>(-1), glm::vec<L, T, Q>(1), FirstQuarterPi));
- glm::vec<L, T, Q> const SectionAngle(RevertAngle - Angle0_PI);
-
- return ReturnSign * taylorSeriesRefCos(SectionAngle);
- }
-
- int perf_fastCosRef(float Begin, float End, std::size_t Samples)
- {
- std::vector<glm::vec4> Results;
- Results.resize(Samples);
-
- float const Steps = (End - Begin) / static_cast<float>(Samples);
-
- std::clock_t const TimeStampBegin = std::clock();
-
- for(std::size_t i = 0; i < Samples; ++i)
- Results[i] = taylorCos::fastRefCos(AngleShift + glm::vec4(Begin + Steps * static_cast<float>(i)));
-
- std::clock_t const TimeStampEnd = std::clock();
-
- std::printf("fastCosRef %d clocks\n", static_cast<int>(TimeStampEnd - TimeStampBegin));
-
- int Error = 0;
- for(std::size_t i = 0; i < Samples; ++i)
- Error += Results[i].x >= -1.0f && Results[i].x <= 1.0f ? 0 : 1;
- return Error;
- }
-
- int perf_fastCosOld(float Begin, float End, std::size_t Samples)
- {
- std::vector<glm::vec4> Results;
- Results.resize(Samples);
-
- float const Steps = (End - Begin) / static_cast<float>(Samples);
-
- std::clock_t const TimeStampBegin = std::clock();
-
- for(std::size_t i = 0; i < Samples; ++i)
- Results[i] = glm::fastCos(AngleShift + glm::vec4(Begin + Steps * static_cast<float>(i)));
-
- std::clock_t const TimeStampEnd = std::clock();
-
- std::printf("fastCosOld %d clocks\n", static_cast<int>(TimeStampEnd - TimeStampBegin));
-
- int Error = 0;
- for(std::size_t i = 0; i < Samples; ++i)
- Error += Results[i].x >= -1.0f && Results[i].x <= 1.0f ? 0 : 1;
- return Error;
- }
-
- int perf_cos(float Begin, float End, std::size_t Samples)
- {
- std::vector<glm::vec4> Results;
- Results.resize(Samples);
-
- float const Steps = (End - Begin) / static_cast<float>(Samples);
-
- std::clock_t const TimeStampBegin = std::clock();
-
- for(std::size_t i = 0; i < Samples; ++i)
- Results[i] = glm::cos(AngleShift + glm::vec4(Begin + Steps * static_cast<float>(i)));
-
- std::clock_t const TimeStampEnd = std::clock();
-
- std::printf("cos %d clocks\n", static_cast<int>(TimeStampEnd - TimeStampBegin));
-
- int Error = 0;
- for(std::size_t i = 0; i < Samples; ++i)
- Error += Results[i].x >= -1.0f && Results[i].x <= 1.0f ? 0 : 1;
- return Error;
- }
-
- int perf(std::size_t const Samples)
- {
- int Error = 0;
-
- float const Begin = -glm::pi<float>();
- float const End = glm::pi<float>();
-
- Error += perf_cos(Begin, End, Samples);
- Error += perf_fastCosOld(Begin, End, Samples);
- Error += perf_fastCosRef(Begin, End, Samples);
- //Error += perf_fastCosNew(Begin, End, Samples);
- Error += perf_fastCosDeterminisctic(Begin, End, Samples);
-
- return Error;
- }
-
- int test()
- {
- int Error = 0;
-
- //for(float Angle = -4.0f * glm::pi<float>(); Angle < 4.0f * glm::pi<float>(); Angle += 0.1f)
- //for(float Angle = -720.0f; Angle < 720.0f; Angle += 0.1f)
- for(float Angle = 0.0f; Angle < 180.0f; Angle += 0.1f)
- {
- float const modAngle = std::fmod(glm::abs(Angle), 360.f);
- assert(modAngle >= 0.0f && modAngle <= 360.f);
- float const radAngle = glm::radians(modAngle);
- float const Cos0 = std::cos(radAngle);
-
- float const Cos1 = taylorCos::fastRefCos(glm::fvec1(radAngle)).x;
- Error += glm::abs(Cos1 - Cos0) < 0.1f ? 0 : 1;
-
- //float const Cos2 = taylorCos::fastCosNew(glm::fvec1(radAngle)).x;
- //Error += glm::abs(Cos2 - Cos0) < 0.1f ? 0 : 1;
-
- assert(!Error);
- }
-
- return Error;
- }
-}//namespace taylorCos
-
-namespace taylor2
-{
- glm::vec4 const AngleShift(0.0f, glm::pi<float>() * 0.5f, glm::pi<float>() * 1.0f, glm::pi<float>() * 1.5f);
-
- float taylorCosA(float x)
- {
- return 1.f
- - (x * x) * (1.f / 2.f)
- + (x * x * x * x) * (1.f / 24.f)
- - (x * x * x * x * x * x) * (1.f / 720.f)
- + (x * x * x * x * x * x * x * x) * (1.f / 40320.f);
- }
-
- float taylorCosB(float x)
- {
- return 1.f
- - (x * x) * (1.f / 2.f)
- + (x * x * x * x) * (1.f / 24.f)
- - (x * x * x * x * x * x) * (1.f / 720.f)
- + (x * x * x * x * x * x * x * x) * (1.f / 40320.f);
- }
-
- float taylorCosC(float x)
- {
- return 1.f
- - (x * x) * (1.f / 2.f)
- + ((x * x) * (x * x)) * (1.f / 24.f)
- - (((x * x) * (x * x)) * (x * x)) * (1.f / 720.f)
- + (((x * x) * (x * x)) * ((x * x) * (x * x))) * (1.f / 40320.f);
- }
-
- int perf_taylorCosA(float Begin, float End, std::size_t Samples)
- {
- std::vector<float> Results;
- Results.resize(Samples);
-
- float const Steps = (End - Begin) / static_cast<float>(Samples);
-
- std::clock_t const TimeStampBegin = std::clock();
-
- for(std::size_t i = 0; i < Samples; ++i)
- Results[i] = taylorCosA(AngleShift.x + Begin + Steps * static_cast<float>(i));
-
- std::clock_t const TimeStampEnd = std::clock();
-
- std::printf("taylorCosA %d clocks\n", static_cast<int>(TimeStampEnd - TimeStampBegin));
-
- int Error = 0;
- for(std::size_t i = 0; i < Samples; ++i)
- Error += Results[i] >= -1.0f && Results[i] <= 1.0f ? 0 : 1;
- return Error;
- }
-
- int perf_taylorCosB(float Begin, float End, std::size_t Samples)
- {
- std::vector<float> Results;
- Results.resize(Samples);
-
- float const Steps = (End - Begin) / static_cast<float>(Samples);
-
- std::clock_t const TimeStampBegin = std::clock();
-
- for(std::size_t i = 0; i < Samples; ++i)
- Results[i] = taylorCosB(AngleShift.x + Begin + Steps * static_cast<float>(i));
-
- std::clock_t const TimeStampEnd = std::clock();
-
- std::printf("taylorCosB %d clocks\n", static_cast<int>(TimeStampEnd - TimeStampBegin));
-
- int Error = 0;
- for(std::size_t i = 0; i < Samples; ++i)
- Error += Results[i] >= -1.0f && Results[i] <= 1.0f ? 0 : 1;
- return Error;
- }
-
- int perf_taylorCosC(float Begin, float End, std::size_t Samples)
- {
- std::vector<float> Results;
- Results.resize(Samples);
-
- float const Steps = (End - Begin) / static_cast<float>(Samples);
-
- std::clock_t const TimeStampBegin = std::clock();
-
- for(std::size_t i = 0; i < Samples; ++i)
- Results[i] = taylorCosC(AngleShift.x + Begin + Steps * static_cast<float>(i));
-
- std::clock_t const TimeStampEnd = std::clock();
-
- std::printf("taylorCosC %d clocks\n", static_cast<int>(TimeStampEnd - TimeStampBegin));
-
- int Error = 0;
- for(std::size_t i = 0; i < Samples; ++i)
- Error += Results[i] >= -1.0f && Results[i] <= 1.0f ? 0 : 1;
- return Error;
- }
-
- int perf(std::size_t Samples)
- {
- int Error = 0;
-
- float const Begin = -glm::pi<float>();
- float const End = glm::pi<float>();
-
- Error += perf_taylorCosA(Begin, End, Samples);
- Error += perf_taylorCosB(Begin, End, Samples);
- Error += perf_taylorCosC(Begin, End, Samples);
-
- return Error;
- }
-
-}//namespace taylor2
-
-int main()
-{
- int Error(0);
-
- Error += ::taylor2::perf(1000);
- Error += ::taylorCos::test();
- Error += ::taylorCos::perf(1000);
-
-# ifdef NDEBUG
- ::fastCos::perf(false);
- ::fastSin::perf(false);
- ::fastTan::perf(false);
- ::fastAcos::perf(false);
- ::fastAsin::perf(false);
- ::fastAtan::perf(false);
-# endif//NDEBUG
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_functions.cpp b/3rdparty/glm/source/test/gtx/gtx_functions.cpp
deleted file mode 100644
index 48a6af0..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_functions.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <glm/gtx/functions.hpp>
-#include <glm/ext/vector_float2.hpp>
-#include <vector>
-
-int test_gauss_1d()
-{
- int Error = 0;
-
- std::vector<float> Result(20);
- for(std::size_t i = 0, n = Result.size(); i < n; ++i)
- Result[i] = glm::gauss(static_cast<float>(i) * 0.1f, 0.0f, 1.0f);
-
- return Error;
-}
-
-int test_gauss_2d()
-{
- int Error = 0;
-
- std::vector<float> Result(20);
- for(std::size_t i = 0, n = Result.size(); i < n; ++i)
- Result[i] = glm::gauss(glm::vec2(static_cast<float>(i)) * 0.1f, glm::vec2(0.0f), glm::vec2(1.0f));
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_gauss_1d();
- Error += test_gauss_2d();
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/gtx/gtx_gradient_paint.cpp b/3rdparty/glm/source/test/gtx/gtx_gradient_paint.cpp
deleted file mode 100644
index 01f521b..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_gradient_paint.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/gradient_paint.hpp>
-
-int test_radialGradient()
-{
- int Error = 0;
-
- float Gradient = glm::radialGradient(glm::vec2(0), 1.0f, glm::vec2(1), glm::vec2(0.5));
- Error += Gradient != 0.0f ? 0 : 1;
-
- return Error;
-}
-
-int test_linearGradient()
-{
- int Error = 0;
-
- float Gradient = glm::linearGradient(glm::vec2(0), glm::vec2(1), glm::vec2(0.5));
- Error += Gradient != 0.0f ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_radialGradient();
- Error += test_linearGradient();
-
- return Error;
-}
-
-
diff --git a/3rdparty/glm/source/test/gtx/gtx_handed_coordinate_space.cpp b/3rdparty/glm/source/test/gtx/gtx_handed_coordinate_space.cpp
deleted file mode 100644
index e417688..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_handed_coordinate_space.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/handed_coordinate_space.hpp>
-
-int main()
-{
- int Error(0);
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_int_10_10_10_2.cpp b/3rdparty/glm/source/test/gtx/gtx_int_10_10_10_2.cpp
deleted file mode 100644
index ab59bb2..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_int_10_10_10_2.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////////////////////////
-// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
-///////////////////////////////////////////////////////////////////////////////////////////////////
-// Created : 2013-10-25
-// Updated : 2013-10-25
-// Licence : This source is under MIT licence
-// File : test/gtx/associated_min_max.cpp
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-#include <glm/gtc/type_precision.hpp>
-#include <glm/gtx/associated_min_max.hpp>
-
-int main()
-{
- int Error(0);
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_integer.cpp b/3rdparty/glm/source/test/gtx/gtx_integer.cpp
deleted file mode 100644
index 4c4225d..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_integer.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/exponential.hpp>
-#include <glm/gtc/epsilon.hpp>
-#include <glm/gtx/integer.hpp>
-#include <cstdio>
-/*
-int test_floor_log2()
-{
- int Error = 0;
-
- for(std::size_t i = 1; i < 1000000; ++i)
- {
- glm::uint A = glm::floor_log2(glm::uint(i));
- glm::uint B = glm::uint(glm::floor(glm::log2(double(i)))); // Will fail with float, lack of accuracy
-
- Error += A == B ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-*/
-int test_log2()
-{
- int Error = 0;
-
- for(std::size_t i = 1; i < 24; ++i)
- {
- glm::uint A = glm::log2(glm::uint(1 << i));
- glm::uint B = glm::uint(glm::log2(double(1 << i)));
-
- //Error += glm::equalEpsilon(double(A), B, 1.0) ? 0 : 1;
- Error += glm::abs(double(A) - B) <= 24 ? 0 : 1;
- assert(!Error);
-
- std::printf("Log2(%d) error A=%d, B=%d\n", 1 << i, A, B);
- }
-
- std::printf("log2 error=%d\n", Error);
-
- return Error;
-}
-
-int test_nlz()
-{
- int Error = 0;
-
- for(glm::uint i = 1; i < glm::uint(33); ++i)
- Error += glm::nlz(i) == glm::uint(31u) - glm::findMSB(i) ? 0 : 1;
- //printf("%d, %d\n", glm::nlz(i), 31u - glm::findMSB(i));
-
- return Error;
-}
-
-int test_pow_uint()
-{
- int Error = 0;
-
- glm::uint const p0 = glm::pow(2u, 0u);
- Error += p0 == 1u ? 0 : 1;
-
- glm::uint const p1 = glm::pow(2u, 1u);
- Error += p1 == 2u ? 0 : 1;
-
- glm::uint const p2 = glm::pow(2u, 2u);
- Error += p2 == 4u ? 0 : 1;
-
- return Error;
-}
-
-int test_pow_int()
-{
- int Error = 0;
-
- int const p0 = glm::pow(2, 0u);
- Error += p0 == 1 ? 0 : 1;
-
- int const p1 = glm::pow(2, 1u);
- Error += p1 == 2 ? 0 : 1;
-
- int const p2 = glm::pow(2, 2u);
- Error += p2 == 4 ? 0 : 1;
-
- int const p0n = glm::pow(-2, 0u);
- Error += p0n == -1 ? 0 : 1;
-
- int const p1n = glm::pow(-2, 1u);
- Error += p1n == -2 ? 0 : 1;
-
- int const p2n = glm::pow(-2, 2u);
- Error += p2n == 4 ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_nlz();
-// Error += test_floor_log2();
- Error += test_log2();
- Error += test_pow_uint();
- Error += test_pow_int();
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/gtx/gtx_intersect.cpp b/3rdparty/glm/source/test/gtx/gtx_intersect.cpp
deleted file mode 100644
index c4a1b2a..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_intersect.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/glm.hpp>
-#include <glm/gtc/epsilon.hpp>
-#include <glm/gtx/intersect.hpp>
-
-int test_intersectRayPlane()
-{
- int Error = 0;
- glm::vec3 const PlaneOrigin(0, 0, 1);
- glm::vec3 const PlaneNormal(0, 0, -1);
- glm::vec3 const RayOrigin(0, 0, 0);
- glm::vec3 const RayDir(0, 0, 1);
-
- // check that inversion of the plane normal has no effect
- {
- float Distance = 0;
- bool const Result = glm::intersectRayPlane(RayOrigin, RayDir, PlaneOrigin, PlaneNormal, Distance);
- Error += glm::abs(Distance - 1.f) <= std::numeric_limits<float>::epsilon() ? 0 : 1;
- Error += Result ? 0 : 1;
- }
- {
- float Distance = 0;
- bool const Result = glm::intersectRayPlane(RayOrigin, RayDir, PlaneOrigin, -1.f * PlaneNormal, Distance);
- Error += glm::abs(Distance - 1.f) <= std::numeric_limits<float>::epsilon() ? 0 : 1;
- Error += Result ? 0 : 1;
- }
-
- // check if plane is before of behind the ray origin
- {
- float Distance = 9.9999f; // value should not be changed
- bool const Result = glm::intersectRayPlane(RayOrigin, RayDir, -1.f * PlaneOrigin, PlaneNormal, Distance);
- Error += glm::abs(Distance - 9.9999f) <= std::numeric_limits<float>::epsilon() ? 0 : 1;
- Error += Result ? 1 : 0; // there is no intersection in front of the ray origin, only behind
- }
-
- return Error;
-}
-
-int test_intersectRayTriangle()
-{
- int Error = 0;
-
- glm::vec3 const Orig(0, 0, 2);
- glm::vec3 const Dir(0, 0, -1);
- glm::vec3 const Vert0(0, 0, 0);
- glm::vec3 const Vert1(-1, -1, 0);
- glm::vec3 const Vert2(1, -1, 0);
- glm::vec2 BaryPosition(0);
- float Distance = 0;
-
- bool const Result = glm::intersectRayTriangle(Orig, Dir, Vert0, Vert1, Vert2, BaryPosition, Distance);
-
- Error += glm::all(glm::epsilonEqual(BaryPosition, glm::vec2(0), std::numeric_limits<float>::epsilon())) ? 0 : 1;
- Error += glm::abs(Distance - 2.f) <= std::numeric_limits<float>::epsilon() ? 0 : 1;
- Error += Result ? 0 : 1;
-
- return Error;
-}
-
-int test_intersectLineTriangle()
-{
- int Error = 0;
-
- glm::vec3 const Orig(0, 0, 2);
- glm::vec3 const Dir(0, 0, -1);
- glm::vec3 const Vert0(0, 0, 0);
- glm::vec3 const Vert1(-1, -1, 0);
- glm::vec3 const Vert2(1, -1, 0);
- glm::vec3 Position(2.0f, 0.0f, 0.0f);
-
- bool const Result = glm::intersectLineTriangle(Orig, Dir, Vert0, Vert1, Vert2, Position);
-
- Error += glm::all(glm::epsilonEqual(Position, glm::vec3(2.0f, 0.0f, 0.0f), std::numeric_limits<float>::epsilon())) ? 0 : 1;
- Error += Result ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_intersectRayPlane();
- Error += test_intersectRayTriangle();
- Error += test_intersectLineTriangle();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_io.cpp b/3rdparty/glm/source/test/gtx/gtx_io.cpp
deleted file mode 100644
index 7d90fd7..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_io.cpp
+++ /dev/null
@@ -1,186 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/glm.hpp>
-#if GLM_LANG & GLM_LANG_CXXMS_FLAG
-#include <glm/gtc/type_precision.hpp>
-#include <glm/gtx/io.hpp>
-#include <iostream>
-#include <sstream>
-#include <typeinfo>
-
-namespace
-{
- template<typename CTy, typename CTr>
- std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, glm::qualifier const& a)
- {
- typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
-
- if (cerberus)
- {
- switch (a) {
- case glm::highp: os << "uhi"; break;
- case glm::mediump: os << "umd"; break;
- case glm::lowp: os << "ulo"; break;
-# if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE
- case glm::aligned_highp: os << "ahi"; break;
- case glm::aligned_mediump: os << "amd"; break;
- case glm::aligned_lowp: os << "alo"; break;
-# endif
- }
- }
-
- return os;
- }
-
- template<typename U, glm::qualifier P, typename T, typename CTy, typename CTr>
- std::basic_string<CTy> type_name(std::basic_ostream<CTy,CTr>&, T const&)
- {
- std::basic_ostringstream<CTy,CTr> ostr;
-
- if (typeid(T) == typeid(glm::qua<U,P>)) { ostr << "quat"; }
- else if (typeid(T) == typeid(glm::vec<2, U,P>)) { ostr << "vec2"; }
- else if (typeid(T) == typeid(glm::vec<3, U,P>)) { ostr << "vec3"; }
- else if (typeid(T) == typeid(glm::vec<4, U,P>)) { ostr << "vec4"; }
- else if (typeid(T) == typeid(glm::mat<2, 2, U,P>)) { ostr << "mat2x2"; }
- else if (typeid(T) == typeid(glm::mat<2, 3, U,P>)) { ostr << "mat2x3"; }
- else if (typeid(T) == typeid(glm::mat<2, 4, U,P>)) { ostr << "mat2x4"; }
- else if (typeid(T) == typeid(glm::mat<3, 2, U,P>)) { ostr << "mat3x2"; }
- else if (typeid(T) == typeid(glm::mat<3, 3, U,P>)) { ostr << "mat3x3"; }
- else if (typeid(T) == typeid(glm::mat<3, 4, U,P>)) { ostr << "mat3x4"; }
- else if (typeid(T) == typeid(glm::mat<4, 2, U,P>)) { ostr << "mat4x2"; }
- else if (typeid(T) == typeid(glm::mat<4, 3, U,P>)) { ostr << "mat4x3"; }
- else if (typeid(T) == typeid(glm::mat<4, 4, U,P>)) { ostr << "mat4x4"; }
- else { ostr << "unknown"; }
-
- ostr << '<' << typeid(U).name() << ',' << P << '>';
-
- return ostr.str();
- }
-} // namespace {
-
-template<typename T, glm::qualifier P, typename OS>
-int test_io_quat(OS& os)
-{
- os << '\n' << typeid(OS).name() << '\n';
-
- glm::qua<T, P> const q(1, 0, 0, 0);
-
- {
- glm::io::basic_format_saver<typename OS::char_type> const iofs(os);
-
- os << glm::io::precision(2) << glm::io::width(1 + 2 + 1 + 2)
- << type_name<T, P>(os, q) << ": " << q << '\n';
- }
-
- {
- glm::io::basic_format_saver<typename OS::char_type> const iofs(os);
-
- os << glm::io::unformatted
- << type_name<T, P>(os, q) << ": " << q << '\n';
- }
-
- return 0;
-}
-
-template<typename T, glm::qualifier P, typename OS>
-int test_io_vec(OS& os)
-{
- os << '\n' << typeid(OS).name() << '\n';
-
- glm::vec<2, T,P> const v2(0, 1);
- glm::vec<3, T,P> const v3(2, 3, 4);
- glm::vec<4, T,P> const v4(5, 6, 7, 8);
-
- os << type_name<T,P>(os, v2) << ": " << v2 << '\n'
- << type_name<T,P>(os, v3) << ": " << v3 << '\n'
- << type_name<T,P>(os, v4) << ": " << v4 << '\n';
-
- glm::io::basic_format_saver<typename OS::char_type> const iofs(os);
-
- os << glm::io::precision(2) << glm::io::width(1 + 2 + 1 + 2)
- << type_name<T,P>(os, v2) << ": " << v2 << '\n'
- << type_name<T,P>(os, v3) << ": " << v3 << '\n'
- << type_name<T,P>(os, v4) << ": " << v4 << '\n';
-
- return 0;
-}
-
-template<typename T, glm::qualifier P, typename OS>
-int test_io_mat(OS& os, glm::io::order_type otype)
-{
- os << '\n' << typeid(OS).name() << '\n';
-
- glm::vec<2, T,P> const v2_1( 0, 1);
- glm::vec<2, T,P> const v2_2( 2, 3);
- glm::vec<2, T,P> const v2_3( 4, 5);
- glm::vec<2, T,P> const v2_4( 6, 7);
- glm::vec<3, T,P> const v3_1( 8, 9, 10);
- glm::vec<3, T,P> const v3_2(11, 12, 13);
- glm::vec<3, T,P> const v3_3(14, 15, 16);
- glm::vec<3, T,P> const v3_4(17, 18, 19);
- glm::vec<4, T,P> const v4_1(20, 21, 22, 23);
- glm::vec<4, T,P> const v4_2(24, 25, 26, 27);
- glm::vec<4, T,P> const v4_3(28, 29, 30, 31);
- glm::vec<4, T,P> const v4_4(32, 33, 34, 35);
-
- glm::io::basic_format_saver<typename OS::char_type> const iofs(os);
-
- os << glm::io::precision(2) << glm::io::width(1 + 2 + 1 + 2)
- << glm::io::order(otype)
- << "mat2x2<" << typeid(T).name() << ',' << P << ">: " << glm::mat<2, 2, T,P>(v2_1, v2_2) << '\n'
- << "mat2x3<" << typeid(T).name() << ',' << P << ">: " << glm::mat<2, 3, T,P>(v3_1, v3_2) << '\n'
- << "mat2x4<" << typeid(T).name() << ',' << P << ">: " << glm::mat<2, 4, T,P>(v4_1, v4_2) << '\n'
- << "mat3x2<" << typeid(T).name() << ',' << P << ">: " << glm::mat<3, 2, T,P>(v2_1, v2_2, v2_3) << '\n'
- << "mat3x3<" << typeid(T).name() << ',' << P << ">: " << glm::mat<3, 3, T,P>(v3_1, v3_2, v3_3) << '\n'
- << "mat3x4<" << typeid(T).name() << ',' << P << ">: " << glm::mat<3, 4, T,P>(v4_1, v4_2, v4_3) << '\n'
- << "mat4x2<" << typeid(T).name() << ',' << P << ">: " << glm::mat<4, 2, T,P>(v2_1, v2_2, v2_3, v2_4) << '\n'
- << "mat4x3<" << typeid(T).name() << ',' << P << ">: " << glm::mat<4, 3, T,P>(v3_1, v3_2, v3_3, v3_4) << '\n'
- << "mat4x4<" << typeid(T).name() << ',' << P << ">: " << glm::mat<4, 4, T,P>(v4_1, v4_2, v4_3, v4_4) << '\n';
-
- os << glm::io::unformatted
- << glm::io::order(otype)
- << "mat2x2<" << typeid(T).name() << ',' << P << ">: " << glm::mat<2, 2, T,P>(v2_1, v2_2) << '\n'
- << "mat2x3<" << typeid(T).name() << ',' << P << ">: " << glm::mat<2, 3, T,P>(v3_1, v3_2) << '\n'
- << "mat2x4<" << typeid(T).name() << ',' << P << ">: " << glm::mat<2, 4, T,P>(v4_1, v4_2) << '\n'
- << "mat3x2<" << typeid(T).name() << ',' << P << ">: " << glm::mat<3, 2, T,P>(v2_1, v2_2, v2_3) << '\n'
- << "mat3x3<" << typeid(T).name() << ',' << P << ">: " << glm::mat<3, 3, T,P>(v3_1, v3_2, v3_3) << '\n'
- << "mat3x4<" << typeid(T).name() << ',' << P << ">: " << glm::mat<3, 4, T,P>(v4_1, v4_2, v4_3) << '\n'
- << "mat4x2<" << typeid(T).name() << ',' << P << ">: " << glm::mat<4, 2, T,P>(v2_1, v2_2, v2_3, v2_4) << '\n'
- << "mat4x3<" << typeid(T).name() << ',' << P << ">: " << glm::mat<4, 3, T,P>(v3_1, v3_2, v3_3, v3_4) << '\n'
- << "mat4x4<" << typeid(T).name() << ',' << P << ">: " << glm::mat<4, 4, T,P>(v4_1, v4_2, v4_3, v4_4) << '\n';
-
- return 0;
-}
-
-int main()
-{
- int Error(0);
-
- Error += test_io_quat<float, glm::highp>(std::cout);
- Error += test_io_quat<float, glm::highp>(std::wcout);
- Error += test_io_quat<int, glm::mediump>(std::cout);
- Error += test_io_quat<int, glm::mediump>(std::wcout);
- Error += test_io_quat<glm::uint, glm::lowp>(std::cout);
- Error += test_io_quat<glm::uint, glm::lowp>(std::wcout);
-
- Error += test_io_vec<float, glm::highp>(std::cout);
- Error += test_io_vec<float, glm::highp>(std::wcout);
- Error += test_io_vec<int, glm::mediump>(std::cout);
- Error += test_io_vec<int, glm::mediump>(std::wcout);
- Error += test_io_vec<glm::uint, glm::lowp>(std::cout);
- Error += test_io_vec<glm::uint, glm::lowp>(std::wcout);
-
- Error += test_io_mat<float, glm::highp>(std::cout, glm::io::column_major);
- Error += test_io_mat<float, glm::lowp>(std::wcout, glm::io::column_major);
- Error += test_io_mat<float, glm::highp>(std::cout, glm::io::row_major);
- Error += test_io_mat<float, glm::lowp>(std::wcout, glm::io::row_major);
-
- return Error;
-}
-#else
-
-int main()
-{
- return 0;
-}
-
-#endif// GLM_LANG & GLM_LANG_CXXMS_FLAG
diff --git a/3rdparty/glm/source/test/gtx/gtx_load.cpp b/3rdparty/glm/source/test/gtx/gtx_load.cpp
deleted file mode 100644
index 1467b9b..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_load.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/glm.hpp>
-/*
-#if GLM_CONFIG_SIMD == GLM_ENABLE
-
-#include <glm/gtx/common.hpp>
-#include <glm/gtc/integer.hpp>
-#include <glm/gtc/epsilon.hpp>
-#include <glm/gtc/type_aligned.hpp>
-#include <glm/ext/vector_relational.hpp>
-
-namespace glm
-{
- enum genTypeEnum
- {
- QUALIFIER_HIGHP,
- QUALIFIER_MEDIUMP,
- QUALIFIER_LOWP
- };
-
- template <typename genType>
- struct genTypeTrait
- {};
-
- template <length_t L, typename T>
- struct genTypeTrait<vec<L, T, aligned_highp> >
- {
- static const genTypeEnum GENTYPE = QUALIFIER_HIGHP;
- };
-
- template <length_t L, typename T>
- struct genTypeTrait<vec<L, T, aligned_mediump> >
- {
- static const genTypeEnum GENTYPE = QUALIFIER_MEDIUMP;
- };
-
- template <length_t L, typename T>
- struct genTypeTrait<vec<L, T, aligned_lowp> >
- {
- static const genTypeEnum GENTYPE = QUALIFIER_LOWP;
- };
-
- template<length_t L, typename T, qualifier Q, bool isAligned>
- struct load_gentype
- {
-
- };
-
-# if GLM_ARCH & GLM_ARCH_SSE_BIT
- template<qualifier Q>
- struct load_gentype<4, float, Q, true>
- {
- GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<4, float, Q> load(float const* Mem)
- {
- vec<4, float, Q> Result;
- Result.data = _mm_loadu_ps(Mem);
- return Result;
- }
- };
-# endif//GLM_ARCH & GLM_ARCH_SSE_BIT
-
- template<typename genType>
- GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType example_identity()
- {
- return detail::init_gentype<genType, detail::genTypeTrait<genType>::GENTYPE>::identity();
- }
-
- template <typename genType, typename valType>
- genType load(valType const* Mem)
- {
-
- }
-
- aligned_vec4 loadu(float const* Mem)
- {
- aligned_vec4 Result;
-# if GLM_ARCH & GLM_ARCH_SSE_BIT
- Result.data = _mm_loadu_ps(Mem);
-# else
- Result[0] = *(Mem + 0);
- Result[1] = *(Mem + 1);
- Result[2] = *(Mem + 2);
- Result[3] = *(Mem + 3);
-# endif//GLM_ARCH & GLM_ARCH_SSE_BIT
- return Result;
- }
-
- aligned_vec4 loada(float const* Mem)
- {
- aligned_vec4 Result;
-# if GLM_ARCH & GLM_ARCH_SSE_BIT
- Result.data = _mm_load_ps(Mem);
-# else
- Result[0] = *(Mem + 0);
- Result[1] = *(Mem + 1);
- Result[2] = *(Mem + 2);
- Result[3] = *(Mem + 3);
-# endif//GLM_ARCH & GLM_ARCH_SSE_BIT
- return Result;
- }
-}//namespace glm
-
-int test_vec4_load()
-{
- int Error = 0;
-
- float Data[] = {1.f, 2.f, 3.f, 4.f};
- glm::aligned_vec4 const V = glm::loadu(Data);
- Error += glm::all(glm::equal(V, glm::aligned_vec4(1.f, 2.f, 3.f, 4.f), glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-#endif
-*/
-int main()
-{
- int Error = 0;
-/*
-# if GLM_CONFIG_SIMD == GLM_ENABLE
- Error += test_vec4_load();
-# endif
-*/
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_log_base.cpp b/3rdparty/glm/source/test/gtx/gtx_log_base.cpp
deleted file mode 100644
index 37c7464..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_log_base.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/log_base.hpp>
-#include <glm/gtc/vec1.hpp>
-#include <glm/gtc/epsilon.hpp>
-#include <glm/exponential.hpp>
-
-namespace test_log
-{
- int run()
- {
- int Error = 0;
-
- {
- float A = glm::log(10.f, 2.0f);
- float B = glm::log2(10.f);
- Error += glm::epsilonEqual(A, B, 0.00001f) ? 0 : 1;
- }
-
- {
- glm::vec1 A = glm::log(glm::vec1(10.f), glm::vec1(2.0f));
- glm::vec1 B = glm::log2(glm::vec1(10.f));
- Error += glm::all(glm::epsilonEqual(A, B, glm::vec1(0.00001f))) ? 0 : 1;
- }
-
- {
- glm::vec2 A = glm::log(glm::vec2(10.f), glm::vec2(2.0f));
- glm::vec2 B = glm::log2(glm::vec2(10.f));
- Error += glm::all(glm::epsilonEqual(A, B, glm::vec2(0.00001f))) ? 0 : 1;
- }
-
- {
- glm::vec3 A = glm::log(glm::vec3(10.f), glm::vec3(2.0f));
- glm::vec3 B = glm::log2(glm::vec3(10.f));
- Error += glm::all(glm::epsilonEqual(A, B, glm::vec3(0.00001f))) ? 0 : 1;
- }
-
- {
- glm::vec4 A = glm::log(glm::vec4(10.f), glm::vec4(2.0f));
- glm::vec4 B = glm::log2(glm::vec4(10.f));
- Error += glm::all(glm::epsilonEqual(A, B, glm::vec4(0.00001f))) ? 0 : 1;
- }
-
- return Error;
- }
-}//namespace test_log
-
-int main()
-{
- int Error(0);
-
- Error += test_log::run();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_matrix_cross_product.cpp b/3rdparty/glm/source/test/gtx/gtx_matrix_cross_product.cpp
deleted file mode 100644
index c1d0fa9..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_matrix_cross_product.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/matrix_cross_product.hpp>
-
-int main()
-{
- int Error(0);
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_matrix_decompose.cpp b/3rdparty/glm/source/test/gtx/gtx_matrix_decompose.cpp
deleted file mode 100644
index 5a1884e..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_matrix_decompose.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/matrix_decompose.hpp>
-
-int main()
-{
- int Error(0);
-
- glm::mat4 Matrix(1);
-
- glm::vec3 Scale;
- glm::quat Orientation;
- glm::vec3 Translation;
- glm::vec3 Skew(1);
- glm::vec4 Perspective(1);
-
- glm::decompose(Matrix, Scale, Orientation, Translation, Skew, Perspective);
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_matrix_factorisation.cpp b/3rdparty/glm/source/test/gtx/gtx_matrix_factorisation.cpp
deleted file mode 100644
index 6771dba..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_matrix_factorisation.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/matrix_factorisation.hpp>
-#include <glm/gtc/constants.hpp>
-#include <glm/gtc/epsilon.hpp>
-
-template <glm::length_t C, glm::length_t R, typename T, glm::qualifier Q>
-int test_qr(glm::mat<C, R, T, Q> m)
-{
- int Error = 0;
-
- T const epsilon = static_cast<T>(1e-10);
-
- glm::mat<(C < R ? C : R), R, T, Q> q(-999);
- glm::mat<C, (C < R ? C : R), T, Q> r(-999);
-
- glm::qr_decompose(m, q, r);
-
- //Test if q*r really equals the input matrix
- glm::mat<C, R, T, Q> tm = q*r;
- glm::mat<C, R, T, Q> err = tm - m;
-
- for (glm::length_t i = 0; i < C; i++)
- for (glm::length_t j = 0; j < R; j++)
- Error += glm::abs(err[i][j]) > epsilon ? 1 : 0;
-
- //Test if the columns of q are orthonormal
- for (glm::length_t i = 0; i < (C < R ? C : R); i++)
- {
- Error += (length(q[i]) - 1) > epsilon ? 1 : 0;
-
- for (glm::length_t j = 0; j<i; j++)
- Error += glm::abs(dot(q[i], q[j])) > epsilon ? 1 : 0;
- }
-
- //Test if the matrix r is upper triangular
- for (glm::length_t i = 0; i < C; i++)
- for (glm::length_t j = i + 1; j < (C < R ? C : R); j++)
- Error += glm::epsilonEqual(r[i][j], static_cast<T>(0), glm::epsilon<T>()) ? 0 : 1;
-
- return Error;
-}
-
-template <glm::length_t C, glm::length_t R, typename T, glm::qualifier Q>
-int test_rq(glm::mat<C, R, T, Q> m)
-{
- int Error = 0;
-
- T const epsilon = static_cast<T>(1e-10);
-
- glm::mat<C, (C < R ? C : R), T, Q> q(-999);
- glm::mat<(C < R ? C : R), R, T, Q> r(-999);
-
- glm::rq_decompose(m, r, q);
-
- //Test if q*r really equals the input matrix
- glm::mat<C, R, T, Q> tm = r*q;
- glm::mat<C, R, T, Q> err = tm - m;
-
- for (glm::length_t i = 0; i < C; i++)
- for (glm::length_t j = 0; j < R; j++)
- Error += glm::abs(err[i][j]) > epsilon ? 1 : 0;
-
- //Test if the rows of q are orthonormal
- glm::mat<(C < R ? C : R), C, T, Q> tq = transpose(q);
-
- for (glm::length_t i = 0; i < (C < R ? C : R); i++)
- {
- Error += (length(tq[i]) - 1) > epsilon ? 1 : 0;
-
- for (glm::length_t j = 0; j<i; j++)
- Error += glm::abs(dot(tq[i], tq[j])) > epsilon ? 1 : 0;
- }
-
- //Test if the matrix r is upper triangular
- for (glm::length_t i = 0; i < (C < R ? C : R); i++)
- for (glm::length_t j = R - (C < R ? C : R) + i + 1; j < R; j++)
- Error += glm::epsilonEqual(r[i][j], static_cast<T>(0), glm::epsilon<T>()) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- //Test QR square
- Error += test_qr(glm::dmat3(12.0, 6.0, -4.0, -51.0, 167.0, 24.0, 4.0, -68.0, -41.0)) ? 1 : 0;
-
- //Test RQ square
- Error += test_rq(glm::dmat3(12.0, 6.0, -4.0, -51.0, 167.0, 24.0, 4.0, -68.0, -41.0)) ? 1 : 0;
-
- //Test QR triangular 1
- Error += test_qr(glm::dmat3x4(12.0, 6.0, -4.0, -51.0, 167.0, 24.0, 4.0, -68.0, -41.0, 7.0, 2.0, 15.0)) ? 1 : 0;
-
- //Test QR triangular 2
- Error += test_qr(glm::dmat4x3(12.0, 6.0, -4.0, -51.0, 167.0, 24.0, 4.0, -68.0, -41.0, 7.0, 2.0, 15.0)) ? 1 : 0;
-
- //Test RQ triangular 1 : Fails at the triangular test
- Error += test_rq(glm::dmat3x4(12.0, 6.0, -4.0, -51.0, 167.0, 24.0, 4.0, -68.0, -41.0, 7.0, 2.0, 15.0)) ? 1 : 0;
-
- //Test QR triangular 2
- Error += test_rq(glm::dmat4x3(12.0, 6.0, -4.0, -51.0, 167.0, 24.0, 4.0, -68.0, -41.0, 7.0, 2.0, 15.0)) ? 1 : 0;
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_matrix_interpolation.cpp b/3rdparty/glm/source/test/gtx/gtx_matrix_interpolation.cpp
deleted file mode 100644
index 108f02e..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_matrix_interpolation.cpp
+++ /dev/null
@@ -1,122 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtc/quaternion.hpp>
-#include <glm/gtx/component_wise.hpp>
-#include <glm/gtx/matrix_interpolation.hpp>
-
-#include <iostream>
-#include <limits>
-#include <math.h>
-
-
-static int test_axisAngle()
-{
- int Error = 0;
-
- glm::mat4 m1(-0.9946f, 0.0f, -0.104531f, 0.0f,
- 0.0f, 1.0f, 0.0f, 0.0f,
- 0.104531f, 0.0f, -0.9946f, 0.0f,
- 0.0f, 0.0f, 0.0f, 1.0f);
- glm::mat4 m2(-0.992624f, 0.0f, -0.121874f, 0.0f,
- 0.0f, 1.0f, 0.0f, 0.0f,
- 0.121874f, 0.0f, -0.992624f, 0.0f,
- 0.0f, 0.0f, 0.0f, 1.0f);
-
- glm::mat4 const m1rot = glm::extractMatrixRotation(m1);
- glm::mat4 const dltRotation = m2 * glm::transpose(m1rot);
-
- glm::vec3 dltAxis(0.0f);
- float dltAngle = 0.0f;
- glm::axisAngle(dltRotation, dltAxis, dltAngle);
-
- std::cout << "dltAxis: (" << dltAxis.x << ", " << dltAxis.y << ", " << dltAxis.z << "), dltAngle: " << dltAngle << std::endl;
-
- glm::quat q = glm::quat_cast(dltRotation);
- std::cout << "q: (" << q.x << ", " << q.y << ", " << q.z << ", " << q.w << ")" << std::endl;
- float yaw = glm::yaw(q);
- std::cout << "Yaw: " << yaw << std::endl;
-
- return Error;
-}
-
-template <class T>
-int testForAxisAngle(glm::vec<3, T, glm::defaultp> const axisTrue, T const angleTrue)
-{
- T const eps = std::sqrt(std::numeric_limits<T>::epsilon());
-
- glm::mat<4, 4, T, glm::defaultp> const matTrue = glm::axisAngleMatrix(axisTrue, angleTrue);
-
- glm::vec<3, T, glm::defaultp> axis;
- T angle;
- glm::axisAngle(matTrue, axis, angle);
- glm::mat<4, 4, T, glm::defaultp> const matRebuilt = glm::axisAngleMatrix(axis, angle);
-
- glm::mat<4, 4, T, glm::defaultp> const errMat = matTrue - matRebuilt;
- T const maxErr = glm::compMax(glm::vec<4, T, glm::defaultp>(
- glm::compMax(glm::abs(errMat[0])),
- glm::compMax(glm::abs(errMat[1])),
- glm::compMax(glm::abs(errMat[2])),
- glm::compMax(glm::abs(errMat[3]))
- ));
-
- return maxErr < eps ? 0 : 1;
-}
-
-static int test_axisAngle2()
-{
- int Error = 0;
-
- Error += testForAxisAngle(glm::vec3(0.0f, 1.0f, 0.0f), 0.0f);
- Error += testForAxisAngle(glm::vec3(0.358f, 0.0716f, 0.9309f), 0.00001f);
- Error += testForAxisAngle(glm::vec3(1.0f, 0.0f, 0.0f), 0.0001f);
- Error += testForAxisAngle(glm::vec3(0.0f, 0.0f, 1.0f), 0.001f);
- Error += testForAxisAngle(glm::vec3(0.0f, 0.0f, 1.0f), 0.001f);
- Error += testForAxisAngle(glm::vec3(0.0f, 1.0f, 0.0f), 0.005f);
- Error += testForAxisAngle(glm::vec3(0.0f, 0.0f, 1.0f), 0.005f);
- Error += testForAxisAngle(glm::vec3(0.358f, 0.0716f, 0.9309f), 0.03f);
- Error += testForAxisAngle(glm::vec3(0.358f, 0.0716f, 0.9309f), 0.0003f);
- Error += testForAxisAngle(glm::vec3(0.0f, 0.0f, 1.0f), 0.01f);
- Error += testForAxisAngle(glm::dvec3(0.0f, 1.0f, 0.0f), 0.00005);
- Error += testForAxisAngle(glm::dvec3(-1.0f, 0.0f, 0.0f), 0.000001);
- Error += testForAxisAngle(glm::dvec3(0.7071f, 0.7071f, 0.0f), 0.5);
- Error += testForAxisAngle(glm::dvec3(0.7071f, 0.0f, 0.7071f), 0.0002);
- Error += testForAxisAngle(glm::dvec3(0.7071f, 0.0f, 0.7071f), 0.00002);
- Error += testForAxisAngle(glm::dvec3(0.7071f, 0.0f, 0.7071f), 0.000002);
- Error += testForAxisAngle(glm::dvec3(0.7071f, 0.0f, 0.7071f), 0.0000002);
- Error += testForAxisAngle(glm::vec3(0.0f, 0.7071f, 0.7071f), 1.3f);
- Error += testForAxisAngle(glm::vec3(0.0f, 0.7071f, 0.7071f), 6.3f);
- Error += testForAxisAngle(glm::vec3(1.0f, 0.0f, 0.0f), -0.23456f);
- Error += testForAxisAngle(glm::vec3(1.0f, 0.0f, 0.0f), glm::pi<float>());
- Error += testForAxisAngle(glm::vec3(0.0f, 1.0f, 0.0f), -glm::pi<float>());
- Error += testForAxisAngle(glm::vec3(0.358f, 0.0716f, 0.9309f), -glm::pi<float>());
- Error += testForAxisAngle(glm::vec3(1.0f, 0.0f, 0.0f), glm::pi<float>() + 2e-6f);
- Error += testForAxisAngle(glm::vec3(1.0f, 0.0f, 0.0f), glm::pi<float>() + 1e-4f);
- Error += testForAxisAngle(glm::vec3(0.0f, 1.0f, 0.0f), -glm::pi<float>() + 1e-3f);
- Error += testForAxisAngle(glm::vec3(0.358f, 0.0716f, 0.9309f), -glm::pi<float>() + 5e-3f);
-
- return Error;
-}
-
-static int test_rotate()
-{
- glm::mat4 m2(1.0);
- float myAngle = 1.0f;
- m2 = glm::rotate(m2, myAngle, glm::vec3(1.0f, 0.0f, 0.0f));
- glm::vec3 m2Axis;
- float m2Angle;
- glm::axisAngle(m2, m2Axis, m2Angle);
-
- return 0;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_axisAngle();
- Error += test_axisAngle2();
- Error += test_rotate();
-
- return Error;
-}
-
-
diff --git a/3rdparty/glm/source/test/gtx/gtx_matrix_major_storage.cpp b/3rdparty/glm/source/test/gtx/gtx_matrix_major_storage.cpp
deleted file mode 100644
index 21de7f7..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_matrix_major_storage.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/matrix_major_storage.hpp>
-
-int main()
-{
- int Error(0);
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_matrix_operation.cpp b/3rdparty/glm/source/test/gtx/gtx_matrix_operation.cpp
deleted file mode 100644
index 79c95c5..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_matrix_operation.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/glm.hpp>
-#include <glm/gtc/epsilon.hpp>
-#include <glm/gtx/matrix_operation.hpp>
-#include <limits>
-
-int test_adjugate()
-{
- int Error = 0;
-
- const float epsilon = std::numeric_limits<float>::epsilon();
-
- // mat2
- const glm::mat2 m2(
- 2, 3,
- 1, 5
- );
-
- const glm::mat2 eam2(
- 5, -3,
- -1, 2
- );
-
- const glm::mat2 am2 = glm::adjugate(m2);
-
- Error += glm::all(glm::bvec2(
- glm::all(glm::epsilonEqual(am2[0], eam2[0], epsilon)),
- glm::all(glm::epsilonEqual(am2[1], eam2[1], epsilon))
- )) ? 0 : 1;
-
- // mat3
- const glm::mat3 m3(
- 2, 3, 3,
- 1, 5, 4,
- 4, 6, 8
- );
-
- const glm::mat3 eam3(
- 16, -6, -3,
- 8, 4, -5,
- -14, 0, 7
- );
-
- const glm::mat3 am3 = glm::adjugate(m3);
-
- Error += glm::all(glm::bvec3(
- glm::all(glm::epsilonEqual(am3[0], eam3[0], epsilon)),
- glm::all(glm::epsilonEqual(am3[1], eam3[1], epsilon)),
- glm::all(glm::epsilonEqual(am3[2], eam3[2], epsilon))
- )) ? 0 : 1;
-
- // mat4
- const glm::mat4 m4(
- 2, 3, 3, 1,
- 1, 5, 4, 3,
- 4, 6, 8, 5,
- -2, -3, -3, 4
- );
-
- const glm::mat4 eam4(
- 97, -30, -15, 17,
- 45, 20, -25, 5,
- -91, 0, 35, -21,
- 14, 0, 0, 14
- );
-
- const glm::mat4 am4 = glm::adjugate(m4);
-
- Error += glm::all(glm::bvec4(
- glm::all(glm::epsilonEqual(am4[0], eam4[0], epsilon)),
- glm::all(glm::epsilonEqual(am4[1], eam4[1], epsilon)),
- glm::all(glm::epsilonEqual(am4[2], eam4[2], epsilon)),
- glm::all(glm::epsilonEqual(am4[3], eam4[3], epsilon))
- )) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_adjugate();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_matrix_query.cpp b/3rdparty/glm/source/test/gtx/gtx_matrix_query.cpp
deleted file mode 100644
index 0dda1f0..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_matrix_query.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/matrix_query.hpp>
-
-int test_isNull()
-{
- int Error(0);
-
- bool TestA = glm::isNull(glm::mat4(0), 0.00001f);
- Error += TestA ? 0 : 1;
-
- return Error;
-}
-
-int test_isIdentity()
-{
- int Error(0);
-
- {
- bool TestA = glm::isIdentity(glm::mat2(1), 0.00001f);
- Error += TestA ? 0 : 1;
- }
- {
- bool TestA = glm::isIdentity(glm::mat3(1), 0.00001f);
- Error += TestA ? 0 : 1;
- }
- {
- bool TestA = glm::isIdentity(glm::mat4(1), 0.00001f);
- Error += TestA ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_isNormalized()
-{
- int Error(0);
-
- bool TestA = glm::isNormalized(glm::mat4(1), 0.00001f);
- Error += TestA ? 0 : 1;
-
- return Error;
-}
-
-int test_isOrthogonal()
-{
- int Error(0);
-
- bool TestA = glm::isOrthogonal(glm::mat4(1), 0.00001f);
- Error += TestA ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error(0);
-
- Error += test_isNull();
- Error += test_isIdentity();
- Error += test_isNormalized();
- Error += test_isOrthogonal();
-
- return Error;
-}
-
-
diff --git a/3rdparty/glm/source/test/gtx/gtx_matrix_transform_2d.cpp b/3rdparty/glm/source/test/gtx/gtx_matrix_transform_2d.cpp
deleted file mode 100644
index f80d263..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_matrix_transform_2d.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/matrix_transform_2d.hpp>
-
-int main()
-{
- int Error(0);
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_mixed_product.cpp b/3rdparty/glm/source/test/gtx/gtx_mixed_product.cpp
deleted file mode 100644
index ab59bb2..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_mixed_product.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////////////////////////
-// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
-///////////////////////////////////////////////////////////////////////////////////////////////////
-// Created : 2013-10-25
-// Updated : 2013-10-25
-// Licence : This source is under MIT licence
-// File : test/gtx/associated_min_max.cpp
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-#include <glm/gtc/type_precision.hpp>
-#include <glm/gtx/associated_min_max.hpp>
-
-int main()
-{
- int Error(0);
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_norm.cpp b/3rdparty/glm/source/test/gtx/gtx_norm.cpp
deleted file mode 100644
index e82102a..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_norm.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/norm.hpp>
-
-
-int test_lMaxNorm()
-{
- int Error(0);
-
- {
- float norm = glm::lMaxNorm(glm::vec3(-1, -2, -3));
- Error += glm::epsilonEqual(norm, 3.f, 0.00001f) ? 0 : 1;
- }
-
- {
- float norm = glm::lMaxNorm(glm::vec3(2, 3, 1));
- Error += glm::epsilonEqual(norm, 3.f, 0.00001f) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_lxNorm()
-{
- int Error(0);
-
- {
- unsigned int depth_1 = 1;
- float normA = glm::lxNorm(glm::vec3(2, 3, 1), depth_1);
- float normB = glm::l1Norm(glm::vec3(2, 3, 1));
- Error += glm::epsilonEqual(normA, normB, 0.00001f) ? 0 : 1;
- Error += glm::epsilonEqual(normA, 6.f, 0.00001f) ? 0 : 1;
- }
-
- {
- unsigned int depth_1 = 1;
- float normA = glm::lxNorm(glm::vec3(-1, -2, -3), depth_1);
- float normB = glm::l1Norm(glm::vec3(-1, -2, -3));
- Error += glm::epsilonEqual(normA, normB, 0.00001f) ? 0 : 1;
- Error += glm::epsilonEqual(normA, 6.f, 0.00001f) ? 0 : 1;
- }
-
- {
- unsigned int depth_2 = 2;
- float normA = glm::lxNorm(glm::vec3(2, 3, 1), depth_2);
- float normB = glm::l2Norm(glm::vec3(2, 3, 1));
- Error += glm::epsilonEqual(normA, normB, 0.00001f) ? 0 : 1;
- Error += glm::epsilonEqual(normA, 3.741657387f, 0.00001f) ? 0 : 1;
- }
-
- {
- unsigned int depth_2 = 2;
- float normA = glm::lxNorm(glm::vec3(-1, -2, -3), depth_2);
- float normB = glm::l2Norm(glm::vec3(-1, -2, -3));
- Error += glm::epsilonEqual(normA, normB, 0.00001f) ? 0 : 1;
- Error += glm::epsilonEqual(normA, 3.741657387f, 0.00001f) ? 0 : 1;
- }
-
- {
- unsigned int oddDepth = 3;
- float norm = glm::lxNorm(glm::vec3(2, 3, 1), oddDepth);
- Error += glm::epsilonEqual(norm, 3.301927249f, 0.00001f) ? 0 : 1;
- }
-
- {
- unsigned int oddDepth = 3;
- float norm = glm::lxNorm(glm::vec3(-1, -2, -3), oddDepth);
- Error += glm::epsilonEqual(norm, 3.301927249f, 0.00001f) ? 0 : 1;
- }
-
- return Error;
-}
-
-int main()
-{
- int Error(0);
-
- Error += test_lMaxNorm();
- Error += test_lxNorm();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_normal.cpp b/3rdparty/glm/source/test/gtx/gtx_normal.cpp
deleted file mode 100644
index 7a01ec0..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_normal.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/normal.hpp>
-
-int main()
-{
- int Error(0);
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_normalize_dot.cpp b/3rdparty/glm/source/test/gtx/gtx_normalize_dot.cpp
deleted file mode 100644
index 9605863..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_normalize_dot.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/normalize_dot.hpp>
-
-int main()
-{
- int Error(0);
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_number_precision.cpp b/3rdparty/glm/source/test/gtx/gtx_number_precision.cpp
deleted file mode 100644
index a5a3ef2..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_number_precision.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/number_precision.hpp>
-
-int main()
-{
- int Error(0);
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_optimum_pow.cpp b/3rdparty/glm/source/test/gtx/gtx_optimum_pow.cpp
deleted file mode 100644
index c0a3fd4..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_optimum_pow.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/optimum_pow.hpp>
-
-int main()
-{
- int Error(0);
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_orthonormalize.cpp b/3rdparty/glm/source/test/gtx/gtx_orthonormalize.cpp
deleted file mode 100644
index 0e7a8c8..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_orthonormalize.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/orthonormalize.hpp>
-
-int main()
-{
- int Error(0);
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_pca.cpp b/3rdparty/glm/source/test/gtx/gtx_pca.cpp
deleted file mode 100644
index 120e277..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_pca.cpp
+++ /dev/null
@@ -1,724 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/glm.hpp>
-#include <glm/gtx/pca.hpp>
-#include <glm/gtc/epsilon.hpp>
-#include <glm/gtx/string_cast.hpp>
-
-#include <cstdio>
-#include <vector>
-#if GLM_HAS_CXX11_STL == 1
-#include <random>
-#endif
-
-template<typename T>
-T myEpsilon();
-template<>
-GLM_INLINE GLM_CONSTEXPR float myEpsilon<float>() { return 0.00001f; }
-template<>
-GLM_INLINE GLM_CONSTEXPR double myEpsilon<double>() { return 0.000001; }
-
-template<glm::length_t D, typename T, glm::qualifier Q>
-bool vectorEpsilonEqual(glm::vec<D, T, Q> const& a, glm::vec<D, T, Q> const& b, T epsilon)
-{
- for (int c = 0; c < D; ++c)
- if (!glm::epsilonEqual(a[c], b[c], epsilon))
- {
- fprintf(stderr, "failing vectorEpsilonEqual: [%d] %lf != %lf (~%lf)\n",
- c,
- static_cast<double>(a[c]),
- static_cast<double>(b[c]),
- static_cast<double>(epsilon)
- );
- return false;
- }
- return true;
-}
-
-template<glm::length_t D, typename T, glm::qualifier Q>
-bool matrixEpsilonEqual(glm::mat<D, D, T, Q> const& a, glm::mat<D, D, T, Q> const& b, T epsilon)
-{
- for (int c = 0; c < D; ++c)
- for (int r = 0; r < D; ++r)
- if (!glm::epsilonEqual(a[c][r], b[c][r], epsilon))
- {
- fprintf(stderr, "failing vectorEpsilonEqual: [%d][%d] %lf != %lf (~%lf)\n",
- c, r,
- static_cast<double>(a[c][r]),
- static_cast<double>(b[c][r]),
- static_cast<double>(epsilon)
- );
- return false;
- }
- return true;
-}
-
-template<typename T>
-GLM_INLINE bool sameSign(T const& a, T const& b)
-{
- return ((a >= 0) && (b >= 0)) || ((a < 0) && (b < 0));
-}
-
-template<typename T>
-T failReport(T line)
-{
- fprintf(stderr, "Failed in line %d\n", static_cast<int>(line));
- return line;
-}
-
-// Test data: 1AGA 'agarose double helix'
-// https://www.rcsb.org/structure/1aga
-// The fourth coordinate is randomized
-namespace _1aga
-{
-
- // Fills `outTestData` with hard-coded atom positions from 1AGA
- // The fourth coordinate is randomized
- template<typename vec>
- void fillTestData(std::vector<vec>& outTestData)
- {
- // x,y,z coordinates copied from RCSB PDB file of 1AGA
- // w coordinate randomized with standard normal distribution
- static const double _1aga[] = {
- 3.219, -0.637, 19.462, 2.286,
- 4.519, 0.024, 18.980, -0.828,
- 4.163, 1.425, 18.481, -0.810,
- 3.190, 1.341, 17.330, -0.170,
- 1.962, 0.991, 18.165, 0.816,
- 2.093, 1.952, 19.331, 0.276,
- 5.119, -0.701, 17.908, -0.490,
- 3.517, 2.147, 19.514, -0.207,
- 2.970, 2.609, 16.719, 0.552,
- 2.107, -0.398, 18.564, 0.403,
- 2.847, 2.618, 15.335, 0.315,
- 1.457, 3.124, 14.979, 0.683,
- 1.316, 3.291, 13.473, 0.446,
- 2.447, 4.155, 12.931, 1.324,
- 3.795, 3.614, 13.394, 0.112,
- 4.956, 4.494, 12.982, 0.253,
- 0.483, 2.217, 15.479, 1.316,
- 0.021, 3.962, 13.166, 1.522,
- 2.311, 5.497, 13.395, 0.248,
- 3.830, 3.522, 14.827, 0.591,
- 5.150, 4.461, 11.576, 0.635,
- -1.057, 3.106, 13.132, 0.191,
- -2.280, 3.902, 12.650, 1.135,
- -3.316, 2.893, 12.151, 0.794,
- -2.756, 2.092, 11.000, 0.720,
- -1.839, 1.204, 11.835, -1.172,
- -2.737, 0.837, 13.001, -0.313,
- -1.952, 4.784, 11.578, 2.082,
- -3.617, 1.972, 13.184, 0.653,
- -3.744, 1.267, 10.389, -0.413,
- -0.709, 2.024, 12.234, -1.747,
- -3.690, 1.156, 9.005, -1.275,
- -3.434, -0.300, 8.649, 0.441,
- -3.508, -0.506, 7.143, 0.237,
- -4.822, 0.042, 6.601, -2.856,
- -5.027, 1.480, 7.064, 0.985,
- -6.370, 2.045, 6.652, 0.915,
- -2.162, -0.690, 9.149, 1.100,
- -3.442, -1.963, 6.836, -0.081,
- -5.916, -0.747, 7.065, -2.345,
- -4.965, 1.556, 8.497, 0.504,
- -6.439, 2.230, 5.246, 1.451,
- -2.161, -2.469, 6.802, -1.171,
- -2.239, -3.925, 6.320, -1.434,
- -0.847, -4.318, 5.821, 0.098,
- -0.434, -3.433, 4.670, -1.446,
- -0.123, -2.195, 5.505, 0.182,
- 0.644, -2.789, 6.671, 0.865,
- -3.167, -4.083, 5.248, -0.098,
- 0.101, -4.119, 6.854, -0.001,
- 0.775, -3.876, 4.059, 1.061,
- -1.398, -1.625, 5.904, 0.230,
- 0.844, -3.774, 2.675, 1.313,
- 1.977, -2.824, 2.319, -0.112,
- 2.192, -2.785, 0.813, -0.981,
- 2.375, -4.197, 0.271, -0.355,
- 1.232, -5.093, 0.734, 0.632,
- 1.414, -6.539, 0.322, 0.576,
- 1.678, -1.527, 2.819, -1.187,
- 3.421, -1.999, 0.496, -1.770,
- 3.605, -4.750, 0.735, 1.099,
- 1.135, -5.078, 2.167, 0.854,
- 1.289, -6.691, -1.084, -0.487,
- -1.057, 3.106, 22.602, -1.297,
- -2.280, 3.902, 22.120, 0.376,
- -3.316, 2.893, 21.621, 0.932,
- -2.756, 2.092, 20.470, 1.680,
- -1.839, 1.204, 21.305, 0.615,
- -2.737, 0.837, 22.471, 0.899,
- -1.952, 4.784, 21.048, -0.521,
- -3.617, 1.972, 22.654, 0.133,
- -3.744, 1.267, 19.859, 0.081,
- -0.709, 2.024, 21.704, 1.420,
- -3.690, 1.156, 18.475, -0.850,
- -3.434, -0.300, 18.119, -0.249,
- -3.508, -0.506, 16.613, 1.434,
- -4.822, 0.042, 16.071, -2.466,
- -5.027, 1.480, 16.534, -1.045,
- -6.370, 2.045, 16.122, 1.707,
- -2.162, -0.690, 18.619, -2.023,
- -3.442, -1.963, 16.336, -0.304,
- -5.916, -0.747, 16.535, 0.979,
- -4.965, 1.556, 17.967, -1.165,
- -6.439, 2.230, 14.716, 0.929,
- -2.161, -2.469, 16.302, -0.234,
- -2.239, -3.925, 15.820, -0.228,
- -0.847, -4.318, 15.321, 1.844,
- -0.434, -3.433, 14.170, 1.132,
- -0.123, -2.195, 15.005, 0.211,
- 0.644, -2.789, 16.171, -0.632,
- -3.167, -4.083, 14.748, -0.519,
- 0.101, -4.119, 16.354, 0.173,
- 0.775, -3.876, 13.559, 1.243,
- -1.398, -1.625, 15.404, -0.187,
- 0.844, -3.774, 12.175, -1.332,
- 1.977, -2.824, 11.819, -1.616,
- 2.192, -2.785, 10.313, 1.320,
- 2.375, -4.197, 9.771, 0.237,
- 1.232, -5.093, 10.234, 0.851,
- 1.414, -6.539, 9.822, 1.816,
- 1.678, -1.527, 12.319, -1.657,
- 3.421, -1.999, 10.036, 1.559,
- 3.605, -4.750, 10.235, 0.831,
- 1.135, -5.078, 11.667, 0.060,
- 1.289, -6.691, 8.416, 1.066,
- 3.219, -0.637, 10.002, 2.111,
- 4.519, 0.024, 9.520, -0.874,
- 4.163, 1.425, 9.021, -1.012,
- 3.190, 1.341, 7.870, -0.250,
- 1.962, 0.991, 8.705, -1.359,
- 2.093, 1.952, 9.871, -0.126,
- 5.119, -0.701, 8.448, 0.995,
- 3.517, 2.147, 10.054, 0.941,
- 2.970, 2.609, 7.259, -0.562,
- 2.107, -0.398, 9.104, -0.038,
- 2.847, 2.618, 5.875, 0.398,
- 1.457, 3.124, 5.519, 0.481,
- 1.316, 3.291, 4.013, -0.187,
- 2.447, 4.155, 3.471, -0.429,
- 3.795, 3.614, 3.934, -0.432,
- 4.956, 4.494, 3.522, -0.788,
- 0.483, 2.217, 6.019, -0.923,
- 0.021, 3.962, 3.636, -0.316,
- 2.311, 5.497, 3.935, -1.917,
- 3.830, 3.522, 5.367, -0.302,
- 5.150, 4.461, 2.116, -1.615
- };
- static const glm::length_t _1agaSize = sizeof(_1aga) / (4 * sizeof(double));
-
- outTestData.resize(_1agaSize);
- for(glm::length_t i = 0; i < _1agaSize; ++i)
- for(glm::length_t d = 0; d < static_cast<glm::length_t>(vec::length()); ++d)
- outTestData[i][d] = static_cast<typename vec::value_type>(_1aga[i * 4 + d]);
- }
-
- // All reference values computed separately using symbolic precision
- // https://github.com/sgrottel/exp-pca-precision
- // This applies to all functions named: `_1aga::expected*()`
-
- GLM_INLINE glm::dmat4 const& expectedCovarData()
- {
- static const glm::dmat4 covar4x4d(
- 9.62434068027210898322, -0.00006657369614512471, -4.29321376568405099761, 0.01879374187452758846,
- -0.00006657369614512471, 9.62443937868480681175, 5.35113872637944076871, -0.11569259145880574080,
- -4.29321376568405099761, 5.35113872637944076871, 35.62848549634668415820, 0.90874239254220201545,
- 0.01879374187452758846, -0.11569259145880574080, 0.90874239254220201545, 1.09705971856890904803
- );
- return covar4x4d;
- }
-
- template<glm::length_t D>
- GLM_INLINE glm::vec<D, double, glm::defaultp> const& expectedEigenvalues();
- template<>
- GLM_INLINE glm::dvec2 const& expectedEigenvalues<2>()
- {
- static const glm::dvec2 evals2(
- 9.62447289926297399961763301774251330057894539467032275382255,
- 9.62430715969394210015560961264297422776572580714373620309355
- );
- return evals2;
- }
- template<>
- GLM_INLINE glm::dvec3 const& expectedEigenvalues<3>()
- {
- static const glm::dvec3 evals3(
- 37.3274494274683425233695502581182052836449738530676689472257,
- 9.62431434161498823505729817436585077939509766554969096873168,
- 7.92550178622027216422369326567668971675332732240052872097887
- );
- return evals3;
- }
- template<>
- GLM_INLINE glm::dvec4 const& expectedEigenvalues<4>()
- {
- static const glm::dvec4 evals4(
- 37.3477389918792213596879452204499702406947817221901007885630,
- 9.62470688921105696017807313860277172063600080413412567999700,
- 7.94017075281634999342344275928070533134615133171969063657713,
- 1.06170863996588365446060186982477896078741484440002343404155
- );
- return evals4;
- }
-
- template<glm::length_t D>
- GLM_INLINE glm::mat<D, D, double, glm::defaultp> const& expectedEigenvectors();
- template<>
- GLM_INLINE glm::dmat2 const& expectedEigenvectors<2>()
- {
- static const glm::dmat2 evecs2(
- glm::dvec2(
- -0.503510847492551904906870957742619139443409162857537237123308,
- 1
- ),
- glm::dvec2(
- 1.98605453086051402895741763848787613048533838388005162794043,
- 1
- )
- );
- return evecs2;
- }
- template<>
- GLM_INLINE glm::dmat3 const& expectedEigenvectors<3>()
- {
- static const glm::dmat3 evecs3(
- glm::dvec3(
- -0.154972738414395866005286433008304444294405085038689821864654,
- 0.193161285869815165989799191097521722568079378840201629578695,
- 1
- ),
- glm::dvec3(
- -158565.112775416943154745839952575022429933119522746586149868,
- -127221.506282351944358932458687410410814983610301927832439675,
- 1
- ),
- glm::dvec3(
- 2.52702248596556806145700361724323960543858113426446460406536,
- -3.14959802931313870497377546974185300816008580801457419079412,
- 1
- )
- );
- return evecs3;
- }
- template<>
- GLM_INLINE glm::dmat4 const& expectedEigenvectors<4>()
- {
- static const glm::dmat4 evecs4(
- glm::dvec4(
- -6.35322390281037045217295803597357821705371650876122113027264,
- 7.91546394153385394517767054617789939529794642646629201212056,
- 41.0301543819240679808549819457450130787045236815736490549663,
- 1
- ),
- glm::dvec4(
- -114.622418941087829756565311692197154422302604224781253861297,
- -92.2070185807065289900871215218752013659402949497379896153118,
- 0.0155846091025912430932734548933329458404665760587569100867246,
- 1
- ),
- glm::dvec4(
- 13.1771887761559019483954743159026938257325190511642952175789,
- -16.3688257459634877666638419310116970616615816436949741766895,
- 5.17386502341472097227408249233288958059579189051394773143190,
- 1
- ),
- glm::dvec4(
- -0.0192777078948229800494895064532553117703859768210647632969276,
- 0.0348034950916108873629241563077465542944938906271231198634442,
- -0.0340715609308469289267379681032545422644143611273049912226126,
- 1
- )
- );
- return evecs4;
- }
-
-} // namespace _1aga
-
-// Compute center of gravity
-template<typename vec>
-vec computeCenter(const std::vector<vec>& testData)
-{
- double c[4];
- std::fill(c, c + vec::length(), 0.0);
-
- typename std::vector<vec>::const_iterator e = testData.end();
- for(typename std::vector<vec>::const_iterator i = testData.begin(); i != e; ++i)
- for(glm::length_t d = 0; d < static_cast<glm::length_t>(vec::length()); ++d)
- c[d] += static_cast<double>((*i)[d]);
-
- vec cVec(0);
- for(glm::length_t d = 0; d < static_cast<glm::length_t>(vec::length()); ++d)
- cVec[d] = static_cast<typename vec::value_type>(c[d] / static_cast<double>(testData.size()));
- return cVec;
-}
-
-// Test sorting of Eigenvalue&Eigenvector lists. Use exhaustive search.
-template<glm::length_t D, typename T, glm::qualifier Q>
-int testEigenvalueSort()
-{
- // Test input data: four arbitrary values
- static const glm::vec<D, T, Q> refVal(
- glm::vec<4, T, Q>(
- 10, 8, 6, 4
- )
- );
- // Test input data: four arbitrary vectors, which can be matched to the above values
- static const glm::mat<D, D, T, Q> refVec(
- glm::mat<4, 4, T, Q>(
- 10, 20, 5, 40,
- 8, 16, 4, 32,
- 6, 12, 3, 24,
- 4, 8, 2, 16
- )
- );
- // Permutations of test input data for exhaustive check, based on `D` (1 <= D <= 4)
- static const int permutationCount[] = {
- 0,
- 1,
- 2,
- 6,
- 24
- };
- // The permutations t perform, based on `D` (1 <= D <= 4)
- static const glm::ivec4 permutation[] = {
- glm::ivec4(0, 1, 2, 3),
- glm::ivec4(1, 0, 2, 3), // last for D = 2
- glm::ivec4(0, 2, 1, 3),
- glm::ivec4(1, 2, 0, 3),
- glm::ivec4(2, 0, 1, 3),
- glm::ivec4(2, 1, 0, 3), // last for D = 3
- glm::ivec4(0, 1, 3, 2),
- glm::ivec4(1, 0, 3, 2),
- glm::ivec4(0, 2, 3, 1),
- glm::ivec4(1, 2, 3, 0),
- glm::ivec4(2, 0, 3, 1),
- glm::ivec4(2, 1, 3, 0),
- glm::ivec4(0, 3, 1, 2),
- glm::ivec4(1, 3, 0, 2),
- glm::ivec4(0, 3, 2, 1),
- glm::ivec4(1, 3, 2, 0),
- glm::ivec4(2, 3, 0, 1),
- glm::ivec4(2, 3, 1, 0),
- glm::ivec4(3, 0, 1, 2),
- glm::ivec4(3, 1, 0, 2),
- glm::ivec4(3, 0, 2, 1),
- glm::ivec4(3, 1, 2, 0),
- glm::ivec4(3, 2, 0, 1),
- glm::ivec4(3, 2, 1, 0) // last for D = 4
- };
-
- // initial sanity check
- if(!vectorEpsilonEqual(refVal, refVal, myEpsilon<T>()))
- return failReport(__LINE__);
- if(!matrixEpsilonEqual(refVec, refVec, myEpsilon<T>()))
- return failReport(__LINE__);
-
- // Exhaustive search through all permutations
- for(int p = 0; p < permutationCount[D]; ++p)
- {
- glm::vec<D, T, Q> testVal;
- glm::mat<D, D, T, Q> testVec;
- for(int i = 0; i < D; ++i)
- {
- testVal[i] = refVal[permutation[p][i]];
- testVec[i] = refVec[permutation[p][i]];
- }
-
- glm::sortEigenvalues(testVal, testVec);
-
- if (!vectorEpsilonEqual(testVal, refVal, myEpsilon<T>()))
- return failReport(__LINE__);
- if (!matrixEpsilonEqual(testVec, refVec, myEpsilon<T>()))
- return failReport(__LINE__);
- }
-
- return 0;
-}
-
-// Test covariance matrix creation functions
-template<glm::length_t D, typename T, glm::qualifier Q>
-int testCovar(
-#if GLM_HAS_CXX11_STL == 1
- glm::length_t dataSize, unsigned int randomEngineSeed
-#else // GLM_HAS_CXX11_STL == 1
- glm::length_t, unsigned int
-#endif // GLM_HAS_CXX11_STL == 1
-)
-{
- typedef glm::vec<D, T, Q> vec;
- typedef glm::mat<D, D, T, Q> mat;
-
- // #1: test expected result with fixed data set
- std::vector<vec> testData;
- _1aga::fillTestData(testData);
-
- // compute center of gravity
- vec center = computeCenter(testData);
-
- mat covarMat = glm::computeCovarianceMatrix(testData.data(), testData.size(), center);
- if(!matrixEpsilonEqual(covarMat, mat(_1aga::expectedCovarData()), myEpsilon<T>()))
- {
- fprintf(stderr, "Reconstructed covarMat:\n%s\n", glm::to_string(covarMat).c_str());
- return failReport(__LINE__);
- }
-
- // #2: test function variant consitency with random data
-#if GLM_HAS_CXX11_STL == 1
- std::default_random_engine rndEng(randomEngineSeed);
- std::normal_distribution<T> normalDist;
- testData.resize(dataSize);
- // some common offset of all data
- T offset[D];
- for(glm::length_t d = 0; d < D; ++d)
- offset[d] = normalDist(rndEng);
- // init data
- for(glm::length_t i = 0; i < dataSize; ++i)
- for(glm::length_t d = 0; d < D; ++d)
- testData[i][d] = offset[d] + normalDist(rndEng);
- center = computeCenter(testData);
-
- std::vector<vec> centeredTestData;
- centeredTestData.reserve(testData.size());
- typename std::vector<vec>::const_iterator e = testData.end();
- for(typename std::vector<vec>::const_iterator i = testData.begin(); i != e; ++i)
- centeredTestData.push_back((*i) - center);
-
- mat c1 = glm::computeCovarianceMatrix(centeredTestData.data(), centeredTestData.size());
- mat c2 = glm::computeCovarianceMatrix<D, T, Q>(centeredTestData.begin(), centeredTestData.end());
- mat c3 = glm::computeCovarianceMatrix(testData.data(), testData.size(), center);
- mat c4 = glm::computeCovarianceMatrix<D, T, Q>(testData.rbegin(), testData.rend(), center);
-
- if(!matrixEpsilonEqual(c1, c2, myEpsilon<T>()))
- return failReport(__LINE__);
- if(!matrixEpsilonEqual(c1, c3, myEpsilon<T>()))
- return failReport(__LINE__);
- if(!matrixEpsilonEqual(c1, c4, myEpsilon<T>()))
- return failReport(__LINE__);
-#endif // GLM_HAS_CXX11_STL == 1
- return 0;
-}
-
-// Computes eigenvalues and eigenvectors from well-known covariance matrix
-template<glm::length_t D, typename T, glm::qualifier Q>
-int testEigenvectors(T epsilon)
-{
- typedef glm::vec<D, T, Q> vec;
- typedef glm::mat<D, D, T, Q> mat;
-
- // test expected result with fixed data set
- std::vector<vec> testData;
- mat covarMat(_1aga::expectedCovarData());
-
- vec eigenvalues;
- mat eigenvectors;
- unsigned int c = glm::findEigenvaluesSymReal(covarMat, eigenvalues, eigenvectors);
- if(c != D)
- return failReport(__LINE__);
- glm::sortEigenvalues(eigenvalues, eigenvectors);
-
- if (!vectorEpsilonEqual(eigenvalues, vec(_1aga::expectedEigenvalues<D>()), epsilon))
- return failReport(__LINE__);
-
- for (int i = 0; i < D; ++i)
- {
- vec act = glm::normalize(eigenvectors[i]);
- vec exp = glm::normalize(_1aga::expectedEigenvectors<D>()[i]);
- if (!sameSign(act[0], exp[0])) exp = -exp;
- if (!vectorEpsilonEqual(act, exp, epsilon))
- return failReport(__LINE__);
- }
-
- return 0;
-}
-
-// A simple small smoke test:
-// - a uniformly sampled block
-// - reconstruct main axes
-// - check order of eigenvalues equals order of extends of block in direction of main axes
-int smokeTest()
-{
- using glm::vec3;
- using glm::mat3;
- std::vector<vec3> pts;
- pts.reserve(11 * 15 * 7);
-
- for(int x = -5; x <= 5; ++x)
- for(int y = -7; y <= 7; ++y)
- for(int z = -3; z <= 3; ++z)
- pts.push_back(vec3(x, y, z));
-
- mat3 covar = glm::computeCovarianceMatrix(pts.data(), pts.size());
- mat3 eVec;
- vec3 eVal;
- int eCnt = glm::findEigenvaluesSymReal(covar, eVal, eVec);
- if(eCnt != 3)
- return failReport(__LINE__);
-
- // sort eVec by decending eVal
- if(eVal[0] < eVal[1])
- {
- std::swap(eVal[0], eVal[1]);
- std::swap(eVec[0], eVec[1]);
- }
- if(eVal[0] < eVal[2])
- {
- std::swap(eVal[0], eVal[2]);
- std::swap(eVec[0], eVec[2]);
- }
- if(eVal[1] < eVal[2])
- {
- std::swap(eVal[1], eVal[2]);
- std::swap(eVec[1], eVec[2]);
- }
-
- if(!vectorEpsilonEqual(glm::abs(eVec[0]), vec3(0, 1, 0), myEpsilon<float>()))
- return failReport(__LINE__);
- if(!vectorEpsilonEqual(glm::abs(eVec[1]), vec3(1, 0, 0), myEpsilon<float>()))
- return failReport(__LINE__);
- if(!vectorEpsilonEqual(glm::abs(eVec[2]), vec3(0, 0, 1), myEpsilon<float>()))
- return failReport(__LINE__);
-
- return 0;
-}
-
-#if GLM_HAS_CXX11_STL == 1
-int rndTest(unsigned int randomEngineSeed)
-{
- std::default_random_engine rndEng(randomEngineSeed);
- std::normal_distribution<double> normalDist;
-
- // construct orthonormal system
- glm::dvec3 x(normalDist(rndEng), normalDist(rndEng), normalDist(rndEng));
- double l = glm::length(x);
- while(l < myEpsilon<double>())
- x = glm::dvec3(normalDist(rndEng), normalDist(rndEng), normalDist(rndEng));
- x = glm::normalize(x);
- glm::dvec3 y(normalDist(rndEng), normalDist(rndEng), normalDist(rndEng));
- l = glm::length(y);
- while(l < myEpsilon<double>())
- y = glm::dvec3(normalDist(rndEng), normalDist(rndEng), normalDist(rndEng));
- while(glm::abs(glm::dot(x, y)) < myEpsilon<double>())
- {
- y = glm::dvec3(normalDist(rndEng), normalDist(rndEng), normalDist(rndEng));
- while(l < myEpsilon<double>())
- y = glm::dvec3(normalDist(rndEng), normalDist(rndEng), normalDist(rndEng));
- }
- y = glm::normalize(y);
- glm::dvec3 z = glm::normalize(glm::cross(x, y));
- y = glm::normalize(glm::cross(z, x));
-
- // generate input point data
- std::vector<glm::dvec3> ptData;
- static const int pattern[] = {
- 8, 0, 0,
- 4, 1, 2,
- 0, 2, 0,
- 0, 0, 4
- };
- glm::dvec3 offset(normalDist(rndEng), normalDist(rndEng), normalDist(rndEng));
- for(int p = 0; p < 4; ++p)
- for(int xs = 1; xs >= -1; xs -= 2)
- for(int ys = 1; ys >= -1; ys -= 2)
- for(int zs = 1; zs >= -1; zs -= 2)
- ptData.push_back(
- offset
- + x * static_cast<double>(pattern[p * 3 + 0] * xs)
- + y * static_cast<double>(pattern[p * 3 + 1] * ys)
- + z * static_cast<double>(pattern[p * 3 + 2] * zs));
-
- // perform PCA:
- glm::dvec3 center = computeCenter(ptData);
- glm::dmat3 covarMat = glm::computeCovarianceMatrix(ptData.data(), ptData.size(), center);
- glm::dvec3 evals;
- glm::dmat3 evecs;
- int evcnt = glm::findEigenvaluesSymReal(covarMat, evals, evecs);
- if(evcnt != 3)
- return failReport(__LINE__);
- glm::sortEigenvalues(evals, evecs);
-
- if (!sameSign(evecs[0][0], x[0])) evecs[0] = -evecs[0];
- if(!vectorEpsilonEqual(x, evecs[0], myEpsilon<double>()))
- return failReport(__LINE__);
- if (!sameSign(evecs[2][0], y[0])) evecs[2] = -evecs[2];
- if (!vectorEpsilonEqual(y, evecs[2], myEpsilon<double>()))
- return failReport(__LINE__);
- if (!sameSign(evecs[1][0], z[0])) evecs[1] = -evecs[1];
- if (!vectorEpsilonEqual(z, evecs[1], myEpsilon<double>()))
- return failReport(__LINE__);
-
- return 0;
-}
-#endif // GLM_HAS_CXX11_STL == 1
-
-int main()
-{
- int error(0);
-
- // A small smoke test to fail early with most problems
- if(smokeTest())
- return failReport(__LINE__);
-
- // test sorting utility.
- if(testEigenvalueSort<2, float, glm::defaultp>() != 0)
- error = failReport(__LINE__);
- if(testEigenvalueSort<2, double, glm::defaultp>() != 0)
- error = failReport(__LINE__);
- if(testEigenvalueSort<3, float, glm::defaultp>() != 0)
- error = failReport(__LINE__);
- if(testEigenvalueSort<3, double, glm::defaultp>() != 0)
- error = failReport(__LINE__);
- if(testEigenvalueSort<4, float, glm::defaultp>() != 0)
- error = failReport(__LINE__);
- if(testEigenvalueSort<4, double, glm::defaultp>() != 0)
- error = failReport(__LINE__);
- if (error != 0)
- return error;
-
- // Note: the random engine uses a fixed seed to create consistent and reproducible test data
- // test covariance matrix computation from different data sources
- if(testCovar<2, float, glm::defaultp>(100, 12345) != 0)
- error = failReport(__LINE__);
- if(testCovar<2, double, glm::defaultp>(100, 42) != 0)
- error = failReport(__LINE__);
- if(testCovar<3, float, glm::defaultp>(100, 2021) != 0)
- error = failReport(__LINE__);
- if(testCovar<3, double, glm::defaultp>(100, 815) != 0)
- error = failReport(__LINE__);
- if(testCovar<4, float, glm::defaultp>(100, 3141) != 0)
- error = failReport(__LINE__);
- if(testCovar<4, double, glm::defaultp>(100, 174) != 0)
- error = failReport(__LINE__);
- if (error != 0)
- return error;
-
- // test PCA eigen vector reconstruction
- // Expected epsilon precision evaluated separately:
- // https://github.com/sgrottel/exp-pca-precision
- if(testEigenvectors<2, float, glm::defaultp>(0.002f) != 0)
- error = failReport(__LINE__);
- if(testEigenvectors<2, double, glm::defaultp>(0.00000000001) != 0)
- error = failReport(__LINE__);
- if(testEigenvectors<3, float, glm::defaultp>(0.00001f) != 0)
- error = failReport(__LINE__);
- if(testEigenvectors<3, double, glm::defaultp>(0.0000000001) != 0)
- error = failReport(__LINE__);
- if(testEigenvectors<4, float, glm::defaultp>(0.0001f) != 0)
- error = failReport(__LINE__);
- if(testEigenvectors<4, double, glm::defaultp>(0.0000001) != 0)
- error = failReport(__LINE__);
- if(error != 0)
- return error;
-
- // Final tests with randomized data
-#if GLM_HAS_CXX11_STL == 1
- if(rndTest(12345) != 0)
- error = failReport(__LINE__);
- if(rndTest(42) != 0)
- error = failReport(__LINE__);
- if (error != 0)
- return error;
-#endif // GLM_HAS_CXX11_STL == 1
-
- return error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_perpendicular.cpp b/3rdparty/glm/source/test/gtx/gtx_perpendicular.cpp
deleted file mode 100644
index d14cfee..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_perpendicular.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/perpendicular.hpp>
-
-int main()
-{
- int Error(0);
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_polar_coordinates.cpp b/3rdparty/glm/source/test/gtx/gtx_polar_coordinates.cpp
deleted file mode 100644
index da2fe53..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_polar_coordinates.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/polar_coordinates.hpp>
-
-int main()
-{
- int Error(0);
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_projection.cpp b/3rdparty/glm/source/test/gtx/gtx_projection.cpp
deleted file mode 100644
index 8f9f772..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_projection.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/projection.hpp>
-
-int main()
-{
- int Error(0);
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_quaternion.cpp b/3rdparty/glm/source/test/gtx/gtx_quaternion.cpp
deleted file mode 100644
index 80cbbac..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_quaternion.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtc/epsilon.hpp>
-#include <glm/gtc/type_ptr.hpp>
-#include <glm/gtc/matrix_transform.hpp>
-#include <glm/gtx/transform.hpp>
-#include <glm/gtx/quaternion.hpp>
-#include <glm/gtx/compatibility.hpp>
-#include <glm/ext.hpp>
-
-int test_quat_fastMix()
-{
- int Error = 0;
-
- glm::quat A = glm::angleAxis(0.0f, glm::vec3(0, 0, 1));
- glm::quat B = glm::angleAxis(glm::pi<float>() * 0.5f, glm::vec3(0, 0, 1));
- glm::quat C = glm::fastMix(A, B, 0.5f);
- glm::quat D = glm::angleAxis(glm::pi<float>() * 0.25f, glm::vec3(0, 0, 1));
-
- Error += glm::epsilonEqual(C.x, D.x, 0.01f) ? 0 : 1;
- Error += glm::epsilonEqual(C.y, D.y, 0.01f) ? 0 : 1;
- Error += glm::epsilonEqual(C.z, D.z, 0.01f) ? 0 : 1;
- Error += glm::epsilonEqual(C.w, D.w, 0.01f) ? 0 : 1;
-
- return Error;
-}
-
-int test_quat_shortMix()
-{
- int Error(0);
-
- glm::quat A = glm::angleAxis(0.0f, glm::vec3(0, 0, 1));
- glm::quat B = glm::angleAxis(glm::pi<float>() * 0.5f, glm::vec3(0, 0, 1));
- glm::quat C = glm::shortMix(A, B, 0.5f);
- glm::quat D = glm::angleAxis(glm::pi<float>() * 0.25f, glm::vec3(0, 0, 1));
-
- Error += glm::epsilonEqual(C.x, D.x, 0.01f) ? 0 : 1;
- Error += glm::epsilonEqual(C.y, D.y, 0.01f) ? 0 : 1;
- Error += glm::epsilonEqual(C.z, D.z, 0.01f) ? 0 : 1;
- Error += glm::epsilonEqual(C.w, D.w, 0.01f) ? 0 : 1;
-
- return Error;
-}
-
-int test_orientation()
-{
- int Error = 0;
-
- {
- glm::quat q(1.0f, 0.0f, 0.0f, 1.0f);
- float p = glm::roll(q);
- Error += glm::epsilonEqual(p, glm::pi<float>() * 0.5f, 0.0001f) ? 0 : 1;
- }
-
- {
- glm::quat q(1.0f, 0.0f, 0.0f, 1.0f);
- float p = glm::pitch(q);
- Error += glm::epsilonEqual(p, 0.f, 0.0001f) ? 0 : 1;
- }
-
- {
- glm::quat q(1.0f, 0.0f, 0.0f, 1.0f);
- float p = glm::yaw(q);
- Error += glm::epsilonEqual(p, 0.f, 0.0001f) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_rotation()
-{
- int Error(0);
-
- glm::vec3 v(1, 0, 0);
- glm::vec3 u(0, 1, 0);
-
- glm::quat Rotation = glm::rotation(v, u);
-
- float Angle = glm::angle(Rotation);
-
- Error += glm::abs(Angle - glm::pi<float>() * 0.5f) < glm::epsilon<float>() ? 0 : 1;
-
- return Error;
-}
-
-int test_log()
-{
- int Error(0);
-
- glm::quat q;
- glm::quat p = glm::log(q);
- glm::quat r = glm::exp(p);
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_log();
- Error += test_rotation();
- Error += test_orientation();
- Error += test_quat_fastMix();
- Error += test_quat_shortMix();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_random.cpp b/3rdparty/glm/source/test/gtx/gtx_random.cpp
deleted file mode 100644
index e562c31..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_random.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////////////////////////
-// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
-///////////////////////////////////////////////////////////////////////////////////////////////////
-// Created : 2011-05-31
-// Updated : 2011-05-31
-// Licence : This source is under MIT licence
-// File : test/gtx/random.cpp
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-#include <glm/glm.hpp>
-#include <glm/gtx/random.hpp>
-#include <glm/gtx/epsilon.hpp>
-#include <iostream>
-
-int test_signedRand1()
-{
- int Error = 0;
-
- {
- float ResultFloat = 0.0f;
- double ResultDouble = 0.0f;
- for(std::size_t i = 0; i < 100000; ++i)
- {
- ResultFloat += glm::signedRand1<float>();
- ResultDouble += glm::signedRand1<double>();
- }
-
- Error += glm::equalEpsilon(ResultFloat, 0.0f, 0.0001f);
- Error += glm::equalEpsilon(ResultDouble, 0.0, 0.0001);
- }
-
- return Error;
-}
-
-int test_normalizedRand2()
-{
- int Error = 0;
-
- {
- std::size_t Max = 100000;
- float ResultFloat = 0.0f;
- double ResultDouble = 0.0f;
- for(std::size_t i = 0; i < Max; ++i)
- {
- ResultFloat += glm::length(glm::normalizedRand2<float>());
- ResultDouble += glm::length(glm::normalizedRand2<double>());
- }
-
- Error += glm::equalEpsilon(ResultFloat, float(Max), 0.000001f) ? 0 : 1;
- Error += glm::equalEpsilon(ResultDouble, double(Max), 0.000001) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int test_normalizedRand3()
-{
- int Error = 0;
-
- {
- std::size_t Max = 100000;
- float ResultFloatA = 0.0f;
- float ResultFloatB = 0.0f;
- float ResultFloatC = 0.0f;
- double ResultDoubleA = 0.0f;
- double ResultDoubleB = 0.0f;
- double ResultDoubleC = 0.0f;
- for(std::size_t i = 0; i < Max; ++i)
- {
- ResultFloatA += glm::length(glm::normalizedRand3<float>());
- ResultDoubleA += glm::length(glm::normalizedRand3<double>());
- ResultFloatB += glm::length(glm::normalizedRand3(2.0f, 2.0f));
- ResultDoubleB += glm::length(glm::normalizedRand3(2.0, 2.0));
- ResultFloatC += glm::length(glm::normalizedRand3(1.0f, 3.0f));
- ResultDoubleC += glm::length(glm::normalizedRand3(1.0, 3.0));
- }
-
- Error += glm::equalEpsilon(ResultFloatA, float(Max), 0.0001f) ? 0 : 1;
- Error += glm::equalEpsilon(ResultDoubleA, double(Max), 0.0001) ? 0 : 1;
- Error += glm::equalEpsilon(ResultFloatB, float(Max * 2), 0.0001f) ? 0 : 1;
- Error += glm::equalEpsilon(ResultDoubleB, double(Max * 2), 0.0001) ? 0 : 1;
- Error += (ResultFloatC >= float(Max) && ResultFloatC <= float(Max * 3)) ? 0 : 1;
- Error += (ResultDoubleC >= double(Max) && ResultDoubleC <= double(Max * 3)) ? 0 : 1;
- }
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_signedRand1();
- Error += test_normalizedRand2();
- Error += test_normalizedRand3();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_range.cpp b/3rdparty/glm/source/test/gtx/gtx_range.cpp
deleted file mode 100644
index 434731b..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_range.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtc/constants.hpp>
-#include <glm/ext/scalar_relational.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/glm.hpp>
-
-#if GLM_HAS_RANGE_FOR
-
-#include <glm/gtx/range.hpp>
-
-int test_vec()
-{
- int Error = 0;
-
- {
- glm::ivec3 const v(1, 2, 3);
-
- int count = 0;
- glm::ivec3 Result(0);
- for(int x : v)
- {
- Result[count] = x;
- count++;
- }
- Error += count == 3 ? 0 : 1;
- Error += v == Result ? 0 : 1;
- }
-
- {
- glm::ivec3 v(1, 2, 3);
- for(int& x : v)
- x = 0;
- Error += glm::all(glm::equal(v, glm::ivec3(0))) ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_mat()
-{
- int Error = 0;
-
- {
- glm::mat4x3 m(1.0f);
-
- int count = 0;
- float Sum = 0.0f;
- for(float x : m)
- {
- count++;
- Sum += x;
- }
- Error += count == 12 ? 0 : 1;
- Error += glm::equal(Sum, 3.0f, 0.001f) ? 0 : 1;
- }
-
- {
- glm::mat4x3 m(1.0f);
-
- for (float& x : m) { x = 0; }
- glm::vec4 v(1, 1, 1, 1);
- Error += glm::all(glm::equal(m*v, glm::vec3(0, 0, 0), glm::epsilon<float>())) ? 0 : 1;
- }
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
- Error += test_vec();
- Error += test_mat();
- return Error;
-}
-
-#else
-
-int main()
-{
- return 0;
-}
-
-#endif//GLM_HAS_RANGE_FOR
diff --git a/3rdparty/glm/source/test/gtx/gtx_rotate_normalized_axis.cpp b/3rdparty/glm/source/test/gtx/gtx_rotate_normalized_axis.cpp
deleted file mode 100644
index d4eecdf..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_rotate_normalized_axis.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/rotate_normalized_axis.hpp>
-
-int main()
-{
- int Error(0);
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_rotate_vector.cpp b/3rdparty/glm/source/test/gtx/gtx_rotate_vector.cpp
deleted file mode 100644
index becd63f..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_rotate_vector.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/rotate_vector.hpp>
-#include <glm/gtc/constants.hpp>
-#include <glm/ext/vector_relational.hpp>
-
-int test_rotate()
-{
- int Error = 0;
-
- glm::vec2 A = glm::rotate(glm::vec2(1, 0), glm::pi<float>() * 0.5f);
- glm::vec3 B = glm::rotate(glm::vec3(1, 0, 0), glm::pi<float>() * 0.5f, glm::vec3(0, 0, 1));
- glm::vec4 C = glm::rotate(glm::vec4(1, 0, 0, 1), glm::pi<float>() * 0.5f, glm::vec3(0, 0, 1));
- glm::vec3 D = glm::rotateX(glm::vec3(1, 0, 0), glm::pi<float>() * 0.5f);
- glm::vec4 E = glm::rotateX(glm::vec4(1, 0, 0, 1), glm::pi<float>() * 0.5f);
- glm::vec3 F = glm::rotateY(glm::vec3(1, 0, 0), glm::pi<float>() * 0.5f);
- glm::vec4 G = glm::rotateY(glm::vec4(1, 0, 0, 1), glm::pi<float>() * 0.5f);
- glm::vec3 H = glm::rotateZ(glm::vec3(1, 0, 0), glm::pi<float>() * 0.5f);
- glm::vec4 I = glm::rotateZ(glm::vec4(1, 0, 0,1 ), glm::pi<float>() * 0.5f);
- glm::mat4 O = glm::orientation(glm::normalize(glm::vec3(1)), glm::vec3(0, 0, 1));
-
- return Error;
-}
-
-int test_rotateX()
-{
- int Error = 0;
-
- glm::vec3 D = glm::rotateX(glm::vec3(1, 0, 0), glm::pi<float>() * 0.5f);
- glm::vec4 E = glm::rotateX(glm::vec4(1, 0, 0, 1), glm::pi<float>() * 0.5f);
-
- return Error;
-}
-
-int test_rotateY()
-{
- int Error = 0;
-
- glm::vec3 F = glm::rotateY(glm::vec3(1, 0, 0), glm::pi<float>() * 0.5f);
- glm::vec4 G = glm::rotateY(glm::vec4(1, 0, 0, 1), glm::pi<float>() * 0.5f);
-
- return Error;
-}
-
-
-int test_rotateZ()
-{
- int Error = 0;
-
- glm::vec3 H = glm::rotateZ(glm::vec3(1, 0, 0), glm::pi<float>() * 0.5f);
- glm::vec4 I = glm::rotateZ(glm::vec4(1, 0, 0,1 ), glm::pi<float>() * 0.5f);
-
- return Error;
-}
-
-int test_orientation()
-{
- int Error = 0;
-
- glm::mat4 O = glm::orientation(glm::normalize(glm::vec3(1)), glm::vec3(0, 0, 1));
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_rotate();
- Error += test_rotateX();
- Error += test_rotateY();
- Error += test_rotateZ();
- Error += test_orientation();
-
- return Error;
-}
-
-
diff --git a/3rdparty/glm/source/test/gtx/gtx_scalar_multiplication.cpp b/3rdparty/glm/source/test/gtx/gtx_scalar_multiplication.cpp
deleted file mode 100644
index 4aa96d6..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_scalar_multiplication.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtc/constants.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/glm.hpp>
-
-#if GLM_HAS_TEMPLATE_ALIASES && !(GLM_COMPILER & GLM_COMPILER_GCC)
-#include <glm/gtx/scalar_multiplication.hpp>
-
-int main()
-{
- int Error(0);
- glm::vec3 v(0.5, 3.1, -9.1);
-
- Error += glm::all(glm::equal(v, 1.0 * v, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(v, 1 * v, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(v, 1u * v, glm::epsilon<float>())) ? 0 : 1;
-
- glm::mat3 m(1, 2, 3, 4, 5, 6, 7, 8, 9);
- glm::vec3 w = 0.5f * m * v;
-
- Error += glm::all(glm::equal((m*v)/2, w, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(m*(v/2), w, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal((m/2)*v, w, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal((0.5*m)*v, w, glm::epsilon<float>())) ? 0 : 1;
- Error += glm::all(glm::equal(0.5*(m*v), w, glm::epsilon<float>())) ? 0 : 1;
-
- return Error;
-}
-
-#else
-
-int main()
-{
- return 0;
-}
-
-#endif
diff --git a/3rdparty/glm/source/test/gtx/gtx_scalar_relational.cpp b/3rdparty/glm/source/test/gtx/gtx_scalar_relational.cpp
deleted file mode 100644
index fc6a09a..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_scalar_relational.cpp
+++ /dev/null
@@ -1,174 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/scalar_relational.hpp>
-#include <glm/gtc/constants.hpp>
-#include <glm/ext/scalar_relational.hpp>
-#include <glm/ext/vector_relational.hpp>
-#include <glm/ext/matrix_relational.hpp>
-#include <glm/glm.hpp>
-
-static int test_lessThan()
-{
- int Error = 0;
-
- Error += glm::lessThan(0, 1) ? 0 : 1;
- Error += glm::lessThan(1, 0) ? 1 : 0;
- Error += glm::lessThan(0, 0) ? 1 : 0;
- Error += glm::lessThan(1, 1) ? 1 : 0;
- Error += glm::lessThan(0.0f, 1.0f) ? 0 : 1;
- Error += glm::lessThan(1.0f, 0.0f) ? 1 : 0;
- Error += glm::lessThan(0.0f, 0.0f) ? 1 : 0;
- Error += glm::lessThan(1.0f, 1.0f) ? 1 : 0;
- Error += glm::lessThan(0.0, 1.0) ? 0 : 1;
- Error += glm::lessThan(1.0, 0.0) ? 1 : 0;
- Error += glm::lessThan(0.0, 0.0) ? 1 : 0;
- Error += glm::lessThan(1.0, 1.0) ? 1 : 0;
-
- return Error;
-}
-
-static int test_lessThanEqual()
-{
- int Error = 0;
-
- Error += glm::lessThanEqual(0, 1) ? 0 : 1;
- Error += glm::lessThanEqual(1, 0) ? 1 : 0;
- Error += glm::lessThanEqual(0, 0) ? 0 : 1;
- Error += glm::lessThanEqual(1, 1) ? 0 : 1;
- Error += glm::lessThanEqual(0.0f, 1.0f) ? 0 : 1;
- Error += glm::lessThanEqual(1.0f, 0.0f) ? 1 : 0;
- Error += glm::lessThanEqual(0.0f, 0.0f) ? 0 : 1;
- Error += glm::lessThanEqual(1.0f, 1.0f) ? 0 : 1;
- Error += glm::lessThanEqual(0.0, 1.0) ? 0 : 1;
- Error += glm::lessThanEqual(1.0, 0.0) ? 1 : 0;
- Error += glm::lessThanEqual(0.0, 0.0) ? 0 : 1;
- Error += glm::lessThanEqual(1.0, 1.0) ? 0 : 1;
-
- return Error;
-}
-
-static int test_greaterThan()
-{
- int Error = 0;
-
- Error += glm::greaterThan(0, 1) ? 1 : 0;
- Error += glm::greaterThan(1, 0) ? 0 : 1;
- Error += glm::greaterThan(0, 0) ? 1 : 0;
- Error += glm::greaterThan(1, 1) ? 1 : 0;
- Error += glm::greaterThan(0.0f, 1.0f) ? 1 : 0;
- Error += glm::greaterThan(1.0f, 0.0f) ? 0 : 1;
- Error += glm::greaterThan(0.0f, 0.0f) ? 1 : 0;
- Error += glm::greaterThan(1.0f, 1.0f) ? 1 : 0;
- Error += glm::greaterThan(0.0, 1.0) ? 1 : 0;
- Error += glm::greaterThan(1.0, 0.0) ? 0 : 1;
- Error += glm::greaterThan(0.0, 0.0) ? 1 : 0;
- Error += glm::greaterThan(1.0, 1.0) ? 1 : 0;
-
- return Error;
-}
-
-static int test_greaterThanEqual()
-{
- int Error = 0;
-
- Error += glm::greaterThanEqual(0, 1) ? 1 : 0;
- Error += glm::greaterThanEqual(1, 0) ? 0 : 1;
- Error += glm::greaterThanEqual(0, 0) ? 0 : 1;
- Error += glm::greaterThanEqual(1, 1) ? 0 : 1;
- Error += glm::greaterThanEqual(0.0f, 1.0f) ? 1 : 0;
- Error += glm::greaterThanEqual(1.0f, 0.0f) ? 0 : 1;
- Error += glm::greaterThanEqual(0.0f, 0.0f) ? 0 : 1;
- Error += glm::greaterThanEqual(1.0f, 1.0f) ? 0 : 1;
- Error += glm::greaterThanEqual(0.0, 1.0) ? 1 : 0;
- Error += glm::greaterThanEqual(1.0, 0.0) ? 0 : 1;
- Error += glm::greaterThanEqual(0.0, 0.0) ? 0 : 1;
- Error += glm::greaterThanEqual(1.0, 1.0) ? 0 : 1;
-
- return Error;
-}
-
-static int test_equal()
-{
- int Error = 0;
-
- Error += glm::equal(0, 1) ? 1 : 0;
- Error += glm::equal(1, 0) ? 1 : 0;
- Error += glm::equal(0, 0) ? 0 : 1;
- Error += glm::equal(1, 1) ? 0 : 1;
- Error += glm::equal(0.0f, 1.0f, glm::epsilon<float>()) ? 1 : 0;
- Error += glm::equal(1.0f, 0.0f, glm::epsilon<float>()) ? 1 : 0;
- Error += glm::equal(0.0f, 0.0f, glm::epsilon<float>()) ? 0 : 1;
- Error += glm::equal(1.0f, 1.0f, glm::epsilon<float>()) ? 0 : 1;
- Error += glm::equal(0.0, 1.0, glm::epsilon<double>()) ? 1 : 0;
- Error += glm::equal(1.0, 0.0, glm::epsilon<double>()) ? 1 : 0;
- Error += glm::equal(0.0, 0.0, glm::epsilon<double>()) ? 0 : 1;
- Error += glm::equal(1.0, 1.0, glm::epsilon<double>()) ? 0 : 1;
-
- return Error;
-}
-
-static int test_notEqual()
-{
- int Error = 0;
-
- Error += glm::notEqual(0, 1) ? 0 : 1;
- Error += glm::notEqual(1, 0) ? 0 : 1;
- Error += glm::notEqual(0, 0) ? 1 : 0;
- Error += glm::notEqual(1, 1) ? 1 : 0;
- Error += glm::notEqual(0.0f, 1.0f, glm::epsilon<float>()) ? 0 : 1;
- Error += glm::notEqual(1.0f, 0.0f, glm::epsilon<float>()) ? 0 : 1;
- Error += glm::notEqual(0.0f, 0.0f, glm::epsilon<float>()) ? 1 : 0;
- Error += glm::notEqual(1.0f, 1.0f, glm::epsilon<float>()) ? 1 : 0;
- Error += glm::notEqual(0.0, 1.0, glm::epsilon<double>()) ? 0 : 1;
- Error += glm::notEqual(1.0, 0.0, glm::epsilon<double>()) ? 0 : 1;
- Error += glm::notEqual(0.0, 0.0, glm::epsilon<double>()) ? 1 : 0;
- Error += glm::notEqual(1.0, 1.0, glm::epsilon<double>()) ? 1 : 0;
-
- return Error;
-}
-
-static int test_any()
-{
- int Error = 0;
-
- Error += glm::any(true) ? 0 : 1;
- Error += glm::any(false) ? 1 : 0;
-
- return Error;
-}
-
-static int test_all()
-{
- int Error = 0;
-
- Error += glm::all(true) ? 0 : 1;
- Error += glm::all(false) ? 1 : 0;
-
- return Error;
-}
-
-static int test_not()
-{
- int Error = 0;
-
- Error += glm::not_(true) ? 1 : 0;
- Error += glm::not_(false) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_lessThan();
- Error += test_lessThanEqual();
- Error += test_greaterThan();
- Error += test_greaterThanEqual();
- Error += test_equal();
- Error += test_notEqual();
- Error += test_any();
- Error += test_all();
- Error += test_not();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_simd_mat4.cpp b/3rdparty/glm/source/test/gtx/gtx_simd_mat4.cpp
deleted file mode 100644
index 28d7ec5..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_simd_mat4.cpp
+++ /dev/null
@@ -1,324 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////////
-/// OpenGL Mathematics (glm.g-truc.net)
-///
-/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
-/// Permission is hereby granted, free of charge, to any person obtaining a copy
-/// of this software and associated documentation files (the "Software"), to deal
-/// in the Software without restriction, including without limitation the rights
-/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-/// copies of the Software, and to permit persons to whom the Software is
-/// furnished to do so, subject to the following conditions:
-///
-/// The above copyright notice and this permission notice shall be included in
-/// all copies or substantial portions of the Software.
-///
-/// Restrictions:
-/// By making use of the Software for military purposes, you choose to make
-/// a Bunny unhappy.
-///
-/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-/// THE SOFTWARE.
-///
-/// @file test/gtx/gtx_simd_mat4.cpp
-/// @date 2010-09-16 / 2014-11-25
-/// @author Christophe Riccio
-///////////////////////////////////////////////////////////////////////////////////
-
-#include <glm/glm.hpp>
-#include <glm/gtc/matrix_transform.hpp>
-#include <glm/gtc/quaternion.hpp>
-#include <glm/gtc/random.hpp>
-#include <glm/gtx/simd_vec4.hpp>
-#include <glm/gtx/simd_mat4.hpp>
-#include <cstdio>
-#include <ctime>
-#include <vector>
-
-#if(GLM_ARCH != GLM_ARCH_PURE)
-
-std::vector<float> test_detA(std::vector<glm::mat4> const & Data)
-{
- std::vector<float> Test(Data.size());
-
- std::clock_t TimeStart = clock();
-
- for(std::size_t i = 0; i < Test.size() - 1; ++i)
- Test[i] = glm::determinant(Data[i]);
-
- std::clock_t TimeEnd = clock();
- printf("Det A: %ld\n", TimeEnd - TimeStart);
-
- return Test;
-}
-
-std::vector<float> test_detB(std::vector<glm::mat4> const & Data)
-{
- std::vector<float> Test(Data.size());
-
- std::clock_t TimeStart = clock();
-
- for(std::size_t i = 0; i < Test.size() - 1; ++i)
- {
- _mm_prefetch((char*)&Data[i + 1], _MM_HINT_T0);
- glm::simdMat4 m(Data[i]);
- glm::simdVec4 d(glm::detail::sse_slow_det_ps((__m128 const * const)&m));
- glm::vec4 v;//(d);
- Test[i] = v.x;
- }
-
- std::clock_t TimeEnd = clock();
- printf("Det B: %ld\n", TimeEnd - TimeStart);
-
- return Test;
-}
-
-std::vector<float> test_detC(std::vector<glm::mat4> const & Data)
-{
- std::vector<float> Test(Data.size());
-
- std::clock_t TimeStart = clock();
-
- for(std::size_t i = 0; i < Test.size() - 1; ++i)
- {
- _mm_prefetch((char*)&Data[i + 1], _MM_HINT_T0);
- glm::simdMat4 m(Data[i]);
- glm::simdVec4 d(glm::detail::sse_det_ps((__m128 const * const)&m));
- glm::vec4 v;//(d);
- Test[i] = v.x;
- }
-
- std::clock_t TimeEnd = clock();
- printf("Det C: %ld\n", TimeEnd - TimeStart);
-
- return Test;
-}
-
-std::vector<float> test_detD(std::vector<glm::mat4> const & Data)
-{
- std::vector<float> Test(Data.size());
-
- std::clock_t TimeStart = clock();
-
- for(std::size_t i = 0; i < Test.size() - 1; ++i)
- {
- _mm_prefetch((char*)&Data[i + 1], _MM_HINT_T0);
- glm::simdMat4 m(Data[i]);
- glm::simdVec4 d(glm::detail::sse_detd_ps((__m128 const * const)&m));
- glm::vec4 v;//(d);
- Test[i] = v.x;
- }
-
- std::clock_t TimeEnd = clock();
- printf("Det D: %ld\n", TimeEnd - TimeStart);
-
- return Test;
-}
-
-void test_invA(std::vector<glm::mat4> const & Data, std::vector<glm::mat4> & Out)
-{
- //std::vector<float> Test(Data.size());
- Out.resize(Data.size());
-
- std::clock_t TimeStart = clock();
-
- for(std::size_t i = 0; i < Out.size() - 1; ++i)
- {
- Out[i] = glm::inverse(Data[i]);
- }
-
- std::clock_t TimeEnd = clock();
- printf("Inv A: %ld\n", TimeEnd - TimeStart);
-}
-
-void test_invC(std::vector<glm::mat4> const & Data, std::vector<glm::mat4> & Out)
-{
- //std::vector<float> Test(Data.size());
- Out.resize(Data.size());
-
- std::clock_t TimeStart = clock();
-
- for(std::size_t i = 0; i < Out.size() - 1; ++i)
- {
- _mm_prefetch((char*)&Data[i + 1], _MM_HINT_T0);
- glm::simdMat4 m(Data[i]);
- glm::simdMat4 o;
- glm::detail::sse_inverse_fast_ps((__m128 const * const)&m, (__m128 *)&o);
- Out[i] = *(glm::mat4*)&o;
- }
-
- std::clock_t TimeEnd = clock();
- printf("Inv C: %ld\n", TimeEnd - TimeStart);
-}
-
-void test_invD(std::vector<glm::mat4> const & Data, std::vector<glm::mat4> & Out)
-{
- //std::vector<float> Test(Data.size());
- Out.resize(Data.size());
-
- std::clock_t TimeStart = clock();
-
- for(std::size_t i = 0; i < Out.size() - 1; ++i)
- {
- _mm_prefetch((char*)&Data[i + 1], _MM_HINT_T0);
- glm::simdMat4 m(Data[i]);
- glm::simdMat4 o;
- glm::detail::sse_inverse_ps((__m128 const * const)&m, (__m128 *)&o);
- Out[i] = *(glm::mat4*)&o;
- }
-
- std::clock_t TimeEnd = clock();
- printf("Inv D: %ld\n", TimeEnd - TimeStart);
-}
-
-void test_mulA(std::vector<glm::mat4> const & Data, std::vector<glm::mat4> & Out)
-{
- //std::vector<float> Test(Data.size());
- Out.resize(Data.size());
-
- std::clock_t TimeStart = clock();
-
- for(std::size_t i = 0; i < Out.size() - 1; ++i)
- {
- Out[i] = Data[i] * Data[i];
- }
-
- std::clock_t TimeEnd = clock();
- printf("Mul A: %ld\n", TimeEnd - TimeStart);
-}
-
-void test_mulD(std::vector<glm::mat4> const & Data, std::vector<glm::mat4> & Out)
-{
- //std::vector<float> Test(Data.size());
- Out.resize(Data.size());
-
- std::clock_t TimeStart = clock();
-
- for(std::size_t i = 0; i < Out.size() - 1; ++i)
- {
- _mm_prefetch((char*)&Data[i + 1], _MM_HINT_T0);
- glm::simdMat4 m(Data[i]);
- glm::simdMat4 o;
- glm::detail::sse_mul_ps((__m128 const * const)&m, (__m128 const * const)&m, (__m128*)&o);
- Out[i] = *(glm::mat4*)&o;
- }
-
- std::clock_t TimeEnd = clock();
- printf("Mul D: %ld\n", TimeEnd - TimeStart);
-}
-
-int test_compute_glm()
-{
- return 0;
-}
-
-int test_compute_gtx()
-{
- std::vector<glm::vec4> Output(1000000);
-
- std::clock_t TimeStart = clock();
-
- for(std::size_t k = 0; k < Output.size(); ++k)
- {
- float i = float(k) / 1000.f + 0.001f;
- glm::vec3 A = glm::normalize(glm::vec3(i));
- glm::vec3 B = glm::cross(A, glm::normalize(glm::vec3(1, 1, 2)));
- glm::mat4 C = glm::rotate(glm::mat4(1.0f), i, B);
- glm::mat4 D = glm::scale(C, glm::vec3(0.8f, 1.0f, 1.2f));
- glm::mat4 E = glm::translate(D, glm::vec3(1.4f, 1.2f, 1.1f));
- glm::mat4 F = glm::perspective(i, 1.5f, 0.1f, 1000.f);
- glm::mat4 G = glm::inverse(F * E);
- glm::vec3 H = glm::unProject(glm::vec3(i), G, F, E[3]);
- glm::vec3 I = glm::any(glm::isnan(glm::project(H, G, F, E[3]))) ? glm::vec3(2) : glm::vec3(1);
- glm::mat4 J = glm::lookAt(glm::normalize(glm::max(B, glm::vec3(0.001f))), H, I);
- glm::mat4 K = glm::transpose(J);
- glm::quat L = glm::normalize(glm::quat_cast(K));
- glm::vec4 M = L * glm::smoothstep(K[3], J[3], glm::vec4(i));
- glm::mat4 N = glm::mat4(glm::normalize(glm::max(M, glm::vec4(0.001f))), K[3], J[3], glm::vec4(i));
- glm::mat4 O = N * glm::inverse(N);
- glm::vec4 P = O * glm::reflect(N[3], glm::vec4(A, 1.0f));
- glm::vec4 Q = glm::vec4(glm::dot(M, P));
- glm::vec4 R = glm::quat(Q.w, glm::vec3(Q)) * P;
- Output[k] = R;
- }
-
- std::clock_t TimeEnd = clock();
- printf("test_compute_gtx: %ld\n", TimeEnd - TimeStart);
-
- return 0;
-}
-
-int main()
-{
- int Error = 0;
-
- std::vector<glm::mat4> Data(64 * 64 * 1);
- for(std::size_t i = 0; i < Data.size(); ++i)
- Data[i] = glm::mat4(
- glm::vec4(glm::linearRand(glm::vec4(-2.0f), glm::vec4(2.0f))),
- glm::vec4(glm::linearRand(glm::vec4(-2.0f), glm::vec4(2.0f))),
- glm::vec4(glm::linearRand(glm::vec4(-2.0f), glm::vec4(2.0f))),
- glm::vec4(glm::linearRand(glm::vec4(-2.0f), glm::vec4(2.0f))));
-
- {
- std::vector<glm::mat4> TestInvA;
- test_invA(Data, TestInvA);
- }
- {
- std::vector<glm::mat4> TestInvC;
- test_invC(Data, TestInvC);
- }
- {
- std::vector<glm::mat4> TestInvD;
- test_invD(Data, TestInvD);
- }
-
- {
- std::vector<glm::mat4> TestA;
- test_mulA(Data, TestA);
- }
- {
- std::vector<glm::mat4> TestD;
- test_mulD(Data, TestD);
- }
-
- {
- std::vector<float> TestDetA = test_detA(Data);
- std::vector<float> TestDetB = test_detB(Data);
- std::vector<float> TestDetD = test_detD(Data);
- std::vector<float> TestDetC = test_detC(Data);
-
- for(std::size_t i = 0; i < TestDetA.size(); ++i)
- if(TestDetA[i] != TestDetB[i] && TestDetC[i] != TestDetB[i] && TestDetC[i] != TestDetD[i])
- return 1;
- }
-
- // shuffle test
- glm::simdVec4 A(1.0f, 2.0f, 3.0f, 4.0f);
- glm::simdVec4 B(5.0f, 6.0f, 7.0f, 8.0f);
- //__m128 C = _mm_shuffle_ps(A.Data, B.Data, _MM_SHUFFLE(1, 0, 1, 0));
-
- Error += test_compute_glm();
- Error += test_compute_gtx();
- float Det = glm::determinant(glm::simdMat4(1.0));
- Error += Det == 1.0f ? 0 : 1;
-
- glm::simdMat4 D = glm::matrixCompMult(glm::simdMat4(1.0), glm::simdMat4(1.0));
-
- return Error;
-}
-
-#else
-
-int main()
-{
- int Error = 0;
-
- return Error;
-}
-
-#endif//(GLM_ARCH != GLM_ARCH_PURE)
diff --git a/3rdparty/glm/source/test/gtx/gtx_simd_vec4.cpp b/3rdparty/glm/source/test/gtx/gtx_simd_vec4.cpp
deleted file mode 100644
index e71a60b..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_simd_vec4.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////////
-/// OpenGL Mathematics (glm.g-truc.net)
-///
-/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
-/// Permission is hereby granted, free of charge, to any person obtaining a copy
-/// of this software and associated documentation files (the "Software"), to deal
-/// in the Software without restriction, including without limitation the rights
-/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-/// copies of the Software, and to permit persons to whom the Software is
-/// furnished to do so, subject to the following conditions:
-///
-/// The above copyright notice and this permission notice shall be included in
-/// all copies or substantial portions of the Software.
-///
-/// Restrictions:
-/// By making use of the Software for military purposes, you choose to make
-/// a Bunny unhappy.
-///
-/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-/// THE SOFTWARE.
-///
-/// @file test/gtx/gtx_simd_vec4.cpp
-/// @date 2010-09-16 / 2014-11-25
-/// @author Christophe Riccio
-///////////////////////////////////////////////////////////////////////////////////
-
-#include <glm/glm.hpp>
-#include <glm/gtx/simd_vec4.hpp>
-#include <cstdio>
-
-#if(GLM_ARCH != GLM_ARCH_PURE)
-
-int main()
-{
- glm::simdVec4 A1(0.0f, 0.1f, 0.2f, 0.3f);
- glm::simdVec4 B1(0.4f, 0.5f, 0.6f, 0.7f);
- glm::simdVec4 C1 = A1 + B1;
- glm::simdVec4 D1 = A1.swizzle<glm::X, glm::Z, glm::Y, glm::W>();
- glm::simdVec4 E1(glm::vec4(1.0f));
- glm::vec4 F1 = glm::vec4_cast(E1);
- //glm::vec4 G1(E1);
-
- //printf("A1(%2.3f, %2.3f, %2.3f, %2.3f)\n", A1.x, A1.y, A1.z, A1.w);
- //printf("B1(%2.3f, %2.3f, %2.3f, %2.3f)\n", B1.x, B1.y, B1.z, B1.w);
- //printf("C1(%2.3f, %2.3f, %2.3f, %2.3f)\n", C1.x, C1.y, C1.z, C1.w);
- //printf("D1(%2.3f, %2.3f, %2.3f, %2.3f)\n", D1.x, D1.y, D1.z, D1.w);
-
- __m128 value = _mm_set1_ps(0.0f);
- __m128 data = _mm_cmpeq_ps(value, value);
- __m128 add0 = _mm_add_ps(data, data);
-
- glm::simdVec4 GNI(add0);
-
- return 0;
-}
-
-#else
-
-int main()
-{
- int Error = 0;
-
- return Error;
-}
-
-#endif//(GLM_ARCH != GLM_ARCH_PURE)
diff --git a/3rdparty/glm/source/test/gtx/gtx_spline.cpp b/3rdparty/glm/source/test/gtx/gtx_spline.cpp
deleted file mode 100644
index c93ee17..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_spline.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/vec2.hpp>
-#include <glm/vec3.hpp>
-#include <glm/vec4.hpp>
-#include <glm/gtx/spline.hpp>
-
-namespace catmullRom
-{
- int test()
- {
- int Error(0);
-
- glm::vec2 Result2 = glm::catmullRom(
- glm::vec2(0.0f, 0.0f),
- glm::vec2(1.0f, 0.0f),
- glm::vec2(1.0f, 1.0f),
- glm::vec2(0.0f, 1.0f), 0.5f);
-
- glm::vec3 Result3 = glm::catmullRom(
- glm::vec3(0.0f, 0.0f, 0.0f),
- glm::vec3(1.0f, 0.0f, 0.0f),
- glm::vec3(1.0f, 1.0f, 0.0f),
- glm::vec3(0.0f, 1.0f, 0.0f), 0.5f);
-
- glm::vec4 Result4 = glm::catmullRom(
- glm::vec4(0.0f, 0.0f, 0.0f, 1.0f),
- glm::vec4(1.0f, 0.0f, 0.0f, 1.0f),
- glm::vec4(1.0f, 1.0f, 0.0f, 1.0f),
- glm::vec4(0.0f, 1.0f, 0.0f, 1.0f), 0.5f);
-
- return Error;
- }
-}//catmullRom
-
-namespace hermite
-{
- int test()
- {
- int Error(0);
-
- glm::vec2 Result2 = glm::hermite(
- glm::vec2(0.0f, 0.0f),
- glm::vec2(1.0f, 0.0f),
- glm::vec2(1.0f, 1.0f),
- glm::vec2(0.0f, 1.0f), 0.5f);
-
- glm::vec3 Result3 = glm::hermite(
- glm::vec3(0.0f, 0.0f, 0.0f),
- glm::vec3(1.0f, 0.0f, 0.0f),
- glm::vec3(1.0f, 1.0f, 0.0f),
- glm::vec3(0.0f, 1.0f, 0.0f), 0.5f);
-
- glm::vec4 Result4 = glm::hermite(
- glm::vec4(0.0f, 0.0f, 0.0f, 1.0f),
- glm::vec4(1.0f, 0.0f, 0.0f, 1.0f),
- glm::vec4(1.0f, 1.0f, 0.0f, 1.0f),
- glm::vec4(0.0f, 1.0f, 0.0f, 1.0f), 0.5f);
-
- return Error;
- }
-}//catmullRom
-
-namespace cubic
-{
- int test()
- {
- int Error(0);
-
- glm::vec2 Result2 = glm::cubic(
- glm::vec2(0.0f, 0.0f),
- glm::vec2(1.0f, 0.0f),
- glm::vec2(1.0f, 1.0f),
- glm::vec2(0.0f, 1.0f), 0.5f);
-
- glm::vec3 Result3 = glm::cubic(
- glm::vec3(0.0f, 0.0f, 0.0f),
- glm::vec3(1.0f, 0.0f, 0.0f),
- glm::vec3(1.0f, 1.0f, 0.0f),
- glm::vec3(0.0f, 1.0f, 0.0f), 0.5f);
-
- glm::vec4 Result = glm::cubic(
- glm::vec4(0.0f, 0.0f, 0.0f, 1.0f),
- glm::vec4(1.0f, 0.0f, 0.0f, 1.0f),
- glm::vec4(1.0f, 1.0f, 0.0f, 1.0f),
- glm::vec4(0.0f, 1.0f, 0.0f, 1.0f), 0.5f);
-
- return Error;
- }
-}//catmullRom
-
-int main()
-{
- int Error(0);
-
- Error += catmullRom::test();
- Error += hermite::test();
- Error += cubic::test();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_string_cast.cpp b/3rdparty/glm/source/test/gtx/gtx_string_cast.cpp
deleted file mode 100644
index b04c870..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_string_cast.cpp
+++ /dev/null
@@ -1,155 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/glm.hpp>
-#include <glm/gtx/string_cast.hpp>
-#include <limits>
-
-int test_string_cast_vector()
-{
- int Error = 0;
-
- {
- glm::vec2 A1(1, 2);
- std::string A2 = glm::to_string(A1);
- Error += A2 != std::string("vec2(1.000000, 2.000000)") ? 1 : 0;
-
- glm::vec3 B1(1, 2, 3);
- std::string B2 = glm::to_string(B1);
- Error += B2 != std::string("vec3(1.000000, 2.000000, 3.000000)") ? 1 : 0;
-
- glm::vec4 C1(1, 2, 3, 4);
- std::string C2 = glm::to_string(C1);
- Error += C2 != std::string("vec4(1.000000, 2.000000, 3.000000, 4.000000)") ? 1 : 0;
-
- glm::dvec2 J1(1, 2);
- std::string J2 = glm::to_string(J1);
- Error += J2 != std::string("dvec2(1.000000, 2.000000)") ? 1 : 0;
-
- glm::dvec3 K1(1, 2, 3);
- std::string K2 = glm::to_string(K1);
- Error += K2 != std::string("dvec3(1.000000, 2.000000, 3.000000)") ? 1 : 0;
-
- glm::dvec4 L1(1, 2, 3, 4);
- std::string L2 = glm::to_string(L1);
- Error += L2 != std::string("dvec4(1.000000, 2.000000, 3.000000, 4.000000)") ? 1 : 0;
- }
-
- {
- glm::bvec2 M1(false, true);
- std::string M2 = glm::to_string(M1);
- Error += M2 != std::string("bvec2(false, true)") ? 1 : 0;
-
- glm::bvec3 O1(false, true, false);
- std::string O2 = glm::to_string(O1);
- Error += O2 != std::string("bvec3(false, true, false)") ? 1 : 0;
-
- glm::bvec4 P1(false, true, false, true);
- std::string P2 = glm::to_string(P1);
- Error += P2 != std::string("bvec4(false, true, false, true)") ? 1 : 0;
- }
-
- {
- glm::ivec2 D1(1, 2);
- std::string D2 = glm::to_string(D1);
- Error += D2 != std::string("ivec2(1, 2)") ? 1 : 0;
-
- glm::ivec3 E1(1, 2, 3);
- std::string E2 = glm::to_string(E1);
- Error += E2 != std::string("ivec3(1, 2, 3)") ? 1 : 0;
-
- glm::ivec4 F1(1, 2, 3, 4);
- std::string F2 = glm::to_string(F1);
- Error += F2 != std::string("ivec4(1, 2, 3, 4)") ? 1 : 0;
- }
-
- {
- glm::i8vec2 D1(1, 2);
- std::string D2 = glm::to_string(D1);
- Error += D2 != std::string("i8vec2(1, 2)") ? 1 : 0;
-
- glm::i8vec3 E1(1, 2, 3);
- std::string E2 = glm::to_string(E1);
- Error += E2 != std::string("i8vec3(1, 2, 3)") ? 1 : 0;
-
- glm::i8vec4 F1(1, 2, 3, 4);
- std::string F2 = glm::to_string(F1);
- Error += F2 != std::string("i8vec4(1, 2, 3, 4)") ? 1 : 0;
- }
-
- {
- glm::i16vec2 D1(1, 2);
- std::string D2 = glm::to_string(D1);
- Error += D2 != std::string("i16vec2(1, 2)") ? 1 : 0;
-
- glm::i16vec3 E1(1, 2, 3);
- std::string E2 = glm::to_string(E1);
- Error += E2 != std::string("i16vec3(1, 2, 3)") ? 1 : 0;
-
- glm::i16vec4 F1(1, 2, 3, 4);
- std::string F2 = glm::to_string(F1);
- Error += F2 != std::string("i16vec4(1, 2, 3, 4)") ? 1 : 0;
- }
-
- {
- glm::i64vec2 D1(1, 2);
- std::string D2 = glm::to_string(D1);
- Error += D2 != std::string("i64vec2(1, 2)") ? 1 : 0;
-
- glm::i64vec3 E1(1, 2, 3);
- std::string E2 = glm::to_string(E1);
- Error += E2 != std::string("i64vec3(1, 2, 3)") ? 1 : 0;
-
- glm::i64vec4 F1(1, 2, 3, 4);
- std::string F2 = glm::to_string(F1);
- Error += F2 != std::string("i64vec4(1, 2, 3, 4)") ? 1 : 0;
- }
-
- return Error;
-}
-
-int test_string_cast_matrix()
-{
- int Error = 0;
-
- glm::mat2x2 A1(1.000000, 2.000000, 3.000000, 4.000000);
- std::string A2 = glm::to_string(A1);
- Error += A2 != std::string("mat2x2((1.000000, 2.000000), (3.000000, 4.000000))") ? 1 : 0;
-
- return Error;
-}
-
-int test_string_cast_quaternion()
-{
- int Error = 0;
-
- glm::quat Q0 = glm::quat(1.0f, 2.0f, 3.0f, 4.0f);
- std::string S0 = glm::to_string(Q0);
- Error += S0 != std::string("quat(1.000000, {2.000000, 3.000000, 4.000000})") ? 1 : 0;
-
- return Error;
-
-}
-
-int test_string_cast_dual_quaternion()
-{
- int Error = 0;
-
- glm::dualquat Q0 = glm::dualquat(glm::quat(1.0f, 2.0f, 3.0f, 4.0f), glm::quat(5.0f, 6.0f, 7.0f, 8.0f));
- std::string S0 = glm::to_string(Q0);
- Error += S0 != std::string("dualquat((1.000000, {2.000000, 3.000000, 4.000000}), (5.000000, {6.000000, 7.000000, 8.000000}))") ? 1 : 0;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_string_cast_vector();
- Error += test_string_cast_matrix();
- Error += test_string_cast_quaternion();
- Error += test_string_cast_dual_quaternion();
-
- return Error;
-}
-
-
diff --git a/3rdparty/glm/source/test/gtx/gtx_texture.cpp b/3rdparty/glm/source/test/gtx/gtx_texture.cpp
deleted file mode 100644
index 0b98ed7..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_texture.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/vec2.hpp>
-#include <glm/gtx/texture.hpp>
-
-int test_levels()
-{
- int Error = 0;
-
- int const Levels = glm::levels(glm::ivec2(3, 2));
- Error += Levels == 2 ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error = 0;
-
- Error += test_levels();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_type_aligned.cpp b/3rdparty/glm/source/test/gtx/gtx_type_aligned.cpp
deleted file mode 100644
index 8d045c0..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_type_aligned.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/type_aligned.hpp>
-#include <cstdio>
-
-int test_decl()
-{
- int Error(0);
-
- {
- struct S1
- {
- glm::aligned_vec4 B;
- };
-
- struct S2
- {
- glm::vec4 B;
- };
-
- std::printf("vec4 - Aligned: %d, unaligned: %d\n", static_cast<int>(sizeof(S1)), static_cast<int>(sizeof(S2)));
-
- Error += sizeof(S1) >= sizeof(S2) ? 0 : 1;
- }
-
- {
- struct S1
- {
- bool A;
- glm::vec3 B;
- };
-
- struct S2
- {
- bool A;
- glm::aligned_vec3 B;
- };
-
- std::printf("vec3 - Aligned: %d, unaligned: %d\n", static_cast<int>(sizeof(S1)), static_cast<int>(sizeof(S2)));
-
- Error += sizeof(S1) <= sizeof(S2) ? 0 : 1;
- }
-
- {
- struct S1
- {
- bool A;
- glm::aligned_vec4 B;
- };
-
- struct S2
- {
- bool A;
- glm::vec4 B;
- };
-
- std::printf("vec4 - Aligned: %d, unaligned: %d\n", static_cast<int>(sizeof(S1)), static_cast<int>(sizeof(S2)));
-
- Error += sizeof(S1) >= sizeof(S2) ? 0 : 1;
- }
-
- {
- struct S1
- {
- bool A;
- glm::aligned_dvec4 B;
- };
-
- struct S2
- {
- bool A;
- glm::dvec4 B;
- };
-
- std::printf("dvec4 - Aligned: %d, unaligned: %d\n", static_cast<int>(sizeof(S1)), static_cast<int>(sizeof(S2)));
-
- Error += sizeof(S1) >= sizeof(S2) ? 0 : 1;
- }
-
- return Error;
-}
-
-template<typename genType>
-void print(genType const& Mat0)
-{
- std::printf("mat4(\n");
- std::printf("\tvec4(%2.9f, %2.9f, %2.9f, %2.9f)\n", static_cast<double>(Mat0[0][0]), static_cast<double>(Mat0[0][1]), static_cast<double>(Mat0[0][2]), static_cast<double>(Mat0[0][3]));
- std::printf("\tvec4(%2.9f, %2.9f, %2.9f, %2.9f)\n", static_cast<double>(Mat0[1][0]), static_cast<double>(Mat0[1][1]), static_cast<double>(Mat0[1][2]), static_cast<double>(Mat0[1][3]));
- std::printf("\tvec4(%2.9f, %2.9f, %2.9f, %2.9f)\n", static_cast<double>(Mat0[2][0]), static_cast<double>(Mat0[2][1]), static_cast<double>(Mat0[2][2]), static_cast<double>(Mat0[2][3]));
- std::printf("\tvec4(%2.9f, %2.9f, %2.9f, %2.9f))\n\n", static_cast<double>(Mat0[3][0]), static_cast<double>(Mat0[3][1]), static_cast<double>(Mat0[3][2]), static_cast<double>(Mat0[3][3]));
-}
-
-int perf_mul()
-{
- int Error = 0;
-
- glm::mat4 A(1.0f);
- glm::mat4 B(1.0f);
-
- glm::mat4 C = A * B;
-
- print(C);
-
- return Error;
-}
-
-int main()
-{
- int Error(0);
-
- Error += test_decl();
- Error += perf_mul();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/gtx/gtx_type_trait.cpp b/3rdparty/glm/source/test/gtx/gtx_type_trait.cpp
deleted file mode 100644
index 9b96a36..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_type_trait.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/vec4.hpp>
-#include <glm/gtx/type_trait.hpp>
-
-int main()
-{
- int Error = 0;
-
-
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/gtx/gtx_vec_swizzle.cpp b/3rdparty/glm/source/test/gtx/gtx_vec_swizzle.cpp
deleted file mode 100644
index 0b0c8b8..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_vec_swizzle.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/vec_swizzle.hpp>
-
-int main()
-{
- int Error = 0;
-
-
- return Error;
-}
-
diff --git a/3rdparty/glm/source/test/gtx/gtx_vector_angle.cpp b/3rdparty/glm/source/test/gtx/gtx_vector_angle.cpp
deleted file mode 100644
index 4e8172b..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_vector_angle.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtc/constants.hpp>
-#include <glm/gtx/vector_angle.hpp>
-#include <limits>
-
-int test_angle()
-{
- int Error = 0;
-
- float AngleA = glm::angle(glm::vec2(1, 0), glm::normalize(glm::vec2(1, 1)));
- Error += glm::epsilonEqual(AngleA, glm::pi<float>() * 0.25f, 0.01f) ? 0 : 1;
- float AngleB = glm::angle(glm::vec3(1, 0, 0), glm::normalize(glm::vec3(1, 1, 0)));
- Error += glm::epsilonEqual(AngleB, glm::pi<float>() * 0.25f, 0.01f) ? 0 : 1;
- float AngleC = glm::angle(glm::vec4(1, 0, 0, 0), glm::normalize(glm::vec4(1, 1, 0, 0)));
- Error += glm::epsilonEqual(AngleC, glm::pi<float>() * 0.25f, 0.01f) ? 0 : 1;
-
- return Error;
-}
-
-int test_orientedAngle_vec2()
-{
- int Error = 0;
-
- float AngleA = glm::orientedAngle(glm::vec2(1, 0), glm::normalize(glm::vec2(1, 1)));
- Error += glm::epsilonEqual(AngleA, glm::pi<float>() * 0.25f, 0.01f) ? 0 : 1;
- float AngleB = glm::orientedAngle(glm::vec2(0, 1), glm::normalize(glm::vec2(1, 1)));
- Error += glm::epsilonEqual(AngleB, -glm::pi<float>() * 0.25f, 0.01f) ? 0 : 1;
- float AngleC = glm::orientedAngle(glm::normalize(glm::vec2(1, 1)), glm::vec2(0, 1));
- Error += glm::epsilonEqual(AngleC, glm::pi<float>() * 0.25f, 0.01f) ? 0 : 1;
-
- return Error;
-}
-
-int test_orientedAngle_vec3()
-{
- int Error = 0;
-
- float AngleA = glm::orientedAngle(glm::vec3(1, 0, 0), glm::normalize(glm::vec3(1, 1, 0)), glm::vec3(0, 0, 1));
- Error += glm::epsilonEqual(AngleA, glm::pi<float>() * 0.25f, 0.01f) ? 0 : 1;
- float AngleB = glm::orientedAngle(glm::vec3(0, 1, 0), glm::normalize(glm::vec3(1, 1, 0)), glm::vec3(0, 0, 1));
- Error += glm::epsilonEqual(AngleB, -glm::pi<float>() * 0.25f, 0.01f) ? 0 : 1;
- float AngleC = glm::orientedAngle(glm::normalize(glm::vec3(1, 1, 0)), glm::vec3(0, 1, 0), glm::vec3(0, 0, 1));
- Error += glm::epsilonEqual(AngleC, glm::pi<float>() * 0.25f, 0.01f) ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error(0);
-
- Error += test_angle();
- Error += test_orientedAngle_vec2();
- Error += test_orientedAngle_vec3();
-
- return Error;
-}
-
-
diff --git a/3rdparty/glm/source/test/gtx/gtx_vector_query.cpp b/3rdparty/glm/source/test/gtx/gtx_vector_query.cpp
deleted file mode 100644
index 729f9e1..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_vector_query.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/vec2.hpp>
-#include <glm/vec3.hpp>
-#include <glm/vec4.hpp>
-#include <glm/gtx/vector_query.hpp>
-
-int test_areCollinear()
-{
- int Error(0);
-
- {
- bool TestA = glm::areCollinear(glm::vec2(-1), glm::vec2(1), 0.00001f);
- Error += TestA ? 0 : 1;
- }
-
- {
- bool TestA = glm::areCollinear(glm::vec3(-1), glm::vec3(1), 0.00001f);
- Error += TestA ? 0 : 1;
- }
-
- {
- bool TestA = glm::areCollinear(glm::vec4(-1), glm::vec4(1), 0.00001f);
- Error += TestA ? 0 : 1;
- }
-
- return Error;
-}
-
-int test_areOrthogonal()
-{
- int Error(0);
-
- bool TestA = glm::areOrthogonal(glm::vec2(1, 0), glm::vec2(0, 1), 0.00001f);
- Error += TestA ? 0 : 1;
-
- return Error;
-}
-
-int test_isNormalized()
-{
- int Error(0);
-
- bool TestA = glm::isNormalized(glm::vec4(1, 0, 0, 0), 0.00001f);
- Error += TestA ? 0 : 1;
-
- return Error;
-}
-
-int test_isNull()
-{
- int Error(0);
-
- bool TestA = glm::isNull(glm::vec4(0), 0.00001f);
- Error += TestA ? 0 : 1;
-
- return Error;
-}
-
-int test_areOrthonormal()
-{
- int Error(0);
-
- bool TestA = glm::areOrthonormal(glm::vec2(1, 0), glm::vec2(0, 1), 0.00001f);
- Error += TestA ? 0 : 1;
-
- return Error;
-}
-
-int main()
-{
- int Error(0);
-
- Error += test_areCollinear();
- Error += test_areOrthogonal();
- Error += test_isNormalized();
- Error += test_isNull();
- Error += test_areOrthonormal();
-
- return Error;
-}
-
-
diff --git a/3rdparty/glm/source/test/gtx/gtx_wrap.cpp b/3rdparty/glm/source/test/gtx/gtx_wrap.cpp
deleted file mode 100644
index 2354cc8..0000000
--- a/3rdparty/glm/source/test/gtx/gtx_wrap.cpp
+++ /dev/null
@@ -1,191 +0,0 @@
-#define GLM_ENABLE_EXPERIMENTAL
-#include <glm/gtx/wrap.hpp>
-#include <glm/ext/scalar_relational.hpp>
-#include <glm/ext/vector_relational.hpp>
-
-namespace clamp
-{
- int test()
- {
- int Error(0);
-
- float A = glm::clamp(0.5f);
- Error += glm::equal(A, 0.5f, 0.00001f) ? 0 : 1;
-
- float B = glm::clamp(0.0f);
- Error += glm::equal(B, 0.0f, 0.00001f) ? 0 : 1;
-
- float C = glm::clamp(1.0f);
- Error += glm::equal(C, 1.0f, 0.00001f) ? 0 : 1;
-
- float D = glm::clamp(-0.5f);
- Error += glm::equal(D, 0.0f, 0.00001f) ? 0 : 1;
-
- float E = glm::clamp(1.5f);
- Error += glm::equal(E, 1.0f, 0.00001f) ? 0 : 1;
-
- glm::vec2 K = glm::clamp(glm::vec2(0.5f));
- Error += glm::all(glm::equal(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1;
-
- glm::vec3 L = glm::clamp(glm::vec3(0.5f));
- Error += glm::all(glm::equal(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1;
-
- glm::vec4 M = glm::clamp(glm::vec4(0.5f));
- Error += glm::all(glm::equal(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1;
-
- glm::vec1 N = glm::clamp(glm::vec1(0.5f));
- Error += glm::all(glm::equal(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1;
-
- return Error;
- }
-}//namespace clamp
-
-namespace repeat
-{
- int test()
- {
- int Error(0);
-
- float A = glm::repeat(0.5f);
- Error += glm::equal(A, 0.5f, 0.00001f) ? 0 : 1;
-
- float B = glm::repeat(0.0f);
- Error += glm::equal(B, 0.0f, 0.00001f) ? 0 : 1;
-
- float C = glm::repeat(1.0f);
- Error += glm::equal(C, 0.0f, 0.00001f) ? 0 : 1;
-
- float D = glm::repeat(-0.5f);
- Error += glm::equal(D, 0.5f, 0.00001f) ? 0 : 1;
-
- float E = glm::repeat(1.5f);
- Error += glm::equal(E, 0.5f, 0.00001f) ? 0 : 1;
-
- float F = glm::repeat(0.9f);
- Error += glm::equal(F, 0.9f, 0.00001f) ? 0 : 1;
-
- glm::vec2 K = glm::repeat(glm::vec2(0.5f));
- Error += glm::all(glm::equal(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1;
-
- glm::vec3 L = glm::repeat(glm::vec3(0.5f));
- Error += glm::all(glm::equal(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1;
-
- glm::vec4 M = glm::repeat(glm::vec4(0.5f));
- Error += glm::all(glm::equal(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1;
-
- glm::vec1 N = glm::repeat(glm::vec1(0.5f));
- Error += glm::all(glm::equal(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1;
-
- return Error;
- }
-}//namespace repeat
-
-namespace mirrorClamp
-{
- int test()
- {
- int Error(0);
-
- float A = glm::mirrorClamp(0.5f);
- Error += glm::equal(A, 0.5f, 0.00001f) ? 0 : 1;
-
- float B = glm::mirrorClamp(0.0f);
- Error += glm::equal(B, 0.0f, 0.00001f) ? 0 : 1;
-
- float C = glm::mirrorClamp(1.1f);
- Error += glm::equal(C, 0.1f, 0.00001f) ? 0 : 1;
-
- float D = glm::mirrorClamp(-0.5f);
- Error += glm::equal(D, 0.5f, 0.00001f) ? 0 : 1;
-
- float E = glm::mirrorClamp(1.5f);
- Error += glm::equal(E, 0.5f, 0.00001f) ? 0 : 1;
-
- float F = glm::mirrorClamp(0.9f);
- Error += glm::equal(F, 0.9f, 0.00001f) ? 0 : 1;
-
- float G = glm::mirrorClamp(3.1f);
- Error += glm::equal(G, 0.1f, 0.00001f) ? 0 : 1;
-
- float H = glm::mirrorClamp(-3.1f);
- Error += glm::equal(H, 0.1f, 0.00001f) ? 0 : 1;
-
- float I = glm::mirrorClamp(-0.9f);
- Error += glm::equal(I, 0.9f, 0.00001f) ? 0 : 1;
-
- glm::vec2 K = glm::mirrorClamp(glm::vec2(0.5f));
- Error += glm::all(glm::equal(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1;
-
- glm::vec3 L = glm::mirrorClamp(glm::vec3(0.5f));
- Error += glm::all(glm::equal(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1;
-
- glm::vec4 M = glm::mirrorClamp(glm::vec4(0.5f));
- Error += glm::all(glm::equal(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1;
-
- glm::vec1 N = glm::mirrorClamp(glm::vec1(0.5f));
- Error += glm::all(glm::equal(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1;
-
- return Error;
- }
-}//namespace mirrorClamp
-
-namespace mirrorRepeat
-{
- int test()
- {
- int Error(0);
-
- float A = glm::mirrorRepeat(0.5f);
- Error += glm::equal(A, 0.5f, 0.00001f) ? 0 : 1;
-
- float B = glm::mirrorRepeat(0.0f);
- Error += glm::equal(B, 0.0f, 0.00001f) ? 0 : 1;
-
- float C = glm::mirrorRepeat(1.0f);
- Error += glm::equal(C, 1.0f, 0.00001f) ? 0 : 1;
-
- float D = glm::mirrorRepeat(-0.5f);
- Error += glm::equal(D, 0.5f, 0.00001f) ? 0 : 1;
-
- float E = glm::mirrorRepeat(1.5f);
- Error += glm::equal(E, 0.5f, 0.00001f) ? 0 : 1;
-
- float F = glm::mirrorRepeat(0.9f);
- Error += glm::equal(F, 0.9f, 0.00001f) ? 0 : 1;
-
- float G = glm::mirrorRepeat(3.0f);
- Error += glm::equal(G, 1.0f, 0.00001f) ? 0 : 1;
-
- float H = glm::mirrorRepeat(-3.0f);
- Error += glm::equal(H, 1.0f, 0.00001f) ? 0 : 1;
-
- float I = glm::mirrorRepeat(-1.0f);
- Error += glm::equal(I, 1.0f, 0.00001f) ? 0 : 1;
-
- glm::vec2 K = glm::mirrorRepeat(glm::vec2(0.5f));
- Error += glm::all(glm::equal(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1;
-
- glm::vec3 L = glm::mirrorRepeat(glm::vec3(0.5f));
- Error += glm::all(glm::equal(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1;
-
- glm::vec4 M = glm::mirrorRepeat(glm::vec4(0.5f));
- Error += glm::all(glm::equal(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1;
-
- glm::vec1 N = glm::mirrorRepeat(glm::vec1(0.5f));
- Error += glm::all(glm::equal(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1;
-
- return Error;
- }
-}//namespace mirrorRepeat
-
-int main()
-{
- int Error(0);
-
- Error += clamp::test();
- Error += repeat::test();
- Error += mirrorClamp::test();
- Error += mirrorRepeat::test();
-
- return Error;
-}
diff --git a/3rdparty/glm/source/test/perf/CMakeLists.txt b/3rdparty/glm/source/test/perf/CMakeLists.txt
deleted file mode 100644
index 19c7050..0000000
--- a/3rdparty/glm/source/test/perf/CMakeLists.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-glmCreateTestGTC(perf_matrix_div)
-glmCreateTestGTC(perf_matrix_inverse)
-glmCreateTestGTC(perf_matrix_mul)
-glmCreateTestGTC(perf_matrix_mul_vector)
-glmCreateTestGTC(perf_matrix_transpose)
-glmCreateTestGTC(perf_vector_mul_matrix)
diff --git a/3rdparty/glm/source/test/perf/perf_matrix_div.cpp b/3rdparty/glm/source/test/perf/perf_matrix_div.cpp
deleted file mode 100644
index 630188d..0000000
--- a/3rdparty/glm/source/test/perf/perf_matrix_div.cpp
+++ /dev/null
@@ -1,153 +0,0 @@
-#define GLM_FORCE_INLINE
-#include <glm/ext/matrix_float4x4.hpp>
-#include <glm/ext/matrix_double4x4.hpp>
-#include <glm/ext/matrix_transform.hpp>
-#include <glm/ext/matrix_relational.hpp>
-#include <glm/ext/vector_float4.hpp>
-#if GLM_CONFIG_SIMD == GLM_ENABLE
-#include <glm/gtc/type_aligned.hpp>
-#include <vector>
-#include <chrono>
-#include <cstdio>
-
-template <typename matType>
-static void test_mat_div_mat(matType const& M, std::vector<matType> const& I, std::vector<matType>& O)
-{
- for (std::size_t i = 0, n = I.size(); i < n; ++i)
- O[i] = M / I[i];
-}
-
-template <typename matType>
-static int launch_mat_div_mat(std::vector<matType>& O, matType const& Transform, matType const& Scale, std::size_t Samples)
-{
- typedef typename matType::value_type T;
-
- std::vector<matType> I(Samples);
- O.resize(Samples);
-
- for(std::size_t i = 0; i < Samples; ++i)
- I[i] = Scale * static_cast<T>(i) + Scale;
-
- std::chrono::high_resolution_clock::time_point t1 = std::chrono::high_resolution_clock::now();
- test_mat_div_mat<matType>(Transform, I, O);
- std::chrono::high_resolution_clock::time_point t2 = std::chrono::high_resolution_clock::now();
-
- return static_cast<int>(std::chrono::duration_cast<std::chrono::microseconds>(t2 - t1).count());
-}
-
-template <typename packedMatType, typename alignedMatType>
-static int comp_mat2_div_mat2(std::size_t Samples)
-{
- typedef typename packedMatType::value_type T;
-
- int Error = 0;
-
- packedMatType const Transform(1, 2, 3, 4);
- packedMatType const Scale(0.01, 0.02, 0.03, 0.05);
-
- std::vector<packedMatType> SISD;
- std::printf("- SISD: %d us\n", launch_mat_div_mat<packedMatType>(SISD, Transform, Scale, Samples));
-
- std::vector<alignedMatType> SIMD;
- std::printf("- SIMD: %d us\n", launch_mat_div_mat<alignedMatType>(SIMD, Transform, Scale, Samples));
-
- for(std::size_t i = 0; i < Samples; ++i)
- {
- packedMatType const A = SISD[i];
- packedMatType const B = SIMD[i];
- Error += glm::all(glm::equal(A, B, static_cast<T>(0.001))) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-template <typename packedMatType, typename alignedMatType>
-static int comp_mat3_div_mat3(std::size_t Samples)
-{
- typedef typename packedMatType::value_type T;
-
- int Error = 0;
-
- packedMatType const Transform(1, 2, 3, 4, 5, 6, 7, 8, 9);
- packedMatType const Scale(0.01, 0.02, 0.03, 0.05, 0.01, 0.02, 0.03, 0.05, 0.01);
-
- std::vector<packedMatType> SISD;
- std::printf("- SISD: %d us\n", launch_mat_div_mat<packedMatType>(SISD, Transform, Scale, Samples));
-
- std::vector<alignedMatType> SIMD;
- std::printf("- SIMD: %d us\n", launch_mat_div_mat<alignedMatType>(SIMD, Transform, Scale, Samples));
-
- for(std::size_t i = 0; i < Samples; ++i)
- {
- packedMatType const A = SISD[i];
- packedMatType const B = SIMD[i];
- Error += glm::all(glm::equal(A, B, static_cast<T>(0.001))) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-template <typename packedMatType, typename alignedMatType>
-static int comp_mat4_div_mat4(std::size_t Samples)
-{
- typedef typename packedMatType::value_type T;
-
- int Error = 0;
-
- packedMatType const Transform(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16);
- packedMatType const Scale(0.01, 0.02, 0.05, 0.04, 0.02, 0.08, 0.05, 0.01, 0.08, 0.03, 0.05, 0.06, 0.02, 0.03, 0.07, 0.05);
-
- std::vector<packedMatType> SISD;
- std::printf("- SISD: %d us\n", launch_mat_div_mat<packedMatType>(SISD, Transform, Scale, Samples));
-
- std::vector<alignedMatType> SIMD;
- std::printf("- SIMD: %d us\n", launch_mat_div_mat<alignedMatType>(SIMD, Transform, Scale, Samples));
-
- for(std::size_t i = 0; i < Samples; ++i)
- {
- packedMatType const A = SISD[i];
- packedMatType const B = SIMD[i];
- Error += glm::all(glm::equal(A, B, static_cast<T>(0.001))) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int main()
-{
- std::size_t const Samples = 100000;
-
- int Error = 0;
-
- std::printf("mat2 / mat2:\n");
- Error += comp_mat2_div_mat2<glm::mat2, glm::aligned_mat2>(Samples);
-
- std::printf("dmat2 / dmat2:\n");
- Error += comp_mat2_div_mat2<glm::dmat2, glm::aligned_dmat2>(Samples);
-
- std::printf("mat3 / mat3:\n");
- Error += comp_mat3_div_mat3<glm::mat3, glm::aligned_mat3>(Samples);
-
- std::printf("dmat3 / dmat3:\n");
- Error += comp_mat3_div_mat3<glm::dmat3, glm::aligned_dmat3>(Samples);
-
- std::printf("mat4 / mat4:\n");
- Error += comp_mat4_div_mat4<glm::mat4, glm::aligned_mat4>(Samples);
-
- std::printf("dmat4 / dmat4:\n");
- Error += comp_mat4_div_mat4<glm::dmat4, glm::aligned_dmat4>(Samples);
-
- return Error;
-}
-
-#else
-
-int main()
-{
- return 0;
-}
-
-#endif
diff --git a/3rdparty/glm/source/test/perf/perf_matrix_inverse.cpp b/3rdparty/glm/source/test/perf/perf_matrix_inverse.cpp
deleted file mode 100644
index 1a989ae..0000000
--- a/3rdparty/glm/source/test/perf/perf_matrix_inverse.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
-#define GLM_FORCE_INLINE
-#include <glm/matrix.hpp>
-#include <glm/ext/matrix_float4x4.hpp>
-#include <glm/ext/matrix_double4x4.hpp>
-#include <glm/ext/matrix_relational.hpp>
-#include <glm/ext/vector_float4.hpp>
-#if GLM_CONFIG_SIMD == GLM_ENABLE
-#include <glm/gtc/type_aligned.hpp>
-#include <vector>
-#include <chrono>
-#include <cstdio>
-
-template <typename matType>
-static void test_mat_inverse(std::vector<matType> const& I, std::vector<matType>& O)
-{
- for (std::size_t i = 0, n = I.size(); i < n; ++i)
- O[i] = glm::inverse(I[i]);
-}
-
-template <typename matType>
-static int launch_mat_inverse(std::vector<matType>& O, matType const& Scale, std::size_t Samples)
-{
- typedef typename matType::value_type T;
-
- std::vector<matType> I(Samples);
- O.resize(Samples);
-
- for(std::size_t i = 0; i < Samples; ++i)
- I[i] = Scale * static_cast<T>(i) + Scale;
-
- std::chrono::high_resolution_clock::time_point t1 = std::chrono::high_resolution_clock::now();
- test_mat_inverse<matType>(I, O);
- std::chrono::high_resolution_clock::time_point t2 = std::chrono::high_resolution_clock::now();
-
- return static_cast<int>(std::chrono::duration_cast<std::chrono::microseconds>(t2 - t1).count());
-}
-
-template <typename packedMatType, typename alignedMatType>
-static int comp_mat2_inverse(std::size_t Samples)
-{
- typedef typename packedMatType::value_type T;
-
- int Error = 0;
-
- packedMatType const Scale(0.01, 0.02, 0.03, 0.05);
-
- std::vector<packedMatType> SISD;
- std::printf("- SISD: %d us\n", launch_mat_inverse<packedMatType>(SISD, Scale, Samples));
-
- std::vector<alignedMatType> SIMD;
- std::printf("- SIMD: %d us\n", launch_mat_inverse<alignedMatType>(SIMD, Scale, Samples));
-
- for(std::size_t i = 0; i < Samples; ++i)
- {
- packedMatType const A = SISD[i];
- packedMatType const B = SIMD[i];
- Error += glm::all(glm::equal(A, B, static_cast<T>(0.001))) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-template <typename packedMatType, typename alignedMatType>
-static int comp_mat3_inverse(std::size_t Samples)
-{
- typedef typename packedMatType::value_type T;
-
- int Error = 0;
-
- packedMatType const Scale(0.01, 0.02, 0.03, 0.05, 0.01, 0.02, 0.03, 0.05, 0.01);
-
- std::vector<packedMatType> SISD;
- std::printf("- SISD: %d us\n", launch_mat_inverse<packedMatType>(SISD, Scale, Samples));
-
- std::vector<alignedMatType> SIMD;
- std::printf("- SIMD: %d us\n", launch_mat_inverse<alignedMatType>(SIMD, Scale, Samples));
-
- for(std::size_t i = 0; i < Samples; ++i)
- {
- packedMatType const A = SISD[i];
- packedMatType const B = SIMD[i];
- Error += glm::all(glm::equal(A, B, static_cast<T>(0.001))) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-template <typename packedMatType, typename alignedMatType>
-static int comp_mat4_inverse(std::size_t Samples)
-{
- typedef typename packedMatType::value_type T;
-
- int Error = 0;
-
- packedMatType const Scale(0.01, 0.02, 0.05, 0.04, 0.02, 0.08, 0.05, 0.01, 0.08, 0.03, 0.05, 0.06, 0.02, 0.03, 0.07, 0.05);
-
- std::vector<packedMatType> SISD;
- std::printf("- SISD: %d us\n", launch_mat_inverse<packedMatType>(SISD, Scale, Samples));
-
- std::vector<alignedMatType> SIMD;
- std::printf("- SIMD: %d us\n", launch_mat_inverse<alignedMatType>(SIMD, Scale, Samples));
-
- for(std::size_t i = 0; i < Samples; ++i)
- {
- packedMatType const A = SISD[i];
- packedMatType const B = SIMD[i];
- Error += glm::all(glm::equal(A, B, static_cast<T>(0.001))) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int main()
-{
- std::size_t const Samples = 100000;
-
- int Error = 0;
-
- std::printf("glm::inverse(mat2):\n");
- Error += comp_mat2_inverse<glm::mat2, glm::aligned_mat2>(Samples);
-
- std::printf("glm::inverse(dmat2):\n");
- Error += comp_mat2_inverse<glm::dmat2, glm::aligned_dmat2>(Samples);
-
- std::printf("glm::inverse(mat3):\n");
- Error += comp_mat3_inverse<glm::mat3, glm::aligned_mat3>(Samples);
-
- std::printf("glm::inverse(dmat3):\n");
- Error += comp_mat3_inverse<glm::dmat3, glm::aligned_dmat3>(Samples);
-
- std::printf("glm::inverse(mat4):\n");
- Error += comp_mat4_inverse<glm::mat4, glm::aligned_mat4>(Samples);
-
- std::printf("glm::inverse(dmat4):\n");
- Error += comp_mat4_inverse<glm::dmat4, glm::aligned_dmat4>(Samples);
-
- return Error;
-}
-
-#else
-
-int main()
-{
- return 0;
-}
-
-#endif
diff --git a/3rdparty/glm/source/test/perf/perf_matrix_mul.cpp b/3rdparty/glm/source/test/perf/perf_matrix_mul.cpp
deleted file mode 100644
index d6b1f10..0000000
--- a/3rdparty/glm/source/test/perf/perf_matrix_mul.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-#define GLM_FORCE_INLINE
-#include <glm/ext/matrix_float2x2.hpp>
-#include <glm/ext/matrix_double2x2.hpp>
-#include <glm/ext/matrix_float3x3.hpp>
-#include <glm/ext/matrix_double3x3.hpp>
-#include <glm/ext/matrix_float4x4.hpp>
-#include <glm/ext/matrix_double4x4.hpp>
-#include <glm/ext/matrix_transform.hpp>
-#include <glm/ext/matrix_relational.hpp>
-#include <glm/ext/vector_float4.hpp>
-#if GLM_CONFIG_SIMD == GLM_ENABLE
-#include <glm/gtc/type_aligned.hpp>
-#include <vector>
-#include <chrono>
-#include <cstdio>
-
-template <typename matType>
-static void test_mat_mul_mat(matType const& M, std::vector<matType> const& I, std::vector<matType>& O)
-{
- for (std::size_t i = 0, n = I.size(); i < n; ++i)
- O[i] = M * I[i];
-}
-
-template <typename matType>
-static int launch_mat_mul_mat(std::vector<matType>& O, matType const& Transform, matType const& Scale, std::size_t Samples)
-{
- typedef typename matType::value_type T;
-
- std::vector<matType> I(Samples);
- O.resize(Samples);
-
- for(std::size_t i = 0; i < Samples; ++i)
- I[i] = Scale * static_cast<T>(i);
-
- std::chrono::high_resolution_clock::time_point t1 = std::chrono::high_resolution_clock::now();
- test_mat_mul_mat<matType>(Transform, I, O);
- std::chrono::high_resolution_clock::time_point t2 = std::chrono::high_resolution_clock::now();
-
- return static_cast<int>(std::chrono::duration_cast<std::chrono::microseconds>(t2 - t1).count());
-}
-
-template <typename packedMatType, typename alignedMatType>
-static int comp_mat2_mul_mat2(std::size_t Samples)
-{
- typedef typename packedMatType::value_type T;
-
- int Error = 0;
-
- packedMatType const Transform(1, 2, 3, 4);
- packedMatType const Scale(0.01, 0.02, 0.03, 0.05);
-
- std::vector<packedMatType> SISD;
- std::printf("- SISD: %d us\n", launch_mat_mul_mat<packedMatType>(SISD, Transform, Scale, Samples));
-
- std::vector<alignedMatType> SIMD;
- std::printf("- SIMD: %d us\n", launch_mat_mul_mat<alignedMatType>(SIMD, Transform, Scale, Samples));
-
- for(std::size_t i = 0; i < Samples; ++i)
- {
- packedMatType const A = SISD[i];
- packedMatType const B = SIMD[i];
- Error += glm::all(glm::equal(A, B, static_cast<T>(0.001))) ? 0 : 1;
- }
-
- return Error;
-}
-
-template <typename packedMatType, typename alignedMatType>
-static int comp_mat3_mul_mat3(std::size_t Samples)
-{
- typedef typename packedMatType::value_type T;
-
- int Error = 0;
-
- packedMatType const Transform(1, 2, 3, 4, 5, 6, 7, 8, 9);
- packedMatType const Scale(0.01, 0.02, 0.03, 0.05, 0.01, 0.02, 0.03, 0.05, 0.01);
-
- std::vector<packedMatType> SISD;
- std::printf("- SISD: %d us\n", launch_mat_mul_mat<packedMatType>(SISD, Transform, Scale, Samples));
-
- std::vector<alignedMatType> SIMD;
- std::printf("- SIMD: %d us\n", launch_mat_mul_mat<alignedMatType>(SIMD, Transform, Scale, Samples));
-
- for(std::size_t i = 0; i < Samples; ++i)
- {
- packedMatType const A = SISD[i];
- packedMatType const B = SIMD[i];
- Error += glm::all(glm::equal(A, B, static_cast<T>(0.001))) ? 0 : 1;
- }
-
- return Error;
-}
-
-template <typename packedMatType, typename alignedMatType>
-static int comp_mat4_mul_mat4(std::size_t Samples)
-{
- typedef typename packedMatType::value_type T;
-
- int Error = 0;
-
- packedMatType const Transform(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16);
- packedMatType const Scale(0.01, 0.02, 0.03, 0.05, 0.01, 0.02, 0.03, 0.05, 0.01, 0.02, 0.03, 0.05, 0.01, 0.02, 0.03, 0.05);
-
- std::vector<packedMatType> SISD;
- std::printf("- SISD: %d us\n", launch_mat_mul_mat<packedMatType>(SISD, Transform, Scale, Samples));
-
- std::vector<alignedMatType> SIMD;
- std::printf("- SIMD: %d us\n", launch_mat_mul_mat<alignedMatType>(SIMD, Transform, Scale, Samples));
-
- for(std::size_t i = 0; i < Samples; ++i)
- {
- packedMatType const A = SISD[i];
- packedMatType const B = SIMD[i];
- Error += glm::all(glm::equal(A, B, static_cast<T>(0.001))) ? 0 : 1;
- }
-
- return Error;
-}
-
-int main()
-{
- std::size_t const Samples = 100000;
-
- int Error = 0;
-
- std::printf("mat2 * mat2:\n");
- Error += comp_mat2_mul_mat2<glm::mat2, glm::aligned_mat2>(Samples);
-
- std::printf("dmat2 * dmat2:\n");
- Error += comp_mat2_mul_mat2<glm::dmat2, glm::aligned_dmat2>(Samples);
-
- std::printf("mat3 * mat3:\n");
- Error += comp_mat3_mul_mat3<glm::mat3, glm::aligned_mat3>(Samples);
-
- std::printf("dmat3 * dmat3:\n");
- Error += comp_mat3_mul_mat3<glm::dmat3, glm::aligned_dmat3>(Samples);
-
- std::printf("mat4 * mat4:\n");
- Error += comp_mat4_mul_mat4<glm::mat4, glm::aligned_mat4>(Samples);
-
- std::printf("dmat4 * dmat4:\n");
- Error += comp_mat4_mul_mat4<glm::dmat4, glm::aligned_dmat4>(Samples);
-
- return Error;
-}
-
-#else
-
-int main()
-{
- return 0;
-}
-
-#endif
diff --git a/3rdparty/glm/source/test/perf/perf_matrix_mul_vector.cpp b/3rdparty/glm/source/test/perf/perf_matrix_mul_vector.cpp
deleted file mode 100644
index 8e555f8..0000000
--- a/3rdparty/glm/source/test/perf/perf_matrix_mul_vector.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-#define GLM_FORCE_INLINE
-#include <glm/ext/matrix_float2x2.hpp>
-#include <glm/ext/matrix_double2x2.hpp>
-#include <glm/ext/matrix_float3x3.hpp>
-#include <glm/ext/matrix_double3x3.hpp>
-#include <glm/ext/matrix_float4x4.hpp>
-#include <glm/ext/matrix_double4x4.hpp>
-#include <glm/ext/matrix_transform.hpp>
-#include <glm/ext/matrix_relational.hpp>
-#include <glm/ext/vector_float4.hpp>
-#if GLM_CONFIG_SIMD == GLM_ENABLE
-#include <glm/gtc/type_aligned.hpp>
-#include <vector>
-#include <chrono>
-#include <cstdio>
-
-template <typename matType, typename vecType>
-static void test_mat_mul_vec(matType const& M, std::vector<vecType> const& I, std::vector<vecType>& O)
-{
- for (std::size_t i = 0, n = I.size(); i < n; ++i)
- O[i] = M * I[i];
-}
-
-template <typename matType, typename vecType>
-static int launch_mat_mul_vec(std::vector<vecType>& O, matType const& Transform, vecType const& Scale, std::size_t Samples)
-{
- typedef typename matType::value_type T;
-
- std::vector<vecType> I(Samples);
- O.resize(Samples);
-
- for(std::size_t i = 0; i < Samples; ++i)
- I[i] = Scale * static_cast<T>(i);
-
- std::chrono::high_resolution_clock::time_point t1 = std::chrono::high_resolution_clock::now();
- test_mat_mul_vec<matType, vecType>(Transform, I, O);
- std::chrono::high_resolution_clock::time_point t2 = std::chrono::high_resolution_clock::now();
-
- return static_cast<int>(std::chrono::duration_cast<std::chrono::microseconds>(t2 - t1).count());
-}
-
-template <typename packedMatType, typename packedVecType, typename alignedMatType, typename alignedVecType>
-static int comp_mat2_mul_vec2(std::size_t Samples)
-{
- typedef typename packedMatType::value_type T;
-
- int Error = 0;
-
- packedMatType const Transform(1, 2, 3, 4);
- packedVecType const Scale(0.01, 0.02);
-
- std::vector<packedVecType> SISD;
- std::printf("- SISD: %d us\n", launch_mat_mul_vec<packedMatType, packedVecType>(SISD, Transform, Scale, Samples));
-
- std::vector<alignedVecType> SIMD;
- std::printf("- SIMD: %d us\n", launch_mat_mul_vec<alignedMatType, alignedVecType>(SIMD, Transform, Scale, Samples));
-
- for(std::size_t i = 0; i < Samples; ++i)
- {
- packedVecType const A = SISD[i];
- packedVecType const B = packedVecType(SIMD[i]);
- Error += glm::all(glm::equal(A, B, static_cast<T>(0.001))) ? 0 : 1;
- }
-
- return Error;
-}
-
-template <typename packedMatType, typename packedVecType, typename alignedMatType, typename alignedVecType>
-static int comp_mat3_mul_vec3(std::size_t Samples)
-{
- typedef typename packedMatType::value_type T;
-
- int Error = 0;
-
- packedMatType const Transform(1, 2, 3, 4, 5, 6, 7, 8, 9);
- packedVecType const Scale(0.01, 0.02, 0.05);
-
- std::vector<packedVecType> SISD;
- std::printf("- SISD: %d us\n", launch_mat_mul_vec<packedMatType, packedVecType>(SISD, Transform, Scale, Samples));
-
- std::vector<alignedVecType> SIMD;
- std::printf("- SIMD: %d us\n", launch_mat_mul_vec<alignedMatType, alignedVecType>(SIMD, Transform, Scale, Samples));
-
- for(std::size_t i = 0; i < Samples; ++i)
- {
- packedVecType const A = SISD[i];
- packedVecType const B = SIMD[i];
- Error += glm::all(glm::equal(A, B, static_cast<T>(0.001))) ? 0 : 1;
- }
-
- return Error;
-}
-
-template <typename packedMatType, typename packedVecType, typename alignedMatType, typename alignedVecType>
-static int comp_mat4_mul_vec4(std::size_t Samples)
-{
- typedef typename packedMatType::value_type T;
-
- int Error = 0;
-
- packedMatType const Transform(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16);
- packedVecType const Scale(0.01, 0.02, 0.03, 0.05);
-
- std::vector<packedVecType> SISD;
- std::printf("- SISD: %d us\n", launch_mat_mul_vec<packedMatType, packedVecType>(SISD, Transform, Scale, Samples));
-
- std::vector<alignedVecType> SIMD;
- std::printf("- SIMD: %d us\n", launch_mat_mul_vec<alignedMatType, alignedVecType>(SIMD, Transform, Scale, Samples));
-
- for(std::size_t i = 0; i < Samples; ++i)
- {
- packedVecType const A = SISD[i];
- packedVecType const B = SIMD[i];
- Error += glm::all(glm::equal(A, B, static_cast<T>(0.001))) ? 0 : 1;
- }
-
- return Error;
-}
-
-int main()
-{
- std::size_t const Samples = 100000;
-
- int Error = 0;
-
- std::printf("mat2 * vec2:\n");
- Error += comp_mat2_mul_vec2<glm::mat2, glm::vec2, glm::aligned_mat2, glm::aligned_vec2>(Samples);
-
- std::printf("dmat2 * dvec2:\n");
- Error += comp_mat2_mul_vec2<glm::dmat2, glm::dvec2,glm::aligned_dmat2, glm::aligned_dvec2>(Samples);
-
- std::printf("mat3 * vec3:\n");
- Error += comp_mat3_mul_vec3<glm::mat3, glm::vec3, glm::aligned_mat3, glm::aligned_vec3>(Samples);
-
- std::printf("dmat3 * dvec3:\n");
- Error += comp_mat3_mul_vec3<glm::dmat3, glm::dvec3, glm::aligned_dmat3, glm::aligned_dvec3>(Samples);
-
- std::printf("mat4 * vec4:\n");
- Error += comp_mat4_mul_vec4<glm::mat4, glm::vec4, glm::aligned_mat4, glm::aligned_vec4>(Samples);
-
- std::printf("dmat4 * dvec4:\n");
- Error += comp_mat4_mul_vec4<glm::dmat4, glm::dvec4, glm::aligned_dmat4, glm::aligned_dvec4>(Samples);
-
- return Error;
-}
-
-#else
-
-int main()
-{
- return 0;
-}
-
-#endif
diff --git a/3rdparty/glm/source/test/perf/perf_matrix_transpose.cpp b/3rdparty/glm/source/test/perf/perf_matrix_transpose.cpp
deleted file mode 100644
index 2fdc782..0000000
--- a/3rdparty/glm/source/test/perf/perf_matrix_transpose.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
-#define GLM_FORCE_INLINE
-#include <glm/matrix.hpp>
-#include <glm/ext/matrix_float4x4.hpp>
-#include <glm/ext/matrix_double4x4.hpp>
-#include <glm/ext/matrix_relational.hpp>
-#include <glm/ext/vector_float4.hpp>
-#if GLM_CONFIG_SIMD == GLM_ENABLE
-#include <glm/gtc/type_aligned.hpp>
-#include <vector>
-#include <chrono>
-#include <cstdio>
-
-template <typename matType>
-static void test_mat_transpose(std::vector<matType> const& I, std::vector<matType>& O)
-{
- for (std::size_t i = 0, n = I.size(); i < n; ++i)
- O[i] = glm::transpose(I[i]);
-}
-
-template <typename matType>
-static int launch_mat_transpose(std::vector<matType>& O, matType const& Scale, std::size_t Samples)
-{
- typedef typename matType::value_type T;
-
- std::vector<matType> I(Samples);
- O.resize(Samples);
-
- for(std::size_t i = 0; i < Samples; ++i)
- I[i] = Scale * static_cast<T>(i) + Scale;
-
- std::chrono::high_resolution_clock::time_point t1 = std::chrono::high_resolution_clock::now();
- test_mat_transpose<matType>(I, O);
- std::chrono::high_resolution_clock::time_point t2 = std::chrono::high_resolution_clock::now();
-
- return static_cast<int>(std::chrono::duration_cast<std::chrono::microseconds>(t2 - t1).count());
-}
-
-template <typename packedMatType, typename alignedMatType>
-static int comp_mat2_transpose(std::size_t Samples)
-{
- typedef typename packedMatType::value_type T;
-
- int Error = 0;
-
- packedMatType const Scale(0.01, 0.02, 0.03, 0.05);
-
- std::vector<packedMatType> SISD;
- std::printf("- SISD: %d us\n", launch_mat_transpose<packedMatType>(SISD, Scale, Samples));
-
- std::vector<alignedMatType> SIMD;
- std::printf("- SIMD: %d us\n", launch_mat_transpose<alignedMatType>(SIMD, Scale, Samples));
-
- for(std::size_t i = 0; i < Samples; ++i)
- {
- packedMatType const A = SISD[i];
- packedMatType const B = SIMD[i];
- Error += glm::all(glm::equal(A, B, static_cast<T>(0.001))) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-template <typename packedMatType, typename alignedMatType>
-static int comp_mat3_transpose(std::size_t Samples)
-{
- typedef typename packedMatType::value_type T;
-
- int Error = 0;
-
- packedMatType const Scale(0.01, 0.02, 0.03, 0.05, 0.01, 0.02, 0.03, 0.05, 0.01);
-
- std::vector<packedMatType> SISD;
- std::printf("- SISD: %d us\n", launch_mat_transpose<packedMatType>(SISD, Scale, Samples));
-
- std::vector<alignedMatType> SIMD;
- std::printf("- SIMD: %d us\n", launch_mat_transpose<alignedMatType>(SIMD, Scale, Samples));
-
- for(std::size_t i = 0; i < Samples; ++i)
- {
- packedMatType const A = SISD[i];
- packedMatType const B = SIMD[i];
- Error += glm::all(glm::equal(A, B, static_cast<T>(0.001))) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-template <typename packedMatType, typename alignedMatType>
-static int comp_mat4_transpose(std::size_t Samples)
-{
- typedef typename packedMatType::value_type T;
-
- int Error = 0;
-
- packedMatType const Scale(0.01, 0.02, 0.05, 0.04, 0.02, 0.08, 0.05, 0.01, 0.08, 0.03, 0.05, 0.06, 0.02, 0.03, 0.07, 0.05);
-
- std::vector<packedMatType> SISD;
- std::printf("- SISD: %d us\n", launch_mat_transpose<packedMatType>(SISD, Scale, Samples));
-
- std::vector<alignedMatType> SIMD;
- std::printf("- SIMD: %d us\n", launch_mat_transpose<alignedMatType>(SIMD, Scale, Samples));
-
- for(std::size_t i = 0; i < Samples; ++i)
- {
- packedMatType const A = SISD[i];
- packedMatType const B = SIMD[i];
- Error += glm::all(glm::equal(A, B, static_cast<T>(0.001))) ? 0 : 1;
- assert(!Error);
- }
-
- return Error;
-}
-
-int main()
-{
- std::size_t const Samples = 100000;
-
- int Error = 0;
-
- std::printf("glm::transpose(mat2):\n");
- Error += comp_mat2_transpose<glm::mat2, glm::aligned_mat2>(Samples);
-
- std::printf("glm::transpose(dmat2):\n");
- Error += comp_mat2_transpose<glm::dmat2, glm::aligned_dmat2>(Samples);
-
- std::printf("glm::transpose(mat3):\n");
- Error += comp_mat3_transpose<glm::mat3, glm::aligned_mat3>(Samples);
-
- std::printf("glm::transpose(dmat3):\n");
- Error += comp_mat3_transpose<glm::dmat3, glm::aligned_dmat3>(Samples);
-
- std::printf("glm::transpose(mat4):\n");
- Error += comp_mat4_transpose<glm::mat4, glm::aligned_mat4>(Samples);
-
- std::printf("glm::transpose(dmat4):\n");
- Error += comp_mat4_transpose<glm::dmat4, glm::aligned_dmat4>(Samples);
-
- return Error;
-}
-
-#else
-
-int main()
-{
- return 0;
-}
-
-#endif
diff --git a/3rdparty/glm/source/test/perf/perf_vector_mul_matrix.cpp b/3rdparty/glm/source/test/perf/perf_vector_mul_matrix.cpp
deleted file mode 100644
index 20991df..0000000
--- a/3rdparty/glm/source/test/perf/perf_vector_mul_matrix.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-#define GLM_FORCE_INLINE
-#include <glm/ext/matrix_float2x2.hpp>
-#include <glm/ext/matrix_double2x2.hpp>
-#include <glm/ext/matrix_float3x3.hpp>
-#include <glm/ext/matrix_double3x3.hpp>
-#include <glm/ext/matrix_float4x4.hpp>
-#include <glm/ext/matrix_double4x4.hpp>
-#include <glm/ext/matrix_transform.hpp>
-#include <glm/ext/matrix_relational.hpp>
-#include <glm/ext/vector_float4.hpp>
-#if GLM_CONFIG_SIMD == GLM_ENABLE
-#include <glm/gtc/type_aligned.hpp>
-#include <vector>
-#include <chrono>
-#include <cstdio>
-
-template <typename matType, typename vecType>
-static void test_vec_mul_mat(matType const& M, std::vector<vecType> const& I, std::vector<vecType>& O)
-{
- for (std::size_t i = 0, n = I.size(); i < n; ++i)
- O[i] = I[i] * M;
-}
-
-template <typename matType, typename vecType>
-static int launch_vec_mul_mat(std::vector<vecType>& O, matType const& Transform, vecType const& Scale, std::size_t Samples)
-{
- typedef typename matType::value_type T;
-
- std::vector<vecType> I(Samples);
- O.resize(Samples);
-
- for(std::size_t i = 0; i < Samples; ++i)
- I[i] = Scale * static_cast<T>(i);
-
- std::chrono::high_resolution_clock::time_point t1 = std::chrono::high_resolution_clock::now();
- test_vec_mul_mat<matType, vecType>(Transform, I, O);
- std::chrono::high_resolution_clock::time_point t2 = std::chrono::high_resolution_clock::now();
-
- return static_cast<int>(std::chrono::duration_cast<std::chrono::microseconds>(t2 - t1).count());
-}
-
-template <typename packedMatType, typename packedVecType, typename alignedMatType, typename alignedVecType>
-static int comp_vec2_mul_mat2(std::size_t Samples)
-{
- typedef typename packedMatType::value_type T;
-
- int Error = 0;
-
- packedMatType const Transform(1, 2, 3, 4);
- packedVecType const Scale(0.01, 0.02);
-
- std::vector<packedVecType> SISD;
- std::printf("- SISD: %d us\n", launch_vec_mul_mat<packedMatType, packedVecType>(SISD, Transform, Scale, Samples));
-
- std::vector<alignedVecType> SIMD;
- std::printf("- SIMD: %d us\n", launch_vec_mul_mat<alignedMatType, alignedVecType>(SIMD, Transform, Scale, Samples));
-
- for(std::size_t i = 0; i < Samples; ++i)
- {
- packedVecType const A = SISD[i];
- packedVecType const B = packedVecType(SIMD[i]);
- Error += glm::all(glm::equal(A, B, static_cast<T>(0.001))) ? 0 : 1;
- }
-
- return Error;
-}
-
-template <typename packedMatType, typename packedVecType, typename alignedMatType, typename alignedVecType>
-static int comp_vec3_mul_mat3(std::size_t Samples)
-{
- typedef typename packedMatType::value_type T;
-
- int Error = 0;
-
- packedMatType const Transform(1, 2, 3, 4, 5, 6, 7, 8, 9);
- packedVecType const Scale(0.01, 0.02, 0.05);
-
- std::vector<packedVecType> SISD;
- std::printf("- SISD: %d us\n", launch_vec_mul_mat<packedMatType, packedVecType>(SISD, Transform, Scale, Samples));
-
- std::vector<alignedVecType> SIMD;
- std::printf("- SIMD: %d us\n", launch_vec_mul_mat<alignedMatType, alignedVecType>(SIMD, Transform, Scale, Samples));
-
- for(std::size_t i = 0; i < Samples; ++i)
- {
- packedVecType const A = SISD[i];
- packedVecType const B = SIMD[i];
- Error += glm::all(glm::equal(A, B, static_cast<T>(0.001))) ? 0 : 1;
- }
-
- return Error;
-}
-
-template <typename packedMatType, typename packedVecType, typename alignedMatType, typename alignedVecType>
-static int comp_vec4_mul_mat4(std::size_t Samples)
-{
- typedef typename packedMatType::value_type T;
-
- int Error = 0;
-
- packedMatType const Transform(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16);
- packedVecType const Scale(0.01, 0.02, 0.03, 0.05);
-
- std::vector<packedVecType> SISD;
- std::printf("- SISD: %d us\n", launch_vec_mul_mat<packedMatType, packedVecType>(SISD, Transform, Scale, Samples));
-
- std::vector<alignedVecType> SIMD;
- std::printf("- SIMD: %d us\n", launch_vec_mul_mat<alignedMatType, alignedVecType>(SIMD, Transform, Scale, Samples));
-
- for(std::size_t i = 0; i < Samples; ++i)
- {
- packedVecType const A = SISD[i];
- packedVecType const B = SIMD[i];
- Error += glm::all(glm::equal(A, B, static_cast<T>(0.001))) ? 0 : 1;
- }
-
- return Error;
-}
-
-int main()
-{
- std::size_t const Samples = 100000;
-
- int Error = 0;
-
- std::printf("vec2 * mat2:\n");
- Error += comp_vec2_mul_mat2<glm::mat2, glm::vec2, glm::aligned_mat2, glm::aligned_vec2>(Samples);
-
- std::printf("dvec2 * dmat2:\n");
- Error += comp_vec2_mul_mat2<glm::dmat2, glm::dvec2,glm::aligned_dmat2, glm::aligned_dvec2>(Samples);
-
- std::printf("vec3 * mat3:\n");
- Error += comp_vec3_mul_mat3<glm::mat3, glm::vec3, glm::aligned_mat3, glm::aligned_vec3>(Samples);
-
- std::printf("dvec3 * dmat3:\n");
- Error += comp_vec3_mul_mat3<glm::dmat3, glm::dvec3, glm::aligned_dmat3, glm::aligned_dvec3>(Samples);
-
- std::printf("vec4 * mat4:\n");
- Error += comp_vec4_mul_mat4<glm::mat4, glm::vec4, glm::aligned_mat4, glm::aligned_vec4>(Samples);
-
- std::printf("dvec4 * dmat4:\n");
- Error += comp_vec4_mul_mat4<glm::dmat4, glm::dvec4, glm::aligned_dmat4, glm::aligned_dvec4>(Samples);
-
- return Error;
-}
-
-#else
-
-int main()
-{
- return 0;
-}
-
-#endif
diff --git a/3rdparty/glm/source/util/autoexp.txt b/3rdparty/glm/source/util/autoexp.txt
deleted file mode 100644
index 5a07bed..0000000
--- a/3rdparty/glm/source/util/autoexp.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-[Visualizer]
-
-glm::detail::tvec2<*>{
- preview (
- #(#($c.x,$c.y))
- )
- children (
- #([x]: $c.x,[y]: $c.y)
- )
-}
-
-glm::detail::tvec3<*>{
- preview (
- #($e.x,$e.y,$e.z)
- )
- children (
- #([x]: $e.x,[y]: $e.y,[z]: $e.z)
- )
-}
-
-glm::detail::tvec4<*>{
- preview (
- #($c.x,$c.y,$c.z,$c.w)
- )
- children (
- #([x]: $e.x,[y]: $e.y,[z]: $e.z, #([w]: $e.w))
- )
-}
diff --git a/3rdparty/glm/source/util/autoexp.vc2010.dat b/3rdparty/glm/source/util/autoexp.vc2010.dat
deleted file mode 100644
index e28d31d..0000000
--- a/3rdparty/glm/source/util/autoexp.vc2010.dat
+++ /dev/null
@@ -1,3896 +0,0 @@
-; AutoExp.Dat - templates for automatically expanding data
-; Copyright(c) Microsoft Corporation. All Rights Reserved.
-;---------------------------------------------------------------
-;
-; While debugging, Data Tips and items in the Watch and Variable
-; windows are automatically expanded to show their most important
-; elements. The expansion follows the format given by the rules
-; in this file. You can add rules for your types or change the
-; predefined rules.
-;
-; For good examples, read the rules in this file.
-;
-; To find what the debugger considers the type of a variable to
-; be, add it to the Watch window and look at the Type column.
-;
-; An AutoExpand rule is a line with the name of a type, an equals
-; sign, and text with replaceable parts in angle brackets. The
-; part in angle brackets names a member of the type and an
-; optional Watch format specifier.
-;
-; AutoExpand rules use the following syntax. The equals sign (=),
-; angle brackets (<>), and comma are taken literally. Square
-; brackets ([]) indicate optional items.
-;
-; type=[text]<member[,format]>...
-;
-; type Name of the type (may be followed by <*> for template
-; types such as the ATL types listed below).
-;
-; text Any text.Usually the name of the member to display,
-; or a shorthand name for the member.
-;
-; member Name of a member to display.
-;
-; format Watch format specifier. One of the following:
-;
-; Letter Description Sample Display
-; ------ -------------------------- ------------ -------------
-; d,i Signed decimal integer 0xF000F065,d -268373915
-; u Unsigned decimal integer 0x0065,u 101
-; o Unsigned octal integer 0xF065,o 0170145
-; x,X Hexadecimal integer 61541,X 0X0000F065
-; l,h long or short prefix for 00406042,hx 0x0c22
-; d, i, u, o, x, X
-; f Signed floating-point 3./2.,f 1.500000
-; e Signed scientific-notation 3./2.,e 1.500000e+000
-; g Shorter of e and f 3./2.,g 1.5
-; c Single character 0x0065,c 'e'
-; s Zero-terminated string pVar,s "Hello world"
-; su Unicode string pVar,su "Hello world"
-;
-; For details of other format specifiers see Help under:
-; "format specifiers/watch variable"
-;
-; The special format <,t> specifies the name of the most-derived
-; type of the object. This is especially useful with pointers or
-; references to a base class.
-;
-; If there is no rule for a class, the base classes are checked for
-; a matching rule.
-;
-; There are some special entries allowed in the AutoExpand section:
-; $BUILTIN is used to display more complex types that need to do more
-; than just show a member variable or two.
-; $ADDIN allows external DLLs to be added to display even more complex
-; types via the EE Add-in API. The first argument is the DLL name, the
-; second argument is the name of the export from the DLL to use. For
-; further information on this API see the sample called EEAddIn.
-;
-; WARNING: if hexadecimal mode is on in the watch window, all numbers here are
-; evaluated in hex, e.g. 42 becomes 0x42
-
-[AutoExpand]
-
-; from windef.h
-tagPOINT =x=<x> y=<y>
-tagRECT =top=<top> bottom=<bottom> left=<left> right=<right>
-
-; from winuser.h
-tagMSG =msg=<message,x> wp=<wParam,x> lp=<lParam,x>
-
-; intrinsics
-__m64 =<m64_i64,x>
-__m128=$BUILTIN(M128)
-__m128i=$BUILTIN(M128I)
-__m128d=$BUILTIN(M128D)
-
-; from afxwin.h
-CDC =hDC=<m_hDC> attrib=<m_hAttribDC>
-CPaintDC =<,t> hWnd=<m_hWnd>
-CPoint =x=<x> y=<y>
-CRect =top=<top> bottom=<bottom> left=<left> right=<right>
-CSize =cx=<cx> cy=<cy>
-CWnd =<,t> hWnd=<m_hWnd>
-CWinApp =<,t> <m_pszAppName,s>
-CWinThread =<,t> h=<m_hThread> proc=<m_pfnThreadProc>
-
-; from afxcoll.h
-CPtrList =cnt=<m_nCount>
-
-; from afxstat_.h
-CProcessLocalObject =<,t>
-CThreadLocalObject =<,t>
-
-; from afx.h
-CArchiveException =cause=<m_cause>
-CFile =hFile=<m_hFile> name=<m_strFileName.m_pchData,s>
-CFileException =cause=<m_cause> OS Error=m_lOsError
-CMemFile =pos=<m_nPosition> size=<m_nFileSize>
-CObject =<,t>
-CRuntimeClass =<m_lpszClassName,s>
-CStdioFile =FILE*=<m_pStream> name=<m_strFilename.m_pchData,s>
-CTimeSpan =time=<m_time>
-CTime =time=<m_time>
-
-; from afxcoll.h
-CByteArray =count=<m_nCount>
-CStringList =count=<m_nCount>
-; same for all CXXXArray classes
-; same for CXXXList
-; same for CMapXXToXX
-
-; various string classes from MFC & ATL
-
-_com_error=<m_hresult,hr>
-_bstr_t=<m_Data->m_wstr,su> (<m_Data->m_RefCount,u>)
-_com_ptr_t<*>=<m_pInterface>
-_LARGE_INTEGER=<QuadPart>
-_ULARGE_INTEGER=<QuadPart>
-ATL::CComPtr<*>=<p>
-
-ATL::CComQIPtr<*>=<p>
-
-tagVARIANT=$BUILTIN(VARIANT)
-VARIANT=$BUILTIN(VARIANT)
-_GUID=$BUILTIN(GUID)
-
-; see EEAddIn sample for how to use these
-;_SYSTEMTIME=$ADDIN(EEAddIn.dll,AddIn_SystemTime)
-;_FILETIME=$ADDIN(EEAddIn.dll,AddIn_FileTime)
-
-[Visualizer]
-; This section contains visualizers for STL and ATL containers
-; DO NOT MODIFY
-ATL::CStringT<char,*>|CSimpleStringT<char,*>|ATL::CSimpleStringT<char,*>{
- preview ([$e.m_pszData,s])
- stringview ([$e.m_pszData,sb])
-}
-ATL::CStringT<wchar_t,*>|CSimpleStringT<wchar_t,*>|ATL::CSimpleStringT<wchar_t,*>|ATL::CStringT<unsigned short,*>|CSimpleStringT<unsigned short,*>|ATL::CSimpleStringT<unsigned short,*>{
- preview ([$e.m_pszData,su])
- stringview ([$e.m_pszData,sub])
-}
-ATL::CComBSTR{
- preview ([$e.m_str,su])
- stringview ([$e.m_str,sub])
-}
-
-
-; Many visualizers use nested #()s.
-; Why not use #(foo, bar) instead of #(#(foo), #(bar))?
-; The former alphabetically sorts its fields, while the latter does not.
-
-;------------------------------------------------------------------------------
-; std::pair from <utility>
-;------------------------------------------------------------------------------
-std::pair<*>{
- ; pair is previewed with "(<first>, <second>)".
- preview (
- #(
- "(",
- $e.first,
- ", ",
- $e.second,
- ")"
- )
- )
-
- ; We gloss over the fact that first and second are actually stored in _Pair_base.
- children (
- #(
- #(first : $e.first),
- #(second : $e.second)
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; std::plus, etc. from <functional>
-;------------------------------------------------------------------------------
-; STL functors are previewed with their names.
-; They have no state, so they have no children.
-std::plus<*>{
- preview ( "plus" )
- children ( #array(expr: 0, size: 0) )
-}
-std::minus<*>{
- preview ( "minus" )
- children ( #array(expr: 0, size: 0) )
-}
-std::multiplies<*>{
- preview ( "multiplies" )
- children ( #array(expr: 0, size: 0) )
-}
-std::divides<*>{
- preview ( "divides" )
- children ( #array(expr: 0, size: 0) )
-}
-std::modulus<*>{
- preview ( "modulus" )
- children ( #array(expr: 0, size: 0) )
-}
-std::negate<*>{
- preview ( "negate" )
- children ( #array(expr: 0, size: 0) )
-}
-std::equal_to<*>{
- preview ( "equal_to" )
- children ( #array(expr: 0, size: 0) )
-}
-std::not_equal_to<*>{
- preview ( "not_equal_to" )
- children ( #array(expr: 0, size: 0) )
-}
-std::greater<*>{
- preview ( "greater" )
- children ( #array(expr: 0, size: 0) )
-}
-std::less<*>{
- preview ( "less" )
- children ( #array(expr: 0, size: 0) )
-}
-std::greater_equal<*>{
- preview ( "greater_equal" )
- children ( #array(expr: 0, size: 0) )
-}
-std::less_equal<*>{
- preview ( "less_equal" )
- children ( #array(expr: 0, size: 0) )
-}
-std::logical_and<*>{
- preview ( "logical_and" )
- children ( #array(expr: 0, size: 0) )
-}
-std::logical_or<*>{
- preview ( "logical_or" )
- children ( #array(expr: 0, size: 0) )
-}
-std::logical_not<*>{
- preview ( "logical_not" )
- children ( #array(expr: 0, size: 0) )
-}
-
-;------------------------------------------------------------------------------
-; std::not1() from <functional>
-; std::not2() from <functional>
-;------------------------------------------------------------------------------
-; STL negators are previewed with "not[12](<stored functor>)".
-; They have a child with the fake name of [pred], so that the
-; stored functor can be inspected.
-std::unary_negate<*>{
- preview (
- #(
- "not1(",
- $e._Functor,
- ")"
- )
- )
-
- children (
- #([pred] : $e._Functor)
- )
-}
-std::binary_negate<*>{
- preview (
- #(
- "not2(",
- $e._Functor,
- ")"
- )
- )
-
- children (
- #([pred] : $e._Functor)
- )
-}
-
-;------------------------------------------------------------------------------
-; std::bind1st() from <functional>
-; std::bind2nd() from <functional>
-;------------------------------------------------------------------------------
-; STL binders are previewed with "bind1st(<op>, <value>)" or "bind2nd(<op>, <value>)".
-; We gloss over the fact that they derive from unary_function.
-std::binder1st<*>{
- preview (
- #(
- "bind1st(",
- $e.op,
- ", ",
- $e.value,
- ")"
- )
- )
-
- children (
- #(
- #(op : $e.op),
- #(value : $e.value)
- )
- )
-}
-std::binder2nd<*>{
- preview (
- #(
- "bind2nd(",
- $e.op,
- ", ",
- $e.value,
- ")"
- )
- )
-
- children (
- #(
- #(op : $e.op),
- #(value : $e.value)
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; std::ptr_fun() from <functional>
-;------------------------------------------------------------------------------
-; STL function pointer adaptors are previewed with "ptr_fun(<stored function pointer>)".
-; Function pointers have no children, so the adaptors have no children.
-std::pointer_to_unary_function<*>|std::pointer_to_binary_function<*>{
- preview (
- #(
- "ptr_fun(",
- $e._Pfun,
- ")"
- )
- )
-
- children ( #array(expr: 0, size: 0) )
-}
-
-;------------------------------------------------------------------------------
-; std::mem_fun() from <functional>
-; std::mem_fun_ref() from <functional>
-;------------------------------------------------------------------------------
-; See ptr_fun().
-std::mem_fun_t<*>|std::mem_fun1_t<*>|std::const_mem_fun_t<*>|std::const_mem_fun1_t<*>{
- preview (
- #(
- "mem_fun(",
- $e._Pmemfun,
- ")"
- )
- )
-
- children ( #array(expr: 0, size: 0) )
-}
-std::mem_fun_ref_t<*>|std::mem_fun1_ref_t<*>|std::const_mem_fun_ref_t<*>|std::const_mem_fun1_ref_t<*>{
- preview (
- #(
- "mem_fun_ref(",
- $e._Pmemfun,
- ")"
- )
- )
-
- children ( #array(expr: 0, size: 0) )
-}
-
-;------------------------------------------------------------------------------
-; std::auto_ptr from <memory>
-;------------------------------------------------------------------------------
-std::auto_ptr<*>{
- ; An empty auto_ptr is previewed with "empty".
- ; Otherwise, it is previewed with "auto_ptr <object>".
- preview (
- #if ($e._Myptr == 0) (
- "empty"
- ) #else (
- #(
- "auto_ptr ",
- *$e._Myptr
- )
- )
- )
-
- ; An empty auto_ptr has no children.
- ; Otherwise, it has a single child, its stored pointer, with a fake name of [ptr].
- children (
- #if ($e._Myptr == 0) (
- #array(expr: 0, size: 0)
- ) #else (
- #([ptr] : $e._Myptr)
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; std::basic_string from <string>
-;------------------------------------------------------------------------------
-; basic_string is previewed with its stored string.
-; It has [size] and [capacity] children, followed by [0], [1], [2], etc. children
-; displaying its stored characters.
-; The ($e._Myres) < ($e._BUF_SIZE) test determines whether the Small String Optimization
-; is in effect.
-; NOTE: The parentheses in ($e._Myres) < ($e._BUF_SIZE) are necessary.
-std::basic_string<char,*>{
- preview ( #if (($e._Myres) < ($e._BUF_SIZE)) ( [$e._Bx._Buf,s] ) #else ( [$e._Bx._Ptr,s] ))
- stringview ( #if (($e._Myres) < ($e._BUF_SIZE)) ( [$e._Bx._Buf,sb] ) #else ( [$e._Bx._Ptr,sb] ))
-
- children (
- #(
- #([size] : $e._Mysize),
- #([capacity] : $e._Myres),
- #if (($e._Myres) < ($e._BUF_SIZE)) (
- #array(expr: $e._Bx._Buf[$i], size: $e._Mysize)
- ) #else (
- #array(expr: $e._Bx._Ptr[$i], size: $e._Mysize)
- )
- )
- )
-}
-std::basic_string<unsigned short,*>|std::basic_string<wchar_t,*>{
- preview ( #if (($e._Myres) < ($e._BUF_SIZE)) ( [$e._Bx._Buf,su] ) #else ( [$e._Bx._Ptr,su] ))
- stringview ( #if (($e._Myres) < ($e._BUF_SIZE)) ( [$e._Bx._Buf,sub] ) #else ( [$e._Bx._Ptr,sub] ))
-
- children (
- #(
- #([size] : $e._Mysize),
- #([capacity] : $e._Myres),
- #if (($e._Myres) < ($e._BUF_SIZE)) (
- #array(expr: $e._Bx._Buf[$i], size: $e._Mysize)
- ) #else (
- #array(expr: $e._Bx._Ptr[$i], size: $e._Mysize)
- )
- )
- )
-}
-std::_String_iterator<char,*>|std::_String_const_iterator<char,*>{
- preview ( [$e._Ptr,s] )
- stringview ( [$e._Ptr,sb] )
- children ( #([ptr] : $e._Ptr) )
-}
-std::_String_iterator<unsigned short,*>|std::_String_const_iterator<unsigned short,*>|std::_String_iterator<wchar_t,*>|std::_String_const_iterator<wchar_t,*>{
- preview ( [$e._Ptr,su] )
- stringview ( [$e._Ptr,sub] )
- children ( #([ptr] : $e._Ptr) )
-}
-
-;------------------------------------------------------------------------------
-; std::vector<bool> from <vector>
-;------------------------------------------------------------------------------
-; Despite its packed representation, vector<bool> is visualized like vector<T>.
-std::vector<bool,*>{
- preview (
- #(
- "[",
- $e._Mysize,
- "](",
- #array(
- expr: (bool)(($e._Myvec._Myfirst[$i / _VBITS] >> ($i % _VBITS)) & 1),
- size: $e._Mysize
- ),
- ")"
- )
- )
-
- children (
- #(
- #([size] : $e._Mysize),
- #([capacity] : ($e._Myvec._Myend - $e._Myvec._Myfirst) * _VBITS),
- #array(
- expr: (bool)(($e._Myvec._Myfirst[$i / _VBITS] >> ($i % _VBITS)) & 1),
- size: $e._Mysize
- )
- )
- )
-}
-std::_Vb_reference<*>|std::_Vb_iterator<*>|std::_Vb_const_iterator<*>{
- preview (
- (bool)((*$e._Myptr >> $e._Myoff) & 1)
- )
-
- children (
- #(
- #([ptr] : $e._Myptr),
- #([offset] : $e._Myoff)
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; std::vector from <vector>
-;------------------------------------------------------------------------------
-; vector is previewed with "[<size>](<elements>)".
-; It has [size] and [capacity] children, followed by its elements.
-; The other containers follow its example.
-std::vector<*>{
- preview (
- #(
- "[",
- $e._Mylast - $e._Myfirst,
- "](",
- #array(
- expr: $e._Myfirst[$i],
- size: $e._Mylast - $e._Myfirst
- ),
- ")"
- )
- )
-
- children (
- #(
- #([size] : $e._Mylast - $e._Myfirst),
- #([capacity] : $e._Myend - $e._Myfirst),
- #array(
- expr: $e._Myfirst[$i],
- size: $e._Mylast - $e._Myfirst
- )
- )
- )
-}
-std::_Vector_iterator<*>|std::_Vector_const_iterator<*>{
- preview (
- *$e._Ptr
- )
-
- children (
- #([ptr] : $e._Ptr)
- )
-}
-
-;------------------------------------------------------------------------------
-; std::deque from <deque>
-;------------------------------------------------------------------------------
-std::deque<*>{
- preview (
- #(
- "[",
- $e._Mysize,
- "](",
- #array(
- expr: $e._Map[(($i + $e._Myoff) / $e._EEN_DS) % $e._Mapsize][($i + $e._Myoff) % $e._EEN_DS],
- size: $e._Mysize
- ),
- ")"
- )
- )
-
- children (
- #(
- #array(
- expr: $e._Map[(($i + $e._Myoff) / $e._EEN_DS) % $e._Mapsize][($i + $e._Myoff) % $e._EEN_DS],
- size: $e._Mysize
- )
- )
- )
-}
-std::_Deque_iterator<*,*>|std::_Deque_const_iterator<*,*>{
- preview (
- #if ($e._Myoff >= ((std::deque<$T1,$T2> *)$e._Myproxy->_Mycont)->_Myoff + ((std::deque<$T1,$T2> *)$e._Myproxy->_Mycont)->_Mysize) (
- "end"
- ) #else (
- ((std::deque<$T1,$T2> *)$e._Myproxy->_Mycont)->_Map[($e._Myoff / ((std::deque<$T1,$T2> *)$e._Myproxy->_Mycont)->_EEN_DS) % ((std::deque<$T1,$T2> *)$e._Myproxy->_Mycont)->_Mapsize][$e._Myoff % ((std::deque<$T1,$T2> *)$e._Myproxy->_Mycont)->_EEN_DS]
- )
- )
-
- children (
- #if ($e._Myoff >= ((std::deque<$T1,$T2> *)$e._Myproxy->_Mycont)->_Myoff + ((std::deque<$T1,$T2> *)$e._Myproxy->_Mycont)->_Mysize) (
- #array(expr: 0, size: 0)
- ) #else (
- #(
- #([index] : $e._Myoff - ((std::deque<$T1,$T2> *)$e._Myproxy->_Mycont)->_Myoff),
- #([ptr] : &((std::deque<$T1,$T2> *)$e._Myproxy->_Mycont)->_Map[($e._Myoff / ((std::deque<$T1,$T2> *)$e._Myproxy->_Mycont)->_EEN_DS) % ((std::deque<$T1,$T2> *)$e._Myproxy->_Mycont)->_Mapsize][$e._Myoff % ((std::deque<$T1,$T2> *)$e._Myproxy->_Mycont)->_EEN_DS] )
- )
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; std::list from <list>
-;------------------------------------------------------------------------------
-std::list<*>{
- preview (
- #(
- "[",
- $e._Mysize,
- "](",
- #list(
- head: $e._Myhead->_Next,
- size: $e._Mysize,
- next: _Next
- ) : $e._Myval,
- ")"
- )
- )
-
- children (
- #list(
- head: $e._Myhead->_Next,
- size: $e._Mysize,
- next: _Next
- ) : $e._Myval
- )
-}
-std::_List_iterator<*>|std::_List_const_iterator<*>{
- preview ( $e._Ptr->_Myval )
- children ( #([ptr] : &$e._Ptr->_Myval) )
-}
-
-;------------------------------------------------------------------------------
-; std::queue from <queue>
-; std::stack from <stack>
-;------------------------------------------------------------------------------
-std::queue<*>|std::stack<*>{
- preview ( $e.c )
- children ( #(c : $e.c) )
-}
-
-;------------------------------------------------------------------------------
-; std::priority_queue from <queue>
-;------------------------------------------------------------------------------
-std::priority_queue<*>{
- preview ( $e.c )
-
- children (
- #(
- #(c [heap]: $e.c),
- #(comp : $e.comp)
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; std::map from <map>
-; std::multimap from <map>
-; std::set from <set>
-; std::multiset from <set>
-;------------------------------------------------------------------------------
-std::map<*>|std::multimap<*>|std::set<*>|std::multiset<*>{
- preview (
- #(
- "[",
- $e._Mysize,
- "](",
- #tree(
- head: $e._Myhead->_Parent,
- skip: $e._Myhead,
- left: _Left,
- right: _Right,
- size: $e._Mysize
- ) : $e._Myval,
- ")"
- )
- )
-
- children (
- #(
- #([comp] : $e.comp),
- #tree(
- head: $e._Myhead->_Parent,
- skip: $e._Myhead,
- left: _Left,
- right: _Right,
- size: $e._Mysize
- ) : $e._Myval
- )
- )
-}
-std::_Tree_iterator<*>|std::_Tree_const_iterator<*>{
- preview ( $e._Ptr->_Myval )
- children ( #([ptr] : &$e._Ptr->_Myval) )
-}
-
-;------------------------------------------------------------------------------
-; std::bitset from <bitset>
-;------------------------------------------------------------------------------
-std::bitset<*>{
- preview (
- #(
- "[",
- $e._EEN_BITS,
- "](",
- #array(
- expr: [($e._Array[$i / $e._Bitsperword] >> ($i % $e._Bitsperword)) & 1,d],
- size: $e._EEN_BITS
- ),
- ")"
- )
- )
-
- children (
- #array(
- expr: [($e._Array[$i / $e._Bitsperword] >> ($i % $e._Bitsperword)) & 1,d],
- size: $e._EEN_BITS
- )
- )
-}
-std::bitset<*>::reference{
- preview (
- [($e._Pbitset->_Array[$i / $e._Pbitset->_Bitsperword] >> ($e._Mypos % $e._Pbitset->_Bitsperword)) & 1,d]
- )
-
- children (
- #(
- #([bitset] : $e._Pbitset),
- #([pos] : $e._Mypos)
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; std::reverse_iterator from <iterator>
-;------------------------------------------------------------------------------
-std::reverse_iterator<std::_String_iterator<*> >|std::reverse_iterator<std::_String_const_iterator<*> >{
- preview (
- #(
- "reverse_iterator to ",
- $e.current._Ptr[-1]
- )
- )
-
- children (
- #(
- #([to] : $e.current._Ptr - 1),
- #(current : $e.current)
- )
- )
-}
-std::reverse_iterator<std::_Vb_iterator<*> >|std::reverse_iterator<std::_Vb_const_iterator<*> >{
- preview (
- #(
- "reverse_iterator to ",
- #if ($e.current._Myoff != 0) (
- (bool)((*$e.current._Myptr >> ($e.current._Myoff - 1)) & 1)
- ) #else (
- (bool)(($e.current._Myptr[-1] >> (_VBITS - 1)) & 1)
- )
- )
- )
-
- children (
- #if ($e.current._Myoff != 0) (
- #(
- #([to ptr] : $e.current._Myptr),
- #([to offset] : $e.current._Myoff - 1),
- #(current : $e.current)
- )
- ) #else (
- #(
- #([to ptr] : $e.current._Myptr - 1),
- #([to offset] : _VBITS - 1),
- #(current : $e.current)
- )
- )
- )
-}
-std::reverse_iterator<std::_Vector_iterator<*> >|std::reverse_iterator<std::_Vector_const_iterator<*> >{
- preview (
- #(
- "reverse_iterator to ",
- $e.current._Ptr[-1]
- )
- )
-
- children (
- #(
- #([to] : $e.current._Ptr - 1),
- #(current : $e.current)
- )
- )
-}
-std::reverse_iterator<std::_Deque_iterator<*,*> >|std::reverse_iterator<std::_Deque_const_iterator<*,*> >{
- preview (
- #(
- "reverse_iterator to ",
- #if ($e.current._Myoff == ((std::deque<$T1,$T2> *)$e.current._Myproxy->_Mycont)->_Myoff) (
- "end"
- ) #else (
- ((std::deque<$T1,$T2> *)$e.current._Myproxy->_Mycont)->_Map[(($e.current._Myoff - 1) / ((std::deque<$T1,$T2> *)$e.current._Myproxy->_Mycont)->_EEN_DS) % ((std::deque<$T1,$T2> *)$e.current._Myproxy->_Mycont)->_Mapsize][($e.current._Myoff - 1) % ((std::deque<$T1,$T2> *)$e.current._Myproxy->_Mycont)->_EEN_DS]
- )
- )
- )
-
- children (
- #if ($e.current._Myoff == ((std::deque<$T1,$T2> *)$e.current._Myproxy->_Mycont)->_Myoff) (
- #(current : $e.current)
- ) #else (
- #(
- #([to index] : ($e.current._Myoff - 1) - ((std::deque<$T1,$T2> *)$e.current._Myproxy->_Mycont)->_Myoff),
- #([to ptr] : &((std::deque<$T1,$T2> *)$e.current._Myproxy->_Mycont)->_Map[(($e.current._Myoff - 1) / ((std::deque<$T1,$T2> *)$e.current._Myproxy->_Mycont)->_EEN_DS) % ((std::deque<$T1,$T2> *)$e.current._Myproxy->_Mycont)->_Mapsize][($e.current._Myoff - 1) % ((std::deque<$T1,$T2> *)$e.current._Myproxy->_Mycont)->_EEN_DS] ),
- #(current : $e.current)
- )
- )
- )
-}
-std::reverse_iterator<std::_List_iterator<*> >|std::reverse_iterator<std::_List_const_iterator<*> >{
- preview (
- #(
- "reverse_iterator to ",
- $e.current._Ptr->_Prev->_Myval
- )
- )
-
- children (
- #(
- #([to] : &$e.current._Ptr->_Prev->_Myval),
- #(current : $e.current)
- )
- )
-}
-std::reverse_iterator<std::_Array_iterator<*> >|std::reverse_iterator<std::_Array_const_iterator<*> >{
- preview (
- #(
- "reverse_iterator to ",
- #if ($e.current._EEN_IDL == 0) (
- $e.current._Ptr[-1]
- ) #else (
- #if ($e.current._Idx == 0) (
- "end"
- ) #else (
- $e.current._Ptr[$e.current._Idx - 1]
- )
- )
- )
- )
-
- children (
- #if ($e.current._EEN_IDL == 0) (
- #(
- #([to] : $e.current._Ptr - 1),
- #(current : $e.current)
- )
- ) #else (
- #if ($e.current._Idx == 0) (
- #(current : $e.current)
- ) #else (
- #(
- #([to] : $e.current._Ptr + $e.current._Idx - 1),
- #(current : $e.current)
- )
- )
- )
- )
-}
-std::reverse_iterator<*>{
- preview (
- #(
- "reverse_iterator current ",
- $e.current
- )
- )
-
- children (
- #(current : $e.current)
- )
-}
-
-;------------------------------------------------------------------------------
-; std::complex from <complex>
-;------------------------------------------------------------------------------
-std::complex<*>{
- preview (
- #if ($e._Val[1] == 0) (
- ; Purely real.
- $e._Val[0]
- ) #else (
- #if ($e._Val[0] == 0) (
- ; Purely imaginary.
- #if ($e._Val[1] < 0) (
- #("-i*", -$e._Val[1])
- ) #else (
- #("i*", $e._Val[1])
- )
- ) #else (
- ; Mixed.
- #if ($e._Val[1] < 0) (
- #($e._Val[0], "-i*", -$e._Val[1])
- ) #else (
- #($e._Val[0], "+i*", $e._Val[1])
- )
- )
- )
- )
-
- children (
- #(
- #(real : $e._Val[0]),
- #(imag : $e._Val[1])
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; std::valarray from <valarray>
-;------------------------------------------------------------------------------
-std::valarray<*>{
- preview (
- #(
- "[",
- $e._Mysize,
- "](",
- #array(
- expr: $e._Myptr[$i],
- size: $e._Mysize
- ),
- ")"
- )
- )
-
- children (
- #array(
- expr: $e._Myptr[$i],
- size: $e._Mysize
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; std::tr1::reference_wrapper from <functional>
-;------------------------------------------------------------------------------
-std::tr1::reference_wrapper<*>{
- preview (
- #if ($e._Callee._EEN_INDIRECT == 1) (
- ; For ordinary T, reference_wrapper<T> stores a T * _Callee._Ptr
- ; which is non-null. Actual references are previewed with what they
- ; refer to, so reference_wrapper<T> is previewed with dereferencing its
- ; stored pointer.
- *$e._Callee._Ptr
- ) #else (
- ; When T is a pointer to data member type, reference_wrapper<T>
- ; stores a T _Callee._Object directly.
- $e._Callee._Object
- )
- )
-
- children (
- #if ($e._Callee._EEN_INDIRECT == 1) (
- ; Actual references have the same children as what they refer to.
- ; Unfortunately, there appears to be no way to imitate this exactly.
- ; Therefore, we make reference_wrapper<T> appear to have a single
- ; child, its stored pointer, with a fake name of [ptr].
- #([ptr] : $e._Callee._Ptr)
- ) #else (
- ; When T is a pointer to data member type, T has no children,
- ; so we make reference_wrapper<T> appear to have no children.
- #array(expr: 0, size: 0)
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; std::tr1::shared_ptr from <memory>
-;------------------------------------------------------------------------------
-std::tr1::_Ref_count<*>{
- preview ( "default" )
- children ( #array(expr: 0, size: 0) )
-}
-std::tr1::_Ref_count_del<*>{
- preview ( "custom deleter" )
- children ( #([deleter] : $e._Dtor) )
-}
-std::tr1::_Ref_count_del_alloc<*>{
- preview ( "custom deleter, custom allocator" )
- children (
- #(
- #([deleter] : $e._Dtor),
- #([allocator] : $e._Myal)
- )
- )
-}
-std::tr1::_Ref_count_obj<*>{
- preview ( "make_shared" )
- children ( #array(expr: 0, size: 0) )
-}
-std::tr1::_Ref_count_obj_alloc<*>{
- preview ( "allocate_shared" )
- children ( #([allocator] : $e._Myal) )
-}
-std::tr1::shared_ptr<*>{
- preview (
- ; shared_ptr<T> stores a T * _Ptr .
- #if ($e._Ptr == 0) (
- ; A default-constructed shared_ptr has a null _Ptr and a null _Rep,
- ; and is formally said to be empty.
- ; A shared_ptr constructed from a null pointer has a null _Ptr
- ; and a NON-null _Rep . It is formally said to own the null pointer.
- ; We preview both with "empty".
- "empty"
- ) #else (
- ; Raw pointers are previewed with "<pointer value> <object>".
- ; auto_ptr is previewed with "auto_ptr <object>".
- ; Following these examples, shared_ptr is previewed with
- ; "shared_ptr <object> [N strong refs, M weak refs]".
- #(
- "shared_ptr ",
- *$e._Ptr,
- " [",
- $e._Rep->_Uses,
- #if ($e._Rep->_Uses == 1) (" strong ref") #else (" strong refs"),
- #if ($e._Rep->_Weaks - 1 > 0) (
- #(
- ", ",
- $e._Rep->_Weaks - 1,
- #if ($e._Rep->_Weaks - 1 == 1) (" weak ref") #else (" weak refs")
- )
- ),
- "] [",
- *$e._Rep,
- "]"
- )
- ; Note: _Rep->_Uses counts how many shared_ptrs share ownership of the object,
- ; so we directly display it as the strong reference count.
- ; _Rep->_Weaks counts how many shared_ptrs and weak_ptrs share ownership of
- ; the "representation object" (or "control block"). All of the shared_ptrs are
- ; counted as a single owner. That is, _Weaks is initialized to 1, and when
- ; _Uses falls to 0, _Weaks is decremented. This avoids incrementing and decrementing
- ; _Weaks every time that a shared_ptr gains or loses ownership. Therefore,
- ; _Weaks - 1 is the weak reference count, the number of weak_ptrs that are observing
- ; the shared object.
- )
- )
-
- children (
- #if ($e._Ptr == 0) (
- ; We make empty shared_ptrs (and shared_ptrs that own
- ; the null pointer) appear to have no children.
- #array(expr: 0, size: 0)
- ) #else (
- #(
- ; We make shared_ptr appear to have two children:
-
- ; Its stored pointer, with a fake name of [ptr].
- #([ptr] : $e._Ptr),
-
- ; Its deleter and allocator, which may be default or custom.
- #([deleter and allocator] : *$e._Rep)
- )
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; std::tr1::weak_ptr from <memory>
-;------------------------------------------------------------------------------
-std::tr1::weak_ptr<*>{
- preview (
- #if ($e._Ptr == 0) (
- "empty"
- ) #elif ($e._Rep->_Uses == 0) (
- ; weak_ptr is just like shared_ptr, except that a weak_ptr can be expired.
- #(
- "expired [",
- *$e._Rep,
- "]"
- )
- ) #else (
- #(
- "weak_ptr ",
- *$e._Ptr,
- " [",
- $e._Rep->_Uses,
- #if ($e._Rep->_Uses == 1) (" strong ref") #else (" strong refs"),
- #if ($e._Rep->_Weaks - 1 > 0) (
- #(
- ", ",
- $e._Rep->_Weaks - 1,
- #if ($e._Rep->_Weaks - 1 == 1) (" weak ref") #else (" weak refs")
- )
- ),
- "] [",
- *$e._Rep,
- "]"
- )
- )
- )
-
- children (
- #if ($e._Ptr == 0) (
- #array(expr: 0, size: 0)
- ) #elif ($e._Rep->_Uses == 0) (
- ; When a weak_ptr is expired, we show its deleter and allocator.
- ; The deleter has already been used, but the control block has not yet been deallocated.
- #([deleter and allocator] : *$e._Rep)
- ) #else (
- #(
- #([ptr] : $e._Ptr),
- #([deleter and allocator] : *$e._Rep)
- )
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; std::tr1::mem_fn() from <functional>
-;------------------------------------------------------------------------------
-; Note that when mem_fn() is given a data member pointer, it returns a _Call_wrapper<_Callable_pmd<*> > .
-; Data member pointers themselves don't have useful previews, so we don't attempt to visualize this.
-; When mem_fn() is given a member function pointer, it returns a _Mem_fn[N], which we can visualize.
-std::tr1::_Mem_fn1<*>|std::tr1::_Mem_fn2<*>|std::tr1::_Mem_fn3<*>|std::tr1::_Mem_fn4<*>|std::tr1::_Mem_fn5<*>|std::tr1::_Mem_fn6<*>|std::tr1::_Mem_fn7<*>|std::tr1::_Mem_fn8<*>|std::tr1::_Mem_fn9<*>|std::tr1::_Mem_fn10<*>{
- preview (
- ; We preview the functor returned by mem_fn() with "mem_fn(<stored member function pointer>)".
- #(
- "mem_fn(",
- $e._Callee._Object,
- ")"
- )
- )
-
- children (
- ; Member function pointers have no children.
- #array(expr: 0, size: 0)
- )
-}
-
-;------------------------------------------------------------------------------
-; std::tr1::bind() from <functional>
-;------------------------------------------------------------------------------
-; bind() placeholders are previewed with their names.
-; They have no state, so they have no children.
-std::tr1::_Ph<1>{
- preview ( "_1" )
- children ( #array(expr: 0, size: 0) )
-}
-std::tr1::_Ph<2>{
- preview ( "_2" )
- children ( #array(expr: 0, size: 0) )
-}
-std::tr1::_Ph<3>{
- preview ( "_3" )
- children ( #array(expr: 0, size: 0) )
-}
-std::tr1::_Ph<4>{
- preview ( "_4" )
- children ( #array(expr: 0, size: 0) )
-}
-std::tr1::_Ph<5>{
- preview ( "_5" )
- children ( #array(expr: 0, size: 0) )
-}
-std::tr1::_Ph<6>{
- preview ( "_6" )
- children ( #array(expr: 0, size: 0) )
-}
-std::tr1::_Ph<7>{
- preview ( "_7" )
- children ( #array(expr: 0, size: 0) )
-}
-std::tr1::_Ph<8>{
- preview ( "_8" )
- children ( #array(expr: 0, size: 0) )
-}
-std::tr1::_Ph<9>{
- preview ( "_9" )
- children ( #array(expr: 0, size: 0) )
-}
-std::tr1::_Ph<10>{
- preview ( "_10" )
- children ( #array(expr: 0, size: 0) )
-}
-
-; The functor returned by bind(f, t1, t2) is previewed with "bind(f, t1, t2)".
-; It has children with the fake names of [f], [t1], [t2], etc.
-std::tr1::_Bind<*,*,std::tr1::_Bind0<*> >|std::tr1::_Bind_fty<*,*,std::tr1::_Bind0<*> >{
- preview (
- #(
- "bind(", $e._Bx._Callee._Object,
- ")"
- )
- )
-
- children (
- #(
- #([f] : $e._Bx._Callee._Object)
- )
- )
-}
-std::tr1::_Bind<*,*,std::tr1::_Bind1<*> >|std::tr1::_Bind_fty<*,*,std::tr1::_Bind1<*> >{
- preview (
- #(
- "bind(", $e._Bx._Callee._Object,
- ", ", $e._Bx._Vx0,
- ")"
- )
- )
-
- children (
- #(
- #([f] : $e._Bx._Callee._Object),
- #([t1] : $e._Bx._Vx0)
- )
- )
-}
-std::tr1::_Bind<*,*,std::tr1::_Bind2<*> >|std::tr1::_Bind_fty<*,*,std::tr1::_Bind2<*> >{
- preview (
- #(
- "bind(", $e._Bx._Callee._Object,
- ", ", $e._Bx._Vx0,
- ", ", $e._Bx._Vx1,
- ")"
- )
- )
-
- children (
- #(
- #([f] : $e._Bx._Callee._Object),
- #([t1] : $e._Bx._Vx0),
- #([t2] : $e._Bx._Vx1)
- )
- )
-}
-std::tr1::_Bind<*,*,std::tr1::_Bind3<*> >|std::tr1::_Bind_fty<*,*,std::tr1::_Bind3<*> >{
- preview (
- #(
- "bind(", $e._Bx._Callee._Object,
- ", ", $e._Bx._Vx0,
- ", ", $e._Bx._Vx1,
- ", ", $e._Bx._Vx2,
- ")"
- )
- )
-
- children (
- #(
- #([f] : $e._Bx._Callee._Object),
- #([t1] : $e._Bx._Vx0),
- #([t2] : $e._Bx._Vx1),
- #([t3] : $e._Bx._Vx2)
- )
- )
-}
-std::tr1::_Bind<*,*,std::tr1::_Bind4<*> >|std::tr1::_Bind_fty<*,*,std::tr1::_Bind4<*> >{
- preview (
- #(
- "bind(", $e._Bx._Callee._Object,
- ", ", $e._Bx._Vx0,
- ", ", $e._Bx._Vx1,
- ", ", $e._Bx._Vx2,
- ", ", $e._Bx._Vx3,
- ")"
- )
- )
-
- children (
- #(
- #([f] : $e._Bx._Callee._Object),
- #([t1] : $e._Bx._Vx0),
- #([t2] : $e._Bx._Vx1),
- #([t3] : $e._Bx._Vx2),
- #([t4] : $e._Bx._Vx3)
- )
- )
-}
-std::tr1::_Bind<*,*,std::tr1::_Bind5<*> >|std::tr1::_Bind_fty<*,*,std::tr1::_Bind5<*> >{
- preview (
- #(
- "bind(", $e._Bx._Callee._Object,
- ", ", $e._Bx._Vx0,
- ", ", $e._Bx._Vx1,
- ", ", $e._Bx._Vx2,
- ", ", $e._Bx._Vx3,
- ", ", $e._Bx._Vx4,
- ")"
- )
- )
-
- children (
- #(
- #([f] : $e._Bx._Callee._Object),
- #([t1] : $e._Bx._Vx0),
- #([t2] : $e._Bx._Vx1),
- #([t3] : $e._Bx._Vx2),
- #([t4] : $e._Bx._Vx3),
- #([t5] : $e._Bx._Vx4)
- )
- )
-}
-std::tr1::_Bind<*,*,std::tr1::_Bind6<*> >|std::tr1::_Bind_fty<*,*,std::tr1::_Bind6<*> >{
- preview (
- #(
- "bind(", $e._Bx._Callee._Object,
- ", ", $e._Bx._Vx0,
- ", ", $e._Bx._Vx1,
- ", ", $e._Bx._Vx2,
- ", ", $e._Bx._Vx3,
- ", ", $e._Bx._Vx4,
- ", ", $e._Bx._Vx5,
- ")"
- )
- )
-
- children (
- #(
- #([f] : $e._Bx._Callee._Object),
- #([t1] : $e._Bx._Vx0),
- #([t2] : $e._Bx._Vx1),
- #([t3] : $e._Bx._Vx2),
- #([t4] : $e._Bx._Vx3),
- #([t5] : $e._Bx._Vx4),
- #([t6] : $e._Bx._Vx5)
- )
- )
-}
-std::tr1::_Bind<*,*,std::tr1::_Bind7<*> >|std::tr1::_Bind_fty<*,*,std::tr1::_Bind7<*> >{
- preview (
- #(
- "bind(", $e._Bx._Callee._Object,
- ", ", $e._Bx._Vx0,
- ", ", $e._Bx._Vx1,
- ", ", $e._Bx._Vx2,
- ", ", $e._Bx._Vx3,
- ", ", $e._Bx._Vx4,
- ", ", $e._Bx._Vx5,
- ", ", $e._Bx._Vx6,
- ")"
- )
- )
-
- children (
- #(
- #([f] : $e._Bx._Callee._Object),
- #([t1] : $e._Bx._Vx0),
- #([t2] : $e._Bx._Vx1),
- #([t3] : $e._Bx._Vx2),
- #([t4] : $e._Bx._Vx3),
- #([t5] : $e._Bx._Vx4),
- #([t6] : $e._Bx._Vx5),
- #([t7] : $e._Bx._Vx6)
- )
- )
-}
-std::tr1::_Bind<*,*,std::tr1::_Bind8<*> >|std::tr1::_Bind_fty<*,*,std::tr1::_Bind8<*> >{
- preview (
- #(
- "bind(", $e._Bx._Callee._Object,
- ", ", $e._Bx._Vx0,
- ", ", $e._Bx._Vx1,
- ", ", $e._Bx._Vx2,
- ", ", $e._Bx._Vx3,
- ", ", $e._Bx._Vx4,
- ", ", $e._Bx._Vx5,
- ", ", $e._Bx._Vx6,
- ", ", $e._Bx._Vx7,
- ")"
- )
- )
-
- children (
- #(
- #([f] : $e._Bx._Callee._Object),
- #([t1] : $e._Bx._Vx0),
- #([t2] : $e._Bx._Vx1),
- #([t3] : $e._Bx._Vx2),
- #([t4] : $e._Bx._Vx3),
- #([t5] : $e._Bx._Vx4),
- #([t6] : $e._Bx._Vx5),
- #([t7] : $e._Bx._Vx6),
- #([t8] : $e._Bx._Vx7)
- )
- )
-}
-std::tr1::_Bind<*,*,std::tr1::_Bind9<*> >|std::tr1::_Bind_fty<*,*,std::tr1::_Bind9<*> >{
- preview (
- #(
- "bind(", $e._Bx._Callee._Object,
- ", ", $e._Bx._Vx0,
- ", ", $e._Bx._Vx1,
- ", ", $e._Bx._Vx2,
- ", ", $e._Bx._Vx3,
- ", ", $e._Bx._Vx4,
- ", ", $e._Bx._Vx5,
- ", ", $e._Bx._Vx6,
- ", ", $e._Bx._Vx7,
- ", ", $e._Bx._Vx8,
- ")"
- )
- )
-
- children (
- #(
- #([f] : $e._Bx._Callee._Object),
- #([t1] : $e._Bx._Vx0),
- #([t2] : $e._Bx._Vx1),
- #([t3] : $e._Bx._Vx2),
- #([t4] : $e._Bx._Vx3),
- #([t5] : $e._Bx._Vx4),
- #([t6] : $e._Bx._Vx5),
- #([t7] : $e._Bx._Vx6),
- #([t8] : $e._Bx._Vx7),
- #([t9] : $e._Bx._Vx8)
- )
- )
-}
-std::tr1::_Bind<*,*,std::tr1::_Bind10<*> >|std::tr1::_Bind_fty<*,*,std::tr1::_Bind10<*> >{
- preview (
- #(
- "bind(", $e._Bx._Callee._Object,
- ", ", $e._Bx._Vx0,
- ", ", $e._Bx._Vx1,
- ", ", $e._Bx._Vx2,
- ", ", $e._Bx._Vx3,
- ", ", $e._Bx._Vx4,
- ", ", $e._Bx._Vx5,
- ", ", $e._Bx._Vx6,
- ", ", $e._Bx._Vx7,
- ", ", $e._Bx._Vx8,
- ", ", $e._Bx._Vx9,
- ")"
- )
- )
-
- children (
- #(
- #([f] : $e._Bx._Callee._Object),
- #([t1] : $e._Bx._Vx0),
- #([t2] : $e._Bx._Vx1),
- #([t3] : $e._Bx._Vx2),
- #([t4] : $e._Bx._Vx3),
- #([t5] : $e._Bx._Vx4),
- #([t6] : $e._Bx._Vx5),
- #([t7] : $e._Bx._Vx6),
- #([t8] : $e._Bx._Vx7),
- #([t9] : $e._Bx._Vx8),
- #([t10] : $e._Bx._Vx9)
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; std::tr1::function from <functional>
-;------------------------------------------------------------------------------
-std::tr1::_Impl_no_alloc0<*>|std::tr1::_Impl_no_alloc1<*>|std::tr1::_Impl_no_alloc2<*>|std::tr1::_Impl_no_alloc3<*>|std::tr1::_Impl_no_alloc4<*>|std::tr1::_Impl_no_alloc5<*>|std::tr1::_Impl_no_alloc6<*>|std::tr1::_Impl_no_alloc7<*>|std::tr1::_Impl_no_alloc8<*>|std::tr1::_Impl_no_alloc9<*>|std::tr1::_Impl_no_alloc10<*>{
- preview ( $e._Callee._Object )
- children ( #([functor] : $e._Callee._Object) )
-}
-std::tr1::_Impl0<*>|std::tr1::_Impl1<*>|std::tr1::_Impl2<*>|std::tr1::_Impl3<*>|std::tr1::_Impl4<*>|std::tr1::_Impl5<*>|std::tr1::_Impl6<*>|std::tr1::_Impl7<*>|std::tr1::_Impl8<*>|std::tr1::_Impl9<*>|std::tr1::_Impl10<*>{
- preview ( $e._Callee._Object )
- children (
- #(
- #([functor] : $e._Callee._Object),
- #([allocator] : $e._Myal)
- )
- )
-}
-std::tr1::function<*>{
- preview (
- #if ($e._Impl == 0) (
- ; Detecting empty functions is trivial.
- "empty"
- ) #else (
- *$e._Impl
- )
- )
-
- children (
- #if ($e._Impl == 0) (
- ; We make empty functions appear to have no children.
- #array(expr: 0, size: 0)
- ) #else (
- #([functor and allocator] : *$e._Impl)
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; std::tr1::tuple from <tuple>
-;------------------------------------------------------------------------------
-; tuple is visualized like pair, except that we have to give fake names to tuple's children.
-std::tr1::tuple<std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil>{
- preview (
- "()"
- )
-
- children (
- #array(expr: 0, size: 0)
- )
-}
-std::tr1::tuple<*,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil>{
- preview (
- #(
- "(", $e._Impl._Value,
- ")"
- )
- )
-
- children (
- #(
- [0] : $e._Impl._Value
- )
- )
-}
-std::tr1::tuple<*,*,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil>{
- preview (
- #(
- "(", $e._Impl._Value,
- ", ", $e._Impl._Tail._Value,
- ")"
- )
- )
-
- children (
- #(
- [0] : $e._Impl._Value,
- [1] : $e._Impl._Tail._Value
- )
- )
-}
-std::tr1::tuple<*,*,*,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil>{
- preview (
- #(
- "(", $e._Impl._Value,
- ", ", $e._Impl._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Value,
- ")"
- )
- )
-
- children (
- #(
- [0] : $e._Impl._Value,
- [1] : $e._Impl._Tail._Value,
- [2] : $e._Impl._Tail._Tail._Value
- )
- )
-}
-std::tr1::tuple<*,*,*,*,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil>{
- preview (
- #(
- "(", $e._Impl._Value,
- ", ", $e._Impl._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Value,
- ")"
- )
- )
-
- children (
- #(
- [0] : $e._Impl._Value,
- [1] : $e._Impl._Tail._Value,
- [2] : $e._Impl._Tail._Tail._Value,
- [3] : $e._Impl._Tail._Tail._Tail._Value
- )
- )
-}
-std::tr1::tuple<*,*,*,*,*,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil>{
- preview (
- #(
- "(", $e._Impl._Value,
- ", ", $e._Impl._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Tail._Value,
- ")"
- )
- )
-
- children (
- #(
- [0] : $e._Impl._Value,
- [1] : $e._Impl._Tail._Value,
- [2] : $e._Impl._Tail._Tail._Value,
- [3] : $e._Impl._Tail._Tail._Tail._Value,
- [4] : $e._Impl._Tail._Tail._Tail._Tail._Value
- )
- )
-}
-std::tr1::tuple<*,*,*,*,*,*,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil>{
- preview (
- #(
- "(", $e._Impl._Value,
- ", ", $e._Impl._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Tail._Tail._Value,
- ")"
- )
- )
-
- children (
- #(
- [0] : $e._Impl._Value,
- [1] : $e._Impl._Tail._Value,
- [2] : $e._Impl._Tail._Tail._Value,
- [3] : $e._Impl._Tail._Tail._Tail._Value,
- [4] : $e._Impl._Tail._Tail._Tail._Tail._Value,
- [5] : $e._Impl._Tail._Tail._Tail._Tail._Tail._Value
- )
- )
-}
-std::tr1::tuple<*,*,*,*,*,*,*,std::tr1::_Nil,std::tr1::_Nil,std::tr1::_Nil>{
- preview (
- #(
- "(", $e._Impl._Value,
- ", ", $e._Impl._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Tail._Tail._Tail._Value,
- ")"
- )
- )
-
- children (
- #(
- [0] : $e._Impl._Value,
- [1] : $e._Impl._Tail._Value,
- [2] : $e._Impl._Tail._Tail._Value,
- [3] : $e._Impl._Tail._Tail._Tail._Value,
- [4] : $e._Impl._Tail._Tail._Tail._Tail._Value,
- [5] : $e._Impl._Tail._Tail._Tail._Tail._Tail._Value,
- [6] : $e._Impl._Tail._Tail._Tail._Tail._Tail._Tail._Value
- )
- )
-}
-std::tr1::tuple<*,*,*,*,*,*,*,*,std::tr1::_Nil,std::tr1::_Nil>{
- preview (
- #(
- "(", $e._Impl._Value,
- ", ", $e._Impl._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Tail._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Tail._Tail._Tail._Tail._Value,
- ")"
- )
- )
-
- children (
- #(
- [0] : $e._Impl._Value,
- [1] : $e._Impl._Tail._Value,
- [2] : $e._Impl._Tail._Tail._Value,
- [3] : $e._Impl._Tail._Tail._Tail._Value,
- [4] : $e._Impl._Tail._Tail._Tail._Tail._Value,
- [5] : $e._Impl._Tail._Tail._Tail._Tail._Tail._Value,
- [6] : $e._Impl._Tail._Tail._Tail._Tail._Tail._Tail._Value,
- [7] : $e._Impl._Tail._Tail._Tail._Tail._Tail._Tail._Tail._Value
- )
- )
-}
-std::tr1::tuple<*,*,*,*,*,*,*,*,*,std::tr1::_Nil>{
- preview (
- #(
- "(", $e._Impl._Value,
- ", ", $e._Impl._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Tail._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Tail._Tail._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Tail._Tail._Tail._Tail._Tail._Value,
- ")"
- )
- )
-
- children (
- #(
- [0] : $e._Impl._Value,
- [1] : $e._Impl._Tail._Value,
- [2] : $e._Impl._Tail._Tail._Value,
- [3] : $e._Impl._Tail._Tail._Tail._Value,
- [4] : $e._Impl._Tail._Tail._Tail._Tail._Value,
- [5] : $e._Impl._Tail._Tail._Tail._Tail._Tail._Value,
- [6] : $e._Impl._Tail._Tail._Tail._Tail._Tail._Tail._Value,
- [7] : $e._Impl._Tail._Tail._Tail._Tail._Tail._Tail._Tail._Value,
- [8] : $e._Impl._Tail._Tail._Tail._Tail._Tail._Tail._Tail._Tail._Value
- )
- )
-}
-std::tr1::tuple<*,*,*,*,*,*,*,*,*,*>{
- preview (
- #(
- "(", $e._Impl._Value,
- ", ", $e._Impl._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Tail._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Tail._Tail._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Tail._Tail._Tail._Tail._Tail._Value,
- ", ", $e._Impl._Tail._Tail._Tail._Tail._Tail._Tail._Tail._Tail._Tail._Value,
- ")"
- )
- )
-
- children (
- #(
- [0] : $e._Impl._Value,
- [1] : $e._Impl._Tail._Value,
- [2] : $e._Impl._Tail._Tail._Value,
- [3] : $e._Impl._Tail._Tail._Tail._Value,
- [4] : $e._Impl._Tail._Tail._Tail._Tail._Value,
- [5] : $e._Impl._Tail._Tail._Tail._Tail._Tail._Value,
- [6] : $e._Impl._Tail._Tail._Tail._Tail._Tail._Tail._Value,
- [7] : $e._Impl._Tail._Tail._Tail._Tail._Tail._Tail._Tail._Value,
- [8] : $e._Impl._Tail._Tail._Tail._Tail._Tail._Tail._Tail._Tail._Value,
- [9] : $e._Impl._Tail._Tail._Tail._Tail._Tail._Tail._Tail._Tail._Tail._Value
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; std::tr1::array from <array>
-;------------------------------------------------------------------------------
-std::tr1::array<*>{
- preview (
- ; An actual array is previewed with its address.
- ; array<T, N> is previewed like vector<T>.
- #(
- "[",
- $e._EEN_SIZE,
- "](",
- #array(expr: $e._Elems[$i], size: $e._EEN_SIZE),
- ")"
- )
- )
-
- children (
- ; Just like an actual array.
- #array(expr: $e._Elems[$i], size: $e._EEN_SIZE)
- )
-}
-std::_Array_iterator<*>|std::_Array_const_iterator<*>{
- preview (
- #if ($e._EEN_IDL == 0) (
- *$e._Ptr
- ) #else (
- #if ($e._Idx == $e._EEN_SIZE) (
- ; array iterators are represented by _Ptr + _Idx,
- ; and they know how large their parent arrays are. Therefore, detecting
- ; end iterators is trivial.
- "end"
- ) #else (
- ; Like vector iterators, array iterators are previewed with what they point to.
- $e._Ptr[$e._Idx]
- )
- )
- )
-
- children (
- #if ($e._EEN_IDL == 0) (
- #([ptr] : $e._Ptr)
- ) #else (
- #if ($e._Idx == $e._EEN_SIZE) (
- ; We make end iterators appear to have no children.
- #array(expr: 0, size: 0)
- ) #else (
- ; An array iterator is conceptually a pointer, so we make it appear to store one.
- #([ptr] : $e._Ptr + $e._Idx)
- )
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; stdext::hash_map from <hash_map>
-; stdext::hash_multimap from <hash_map>
-; stdext::hash_set from <hash_set>
-; stdext::hash_multiset from <hash_set>
-;------------------------------------------------------------------------------
-stdext::hash_map<*>|stdext::hash_multimap<*>|stdext::hash_set<*>|stdext::hash_multiset<*>{
- preview (
- #(
- "[",
- $e._List._Mysize,
- "](",
- #list(
- head: $e._List._Myhead->_Next,
- size: $e._List._Mysize,
- next: _Next
- ) : $e._Myval,
- ")"
- )
- )
-
- children (
- #list(
- head: $e._List._Myhead->_Next,
- size: $e._List._Mysize,
- next: _Next
- ) : $e._Myval
- )
-}
-
-;------------------------------------------------------------------------------
-; std::tr1::unordered_map from <unordered_map>
-; std::tr1::unordered_multimap from <unordered_map>
-; std::tr1::unordered_set from <unordered_set>
-; std::tr1::unordered_multiset from <unordered_set>
-;------------------------------------------------------------------------------
-std::hash<*>{
- preview ( "hash" )
- children ( #array(expr: 0, size: 0) )
-}
-std::tr1::unordered_map<*>|std::tr1::unordered_multimap<*>|std::tr1::unordered_set<*>|std::tr1::unordered_multiset<*>{
- preview (
- #(
- "[",
- $e._List._Mysize,
- "](",
- #list(
- head: $e._List._Myhead->_Next,
- size: $e._List._Mysize,
- next: _Next
- ) : $e._Myval,
- ")"
- )
- )
-
- children (
- #(
- #([hash] : $e.comp._Hashobj),
- #([equal] : $e.comp._Keyeqobj),
- #list(
- head: $e._List._Myhead->_Next,
- size: $e._List._Mysize,
- next: _Next
- ) : $e._Myval
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; std::tr1::basic_regex from <regex>
-;------------------------------------------------------------------------------
-std::tr1::basic_regex<*>{
- preview (
- #if ($e._Rep == 0) (
- ; Default construction creates an empty basic_regex.
- "empty"
- ) #elif ($e._EEN_VIS == 1) (
- ; By default, _ENHANCED_REGEX_VISUALIZER is defined to be 1 in debug and 0 in ship.
- ; When it is 1, basic_regex stores the string from which it was constructed.
- ; When it is 0, basic_regex stores only the resulting finite state machine.
- $e._Visualization
- ) #else (
- ; basic_regex contains many static const flags, which would be shown in the preview by default.
- ; Its actual members are _Rep and _Traits. _Rep holds the finite state machine, so we
- ; use it to preview basic_regex. (It does contain some human-readable information.)
- *$e._Rep
- )
- )
-
- children (
- #if ($e._Rep == 0) (
- ; We make empty basic_regexes appear to have no children.
- #array(expr: 0, size: 0)
- ) #elif ($e._EEN_VIS == 1) (
- ; We want to hide those static const flags.
- ; We also want to give _Visualization a fake name.
- #(
- #([str] : $e._Visualization),
- #(_Rep : $e._Rep),
- #(_Traits : $e._Traits)
- )
- ) #else (
- ; We want to hide those static const flags.
- #(
- _Rep : $e._Rep,
- _Traits : $e._Traits
- )
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; std::tr1::sub_match from <regex>
-;------------------------------------------------------------------------------
-std::tr1::sub_match<char const *>|std::tr1::sub_match<wchar_t const *>|std::tr1::sub_match<unsigned short const *>|std::tr1::sub_match<char *>|std::tr1::sub_match<wchar_t *>|std::tr1::sub_match<unsigned short *>{
- preview (
- ; It would be nice if we could preview sub_match with its str().
- ; However, visualizers cannot handle strings represented by pointer pairs.
- ; Therefore, our preview contains more limited information.
- #if ($e.matched) (
- ; If this sub_match participated in a match,
- ; we preview it with its length().
- $e.second - $e.first
- ) #else (
- ; Otherwise, we preview it with its matched bool (i.e. "false").
- ; (Why not length() (i.e. "0")? It's meaningful to have
- ; matched == true and length() == 0.
- "false"
- )
- )
-
- children (
- #(
- ; sub_match's three data members are public, but we list them here
- ; (a) to display matched before first and second, and
- ; (b) to gloss over the fact that sub_match derives from std::pair.
- #(matched : $e.matched),
- #(first : $e.first),
- #(second : $e.second)
- )
- )
-}
-std::tr1::sub_match<std::_String_const_iterator<*> >|std::tr1::sub_match<std::_String_iterator<*> >{
- preview (
- #if ($e.matched) (
- ; We visualize ssub_match and wssub_match just like csub_match and wcsub_match,
- ; except that when determining the length(), we can't subtract iterators.
- ; We have to subtract their stored pointers.
- $e.second._Ptr - $e.first._Ptr
- ) #else (
- "false"
- )
- )
-
- children (
- #(
- #(matched : $e.matched),
- #(first : $e.first),
- #(second : $e.second)
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; std::tr1::match_results from <regex>
-;------------------------------------------------------------------------------
-std::tr1::match_results<*>{
- preview (
- ; A match_results object is empty iff its vector _Matches is empty.
- #if ($e._Matches._Myfirst == $e._Matches._Mylast) (
- "empty"
- ) #else (
- ; We preview a non-empty match_results object with its vector.
- $e._Matches
- )
- )
-
- children (
- #if ($e._Matches._Myfirst == $e._Matches._Mylast) (
- ; We make empty match_results appear to have no children.
- #array(expr: 0, size: 0)
- ) #else (
- ; As match_results has operator[](), prefix(), and suffix() member functions,
- ; we make it appear to directly contain [0], [1], [2], etc. elements,
- ; as well as [prefix] and [suffix] elements.
- #(
- #array(expr: $e._Matches._Myfirst[$i], size: $e._Matches._Mylast - $e._Matches._Myfirst),
- #([prefix] : $e._Prefix),
- #([suffix] : $e._Suffix)
- )
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; std::tr1::regex_iterator from <regex>
-;------------------------------------------------------------------------------
-std::tr1::regex_iterator<*>{
- preview (
- #if ($e._MyRe == 0) (
- ; We represent end-of-sequence regex_iterators with null regex pointers.
- "end"
- ) #else (
- ; Dereferenceable regex_iterators return match_results when dereferenced,
- ; so we'll preview them with that.
- $e._MyVal
- )
- )
-
- children (
- #if ($e._MyRe == 0) (
- ; We make end-of-sequence regex_iterators appear to have no children.
- #array(expr: 0, size: 0)
- ) #else (
- ; For ease of understanding, we make dereferenceable regex_iterators
- ; appear to have data members with the "for exposition only" names from TR1.
- #(
- #([begin] : $e._Begin),
- #([end] : $e._End),
- #([pregex] : $e._MyRe),
- #([flags] : $e._Flags),
- #([match] : $e._MyVal)
- )
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; std::tr1::regex_token_iterator from <regex>
-;------------------------------------------------------------------------------
-std::tr1::regex_token_iterator<*>{
- preview (
- #if ($e._Res == 0) (
- ; We represent end-of-sequence regex_token_iterators with null result pointers.
- "end"
- ) #else (
- ; Dereferenceable regex_token_iterators return *result when dereferenced,
- ; so we'll preview them with that.
- *$e._Res
- )
- )
-
- children (
- #if ($e._Res == 0) (
- ; We make end-of-sequence regex_token_iterators appear to have no children.
- #array(expr: 0, size: 0)
- ) #else (
- ; For ease of understanding, we make dereferenceable regex_token_iterators
- ; appear to have data members with the "for exposition only" names from TR1.
- #(
- #([position] : $e._Pos),
- #([result] : $e._Res),
- #([suffix] : $e._Suffix),
- #([N] : $e._Cur),
- #([subs] : $e._Subs)
- )
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; std::identity, etc. from <functional>
-;------------------------------------------------------------------------------
-std::identity<*>{
- preview ( "identity" )
- children ( #array(expr: 0, size: 0) )
-}
-std::bit_and<*>{
- preview ( "bit_and" )
- children ( #array(expr: 0, size: 0) )
-}
-std::bit_or<*>{
- preview ( "bit_or" )
- children ( #array(expr: 0, size: 0) )
-}
-std::bit_xor<*>{
- preview ( "bit_xor" )
- children ( #array(expr: 0, size: 0) )
-}
-
-;------------------------------------------------------------------------------
-; std::unique_ptr from <memory>
-;------------------------------------------------------------------------------
-std::unique_ptr<*>{
- preview (
- #if ($e._Myptr == 0) (
- "empty"
- ) #else (
- #(
- "unique_ptr ",
- *$e._Myptr
- )
- )
- )
-
- children (
- #if ($e._Myptr == 0) (
- #array(expr: 0, size: 0)
- ) #else (
- #([ptr] : $e._Myptr)
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; std::forward_list from <forward_list>
-;------------------------------------------------------------------------------
-std::forward_list<*>{
- preview (
- #(
- "(",
- #list(
- head: $e._Myhead,
- next: _Next
- ) : $e._Myval,
- ")"
- )
- )
-
- children (
- #list(
- head: $e._Myhead,
- next: _Next
- ) : $e._Myval
- )
-}
-std::_Flist_iterator<*>|std::_Flist_const_iterator<*>{
- preview (
- #if ($e._Ptr == 0) (
- "end"
- ) #else (
- $e._Ptr->_Myval
- )
- )
-
- children (
- #if ($e._Ptr == 0) (
- #array(expr: 0, size: 0)
- ) #else (
- #([ptr] : &$e._Ptr->_Myval)
- )
- )
-}
-
-
-;------------------------------------------------------------------------------
-; PROPVARIANT
-;------------------------------------------------------------------------------
-; Visualizers for VT_VECTOR C arrays
-tagCAC|tagCAUB|tagCAI|tagCAUI|tagCAL|tagCAUL|tagCAFLT|tagCADBL|tagCACY|tagCADATE|tagCABSTR|tagCABSTRBLOB|tagCABOOL|tagCASCODE|tagCAPROPVARIANT|tagCAH|tagCAUH|tagCALPSTR|tagCALPWSTR|tagCAFILETIME|tagCACLIPDATA|tagCACLSID{
- preview(
- #(
- "[", $e.cElems , "](",
- #array
- (
- expr : ($e.pElems)[$i],
- size : $e.cElems
- ),
- ")"
- )
- )
- children
- (
- #array
- (
- expr : ($e.pElems)[$i],
- size : $e.cElems
- )
- )
-}
-; Visualizers for SAFE ARRAY
-tagSAFEARRAY|SAFEARRAY{
- preview(
- #if ($e.fFeatures & 0x0080) ; FADF_HAVEVARTYPE
- (
- ; Switch on the variant type field - which is stored 4 bytes
- ; before the beginning of the SAFEARRAY type
- #switch( ((unsigned *)&($e))[-1] )
- #case 0x2 ; VT_I2 | VT_ARRAY
- (
- #(
- "safearray of I2 = [",
- ; output the rank array
- #array( expr: $e.rgsabound[$i].cElements, size: $e.cDims),
- "](",
- ; output the data elements
- #array(
- expr: ((signed short *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- ),
- ")"
- )
- )
- #case 0x3 ; VT_I4 | VT_ARRAY
- (
- #(
- "safearray of I4 = [",
- ; output the rank array
- #array( expr: $e.rgsabound[$i].cElements, size: $e.cDims),
- "](",
- ; output the data elements
- #array(
- expr: ((signed int *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- ),
- ")"
- )
- )
- #case 0x4 ; VT_R4 | VT_ARRAY
- (
- #(
- "safearray of R4 = [",
- ; output the rank array
- #array( expr: $e.rgsabound[$i].cElements, size: $e.cDims),
- "](",
- ; output the data elements
- #array(
- expr: ((float *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- ),
- ")"
- )
- )
- #case 0x5 ; VT_R8 | VT_ARRAY
- (
- #(
- "safearray of R8 = [",
- ; output the rank array
- #array( expr: $e.rgsabound[$i].cElements, size: $e.cDims),
- "](",
- ; output the data elements
- #array(
- expr: ((double *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- ),
- ")"
- )
- )
- #case 0x6 ; VT_CY | VT_ARRAY
- (
- #(
- "safearray of CY = [",
- ; output the rank array
- #array( expr: $e.rgsabound[$i].cElements, size: $e.cDims),
- "](",
- ; output the data elements
- #array(
- expr: ((CY *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- ),
- ")"
- )
- )
- #case 0x7 ; VT_DATE | VT_ARRAY
- (
- #(
- "safearray of DATE = [",
- ; output the rank array
- #array( expr: $e.rgsabound[$i].cElements, size: $e.cDims),
- "](",
- ; output the data elements
- #array(
- expr: ((DATE *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- ),
- ")"
- )
- )
- #case 0x8 ; VT_BSTR | VT_ARRAY
- (
- #(
- "safearray of BSTR = [",
- ; output the rank array
- #array( expr: $e.rgsabound[$i].cElements, size: $e.cDims),
- "](",
- ; output the data elements
- #array(
- expr: ((wchar_t **)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- ),
- ")"
- )
- )
- #case 0xa ; VT_ERROR | VT_ARRAY
- (
- #(
- "safearray of ERROR = [",
- ; output the rank array
- #array( expr: $e.rgsabound[$i].cElements, size: $e.cDims),
- "](",
- ; output the data elements
- #array(
- expr: ((long *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- ),
- ")"
- )
- )
- #case 0xb ; VT_BOOL | VT_ARRAY
- (
- #(
- "safearray of BOOL = [",
- ; output the rank array
- #array( expr: $e.rgsabound[$i].cElements, size: $e.cDims),
- "](",
- ; output the data elements
- #array(
- expr: ((short *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- ),
- ")"
- )
- )
- #case 0xc ; VT_VARIANT | VT_ARRAY
- (
- #(
- "safearray of VARIANT = [",
- ; output the rank array
- #array( expr: $e.rgsabound[$i].cElements, size: $e.cDims),
- "](",
- ; output the data elements
- #array(
- expr: ((tagVARIANT *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- ),
- ")"
- )
- )
- #case 0x10 ; VT_I1 | VT_ARRAY
- (
- #(
- "safearray of I1 = [",
- ; output the rank array
- #array( expr: $e.rgsabound[$i].cElements, size: $e.cDims),
- "](",
- ; output the data elements
- #array(
- expr: ((signed char *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- ),
- ")"
- )
- )
- #case 0x11 ; VT_UI1 | VT_ARRAY
- (
- #(
- "safearray of UI1 = [",
- ; output the rank array
- #array( expr: $e.rgsabound[$i].cElements, size: $e.cDims),
- "](",
- ; output the data elements
- #array(
- expr: ((unsigned char *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- ),
- ")"
- )
- )
- #case 0x12 ; VT_UI2 | VT_ARRAY
- (
- #(
- "safearray of UI2 = [",
- ; output the rank array
- #array( expr: $e.rgsabound[$i].cElements, size: $e.cDims),
- "](",
- ; output the data elements
- #array(
- expr: ((unsigned short *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- ),
- ")"
- )
- )
- #case 0x13 ; VT_UI4 | VT_ARRAY
- (
- #(
- "safearray of UI4 = [",
- ; output the rank array
- #array( expr: $e.rgsabound[$i].cElements, size: $e.cDims),
- "](",
- ; output the data elements
- #array(
- expr: ((unsigned int *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- ),
- ")"
- )
- )
- #case 0x14 ; VT_I8 | VT_ARRAY
- (
- #(
- "safearray of I8 = [",
- ; output the rank array
- #array( expr: $e.rgsabound[$i].cElements, size: $e.cDims),
- "](",
- ; output the data elements
- #array(
- expr: ((signed __int64 *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- ),
- ")"
- )
- )
- #case 0x15 ; VT_UI8 | VT_ARRAY
- (
- #(
- "safearray of UI8 = [",
- ; output the rank array
- #array( expr: $e.rgsabound[$i].cElements, size: $e.cDims),
- "](",
- ; output the data elements
- #array(
- expr: ((unsigned __int64 *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- ),
- ")"
- )
- )
- #case 0x16 ; VT_INT | VT_ARRAY
- (
- #(
- "safearray of INT = [",
- ; output the rank array
- #array( expr: $e.rgsabound[$i].cElements, size: $e.cDims),
- "](",
- ; output the data elements
- #array(
- expr: ((int *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- ),
- ")"
- )
- )
- #case 0x17 ; VT_UINT | VT_ARRAY
- (
- #(
- "safearray of UINT = [",
- ; output the rank array
- #array( expr: $e.rgsabound[$i].cElements, size: $e.cDims),
- "](",
- ; output the data elements
- #array(
- expr: ((unsigned *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- ),
- ")"
- )
- )
- #case 0x1e ; VT_LPSTR | VT_ARRAY
- (
- #(
- "safearray of LPSTR = [",
- ; output the rank array
- #array( expr: $e.rgsabound[$i].cElements, size: $e.cDims),
- "](",
- ; output the data elements
- #array(
- expr: ((char **)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- ),
- ")"
- )
- )
- #case 0x1f ; VT_LPWSTR | VT_ARRAY
- (
- #(
- "safearray of LPWSTR = [",
- ; output the rank array
- #array( expr: $e.rgsabound[$i].cElements, size: $e.cDims),
- "](",
- ; output the data elements
- #array(
- expr: ((wchar_t **)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- ),
- ")"
- )
- )
- #case 0x40 ; VT_FILETIME | VT_ARRAY
- (
- #(
- "safearray of FILETIME = [",
- ; output the rank array
- #array( expr: $e.rgsabound[$i].cElements, size: $e.cDims),
- "](",
- ; output the data elements
- #array(
- expr: ((FILETIME *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- ),
- ")"
- )
- )
- #case 0x47 ; VT_CLIPDATA | VT_ARRAY
- (
- #(
- "safearray of CLIPDATA = [",
- ; output the rank array
- #array( expr: $e.rgsabound[$i].cElements, size: $e.cDims),
- "](",
- ; output the data elements
- #array(
- expr: ((CLIPDATA *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- ),
- ")"
- )
- )
- #case 0x48 ; VT_CLSID | VT_ARRAY
- (
- #(
- "safearray of CLSID = [",
- ; output the rank array
- #array( expr: $e.rgsabound[$i].cElements, size: $e.cDims),
- "](",
- ; output the data elements
- #array(
- expr: ((CLSID *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- ),
- ")"
- )
- )
- )
- #elif ($e.fFeatures & 0x0100) ; FADF_BSTR
- (
- #("safearray of BSTR = ",#array(expr: $e.rgsabound[$i].cElements, size: $e.cDims) : #("[",$e,"]"), "(", #array(expr: ((wchar_t * *)$e.pvData)[$i], size: $e.rgsabound[$r].cElements, rank: $e.cDims, base: $e.rgsabound[$r].lLbound ), ")")
- )
- #elif ($e.fFeatures & 0x0200) ; FADF_UNKNOWN
- (
- #("safearray of IUnknown* = [",#array(expr: $e.rgsabound[$i].cElements, size: $e.cDims), "](", #array(expr: ((IUnknown * *)$e.pvData)[$i], size: $e.rgsabound[$r].cElements, rank: $e.cDims, base: $e.rgsabound[$r].lLbound ), ")")
- )
- #elif ($e.fFeatures & 0x0400) ; FADF_DISPATCH
- (
- #("safearray of IDispatch* = [",#array(expr: $e.rgsabound[$i].cElements, size: $e.cDims), "](", #array(expr: ((IDispatch * *)$e.pvData)[$i], size: $e.rgsabound[$r].cElements, rank: $e.cDims, base: $e.rgsabound[$r].lLbound ), ")")
- )
- #elif ($e.fFeatures & 0x0800) ; FADF_VARIANT
- (
- #("safearray of VARIANT = ",#array(expr: $e.rgsabound[$i].cElements, size: $e.cDims) : #("[",$e,"]"), "(", #array(expr: ((tagVARIANT *)$e.pvData)[$i], size: $e.rgsabound[$r].cElements, rank: $e.cDims, base: $e.rgsabound[$r].lLbound ), ")")
- )
- )
- children
- (
- #( ;[actual members]: [$e,!],
- #if ($e.fFeatures & 0x0080) ; FADF_HAVEVARTYPE
- (
- #switch( ((unsigned *)&($e))[-1] ) ; for some reason the VT field is before the SAFEARRAY struct
- #case 2 ; VT_I2|VT_ARRAY
- (
- #array(
- expr: ((signed short *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- )
- )
- #case 3 ; VT_I4|VT_ARRAY
- (
- #array(
- expr: ((signed int *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- )
- )
- #case 4 ; VT_R4|VT_ARRAY
- (
- #array(
- expr: ((float *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- )
- )
- #case 5 ; VT_R8|VT_ARRAY
- (
- #array(
- expr: ((double *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- )
- )
- #case 0x10 ; VT_I1|VT_ARRAY
- (
- #array(
- expr: ((signed char *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- )
- )
- #case 0x11 ; VT_UI1|VT_ARRAY
- (
- #array(
- expr: ((unsigned char *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- )
- )
- #case 0x12 ; VT_UI2|VT_ARRAY
- (
- #array(
- expr: ((unsigned short *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- )
- )
- #case 0x13 ; VT_UI4|VT_ARRAY
- (
- #array(
- expr: ((unsigned int *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- )
- )
- #case 0x14 ; VT_I8|VT_ARRAY
- (
- #array(
- expr: ((signed __int64 *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- )
- )
- #case 0x15 ; VT_UI8|VT_ARRAY
- (
- #array(
- expr: ((unsigned __int64 *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- )
- )
- #case 0x1e ; VT_LPSTR|VT_ARRAY
- (
- #array(
- expr: ((char * *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- )
- )
- #case 0x1f ; VT_LPWSTR|VT_ARRAY
- (
- #array(
- expr: ((wchar_t **)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- )
- )
- #case 0xc ; VT_VARIANT|VT_ARRAY
- (
- #array(
- expr: ((tagVARIANT *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- )
- )
- #case 0xb ; VT_BOOL|VT_ARRAY
- (
- #array(
- expr: ((short *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- )
- )
- #case 0xa ; VT_ERROR|VT_ARRAY
- (
- #array(
- expr: ((long *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- )
- )
- #case 6 ; VT_CY|VT_ARRAY
- (
- #array(
- expr: ((CY *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- )
- )
- #case 7 ; VT_DATE|VT_ARRAY
- (
- #array(
- expr: ((DATE *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- )
- )
- #case 0x40 ; VT_FILETIME|VT_ARRAY
- (
- #array(
- expr: ((FILETIME *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- )
- )
- #case 0x48 ; VT_CLSID|VT_ARRAY
- (
- #array(
- expr: ((CLSID *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- )
- )
- #case 0x47 ; VT_CF|VT_ARRAY
- (
- #array(
- expr: ((CLIPDATA *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- )
- )
- #case 8 ; VT_BSTR|VT_ARRAY
- (
- #array(
- expr: ((wchar_t * *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- )
- )
- #case 0x16 ; VT_INT|VT_ARRAY
- (
- #array(
- expr: ((int *)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- )
- )
- #case 0x17 ; VT_UINT|VT_ARRAY
- (
- #array(
- expr: ((unsigned int*)$e.pvData)[$i],
- size: $e.rgsabound[$r].cElements,
- rank: $e.cDims,
- base: $e.rgsabound[$r].lLbound
- )
- )
- #default
- (
- #([actual members]: [$e,!])
- )
- #except
- (
- #([actual members]: [$e,!])
- )
- )
- #elif ($e.fFeatures & 0x0100) ; FADF_BSTR
- (
- #array(expr: ((wchar_t * *)$e.pvData)[$i], size: $e.rgsabound[$r].cElements, rank: $e.cDims, base: $e.rgsabound[$r].lLbound )
- )
- #elif ($e.fFeatures & 0x0200) ; FADF_UNKNOWN
- (
- #array(expr: ((IUnknown * *)$e.pvData)[$i], size: $e.rgsabound[$r].cElements, rank: $e.cDims, base: $e.rgsabound[$r].lLbound )
- )
- #elif ($e.fFeatures & 0x0400) ; FADF_DISPATCH
- (
- #array(expr: ((IDispatch * *)$e.pvData)[$i], size: $e.rgsabound[$r].cElements, rank: $e.cDims, base: $e.rgsabound[$r].lLbound )
- )
- #elif ($e.fFeatures & 0x0800) ; FADF_VARIANT
- (
- #array(expr: ((tagVARIANT *)$e.pvData)[$i], size: $e.rgsabound[$r].cElements, rank: $e.cDims, base: $e.rgsabound[$r].lLbound )
- )
- )
- )
-}
-tagPROPVARIANT|tagVARIANT|PROPVARIANT|VARIANT{
- preview(
- #switch ($e.vt)
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;; Base Types ;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- #case 0 ( #("Empty") ) ; VT_EMPTY
- #case 1 ( #("NULL") ) ; VT_NULL
- #case 2 ( #("I2 = ", $e.iVal) ) ; VT_I2
- #case 3 ( #("I4 = ", $e.lVal) ) ; VT_I4
- #case 4 ( #("R4 = ", $e.fltVal) ) ; VT_R4
- #case 5 ( #("R8 = ", $e.dblVal) ) ; VT_R8
- #case 6 ( #("CY = ", $e.cyVal) ) ; VT_CY
- #case 7 ( #("DATE = ", $e.date) ) ; VT_DATE
- #case 8 ( #("BSTR = ", $e.bstrVal) ) ; VT_BSTR
- #case 9 ( #("DISPATCH = ", $e.pdispVal) ) ; VT_DISPATCH
- #case 10 ( #("ERROR = ", $e.scode) ) ; VT_ERROR
- #case 0xB ( #("BOOL = ", $e.boolVal) ) ; VT_BOOL
- #case 0xC ( #("VARIANT ") ) ; VT_VARIANT
- #case 0xD ( #("UNKNOWN = ", $e.punkVal) ) ; VT_UNKOWN
- #case 0xE ( #("DECIMAL = ", $e.decVal) ) ; VT_DECIMAL
- #case 0x10 ( #("I1 = ", $e.cVal) ) ; VT_I1
- #case 0x11 ( #("UI1 = ", $e.bVal) ) ; VT_UI1
- #case 0x12 ( #("UI2 = ", $e.uiVal) ) ; VT_UI2
- #case 0x13 ( #("UI4 = ", $e.ulVal) ) ; VT_UI4
- #case 0x14 ( #("I8 = ", *(__int64*)&$e.dblVal) ) ; VT_I8
- #case 0x15 ( #("UI8 = ", *(unsigned __int64*)&$e.dblVal) ) ; VT_UI8
- #case 0x16 ( #("INT = ", $e.intVal) ) ; VT_INT
- #case 0x17 ( #("UINT = ", $e.uintVal) ) ; VT_UINT
- #case 0x18 ( #("VOID ") ) ; VT_VOID
- #case 0x19 ( #("HRESULT ") ) ; VT_HRESULT
- #case 0x1A ( #("PTR ") ) ; VT_PTR
- #case 0x1B ( #("SAFEARRAY ") ) ; VT_SAFEARRAY
- #case 0x1C ( #("CARRAY ") ) ; VT_CARRAY
- #case 0x1D ( #("USERDEFINED ") ) ; VT_USERDEFINED
- #case 0x1E ( #("LPSTR = ", $e.pszVal) ) ; VT_LPSTR
- #case 0x1F ( #("LPWSTR = ", $e.pwszVal) ) ; VT_LPWSTR
- #case 0x24 ( #("RECORD ") ) ; VT_RECORD
- #case 0x26 ( #("UINT_PTR ") ) ; VT_UINT_PTR
- #case 0x40 ( #("FILETIME = ", $e.filetime) ) ; VT_FILETIME
- #case 0x42 ( #("STREAM = ", $e.pStream) ) ; VT_STREAM
- #case 0x43 ( #("STORAGE = ", $e.pStorage) ) ; VT_STORAGE
- #case 0x44 ( #("STREAMED_OBJECT = ", $e.pStream) ) ; VT_STREAMED_OBJECT
- #case 0x45 ( #("STORED_OBJECT = ", $e.pStorage) ) ; VT_STORED_OBJECT
- #case 0x46 ( #("BLOB_OBJECT = ", $e.blob ) ) ; VT_BLOB_OBJECT
- #case 0x47 ( #("CF = ", $e.pclipdata) ) ; VT_CF
- #case 0x48 ( #("CLSID = ", $e.puuid) ) ; VT_CLSID
- #case 0x49 ( #("VERSIONED_STREAM = ", $e.pVersionedStream) ) ; VT_VERSIONED_STREAM
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;; Vector types ;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- #case 0x1002 ( #("vector of I2 = ", $e.cai) ) ; VT_I2|VT_VECTOR
- #case 0x1003 ( #("vector of I4 = ", $e.cal) ) ; VT_I4|VT_VECTOR
- #case 0x1004 ( #("vector of R4 = ", $e.caflt) ) ; VT_R4|VT_VECTOR
- #case 0x1005 ( #("vector of R8 = ", $e.cadbl) ) ; VT_R8|VT_VECTOR
- #case 0x1010 ( #("vector of I1 = ", $e.cac) ) ; VT_I1|VT_VECTOR
- #case 0x1011 ( #("vector of UI1 = ", $e.caub) ) ; VT_UI1|VT_VECTOR
- #case 0x1012 ( #("vector of UI2 = ", $e.caui) ) ; VT_UI2|VT_VECTOR
- #case 0x1013 ( #("vector of UI4 = ", $e.caul) ) ; VT_UI4|VT_VECTOR
- #case 0x1014 ( #("vector of I8 = ", $e.cah) ) ; VT_I8|VT_VECTOR
- #case 0x1015 ( #("vector of UI8 = ", $e.cauh) ) ; VT_UI8|VT_VECTOR
- #case 0x101E ( #("vector of LPSTR = ", $e.calpstr) ) ; VT_LPSTR|VT_VECTOR
- #case 0x101F ( #("vector of LPWSTR = ", $e.calpwstr) ) ; VT_LPWSTR|VT_VECTOR
- #case 0x100C ( #("vector of VARIANT ", $e.capropvar) ) ; VT_VARIANT|VT_VECTOR
- #case 0x100B ( #("vector of BOOL = ", $e.cabool) ) ; VT_BOOL|VT_VECTOR
- #case 0x100A ( #("vector of ERROR = ", $e.cascode) ) ; VT_ERROR|VT_VECTOR
- #case 0x1006 ( #("vector of CY = ", $e.cacy) ) ; VT_CY|VT_VECTOR
- #case 0x1007 ( #("vector of DATE = ", $e.cadate) ) ; VT_DATE|VT_VECTOR
- #case 0x1040 ( #("vector of FILETIME = ", $e.cafiletime) ) ; VT_FILETIME|VT_VECTOR
- #case 0x1048 ( #("vector of CLSID = ", $e.cauuid) ) ; VT_CLSID|VT_VECTOR
- #case 0x1047 ( #("vector of CF = ", $e.caclipdata) ) ; VT_CF|VT_VECTOR
- #case 0x1008 ( #("vector of BSTR = ", $e.cabstr) ) ; VT_BSTR|VT_VECTOR
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;; Byref Types ;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- #case 0x4016 ( #("byref of INT = ", $e.pintVal) ) ; VT_INT|VT_BYREF
- #case 0x4017 ( #("byref of UINT = ", $e.puintVal) ) ; VT_UINT|VT_BYREF
- #case 0x4002 ( #("byref of I2 = ", $e.piVal) ) ; VT_I2|VT_BYREF
- #case 0x4003 ( #("byref of I4 = ", $e.plVal) ) ; VT_I4|VT_BYREF
- #case 0x4004 ( #("byref of R4 = ", $e.pfltVal) ) ; VT_R4|VT_BYREF
- #case 0x4005 ( #("byref of R8 = ", $e.pdblVal) ) ; VT_R8|VT_BYREF
- #case 0x4010 ( #("byref of I1 = ", $e.pcVal) ) ; VT_I1|VT_BYREF
- #case 0x4011 ( #("byref of UI1 = ", $e.pbVal) ) ; VT_UI1|VT_BYREF
- #case 0x4012 ( #("byref of UI2 = ", $e.puiVal) ) ; VT_UI2|VT_BYREF
- #case 0x4013 ( #("byref of UI4 = ", $e.pulVal) ) ; VT_UI4|VT_BYREF
- #case 0x4014 ( #("byref of I8 = ", (__int64*)$e.pdblVal) ) ; VT_I8|VT_BYREF
- #case 0x4015 ( #("byref of UI8 = ", (unsigned __int64*)$e.pudblVal) ) ; VT_UI8|VT_BYREF
- #case 0x400C ( #("byref of VARIANT ", $e.pvarVal) ) ; VT_VARIANT|VT_BYREF
- #case 0x400B ( #("byref of BOOL = ", $e.pboolVal) ) ; VT_BOOL|VT_BYREF
- #case 0x400A ( #("byref of ERROR = ", $e.pscode) ) ; VT_ERROR|VT_BYREF
- #case 0x4006 ( #("byref of CY = ", $e.pcyVal) ) ; VT_CY|VT_BYREF
- #case 0x4007 ( #("byref of DATE = ", $e.pdate) ) ; VT_DATE|VT_BYREF
- #case 0x4008 ( #("byref of BSTR = ", $e.pbstrVal) ) ; VT_BSTR|VT_BYREF
- #case 0x400E ( #("byref of DECIMAL = ", $e.pdecVal) ) ; VT_DECIMAL|VT_BYREF
- #case 0x400D ( #("byref of UNKNOWN = ", $e.ppunkVal) ) ; VT_UNKOWN|VT_BYREF
- #case 0x4009 ( #("byref of DISPATCH = ", $e.ppdispVal) ) ; VT_DISPATCH|VT_BYREF
- #case 0x6000 ( #("byref of ARRAY = ", $e.pparray) ) ; VT_ARRAY|VT_BYREF
- #default
- (
- #if ($e.vt & 0x2000) ( $e.parray)
- #else ( #("Unknown vt type = ", $e.vt))
- )
- )
- children(
- #(
- vt: $e.vt,
- #switch ($e.vt)
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;; Base Types ;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- #case 0x2 ( #(I2 : $e.iVal) ) ; VT_I2
- #case 0x3 ( #(I4 : $e.lVal) ) ; VT_I4
- #case 0x4 ( #(R4 : $e.fltVal) ) ; VT_R4
- #case 0x5 ( #(R8 : $e.dblVal) ) ; VT_R8
- #case 0x6 ( #(CY : $e.cyVal) ) ; VT_CY
- #case 0x7 ( #(DATE : $e.date) ) ; VT_DATE
- #case 0x8 ( #(BSTR : $e.bstrVal) ) ; VT_BSTR
- #case 0x9 ( #(DISPATCH : $e.pdispVal) ) ; VT_DISPATCH
- #case 0xA ( #(ERROR : $e.scode) ) ; VT_ERROR
- #case 0xB ( #(BOOL : $e.boolVal) ) ; VT_BOOL
- #case 0xD ( #(UNKNOWN : $e.punkVal) ) ; VT_UNKOWN
- #case 0xE ( #(DECIMAL : $e.decVal) ) ; VT_DECIMAL
- #case 0x10 ( #(I1 : $e.cVal) ) ; VT_I1
- #case 0x11 ( #(UI1 : $e.bVal) ) ; VT_UI1
- #case 0x12 ( #(UI2 : $e.uiVal) ) ; VT_UI2
- #case 0x13 ( #(UI4 : $e.ulVal) ) ; VT_UI4
- #case 0x14 ( #(I8 : *(__int64*)&$e.dblVal) ) ; VT_I8
- #case 0x15 ( #(UI8 : *(unsigned __int64*)&$e.dblVal) ) ; VT_UI8
- #case 0x16 ( #(INT : $e.intVal) ) ; VT_INT
- #case 0x17 ( #(UINT : $e.uintVal) ) ; VT_UINT
- #case 0x1E ( #(LPSTR : $e.pszVal) ) ; VT_LPSTR
- #case 0x1F ( #(LPWSTR : $e.pwszVal) ) ; VT_LPWSTR
- #case 0x40 ( #(FILETIME : $e.filetime) ) ; VT_FILETIME
- #case 0x42 ( #(STREAM : $e.pStream) ) ; VT_STREAM
- #case 0x43 ( #(STORAGE : $e.pStorage) ) ; VT_STORAGE
- #case 0x44 ( #(STREAMED_OBJECT : $e.pStream) ) ; VT_STREAMED_OBJECT
- #case 0x45 ( #(STORED_OBJECT : $e.pStorage) ) ; VT_STORED_OBJECT
- #case 0x46 ( #(BLOB_OBJECT : $e.blob ) ) ; VT_BLOB_OBJECT
- #case 0x47 ( #(CF : $e.pclipdata) ) ; VT_CF
- #case 0x48 ( #(CLSID : $e.puuid) ) ; VT_CLSID
- #case 0x49 ( #(VERSIONED_STREAM : $e.pVersionedStream) ) ; VT_VERSIONED_STREAM
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;; Vector types ;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- #case 0x1002 ( #(vector of I2 : $e.cai) ) ; VT_I2|VT_VECTOR
- #case 0x1003 ( #(vector of I4 : $e.cal) ) ; VT_I4|VT_VECTOR
- #case 0x1004 ( #(vector of R4 : $e.caflt) ) ; VT_R4|VT_VECTOR
- #case 0x1005 ( #(vector of R8 : $e.cadbl) ) ; VT_R8|VT_VECTOR
- #case 0x1010 ( #(vector of I1 : $e.cac) ) ; VT_I1|VT_VECTOR
- #case 0x1011 ( #(vector of UI1 : $e.caub) ) ; VT_UI1|VT_VECTOR
- #case 0x1012 ( #(vector of UI2 : $e.caui) ) ; VT_UI2|VT_VECTOR
- #case 0x1013 ( #(vector of UI4 : $e.caul) ) ; VT_UI4|VT_VECTOR
- #case 0x1014 ( #(vector of I8 : $e.cah) ) ; VT_I8|VT_VECTOR
- #case 0x1015 ( #(vector of UI8 : $e.cauh) ) ; VT_UI8|VT_VECTOR
- #case 0x101E ( #(vector of LPSTR : $e.calpstr) ) ; VT_LPSTR|VT_VECTOR
- #case 0x101F ( #(vector of LPWSTR : $e.calpwstr) ) ; VT_LPWSTR|VT_VECTOR
- #case 0x100C ( #(vector of VARIANT : $e.capropvar) ) ; VT_VARIANT|VT_VECTOR
- #case 0x100B ( #(vector of BOOL : $e.cabool) ) ; VT_BOOL|VT_VECTOR
- #case 0x100A ( #(vector of ERROR : $e.cascode) ) ; VT_ERROR|VT_VECTOR
- #case 0x1006 ( #(vector of CY : $e.cacy) ) ; VT_CY|VT_VECTOR
- #case 0x1007 ( #(vector of DATE : $e.cadate) ) ; VT_DATE|VT_VECTOR
- #case 0x1040 ( #(vector of FILETIME : $e.cafiletime) ) ; VT_FILETIME|VT_VECTOR
- #case 0x1048 ( #(vector of CLSID : $e.cauuid) ) ; VT_CLSID|VT_VECTOR
- #case 0x1047 ( #(vector of CF : $e.caclipdata) ) ; VT_CF|VT_VECTOR
- #case 0x1008 ( #(vector of BSTR : $e.cabstr) ) ; VT_BSTR|VT_VECTOR
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;; Byref Types ;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- #case 0x4016 ( #(byref of INT : $e.pintVal) ) ; VT_INT|VT_BYREF
- #case 0x4017 ( #(byref of UINT : $e.puintVal) ) ; VT_UINT|VT_BYREF
- #case 0x4002 ( #(byref of I2 : $e.piVal) ) ; VT_I2|VT_BYREF
- #case 0x4003 ( #(byref of I4 : $e.plVal) ) ; VT_I4|VT_BYREF
- #case 0x4004 ( #(byref of R4 : $e.pfltVal) ) ; VT_R4|VT_BYREF
- #case 0x4005 ( #(byref of R8 : $e.pdblVal) ) ; VT_R8|VT_BYREF
- #case 0x4010 ( #(byref of I1 : $e.pcVal) ) ; VT_I1|VT_BYREF
- #case 0x4011 ( #(byref of UI1 : $e.pbVal) ) ; VT_UI1|VT_BYREF
- #case 0x4012 ( #(byref of UI2 : $e.puiVal) ) ; VT_UI2|VT_BYREF
- #case 0x4013 ( #(byref of UI4 : $e.pulVal) ) ; VT_UI4|VT_BYREF
- #case 0x4014 ( #(byref of I8 : (__int64*)$e.pdblVal) ) ; VT_I8|VT_BYREF
- #case 0x4015 ( #(byref of UI8 : (unsigned __int64*)$e.pdblVal) ) ; VT_UI8|VT_BYREF
- #case 0x400C ( #(byref of VARIANT : $e.pvarVal) ) ; VT_VARIANT|VT_BYREF
- #case 0x400B ( #(byref of BOOL : $e.pboolVal) ) ; VT_BOOL|VT_BYREF
- #case 0x400A ( #(byref of ERROR : $e.pscode) ) ; VT_ERROR|VT_BYREF
- #case 0x4006 ( #(byref of CY : $e.pcyVal) ) ; VT_CY|VT_BYREF
- #case 0x4007 ( #(byref of DATE : $e.pdate) ) ; VT_DATE|VT_BYREF
- #case 0x4008 ( #(byref of BSTR : $e.pbstrVal) ) ; VT_BSTR|VT_BYREF
- #case 0x400E ( #(byref of DECIMAL : $e.pdecVal) ) ; VT_DECIMAL|VT_BYREF
- #case 0x400D ( #(byref of UNKNOWN : $e.ppunkVal) ) ; VT_UNKOWN|VT_BYREF
- #case 0x4009 ( #(byref of DISPATCH : $e.ppdispVal) ) ; VT_DISPATCH|VT_BYREF
- #case 0x6000 ( #(byref of ARRAY : $e.pparray) ) ; VT_ARRAY|VT_BYREF
-
- ; the following are either empty or invalid vt values for a variant
- ; #case 0 ( #(Empty :) ) ; VT_EMPTY
- ; #case 0x1 ( #(NULL :) ) ; VT_NULL
- ; #case 0xC ( #(VARIANT :) ) ; VT_VARIANT
- ; #case 0x18 ( #(VOID :) ) ; VT_VOID
- ; #case 0x19 ( #(HRESULT :) ) ; VT_HRESULT
- ; #case 0x1A ( #(PTR :) ) ; VT_PTR
- ; #case 0x1B ( #(SAFEARRAY :) ) ; VT_SAFEARRAY
- ; #case 0x1C ( #(CARRAY :) ) ; VT_CARRAY
- ; #case 0x1D ( #(USERDEFINED :) ) ; VT_USERDEFINED
- ; #case 0x24 ( #(RECORD :) ) ; VT_RECORD
- ; #case 0x26 ( #(UINT_PTR :) ) ; VT_UINT_PTR
- #default
- (
- #if ($e.vt & 0x2000 )
- ( #(safearray: $e.parray))
- #else
- (
- #(
- [raw members]: [$e,!] ; unformatted data members
- )
- )
- )
- #except
- (
- #(
- [raw members]: [$e,!] ; unformatted data members
- )
- )
- )
- )
-}
-
-; Visualizers for data structures in namespace Concurrency
-;------------------------------------------------------------------------------
-; Concurrency::message from <agents.h>
-;------------------------------------------------------------------------------
-Concurrency::message<*>{
- preview (
- #(
- $e.payload
- )
- )
-
- children (
- #(
- #(payload: $e.payload),
- #([msg_id]: $e._M_id)
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::multi_link_registry from <agents.h>
-;------------------------------------------------------------------------------
-Concurrency::multi_link_registry<*>{
- preview (
- #(
- "[",
- $e._M_vector._M_index,
- "](",
- #array(
- expr: *($e._M_vector._M_array[$i]),
- size: $e._M_vector._M_index
- ),
- ")"
- )
- )
-
- children (
- #(
- #([size]: $e._M_vector._M_index),
- #array(
- expr: *($e._M_vector._M_array[$i]),
- size: $e._M_vector._M_index
- )
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::details::_Queue from <agents.h>
-;------------------------------------------------------------------------------
-Concurrency::details::_Queue<*>{
- preview (
- #(
- "[",
- $e._M_count,
- "](",
- #list(
- head: $e._M_pHead,
- next: _M_pNext,
- size: _M_count
- ),
- ")"
- )
- )
-
- children (
- #(
- #([size]: $e._M_count),
- #list(
- head: $e._M_pHead,
- next: _M_pNext,
- size: _M_count
- )
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::unbounded_buffer from <agents.h>
-;------------------------------------------------------------------------------
-Concurrency::unbounded_buffer<*>{
- preview (
- #(
- $e._M_messageBuffer
- )
- )
-
- children (
- #(
- #(unprocessed_messages: $e._M_messageProcessor._M_queuedMessages._M_queue),
- #(messages: $e._M_messageBuffer),
- #(message_filter: *($e._M_pFilter)),
- #(linked_sources: $e._M_connectedSources._M_links),
- #(linked_targets: $e._M_connectedTargets),
- #(reserving_target: *($e._M_pReservedFor)),
- #(Scheduler: *($e._M_messageProcessor._M_pScheduler)),
- #(ScheduleGroup: *($e._M_messageProcessor._M_pScheduleGroup))
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::overwrite_buffer from <agents.h>
-;------------------------------------------------------------------------------
-Concurrency::overwrite_buffer<*>{
- preview (
- #(
- $e._M_pMessage
- )
- )
-
- children (
- #(
- #(value: *($e._M_pMessage)),
- #(unprocessed_messages: $e._M_messageProcessor._M_queuedMessages._M_queue),
- #(message_filter: *($e._M_pFilter)),
- #(linked_sources: $e._M_connectedSources._M_links),
- #(linked_targets: $e._M_connectedTargets),
- #(reserving_target: *($e._M_pReservedFor)),
- #(reserved_message: *($e._M_pReservedMessage)),
- #(Scheduler: *($e._M_messageProcessor._M_pScheduler)),
- #(ScheduleGroup: *($e._M_messageProcessor._M_pScheduleGroup))
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::single_assignment from <agents.h>
-;------------------------------------------------------------------------------
-Concurrency::single_assignment<*>{
- preview (
- #(
- $e._M_pMessage
- )
- )
-
- children (
- #(
- #(value: *($e._M_pMessage)),
- #(unprocessed_messages: $e._M_messageProcessor._M_queuedMessages._M_queue),
- #(message_filter: *($e._M_pFilter)),
- #(linked_sources: $e._M_connectedSources._M_links),
- #(linked_targets: $e._M_connectedTargets),
- #(reserving_target: *($e._M_pReservedFor)),
- #(Scheduler: *($e._M_messageProcessor._M_pScheduler)),
- #(ScheduleGroup: *($e._M_messageProcessor._M_pScheduleGroup))
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::call from <agents.h>
-;------------------------------------------------------------------------------
-Concurrency::call<*>{
- preview (
- #(
- $e._M_pFunc
- )
- )
-
- children (
- #(
- #(call_method: $e._M_pFunc),
- #(unprocessed_messages: $e._M_messageProcessor._M_queuedMessages._M_queue),
- #(message_filter: *($e._M_pFilter)),
- #(linked_sources: $e._M_connectedSources._M_links),
- #(Scheduler: *($e._M_messageProcessor._M_pScheduler)),
- #(ScheduleGroup: *($e._M_messageProcessor._M_pScheduleGroup))
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::transformer from <agents.h>
-;------------------------------------------------------------------------------
-Concurrency::transformer<*>{
- preview (
- #(
- $e._M_pFunc
- )
- )
-
- children (
- #(
- #(transform_method: $e._M_pFunc),
- #(unprocessed_messages: $e._M_messageProcessor._M_queuedMessages._M_queue),
- #(messages: $e._M_messageBuffer),
- #(message_filter: *($e._M_pFilter)),
- #(linked_sources: $e._M_connectedSources._M_links),
- #(linked_target: *($e._M_connectedTargets._M_connectedLink)),
- #(reserving_target: *($e._M_pReservedFor)),
- #(Scheduler: *($e._M_messageProcessor._M_pScheduler)),
- #(ScheduleGroup: *($e._M_messageProcessor._M_pScheduleGroup))
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::choice from <agents.h>
-;------------------------------------------------------------------------------
-Concurrency::choice<*>{
- preview (
- #(
- "[",
- #if ($e._M_pSingleAssignment->_M_fIsInitialized) ("initialized")
- #else ("not_initialized"),
- "] ",
- $e._M_sourceTuple
- )
- )
-
- children (
- #(
- #([input_count]: $e._M_pSingleAssignment->_M_connectedSources._M_links._M_vector._M_index),
- #(index: $e._M_pSingleAssignment->_M_pMessage->payload),
- #(source_tuple: $e._M_sourceTuple),
- #(linked_sources: $e._M_pSingleAssignment->_M_connectedSources._M_links),
- #(linked_targets: $e._M_pSingleAssignment->_M_connectedTargets),
- #(reserving_target: *($e._M_pSingleAssignment->_M_pReservedFor)),
- #(Scheduler: *($e._M_pScheduler)),
- #(ScheduleGroup: *($e._M_pScheduleGroup)),
- #([raw _M_pSourceChoices] : $e._M_pSourceChoices)
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::join<*,*>::_MessageArray from <agents.h>
-;------------------------------------------------------------------------------
-Concurrency::join<*,*>::_MessageArray{
- preview (
- #(
- "[",
- $e._M_count,
- "](",
- #array(
- expr: *(((Concurrency::message<$T1>**)$e._M_messages)[$i]),
- size: $e._M_count
- ),
- ")"
- )
- )
-
- children (
- #(
- #([size]: $e._M_count),
- #array(
- expr: *(((Concurrency::message<$T1>**)$e._M_messages)[$i]),
- size: $e._M_count
- )
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::join<*,*>::_SavedMessageIdArray from <agents.h>
-;------------------------------------------------------------------------------
-Concurrency::join<*,*>::_SavedMessageIdArray{
- preview (
- #(
- "[",
- $e._M_count,
- "](",
- #array(
- expr: ((int*)$e._M_savedIds)[$i],
- size: $e._M_count
- ),
- ")"
- )
- )
-
- children (
- #(
- #([size]: $e._M_count),
- #array(
- expr: ((int*)$e._M_savedIds)[$i],
- size: $e._M_count
- )
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::join from <agents.h>
-;------------------------------------------------------------------------------
-Concurrency::join<*,*>{
- preview (
- #(
- "[",
- $e._M_messageArray._M_count - $e._M_messagesRemaining,
- "/",
- $e._M_messageArray._M_count,
- "](",
- #array(
- expr: *($e._M_connectedSources._M_links._M_vector._M_array[$i]),
- size: $e._M_connectedSources._M_links._M_vector._M_index
- ),
- ")"
- )
- )
-
- children (
- #(
- #([join_type]: (Concurrency::join_type)$T2),
- #([offer_count]: $e._M_messageArray._M_count - $e._M_messagesRemaining),
- #(offer_IDs: $e._M_savedMessageIdArray),
- #([input_count]: $e._M_messageArray._M_count),
- #(input_values: $e._M_messageArray),
- #(messages: $e._M_messageBuffer),
- #(message_filter: *($e._M_pFilter)),
- #(linked_sources: $e._M_connectedSources._M_links),
- #(linked_target: $e._M_connectedTargets._M_connectedLink),
- #(reserving_target: *($e._M_pReservedFor)),
- #(Scheduler: *($e._M_messageProcessor._M_pScheduler)),
- #(ScheduleGroup: *($e._M_messageProcessor._M_pScheduleGroup))
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::multitype_join from <agents.h>
-;------------------------------------------------------------------------------
-Concurrency::multitype_join<*,*>{
- preview (
- #(
- "[",
- $e._M_pJoinNode->_M_connectedSources._M_links._M_vector._M_index - $e._M_pJoinNode->_M_counter,
- "/",
- $e._M_pJoinNode->_M_connectedSources._M_links._M_vector._M_index,
- "]",
- $e._M_sourceTuple
- )
- )
-
- children (
- #(
- #([join_type]: (Concurrency::join_type)$T2),
- #([offer_count]: $e._M_pJoinNode->_M_connectedSources._M_links._M_vector._M_index - $e._M_pJoinNode->_M_counter),
- #([input_count]: $e._M_pJoinNode->_M_connectedSources._M_links._M_vector._M_index),
- #(source_tuple: $e._M_sourceTuple),
- #(messages: $e._M_pJoinNode->_M_messageBuffer),
- #(linked_sources: $e._M_pJoinNode->_M_connectedSources._M_links),
- #(linked_target: $e._M_pJoinNode->_M_connectedTargets._M_connectedLink),
- #(reserving_target: *($e._M_pJoinNode->_M_pReservedFor)),
- #(Scheduler: *($e._M_pJoinNode->_M_messageProcessor._M_pScheduler)),
- #(ScheduleGroup: *($e._M_pJoinNode->_M_messageProcessor._M_pScheduleGroup)),
- #([raw _M_pSourceJoins] : $e._M_pSourceJoins)
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::timer from <agents.h>
-;------------------------------------------------------------------------------
-Concurrency::timer<*>{
- preview (
- #(
- $e._M_state
- )
- )
-
- children (
- #(
- #(state: $e._M_state),
- #(value: $e._M_value),
- #(repeating: $e._M_fRepeating),
- #(interval_ms: $e._M_ms),
- #(linked_target: *($e._M_connectedTargets._M_connectedLink)),
- #(reserving_target: *($e._M_pReservedFor)),
- #(Scheduler: *($e._M_messageProcessor._M_pScheduler)),
- #(ScheduleGroup: *($e._M_messageProcessor._M_pScheduleGroup))
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::details::SchedulerBase from <SchedulerBase.h>
-; Concurrency::details::ThreadScheduler from <ThreadScheduler.h>
-; Concurrency::details::UMSThreadScheduler from <UMSThreadScheduler.h>
-;------------------------------------------------------------------------------
-Concurrency::details::SchedulerBase|Concurrency::details::ThreadScheduler|Concurrency::details::UMSThreadScheduler{
- preview (
- #(
- "[",
- $e.m_id,
- "] ",
- #if ($e.m_schedulerKind == 0) ("ThreadScheduler")
- #else ("UmsScheduler"),
- #if ($e.m_id == $e.s_pDefaultScheduler->m_id) (", default")
- #else ("")
- )
- )
-
- children (
- #(
- #(ID: $e.m_id),
- #(SchedulerPolicy: $e.m_policy),
- #(VirtualProcessorCount: $e.m_virtualProcessorCount),
- #(ReferenceCount: $e.m_refCount),
- #([isDefaultScheduler]: $e.m_id == $e.s_pDefaultScheduler->m_id)
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::details::ScheduleGroupBase from <ScheduleGroupBase.h>
-; Concurrency::details::CacheLocalScheduleGroup from <CacheLocalScheduleGroup.h>
-; Concurrency::details::FairScheduleGroup from <FairScheduleGroup.h>
-;------------------------------------------------------------------------------
-Concurrency::details::ScheduleGroupBase|Concurrency::details::CacheLocalScheduleGroup|Concurrency::details::FairScheduleGroup{
- preview (
- #(
- "[",
- $e.m_id,
- "]",
- #if ($e.m_kind & 4) (" AnonymousScheduleGroup")
- #else ("")
- )
- )
-
- children (
- #(
- #(ID: $e.m_id),
- #(Scheduler: *($e.m_pScheduler))
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::details::ContextBase from <ContextBase.h>
-; Concurrency::details::InternalContextBase from <InternalContextBase.h>
-; Concurrency::details::ThreadInternalContext from <ThreadInternalContext.h>
-; Concurrency::details::UMSThreadInternalContext from <UMSThreadInternalContext.h>
-;------------------------------------------------------------------------------
-Concurrency::details::ContextBase|Concurrency::details::InternalContextBase|Concurrency::details::ThreadInternalContext|Concurrency::details::UMSThreadInternalContext{
- preview (
- #(
- "[",
- $e.m_threadId,
- "] ",
- #if ($e.m_blockedState == 0) ("not_concrt_blocked")
- #elif ($e.m_blockedState == 1) ("concrt_blocked")
- #elif ($e.m_blockedState == 2) ("ums_sync_blocked")
- #elif ($e.m_blockedState == 4) ("ums_async_blocked")
- #else ("")
- )
- )
-
- children (
- #(
- #(ID: $e.m_id),
- #(ThreadID: $e.m_threadId),
- #(Scheduler: *($e.m_pScheduler)),
- #(ScheduleGroup: *($e.m_pGroup))
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::details::ExternalContextBase from <ExternalContextBase.h>
-;------------------------------------------------------------------------------
-Concurrency::details::ExternalContextBase{
- preview (
- #(
- "[",
- $e.m_threadId,
- "] ",
- #if ($e.m_contextSwitchingFence == 1) ("concrt_blocked")
- #else ("not_concrt_blocked")
- )
- )
-
- children (
- #(
- #(ID: $e.m_id),
- #(ThreadID: $e.m_threadId),
- #(Scheduler: *($e.m_pScheduler)),
- #(ScheduleGroup: *($e.m_pGroup))
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::SchedulerPolicy from <concrt.h>
-;------------------------------------------------------------------------------
-Concurrency::SchedulerPolicy{
- preview (
- #(
- $e._M_pPolicyBag->_M_values._M_specificValues._M_schedulerKind,
- ", Min=",
- $e._M_pPolicyBag->_M_values._M_specificValues._M_minConcurrency,
- ", Max=",
- $e._M_pPolicyBag->_M_values._M_specificValues._M_maxConcurrency
- )
- )
-
- children (
- #(
- #(SchedulerKind: $e._M_pPolicyBag->_M_values._M_specificValues._M_schedulerKind),
- #(MinConcurrency: $e._M_pPolicyBag->_M_values._M_specificValues._M_minConcurrency),
- #(MaxConcurrency: $e._M_pPolicyBag->_M_values._M_specificValues._M_maxConcurrency),
- #(TargetOversubscriptionFactor: $e._M_pPolicyBag->_M_values._M_specificValues._M_targetOversubscriptionFactor),
- #(LocalContextCacheSize: $e._M_pPolicyBag->_M_values._M_specificValues._M_localContextCacheSize),
- #(ContextStackSize: $e._M_pPolicyBag->_M_values._M_specificValues._M_contextStackSize),
- #(ContextPriority: $e._M_pPolicyBag->_M_values._M_specificValues._M_contextPriority),
- #(SchedulingProtocol: $e._M_pPolicyBag->_M_values._M_specificValues._M_schedulingProtocol),
- #(DynamicProgressFeedback: $e._M_pPolicyBag->_M_values._M_specificValues._M_dynamicProgressFeedback)
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::event from <concrt.h>
-;------------------------------------------------------------------------------
-Concurrency::event{
- preview (
- #(
- #if ($e._M_pWaitChain == 1) ("set")
- #else ("not_set")
- )
- )
-
- children (
- #(
- #([is_set]: ($e._M_pWaitChain == 1)),
- #([has_waiters]: (($e._M_pWaitChain != 0) && ($e._M_pWaitChain != 1)))
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::critical_section from <concrt.h>
-;------------------------------------------------------------------------------
-Concurrency::critical_section{
- preview (
- #(
- #if ($e._M_pHead != 0) ("locked")
- #else ("not_locked")
- )
- )
-
- children (
- #(
- #([is_locked]: ($e._M_pHead != 0)),
- #(OwningContext: *((Concurrency::Context*)($e._M_activeNode[0])))
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::critical_section::scoped_lock from <concrt.h>
-;------------------------------------------------------------------------------
-Concurrency::critical_section::scoped_lock{
- preview (
- #(
- $e._M_critical_section
- )
- )
-
- children (
- #(
- CriticalSection: $e._M_critical_section
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::reader_writer_lock from <concrt.h>
-;------------------------------------------------------------------------------
-Concurrency::reader_writer_lock{
- preview (
- #(
- #if (($e._M_lockState < 8) && ($e._M_lockState & 2)) ("held_by_writer")
- #elif ($e._M_lockState >= 8) (
- #(
- "held_by_reader(s) [",
- ($e._M_lockState / 8),
- "]"
- )
- )
- #else ("not_held")
- )
- )
-
- children (
- #(
- #([is_reader_lock_held]: ($e._M_lockState >= 8)),
- #([num_reader_lock_holders]: ($e._M_lockState / 8)),
- #([is_writer_lock_held]: ($e._M_lockState < 8) && ($e._M_lockState & 2)),
- #(OwningWriterContext: *((Concurrency::Context*)($e._M_activeWriter[0])))
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::reader_writer_lock::scoped_lock from <concrt.h>
-; Concurrency::reader_writer_lock::scoped_lock_read from <concrt.h>
-;------------------------------------------------------------------------------
-Concurrency::reader_writer_lock::scoped_lock|Concurrency::reader_writer_lock::scoped_lock_read{
- preview (
- #(
- $e._M_reader_writer_lock
- )
- )
-
- children (
- #(
- ReaderWriterLock: $e._M_reader_writer_lock
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::details::_TaskCollectionBase from <concrt.h>
-;------------------------------------------------------------------------------
-Concurrency::details::_TaskCollectionBase{
- preview (
- #(
- #if ((((int)$e._M_pException & ~0x3) != 0) && (((int)$e._M_pException & ~0x3) != 0xC)) ("exception")
- #else ("no_exception")
- )
- )
-
- children (
- #(
- #([has_exception]: (((int)$e._M_pException & ~0x3) != 0) && (((int)$e._M_pException & ~0x3) != 0xC)),
- #(CreatingContext: *((Concurrency::Context*)$e._M_pOwningContext))
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::task_group from <ppl.h>
-; Concurrency::structured_task_group from <ppl.h>
-;------------------------------------------------------------------------------
-Concurrency::task_group|Concurrency::structured_task_group{
- preview (
- #(
- #if ((((int)$e._M_task_collection._M_pException & ~0x3) != 0) && (((int)$e._M_task_collection._M_pException & ~0x3) != 0xC)) ("exception")
- #else ("no_exception")
- )
- )
-
- children (
- #(
- #([has_exception]: (((int)$e._M_task_collection._M_pException & ~0x3) != 0) && (((int)$e._M_task_collection._M_pException & ~0x3) != 0xC)),
- #(CreatingContext: *((Concurrency::Context*)$e._M_task_collection._M_pOwningContext))
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::task_handle from <ppl.h>
-;------------------------------------------------------------------------------
-Concurrency::task_handle<*>{
- preview (
- #(
- $e._M_function
- )
- )
-
- children (
- #(
- #(Function: $e._M_function),
- #(RuntimeOwnsLifetime: $e._M_fRuntimeOwnsLifetime),
- #(TaskCollection: *($e._M_pTaskCollection))
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::combinable from <ppl.h>
-;------------------------------------------------------------------------------
-Concurrency::combinable<*>{
- preview(
- #(
- "(",
- #array(
- expr: *($e._M_buckets[$i]),
- size: $e._M_size
- ) : #list(
- head: $e,
- next: _M_chain
- ) : $e._M_value,
- ")"
- )
- )
- children(
- #(
- #array(
- expr: *($e._M_buckets[$i]),
- size: $e._M_size
- ) : #list(
- head: $e,
- next: _M_chain
- ) : $e._M_value,
- #(InitFunction : $e._M_fnInitialize)
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::concurrent_vector from <concurrent_vector.h>
-;------------------------------------------------------------------------------
-Concurrency::concurrent_vector<*,*>{
- preview(
- #(
- "[",
- $e._My_early_size._M_value,
- "](",
- #array (
- expr: #(
- #if (($i >> 1) == 0) ((($T1*)$e._My_segment._M_value[0]._My_array)[$i])
- #else ((($T1*)$e._My_segment._M_value[__log2($i)]._My_array)[$i - (0x1 << __log2($i))])
- ),
- size: $e._My_early_size._M_value
- ),
- ")"
- )
- )
- children(
- #(
- [size] : $e._My_early_size._M_value,
- #array (
- expr: #(
- #if (($i >> 1) == 0) ((($T1*)$e._My_segment._M_value[0]._My_array)[$i])
- #else ((($T1*)$e._My_segment._M_value[__log2($i)]._My_array)[$i - (0x1 << __log2($i))])
- ),
- size: $e._My_early_size._M_value
- )
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::details::_Vector_iterator from <concurrent_vector.h>
-;------------------------------------------------------------------------------
-Concurrency::details::_Vector_iterator<Concurrency::concurrent_vector<*,*>,*>{
- preview(
- #(
- #if (($e._My_index >> 1) == 0) ((($T1*)$e._My_vector->_My_segment._M_value[0]._My_array)[$e._My_index])
- #else ((($T1*)$e._My_vector->_My_segment._M_value[__log2($e._My_index)]._My_array)[$e._My_index - (0x1 << __log2($e._My_index))])
- )
- )
- children(
- #(
- [ptr]: #if (($e._My_index >> 1) == 0) (&((($T1*)$e._My_vector->_My_segment._M_value[0]._My_array)[$e._My_index]))
- #else (&((($T1*)$e._My_vector->_My_segment._M_value[__log2($e._My_index)]._My_array)[$e._My_index - (0x1 << __log2($e._My_index))]))
-
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::concurrent_queue from <concurrent_queue.h>
-;------------------------------------------------------------------------------
-Concurrency::concurrent_queue<*,*>{
- preview
- (
- #(
- "[",
- $e._My_rep->_Tail_counter._M_value - $e._My_rep->_Head_counter._M_value,
- "](",
- #array
- (
- expr : #if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 0) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 1) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 2) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 3) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 4) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 5) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 6) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 7) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 8) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 9) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 10) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 11) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 12) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 13) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 14) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 15) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 16) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 17) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 18) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 19) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])))))))))))))))))))),
- size : #if ($e._My_rep->_Tail_counter._M_value-$e._My_rep->_Head_counter._M_value < 20*8*$e._Items_per_page) ($e._My_rep->_Tail_counter._M_value-$e._My_rep->_Head_counter._M_value)
- #else (20*8*$e._Items_per_page)
- ),
- ")"
- )
- )
- children
- (
- #(
- #([unsafe_size]: $e._My_rep->_Tail_counter._M_value-$e._My_rep->_Head_counter._M_value),
- #array
- (
- expr : #if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 0) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 1) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 2) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 3) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 4) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 5) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 6) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 7) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 8) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 9) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 10) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 11) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 12) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 13) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 14) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 15) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 16) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 17) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 18) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else (#if (($i+($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)))/(8*$e._Items_per_page)-($e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>(8*($e._Items_per_page-1)))*($i%8+$e._My_rep->_Head_counter._M_value%(8*$e._Items_per_page)>=(8*$e._Items_per_page)) == 19) ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])
- #else ((($T1*)(($e._My_rep->_Array[(($i+$e._My_rep->_Head_counter._M_value)*3%8)]._Head_page._M_value->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next->_Next) + 1))[(($i+$e._My_rep->_Head_counter._M_value)&-8)/8&$e._Items_per_page-1])))))))))))))))))))),
- size : #if ($e._My_rep->_Tail_counter._M_value-$e._My_rep->_Head_counter._M_value < 20*8*$e._Items_per_page) ($e._My_rep->_Tail_counter._M_value-$e._My_rep->_Head_counter._M_value)
- #else (20*8*$e._Items_per_page)
- )
- )
- )
-}
-
-;------------------------------------------------------------------------------
-; Concurrency::details::_Concurrent_queue_iterator from <concurrent_queue.h>
-;------------------------------------------------------------------------------
-Concurrency::details::_Concurrent_queue_iterator<Concurrency::concurrent_queue<*,*>,*>{
- preview(
- #(
- *(($T1*)$e._My_item)
- )
- )
- children(
- #(
- [ptr]: (($T1*)$e._My_item)
-
- )
- )
-}
-
-; This section lets you define your own errors for the HRESULT display.
-; You need to list the error code in unsigned decimal, followed by the message.
-; Changes will take effect the next time you redisplay the variable.
-
-[hresult]
-;1234=my custom error code
-
-[Visualizer]
-
-glm::detail::tvec2<*>{
- preview (
- #(#($c.x,$c.y))
- )
- children (
- #([x]: $c.x,[y]: $c.y)
- )
-}
-
-glm::detail::tvec3<*>{
- preview (
- #($e.x,$e.y,$e.z)
- )
- children (
- #([x]: $e.x,[y]: $e.y,[z]: $e.z)
- )
-}
-
-glm::detail::tvec4<*>{
- preview (
- #($c.x,$c.y,$c.z,$c.w)
- )
- children (
- #([x]: $e.x,[y]: $e.y,[z]: $e.z, #([w]: $e.w))
- )
-}
diff --git a/3rdparty/glm/source/util/usertype.dat b/3rdparty/glm/source/util/usertype.dat
deleted file mode 100644
index cb44de3..0000000
--- a/3rdparty/glm/source/util/usertype.dat
+++ /dev/null
@@ -1,407 +0,0 @@
-attribute
-const
-uniform
-varying
-break
-continue
-do
-for
-while
-if
-else
-in
-out
-inout
-float
-int
-void
-bool
-true
-false
-discard
-return
-mat2
-mat3
-mat4
-mat2x2
-mat3x3
-mat4x4
-mat2x3
-mat3x2
-mat2x4
-mat4x2
-mat3x4
-mat4x3
-vec2
-vec3
-vec4
-ivec2
-ivec3
-ivec4
-uvec2
-uvec3
-uvec4
-bvec2
-bvec3
-bvec4
-sampler1D
-sampler2D
-sampler3D
-samplerCube
-sampler1DShadow
-sampler2DShadow
-struct
-
-asm
-class
-union
-enum
-typedef
-template
-this
-packed
-goto
-switch
-default
-inline
-noinline
-volatile
-public
-static
-extern
-external
-interface
-long
-short
-double
-half
-fixed
-unsigned
-input
-output
-sampler2DRect
-sampler3DRect
-sampler2DRectShadow
-sizeof
-cast
-namespace
-using
-
-layout
-location
-smooth
-flat
-noperspective
-centroid
-invariant
-lowp
-mediump
-highp
-precision
-patch
-sample
-subroutine
-
-hvec2
-hvec3
-hvec4
-fvec2
-fvec3
-fvec4
-dvec2
-dvec3
-dvec4
-
-on
-
-final
-abstract
-limited
-access
-self
-
-uchar
-schar
-uint
-sint
-
-int8
-int16
-int32
-int64
-
-sint8
-sint16
-sint32
-sint64
-
-uint8
-uint16
-uint32
-uint64
-
-float16
-float32
-float64
-
-quat
-hquat
-fquat
-dquat
-
-handle
-handle8
-handle16
-handle32
-handle64
-
-flag
-flag8
-flag16
-flag32
-flag64
-
-import
-export
-
-hmat2
-hmat3
-hmat4
-
-fmat2
-fmat3
-fmat4
-
-dmat2
-dmat3
-dmat4
-
-hmat2x3
-hmat3x2
-hmat2x4
-hmat4x2
-hmat3x4
-hmat4x3
-
-fmat2x3
-fmat3x2
-fmat2x4
-fmat4x2
-fmat3x4
-fmat4x3
-
-dmat2x3
-dmat3x2
-dmat2x4
-dmat4x2
-dmat3x4
-dmat4x3
-
-null
-pi
-epsilon
-infinite
-self
-
-byte
-word
-dword
-qword
-
-new_object
-new_array
-delete_object
-delete_array
-
-int8
-int16
-int32
-int64
-
-i8
-i16
-i32
-i64
-
-i8vec2
-i8vec3
-i8vec4
-
-i16vec2
-i16vec3
-i16vec4
-
-i32vec2
-i32vec3
-i32vec4
-
-i64vec2
-i64vec3
-i64vec4
-
-uint8
-uint16
-uint32
-uint64
-
-u8
-u16
-u32
-u64
-
-u8vec2
-u8vec3
-u8vec4
-
-u16vec2
-u16vec3
-u16vec4
-
-u32vec2
-u32vec3
-u32vec4
-
-u64vec2
-u64vec3
-u64vec4
-
-float16
-float32
-float64
-
-f16
-f32
-f64
-
-f16vec2
-f16vec3
-f16vec4
-
-f32vec2
-f32vec3
-f32vec4
-
-f64vec2
-f64vec3
-f64vec4
-
-f16mat2
-f16mat3
-f16mat4
-
-f16mat2x3
-f16mat2x4
-f16mat3x2
-f16mat3x4
-f16mat4x2
-f16mat4x3
-
-f32mat2
-f32mat3
-f32mat4
-
-f32mat2x3
-f32mat2x4
-f32mat3x2
-f32mat3x4
-f32mat4x2
-f32mat4x3
-
-f64mat2
-f64mat3
-f64mat4
-
-f64mat2x3
-f64mat2x4
-f64mat3x2
-f64mat3x4
-f64mat4x2
-f64mat4x3
-
-f16quat
-f32quat
-f64quat
-
-bool1
-bool2
-bool3
-bool4
-
-bool1x1
-bool2x2
-bool3x3
-bool4x4
-
-bool2x3
-bool2x4
-bool3x2
-bool3x4
-bool4x2
-bool4x3
-
-int1
-int2
-int3
-int4
-
-int1x1
-int2x2
-int3x3
-int4x4
-
-int2x3
-int2x4
-int3x2
-int3x4
-int4x2
-int4x3
-
-half1
-half2
-half3
-half4
-
-half2x2
-half3x3
-half4x4
-
-half2x3
-half2x4
-half3x2
-half3x4
-half4x2
-half4x3
-
-float1
-float2
-float3
-float4
-
-float1x1
-float2x2
-float3x3
-float4x4
-
-float2x3
-float2x4
-float3x2
-float3x4
-float4x2
-float4x3
-
-double1
-double2
-double3
-double4
-
-double1x1
-double2x2
-double3x3
-double4x4
-
-double2x3
-double2x4
-double3x2
-double3x4
-double4x2
-double4x3
diff --git a/3rdparty/imgui/CMakeLists.txt b/3rdparty/imgui/CMakeLists.txt
deleted file mode 100644
index c9cdc1b..0000000
--- a/3rdparty/imgui/CMakeLists.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-file(GLOB_RECURSE IMGUI_SOURCE ${CMAKE_CURRENT_LIST_DIR}/source/*.cpp)
-add_library(imgui
- ${IMGUI_SOURCE}
-)
-target_include_directories(imgui PUBLIC
- ${CMAKE_SOURCE_DIR}/3rdparty/glfw/source/include
- ${CMAKE_SOURCE_DIR}/3rdparty/glad/include
- ${CMAKE_CURRENT_LIST_DIR}/source
-)
-
-set_target_properties(imgui
-PROPERTIES
- UNITY_BUILD OFF
-)
diff --git a/3rdparty/imguicolortextedit/CMakeLists.txt b/3rdparty/imguicolortextedit/CMakeLists.txt
deleted file mode 100644
index 8d940f7..0000000
--- a/3rdparty/imguicolortextedit/CMakeLists.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-add_library(ImGuiColorTextEdit
- TextEditor.h
- TextEditor.cpp
-)
-target_include_directories(ImGuiColorTextEdit PUBLIC
- ${CMAKE_SOURCE_DIR}/3rdparty/imgui/source
- ${CMAKE_CURRENT_LIST_DIR}/source
-)
-
-set_target_properties(ImGuiColorTextEdit
-PROPERTIES
- UNITY_BUILD OFF
-)
diff --git a/3rdparty/tracy/CMakeLists.txt b/3rdparty/tracy/CMakeLists.txt
deleted file mode 100644
index 84cc697..0000000
--- a/3rdparty/tracy/CMakeLists.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-add_library(tracy INTERFACE)
-target_include_directories(tracy INTERFACE ${CMAKE_CURRENT_LIST_DIR})
diff --git a/CMakeLists.txt b/CMakeLists.txt
deleted file mode 100644
index ca9c541..0000000
--- a/CMakeLists.txt
+++ /dev/null
@@ -1,244 +0,0 @@
-cmake_minimum_required(VERSION 3.13)
-project(ProjectBrussel LANGUAGES C CXX)
-
-include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
-conan_basic_setup()
-
-include(cmake/Exceptions.cmake)
-include(cmake/RTTI.cmake)
-include(cmake/Win32Subsystem.cmake)
-
-find_package(OpenGL REQUIRED)
-add_subdirectory(3rdparty/glfw)
-add_subdirectory(3rdparty/glm)
-add_subdirectory(3rdparty/imgui)
-add_subdirectory(3rdparty/imguicolortextedit)
-add_subdirectory(3rdparty/tracy)
-
-# ==============================================================================
-# Layer 10 (standalone, throw-into-the-buildsystem style)
-
-file(GLOB_RECURSE 10-common_SOURCES
- source/10-common/*.c
- source/10-common/*.cpp
-)
-add_library(10-common OBJECT ${10-common_SOURCES})
-
-set_target_properties(10-common PROPERTIES
- CXX_STANDARD 20
- CXX_STANDARD_REQUIRED ON
- CXX_EXTENSIONS OFF
-
- # Many files include platform headers, we don't want to leak them - it's just simpler to disable unity build for everything
- UNITY_BUILD OFF
-)
-
-target_include_directories(10-common PUBLIC source/10-common)
-target_link_libraries(10-common PUBLIC
- # External dependencies
- ${CONAN_LIBS}
- glm::glm
-)
-
-# ==============================================================================
-# Layer 20 (building tools)
-
-file(GLOB_RECURSE 20-codegen-runtime_SOURCES
- source/20-codegen-runtime/*.c
- source/20-codegen-runtime/*.cpp
-)
-add_library(20-codegen-runtime OBJECT ${20-codegen-runtime_SOURCES})
-
-set_target_properties(20-codegen-runtime PROPERTIES
- CXX_STANDARD 20
- CXX_STANDARD_REQUIRED ON
- CXX_EXTENSIONS OFF
-)
-
-target_include_directories(20-codegen-runtime PUBLIC source/20-codegen-runtime)
-target_link_libraries(20-codegen-runtime PUBLIC
- # External dependencies
- ${CONAN_LIBS}
-
- # Project internal components
- 10-common
-)
-
-# NOTE: delibrately not recursive, because this target can contain non-source files with .cpp extensions in the folder
-file(GLOB 20-codegen-compiler_SOURCES
- source/20-codegen-compiler/*.c
- source/20-codegen-compiler/*.cpp
-)
-add_executable(20-codegen-compiler ${20-codegen-compiler_SOURCES})
-
-set_target_properties(20-codegen-compiler PROPERTIES
- CXX_STANDARD 20
- CXX_STANDARD_REQUIRED ON
- CXX_EXTENSIONS OFF
-)
-
-target_link_libraries(20-codegen-compiler PRIVATE
- # External dependencies
- ${CONAN_LIBS}
-
- # Project internal components
- 10-common
-)
-
-target_flag_exceptions(20-codegen-compiler ON)
-target_flag_rtti(20-codegen-compiler OFF)
-
-option(BRUSSEL_CODEGEN_DEBUG_PRINT "Enable debug printing in the code generator or not." OFF)
-if(BRUSSEL_CODEGEN_DEBUG_PRINT)
- target_compile_definitions(20-codegen-compiler PRIVATE CODEGEN_DEBUG_PRINT=1)
-endif()
-
-# ==============================================================================
-# Layer 30 (final products)
-
-function(add_projectized_executable)
- # Add a library target
- #
- # Arguments
- # TARGET_NAME
- # TARGET_SOURCE_DIR
- # EXTRA_SOURCES
- # ENABLE_CODEGEN
-
- set(one_value_args TARGET_NAME TARGET_SOURCE_DIR ENABLE_CODEGEN)
- set(multi_value_args EXTRA_SOURCES)
- cmake_parse_arguments(arg "" "${one_value_args}" "${multi_value_args}" ${ARGN})
-
- file(GLOB_RECURSE var_HEADERS
- ${arg_TARGET_SOURCE_DIR}/*.h
- ${arg_TARGET_SOURCE_DIR}/*.hh
- ${arg_TARGET_SOURCE_DIR}/*.hpp
- )
- file(GLOB_RECURSE var_SOURCES
- ${arg_TARGET_SOURCE_DIR}/*.c
- ${arg_TARGET_SOURCE_DIR}/*.cc
- ${arg_TARGET_SOURCE_DIR}/*.cpp
- )
- add_executable(${arg_TARGET_NAME}
- ${var_SOURCES}
- ${arg_EXTRA_SOURCES}
- )
-
- target_include_directories(${arg_TARGET_NAME} PRIVATE
- ${arg_TARGET_SOURCE_DIR}
- )
-
- target_link_libraries(${arg_TARGET_NAME} PRIVATE
- 10-common
- )
-
- set_target_properties(${arg_TARGET_NAME} PROPERTIES
- CXX_STANDARD 20
- CXX_STANDARD_REQUIRED ON
- CXX_EXTENSIONS OFF
- )
-
- if(arg_ENABLE_CODEGEN)
- set(var_OUTPUT_DIR ${CMAKE_BINARY_DIR}/generated/${arg_TARGET_NAME})
- target_include_directories(${arg_TARGET_NAME} PRIVATE ${var_OUTPUT_DIR})
- target_link_libraries(${arg_TARGET_NAME} PRIVATE 20-codegen-runtime)
-
- foreach(var_HEADER IN LISTS var_HEADERS)
- get_filename_component(var_HEADER_ABS "${var_HEADER}" ABSOLUTE)
- get_filename_component(var_HEADER_NAME "${var_HEADER}" NAME_WLE)
-
- # Things that are included by other TUs
- set(var_OUTPUT_HEADERS
- ${var_OUTPUT_DIR}/generated/${var_HEADER_NAME}.gh.inl
- ${var_OUTPUT_DIR}/generated/${var_HEADER_NAME}.gs.inl
- )
-
- # Things that needs to be compiled
- # NOTE: we need at least one of this to make sure the target is rebuilt if the generated files changes
- set(var_OUTPUT_SOURCES
- ${var_OUTPUT_DIR}/generated/${var_HEADER_NAME}.g.cpp
- )
-
- # Generate the files
- add_custom_command(
- OUTPUT ${var_OUTPUT_HEADERS} ${var_OUTPUT_SOURCES}
- COMMAND 20-codegen-compiler ${var_OUTPUT_DIR}/generated single:${var_HEADER}
- DEPENDS ${var_HEADER}
- )
-
- # Add generated TUs to the target
- target_sources(${arg_TARGET_NAME} PRIVATE ${var_OUTPUT_SOURCES})
- endforeach()
- endif()
-endfunction()
-
-add_projectized_executable(
- TARGET_NAME 30-game
- TARGET_SOURCE_DIR source/30-game/
- ENABLE_CODEGEN ON
-)
-
-set_target_properties(30-game PROPERTIES
- UNITY_BUILD_MODE BATCH
- UNITY_BUILD_UNIQUE_ID "ProjectBrussel_UNITY_ID"
-)
-
-target_compile_definitions(30-game PRIVATE
- RAPIDJSON_HAS_STDSTRING=1
- IMGUI_DISABLE_OBSOLETE_FUNCTIONS
-)
-
-target_link_libraries(30-game PRIVATE
- # External dependencies
- ${CONAN_LIBS}
- OpenGL::GL
- glfw
- glm::glm
- imgui
- ImGuiColorTextEdit
- tracy
-
- # Project internal components
-)
-
-target_flag_exceptions(30-game ON)
-target_flag_rtti(30-game ON)
-target_use_windows_subsystem(30-game)
-
-option(BRUSSEL_ENABLE_PROFILING "Whether profiling support is enabled or not." OFF)
-if(BRUSSEL_ENABLE_PROFILING)
- target_compile_definitions(30-game
- PRIVATE
- TRACY_ENABLE
- )
-endif()
-
-option(BRUSSEL_ENABLE_DEV_ENC "Enable dev environment features or not." ON)
-if(BRUSSEL_ENABLE_DEV_ENC)
- target_compile_definitions(30-game
- PRIVATE
- BRUSSEL_DEV_ENV=1
- )
-endif()
-
-option(BRUSSEL_ENABLE_EDITOR "Enable editor support or not." ON)
-if(BRUSSEL_ENABLE_EDITOR)
- target_compile_definitions(30-game
- PRIVATE
- BRUSSEL_ENABLE_EDITOR=1
- )
-endif()
-
-option(BRUSSEL_ENABLE_ASAN "Enable AddressSanitizer or not." OFF)
-if(BRUSSEL_ENABLE_ASAN)
- target_compile_options(30-game
- PRIVATE
- -fsanitize=address
- -fno-omit-frame-pointer
- )
- target_link_options(30-game
- PRIVATE
- -fsanitize=address
- -fno-omit-frame-pointer
- )
-endif()
diff --git a/build/bootstrap.build b/build/bootstrap.build
new file mode 100644
index 0000000..3770f7e
--- /dev/null
+++ b/build/bootstrap.build
@@ -0,0 +1,7 @@
+project = ProjectBrussel
+
+using version
+using config
+using test
+using install
+using dist
diff --git a/build/root.build b/build/root.build
new file mode 100644
index 0000000..8d5c0d3
--- /dev/null
+++ b/build/root.build
@@ -0,0 +1,15 @@
+cxx.std = latest
+
+using c
+using cxx
+
+h{*}: extension = h
+c{*}: extension = c
+hxx{*}: extension = hpp
+ixx{*}: extension = ipp
+txx{*}: extension = tpp
+cxx{*}: extension = cpp
+
+# Assume headers are importable unless stated otherwise.
+#
+hxx{*}: cxx.importable = true
diff --git a/buildfile b/buildfile
new file mode 100644
index 0000000..39c6e9e
--- /dev/null
+++ b/buildfile
@@ -0,0 +1 @@
+./: ProjectBrussel/ ThirdParty/ doc{README.md} manifest
diff --git a/cmake/Exceptions.cmake b/cmake/Exceptions.cmake
deleted file mode 100644
index 89e7e69..0000000
--- a/cmake/Exceptions.cmake
+++ /dev/null
@@ -1,31 +0,0 @@
-function(target_flag_exceptions_msvc TARGET_NAME ENABLED)
- if(ENABLED)
- target_compile_options(${TARGET_NAME} PRIVATE /EHsc)
- else()
- target_compile_options(${TARGET_NAME} PRIVATE /EH-)
- endif()
-endfunction()
-
-function(target_flag_exceptions_gcc TARGET_NAME ENABLED)
- if(ENABLED)
- target_compile_options(${TARGET_NAME} PRIVATE -fexceptions)
- else()
- target_compile_options(${TARGET_NAME} PRIVATE -fno-exceptions)
- endif()
-endfunction()
-
-function(target_flag_exceptions TARGET_NAME ENABLED)
- if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
- target_flag_exceptions_msvc(${TARGET_NAME} ${ENABLED})
- elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- if(CMAKE_CXX_COMPILER_FRONTEND_VARIANT MATCHES "MSVC")
- target_flag_exceptions_msvc(${TARGET_NAME} ${ENABLED})
- elseif(CMAKE_CXX_COMPILER_FRONTEND_VARIANT MATCHES "GNU")
- target_flag_exceptions_gcc(${TARGET_NAME} ${ENABLED})
- endif()
- elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
- target_flag_exceptions_gcc(${TARGET_NAME} ${ENABLED})
- else()
- message(FATAL "target_flag_exceptions(): Unknown compiler ${CMAKE_CXX_COMPILER_ID}")
- endif()
-endfunction()
diff --git a/cmake/RTTI.cmake b/cmake/RTTI.cmake
deleted file mode 100644
index b948497..0000000
--- a/cmake/RTTI.cmake
+++ /dev/null
@@ -1,31 +0,0 @@
-function(target_flag_rtti_msvc TARGET_NAME ENABLED)
- if(ENABLED)
- target_compile_options(${TARGET_NAME} PRIVATE /GR)
- else()
- target_compile_options(${TARGET_NAME} PRIVATE /GR-)
- endif()
-endfunction()
-
-function(target_flag_rtti_gcc TARGET_NAME ENABLED)
- if(ENABLED)
- target_compile_options(${TARGET_NAME} PRIVATE -frtti)
- else()
- target_compile_options(${TARGET_NAME} PRIVATE -fno-rtti)
- endif()
-endfunction()
-
-function(target_flag_rtti TARGET_NAME ENABLED)
- if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
- target_flag_rtti_msvc(${TARGET_NAME} ${ENABLED})
- elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- if(CMAKE_CXX_COMPILER_FRONTEND_VARIANT MATCHES "MSVC")
- target_flag_rtti_msvc(${TARGET_NAME} ${ENABLED})
- elseif(CMAKE_CXX_COMPILER_FRONTEND_VARIANT MATCHES "GNU")
- target_flag_rtti_gcc(${TARGET_NAME} ${ENABLED})
- endif()
- elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
- target_flag_rtti_gcc(${TARGET_NAME} ${ENABLED})
- else()
- message(FATAL "target_flag_rtti(): Unknown compiler ${CMAKE_CXX_COMPILER_ID}")
- endif()
-endfunction()
diff --git a/cmake/Win32Subsystem.cmake b/cmake/Win32Subsystem.cmake
deleted file mode 100644
index 8546fd9..0000000
--- a/cmake/Win32Subsystem.cmake
+++ /dev/null
@@ -1,31 +0,0 @@
-function(target_use_windows_subsystem TARGET_NAME)
- if(WIN32)
- function(handle_msvc_style_compiler)
- target_link_options(${TARGET_NAME} PRIVATE /SUBSYSTEM:windows /ENTRY:mainCRTStartup)
- endfunction()
-
- if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
- # GCC (MinGW)
- # Supposedly the flag -mwindows would automatically make the executable use GUI subsystem
- # But, when subsystem is set to GUI, linker will only search WinMain and wWinMain but not the standard main (it seems like)
- # so creating GUI executable fails and the linker silently reverts to the default, CUI subsystem
- target_link_options(${TARGET_NAME} PRIVATE -Wl,-subsystem,windows)
- target_link_options(${TARGET_NAME} PRIVATE -Wl,-entry,mainCRTStartup)
- elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
- if(CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
- # MSVC-style argument clang (clang-cl.exe)
- handle_msvc_style_compiler()
- elseif(CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU")
- # GNU-style argument clang (clang.exe and clang++.exe)
- target_link_options(${TARGET_NAME} PRIVATE -Wl,-subsystem:windows)
- target_link_options(${TARGET_NAME} PRIVATE -Wl,-entry:mainCRTStartup)
- endif()
- elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
- handle_msvc_style_compiler()
-
- # Use updated __cplusplus macro
- # https://docs.microsoft.com/en-us/cpp/build/reference/zc-cplusplus
- target_compile_options(${TARGET_NAME} PUBLIC /Zc:__cplusplus)
- endif()
- endif()
-endfunction()
diff --git a/conanfile.txt b/conanfile.txt
deleted file mode 100644
index 2b03fbb..0000000
--- a/conanfile.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-[requires]
-cxxopts/3.0.0
-glad/0.1.34
-assimp/5.2.2
-rapidjson/cci.20211112
-stb/cci.20210910
-robin-hood-hashing/3.11.5
-frozen/1.1.1
-
-[generators]
-cmake
-
-[options]
-glad:no_loader=True
-glad:gl_version=4.5
diff --git a/ignore.conf b/ignore.conf
index 058534a..9628ef1 100644
--- a/ignore.conf
+++ b/ignore.conf
@@ -1,5 +1,3 @@
-build
-build.scripts
.vscode
.vs
.idea
@@ -7,6 +5,10 @@ build.scripts
.local
_ReSharper.Caches
+/build/config.build
+/build/root
+/build/bootstrap
+
imgui.ini
project.4coder
CMakeSettings.json
diff --git a/manifest b/manifest
new file mode 100644
index 0000000..8f643e4
--- /dev/null
+++ b/manifest
@@ -0,0 +1,10 @@
+: 1
+name: Project Brussel
+version: 0.1.0-a.0.z
+summary: Project Brussel
+license: other: proprietary ; Not free/open source.
+description-file: README.md
+url: https://github.com/hnOsmium0001/project-brussel
+depends: * build2 >= 0.14.0
+depends: * bpkg >= 0.14.0
diff --git a/repositories.manifest b/repositories.manifest
new file mode 100644
index 0000000..111b0bb
--- /dev/null
+++ b/repositories.manifest
@@ -0,0 +1,6 @@
+: 1
+summary: Project Brussel repository
+
+:
+role: prerequisite
+location: https://pkg.cppget.org/1/stable
diff --git a/source/10-common/buildfile b/source/10-common/buildfile
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/source/10-common/buildfile
@@ -0,0 +1 @@
+
diff --git a/source/20-codegen-compiler/buildfile b/source/20-codegen-compiler/buildfile
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/source/20-codegen-compiler/buildfile
@@ -0,0 +1 @@
+
diff --git a/source/20-codegen-runtime/buildfile b/source/20-codegen-runtime/buildfile
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/source/20-codegen-runtime/buildfile
@@ -0,0 +1 @@
+
diff --git a/source/30-game/buildfile b/source/30-game/buildfile
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/source/30-game/buildfile
diff --git a/source/buildfile b/source/buildfile
new file mode 100644
index 0000000..44fc188
--- /dev/null
+++ b/source/buildfile
@@ -0,0 +1 @@
+./: */