diff --git a/Escape-the-Dawn/Escape-the-Dawn.vcxproj b/Escape-the-Dawn/Escape-the-Dawn.vcxproj index f5ecc5c..a67e889 100644 --- a/Escape-the-Dawn/Escape-the-Dawn.vcxproj +++ b/Escape-the-Dawn/Escape-the-Dawn.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -19,14 +19,14 @@ Application true MultiByte - v110 + v120 Application false true MultiByte - v110 + v120 @@ -40,17 +40,17 @@ - $(BOOST_ROOT)\lib32-msvc-11.0;$(SolutionDir)\Libraries\openal-soft-1.15.1-bin\lib\Win32\Debug;$(SolutionDir)\Libraries\SOIL\lib\Debug;$(SolutionDir)\Libraries\glew-1.10.0\lib\Debug\Win32;$(SolutionDir)\Libraries\glfw-3.0.4\lib\Debug;$(LibraryPath) + $(BOOST_ROOT)\lib32-msvc-12.0;$(SolutionDir)\Libraries\openal-soft-1.15.1-bin\lib\Win32\Debug;$(SolutionDir)\Libraries\SOIL\lib\Debug;$(SolutionDir)\Libraries\glew-1.10.0\lib\Debug\Win32;$(SolutionDir)\Libraries\glfw-3.0.4\lib\Debug;$(LibraryPath) $(SolutionDir)bin\ $(SolutionDir)obj\$(ProjectName)\ $(ProjectName)-$(Configuration) - $(BOOST_ROOT);$(SolutionDir)\Libraries\openal-soft-1.15.1-bin\include;$(SolutionDir)\Libraries\SOIL\src;$(ProjectDir);$(SolutionDir)\Libraries;$(SolutionDir)\Libraries\glew-1.10.0\include;$(SolutionDir)\Libraries\glfw-3.0.4\include;$(SolutionDir)\Libraries\glm-0.9.5.2;$(IncludePath) + $(BOOST_ROOT);$(SolutionDir)\Libraries\openal-soft-1.15.1-bin\include;$(SolutionDir)\Libraries\SOIL\src;$(ProjectDir);$(SolutionDir)\Libraries;$(SolutionDir)\Libraries\glew-1.10.0\include;$(SolutionDir)\Libraries\glfw-3.0.4\include;$(SolutionDir)\Libraries\glm-0.9.5.3;$(IncludePath) - $(BOOST_ROOT);$(SolutionDir)\Libraries\openal-soft-1.15.1-bin\include;$(SolutionDir)\Libraries\SOIL\src;$(ProjectDir);$(SolutionDir)\Libraries;$(SolutionDir)\Libraries\glew-1.10.0\include;$(SolutionDir)\Libraries\glfw-3.0.4\include;$(SolutionDir)\Libraries\glm-0.9.5.2;$(IncludePath) + $(BOOST_ROOT);$(SolutionDir)\Libraries\openal-soft-1.15.1-bin\include;$(SolutionDir)\Libraries\SOIL\src;$(ProjectDir);$(SolutionDir)\Libraries;$(SolutionDir)\Libraries\glew-1.10.0\include;$(SolutionDir)\Libraries\glfw-3.0.4\include;$(SolutionDir)\Libraries\glm-0.9.5.3;$(IncludePath) - $(BOOST_ROOT)\lib32-msvc-11.0;$(SolutionDir)\Libraries\openal-soft-1.15.1-bin\lib\Win32\Release;$(SolutionDir)\Libraries\SOIL\lib\Release;$(SolutionDir)\Libraries\glew-1.10.0\lib\Release\Win32;$(SolutionDir)\Libraries\glfw-3.0.4\lib\Release;$(LibraryPath) + $(BOOST_ROOT)\lib32-msvc-12.0;$(SolutionDir)\Libraries\openal-soft-1.15.1-bin\lib\Win32\Release;$(SolutionDir)\Libraries\SOIL\lib\Release;$(SolutionDir)\Libraries\glew-1.10.0\lib\Release\Win32;$(SolutionDir)\Libraries\glfw-3.0.4\lib\Release;$(LibraryPath) $(SolutionDir)bin\ $(SolutionDir)obj\$(ProjectName)\ $(ProjectName)-$(Configuration) diff --git a/Escape-the-Dawn/Escape-the-Dawn.vcxproj.orig b/Escape-the-Dawn/Escape-the-Dawn.vcxproj.orig deleted file mode 100644 index 7f9c2d5..0000000 --- a/Escape-the-Dawn/Escape-the-Dawn.vcxproj.orig +++ /dev/null @@ -1,183 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {FE405CFA-8FCE-4867-92CF-797E73B36482} - EscapetheDawn - - - - Application - true - MultiByte - v110 - - - Application - false - true - MultiByte - v110 - - - - - - - - - - - - - - $(BOOST_ROOT)\lib32-msvc-11.0;$(SolutionDir)\Libraries\openal-soft-1.15.1-bin\lib\Win32\Debug;$(SolutionDir)\Libraries\SOIL\lib\Debug;$(SolutionDir)\Libraries\glew-1.10.0\lib\Debug\Win32;$(SolutionDir)\Libraries\glfw-3.0.4\lib\Debug;$(LibraryPath) - $(SolutionDir)bin\ - $(SolutionDir)obj\$(ProjectName)\ - $(ProjectName)-$(Configuration) - $(BOOST_ROOT);$(SolutionDir)\Libraries\openal-soft-1.15.1-bin\include;$(SolutionDir)\Libraries\SOIL\src;$(ProjectDir);$(SolutionDir)\Libraries;$(SolutionDir)\Libraries\glew-1.10.0\include;$(SolutionDir)\Libraries\glfw-3.0.4\include;$(SolutionDir)\Libraries\glm-0.9.5.2;$(IncludePath) - - - $(BOOST_ROOT);$(SolutionDir)\Libraries\openal-soft-1.15.1-bin\include;$(SolutionDir)\Libraries\SOIL\src;$(ProjectDir);$(SolutionDir)\Libraries;$(SolutionDir)\Libraries\glew-1.10.0\include;$(SolutionDir)\Libraries\glfw-3.0.4\include;$(SolutionDir)\Libraries\glm-0.9.5.2;$(IncludePath) - - - $(BOOST_ROOT)\lib32-msvc-11.0;$(SolutionDir)\Libraries\openal-soft-1.15.1-bin\lib\Win32\Release;$(SolutionDir)\Libraries\SOIL\lib\Release;$(SolutionDir)\Libraries\glew-1.10.0\lib\Release\Win32;$(SolutionDir)\Libraries\glfw-3.0.4\lib\Release;$(LibraryPath) - $(SolutionDir)bin\ - $(SolutionDir)obj\$(ProjectName)\ - $(ProjectName)-$(Configuration) - - - - Level3 - Disabled - GLEW_STATIC;DEBUG;%(PreprocessorDefinitions) - NotUsing - - - true - Console - OpenAL32.lib;opengl32.lib;glu32.lib;SOIL.lib;glew32sd.lib;glfw3.lib;%(AdditionalDependencies) - - - - - OpenAL32.lib;opengl32.lib;glu32.lib;SOIL.lib;glew32sd.lib;glfw3.lib - - - - - - - - Level3 - MaxSpeed - true - true - GLEW_STATIC;DEBUG;%(PreprocessorDefinitions) - NotUsing - ProgramDatabase - true - - - true - true - OpenAL32.lib;opengl32.lib;glu32.lib;SOIL.lib;glew32s.lib;glfw3.lib;%(AdditionalDependencies) - - - OpenAL32.lib;opengl32.lib;glu32.lib;SOIL.lib;glew32s.lib;glfw3.lib; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Escape-the-Dawn/GameWorld.cpp.orig b/Escape-the-Dawn/GameWorld.cpp.orig deleted file mode 100644 index 12d11a3..0000000 --- a/Escape-the-Dawn/GameWorld.cpp.orig +++ /dev/null @@ -1,169 +0,0 @@ -#include "GameWorld.h" - - -void GameWorld::Initialize() -{ - World::Initialize(); - - AddSystem("LevelGenerationSystem"); - AddSystem("InputSystem"); - AddSystem("CollisionSystem"); - //AddSystem("ParticleSystem"); - AddSystem("PlayerSystem"); - AddSystem("SoundSystem"); - AddSystem("RenderSystem"); - - std::shared_ptr transform; - std::shared_ptr model; - std::shared_ptr pointLight; - std::shared_ptr camera; - std::shared_ptr bounds; - std::shared_ptr collision; - std::shared_ptr soundEmitter; - EntityID ent; - - - - - // Fucking lights - ent = CreateEntity(); - transform = AddComponent(ent, "Transform"); - transform->Position = glm::vec3(0.f, 7.f, 0.f); - pointLight = AddComponent(ent, "PointLight"); - pointLight->Specular = glm::vec3(1.0, 1.0, 1.0); - pointLight->Diffuse = glm::vec3(0.0, 0.0, 5.0); - pointLight->constantAttenuation = 0.f; - pointLight->linearAttenuation = 1.f; - pointLight->quadraticAttenuation = 0.f; - pointLight->spotExponent = 0.0f; - model = AddComponent(ent, "Model"); - model->ModelFile = "Models/sphere.obj"; - ent = CreateEntity(); - transform = AddComponent(ent, "Transform"); - transform->Position = glm::vec3(10.f, 7.f, 0.f); - pointLight = AddComponent(ent, "PointLight"); - pointLight->Specular = glm::vec3(1.0, 1.0, 1.0); - pointLight->Diffuse = glm::vec3(0.0, 5.0, 0.0); - pointLight->constantAttenuation = 0.f; - pointLight->linearAttenuation = 1.f; - pointLight->quadraticAttenuation = 0.f; - pointLight->spotExponent = 0.0f; - model = AddComponent(ent, "Model"); - model->ModelFile = "Models/sphere.obj"; - ent = CreateEntity(); - transform = AddComponent(ent, "Transform"); - transform->Position = glm::vec3(-10.f, 7.f, 0.f); - pointLight = AddComponent(ent, "PointLight"); - pointLight->Specular = glm::vec3(1.0, 1.0, 1.0); - pointLight->Diffuse = glm::vec3(5.0, 0.0, 0.0); - pointLight->constantAttenuation = 0.f; - pointLight->linearAttenuation = 1.f; - pointLight->quadraticAttenuation = 0.f; - pointLight->spotExponent = 0.0f; - model = AddComponent(ent, "Model"); - model->ModelFile = "Models/sphere.obj"; - - //ground - ent = CreateEntity(); - transform = AddComponent(ent, "Transform"); - transform->Position = glm::vec3(0.f, 0.f, 0.f); - model = AddComponent(ent, "Model"); - model->ModelFile = "Models/plane.obj"; - - // Player - m_Player = CreateEntity(); - SetProperty(m_Player, "Name", std::string("PlayerShip")); - transform = AddComponent(m_Player, "Transform"); - transform->Position = glm::vec3(0.f, 2.f, -5.f); - transform->Scale = glm::vec3(1.0f); - model = AddComponent(m_Player, "Model"); - model->ModelFile = "Models/ship.obj"; - pointLight = AddComponent(m_Player, "PointLight"); - pointLight->Specular = glm::vec3(1.0, 1.0, 1.0); - pointLight->Diffuse = glm::vec3(0.4, 0.4, 1.0); - pointLight->constantAttenuation = 0.f; - pointLight->linearAttenuation = 1.f; - pointLight->quadraticAttenuation = 0.f; - pointLight->spotExponent = 0.0f; - AddComponent(m_Player, "Input"); - collision = AddComponent(m_Player, "Collision"); - collision->Phantom = false; - collision->Interested = true; - bounds = AddComponent(m_Player, "Bounds"); -<<<<<<< HEAD - bounds->Origin = glm::vec3(transform->Position.x, transform->Position.y - 4, transform->Position.z + 3); - bounds->VolumeVector = glm::vec3(4.f,0.7f,4); - soundEmitter = AddComponent(m_Player, "SoundEmitter"); - soundEmitter->Loop = true; - soundEmitter->MaxDistance = FLT_MAX; - soundEmitter->ReferenceDistance = 10; - soundEmitter->Gain = 1; - soundEmitter->Pitch = 1; - soundEmitter->Path = "Sounds/hallelujah.wav"; - GetSystem("SoundSystem")->PlaySound(soundEmitter); -======= - bounds->Origin = glm::vec3(0, 0, 2.f); - bounds->VolumeVector = glm::vec3(4.f, 0.7f, 1); ->>>>>>> f76c0b336f87a259a7eabf3c532fc885f155a605 - - - // Camera - entcamera = CreateEntity(m_Player); - SetProperty(entcamera, "Name", std::string("Camera")); - transform = AddComponent(entcamera, "Transform"); - AddComponent(entcamera, "Input"); - transform->Position = glm::vec3(0.f, 10.f, 14.f); - camera = AddComponent(entcamera, "Camera"); - camera->FOV = 45.f; - camera->FarClip = 1000.f; - camera->NearClip = 0.01f; - transform->Orientation = glm::angleAxis(glm::radians(15.0f),glm::vec3(1,0,0)); - - - - - /*ent = CreateEntity(); - transform = AddComponent(ent, "Transform"); - transform->Position = glm::vec3(10.f, 4.f, 0.f); - model = AddComponent(ent, "Model"); - model->ModelFile = "Models/ship.obj"; - collision = AddComponent(player2, "Collision"); - collision->Phantom = false; - bounds = AddComponent(player2, "Bounds"); - bounds->Origin = transform->Position; - bounds->VolumeVector = glm::vec3(2.f,2.f,2.f);*/ -} - -void GameWorld::Update(double dt) -{ - World::Update(dt); -} - -void GameWorld::RegisterComponents() -{ - m_ComponentFactory.Register("Bounds", []() { return new Components::Bounds(); }); - m_ComponentFactory.Register("Camera", []() { return new Components::Camera(); }); - m_ComponentFactory.Register("Collision", []() { return new Components::Collision(); }); - m_ComponentFactory.Register("DirectionalLight", []() { return new Components::DirectionalLight(); }); - m_ComponentFactory.Register("Input", []() { return new Components::Input(); }); - m_ComponentFactory.Register("Model", []() { return new Components::Model(); }); - m_ComponentFactory.Register("ParticleEmitter", []() { return new Components::ParticleEmitter(); }); - m_ComponentFactory.Register("PointLight", []() { return new Components::PointLight(); }); - m_ComponentFactory.Register("PowerUp", []() { return new Components::PowerUp(); }); - m_ComponentFactory.Register("SoundEmitter", []() { return new Components::SoundEmitter(); }); - m_ComponentFactory.Register("Sprite", []() { return new Components::Sprite(); }); - m_ComponentFactory.Register("Stat", []() { return new Components::Stat(); }); - m_ComponentFactory.Register("Template", []() { return new Components::Template(); }); - m_ComponentFactory.Register("Transform", []() { return new Components::Transform(); }); -} - -void GameWorld::RegisterSystems() -{ - m_SystemFactory.Register("LevelGenerationSystem", [this]() { return new Systems::LevelGenerationSystem(this); }); - m_SystemFactory.Register("InputSystem", [this]() { return new Systems::InputSystem(this, m_Renderer); }); - m_SystemFactory.Register("CollisionSystem", [this]() { return new Systems::CollisionSystem(this); }); - //m_SystemFactory.Register("ParticleSystem", [this]() { return new Systems::ParticleSystem(this); }); - m_SystemFactory.Register("PlayerSystem", [this]() { return new Systems::PlayerSystem(this); }); - m_SystemFactory.Register("SoundSystem", [this]() { return new Systems::SoundSystem(this); }); - m_SystemFactory.Register("RenderSystem", [this]() { return new Systems::RenderSystem(this, m_Renderer); }); -} \ No newline at end of file diff --git a/Escape-the-Dawn/OpenAL32.dll b/Escape-the-Dawn/OpenAL32.dll deleted file mode 100644 index 9c8932e..0000000 Binary files a/Escape-the-Dawn/OpenAL32.dll and /dev/null differ diff --git a/Libraries/glm-0.9.5.2/CMakeLists.txt b/Libraries/glm-0.9.5.2/CMakeLists.txt deleted file mode 100644 index 6971a67..0000000 --- a/Libraries/glm-0.9.5.2/CMakeLists.txt +++ /dev/null @@ -1,133 +0,0 @@ -cmake_minimum_required(VERSION 2.6 FATAL_ERROR) -cmake_policy(VERSION 2.6) - -project(glm) -enable_testing() - -add_definitions(-D_CRT_SECURE_NO_WARNINGS) - -option(GLM_TEST_ENABLE "GLM test" OFF) -if(NOT GLM_TEST_ENABLE) - message(FATAL_ERROR "GLM is a header only library, no need to build it. Set the option GLM_TEST_ENABLE with ON to build and run the test bench") -endif() - -if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") AND UNIX)) - option(GLM_TEST_ENABLE_CXX_98 "Enable C++ 98" OFF) - option(GLM_TEST_ENABLE_CXX_0X "Enable C++ 0x" OFF) - option(GLM_TEST_ENABLE_CXX_11 "Enable C++ 11" OFF) - option(GLM_TEST_ENABLE_CXX_1Y "Enable C++ 1y" OFF) - option(GLM_TEST_ENABLE_CXX_PEDANTIC "Pedantic" ON) - - if(GLM_TEST_ENABLE_CXX_PEDANTIC) - add_definitions(-pedantic) - endif() - - if(GLM_TEST_ENABLE_CXX_1Y) - set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++1y") - set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") - set(CMAKE_CXX_FLAGS "-std=c++1y") - elseif(GLM_TEST_ENABLE_CXX_11) - set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11") - set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") - set(CMAKE_CXX_FLAGS "-std=c++11") - elseif(GLM_TEST_ENABLE_CXX_0X) - set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++0x") - set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") - set(CMAKE_CXX_FLAGS "-std=c++0x") - elseif(GLM_TEST_ENABLE_CXX_98) - set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++98") - set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") - set(CMAKE_CXX_FLAGS "-std=c++98") - endif() -endif() - -if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") OR (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") AND WIN32)) - option(GLM_TEST_ENABLE_MS_EXTENSIONS "Enable MS extensions" OFF) - - if(NOT GLM_TEST_ENABLE_MS_EXTENSIONS) - add_definitions(/Za) - endif() -endif() - -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_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_COMPILER_IS_GNUCXX) - add_definitions(-mfpmath=387) - elseif(MSVC) - add_definitions(/arch:IA32) - endif() -elseif(GLM_TEST_ENABLE_AVX2) - if(CMAKE_COMPILER_IS_GNUCXX) - add_definitions(-mavx2) - elseif(GLM_USE_INTEL) - add_definitions(/QxAVX2) - elseif(MSVC) - add_definitions(/arch:AVX2) - endif() -elseif(GLM_TEST_ENABLE_AVX) - if(CMAKE_COMPILER_IS_GNUCXX) - add_definitions(-mavx) - elseif(GLM_USE_INTEL) - add_definitions(/QxAVX) - elseif(MSVC) - add_definitions(/arch:AVX) - endif() -elseif(GLM_TEST_ENABLE_SSE3) - if(CMAKE_COMPILER_IS_GNUCXX) - add_definitions(-msse3) - elseif(GLM_USE_INTEL) - add_definitions(/QxSSE3) - elseif(MSVC) - add_definitions(/arch:SSE2) # VC doesn't support /arch:SSE3 - endif() -elseif(GLM_TEST_ENABLE_SSE2) - if(CMAKE_COMPILER_IS_GNUCXX) - add_definitions(-msse2) - elseif(GLM_USE_INTEL) - add_definitions(/QxSSE2) - elseif(MSVC) - if(NOT CMAKE_CL_64) - add_definitions(/arch:SSE2) - endif() - endif() -endif() - -option(GLM_TEST_ENABLE_FAST_MATH "Enable fast math optimizations" OFF) -if(GLM_TEST_ENABLE_FAST_MATH) - if(CMAKE_COMPILER_IS_GNUCXX) - add_definitions(-ffast-math) - endif() - - if(MSVC) - add_definitions(/fp:fast) - endif() -elseif(NOT GLM_TEST_ENABLE_FAST_MATH) - if(MSVC) - add_definitions(/fp:precise) - endif() -endif() - -if(CMAKE_COMPILER_IS_GNUCXX) - #add_definitions(-S) - #add_definitions(-s) - #add_definitions(-m32) - #add_definitions(-O3) - - #add_definitions(-fprofile-arcs -ftest-coverage) gcov - #ctest_enable_coverage() -endif() - -include_directories(".") -include_directories("./test/external") - -add_subdirectory(glm) -add_subdirectory(test) - -install(DIRECTORY glm DESTINATION include) diff --git a/Libraries/glm-0.9.5.2/CTestConfig.cmake b/Libraries/glm-0.9.5.2/CTestConfig.cmake deleted file mode 100644 index d338835..0000000 --- a/Libraries/glm-0.9.5.2/CTestConfig.cmake +++ /dev/null @@ -1,13 +0,0 @@ -## This file should be placed in the root directory of your project. -## Then modify the CMakeLists.txt file in the root directory of your -## project to incorporate the testing dashboard. -## # The following are required to uses Dart and the Cdash dashboard -## ENABLE_TESTING() -## INCLUDE(CTest) -set(CTEST_PROJECT_NAME "GLM") -set(CTEST_NIGHTLY_START_TIME "00:00:00 EST") - -set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "my.cdash.org") -set(CTEST_DROP_LOCATION "/submit.php?project=GLM") -set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Libraries/glm-0.9.5.2/glm/detail/dummy.cpp b/Libraries/glm-0.9.5.2/glm/detail/dummy.cpp deleted file mode 100644 index a95afcd..0000000 --- a/Libraries/glm-0.9.5.2/glm/detail/dummy.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2014 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. -/// -/// 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. -/// -/// @ref core -/// @file glm/core/dummy.cpp -/// @date 2011-01-19 / 2011-06-15 -/// @author Christophe Riccio -/// -/// GLM is a header only library. There is nothing to compile. -/// dummy.cpp exist only a wordaround for CMake file. -/////////////////////////////////////////////////////////////////////////////////// - -#define GLM_FORCE_RADIANS -#define GLM_MESSAGES -#include "../glm.hpp" -#include -/* -#if(GLM_ARCH & GLM_ARCH_SSE2) -struct float4 -{ - union - { - struct {float r, g, b, a;}; - struct {float s, t, p, q;}; - struct {float x, y, z, w;}; - __m128 data; - }; -}; - -int test_simd() -{ - float4 f; - - - - return 0; -} - -#endif//GLM_ARCH -*/ - -template -class C; - -template -class C -{ -public: - T value; -}; - -int main() -{ -/* -# if(GLM_ARCH & GLM_ARCH_SSE2) - test_simd(); -# endif -*/ - - C<> c; - - return 0; -} diff --git a/Libraries/glm-0.9.5.2/test/.DS_Store b/Libraries/glm-0.9.5.2/test/.DS_Store deleted file mode 100644 index 8ade767..0000000 Binary files a/Libraries/glm-0.9.5.2/test/.DS_Store and /dev/null differ diff --git a/Libraries/glm-0.9.5.2/test/CMakeLists.txt b/Libraries/glm-0.9.5.2/test/CMakeLists.txt deleted file mode 100644 index 0d4acb9..0000000 --- a/Libraries/glm-0.9.5.2/test/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -function(glmCreateTestGTC NAME) - set(SAMPLE_NAME test-${NAME}) - add_executable(${SAMPLE_NAME} ${NAME}.cpp) - - add_test( - NAME ${SAMPLE_NAME} - COMMAND $ ) -endfunction() - -add_subdirectory(bug) -add_subdirectory(core) -add_subdirectory(gtc) -add_subdirectory(gtx) - - diff --git a/Libraries/glm-0.9.5.2/test/bug/CMakeLists.txt b/Libraries/glm-0.9.5.2/test/bug/CMakeLists.txt deleted file mode 100644 index e69de29..0000000 diff --git a/Libraries/glm-0.9.5.2/test/core/CMakeLists.txt b/Libraries/glm-0.9.5.2/test/core/CMakeLists.txt deleted file mode 100644 index 0f5b9b4..0000000 --- a/Libraries/glm-0.9.5.2/test/core/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -glmCreateTestGTC(core_type_cast) -glmCreateTestGTC(core_type_float) -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_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_message) -glmCreateTestGTC(core_setup_precision) - - - diff --git a/Libraries/glm-0.9.5.2/test/core/core_func_common.cpp b/Libraries/glm-0.9.5.2/test/core/core_func_common.cpp deleted file mode 100644 index 0c509d3..0000000 --- a/Libraries/glm-0.9.5.2/test/core/core_func_common.cpp +++ /dev/null @@ -1,645 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2011-01-15 -// Updated : 2011-09-13 -// Licence : This source is under MIT licence -// File : test/core/func_common.cpp -/////////////////////////////////////////////////////////////////////////////////////////////////// - -//#include -//#include -//#include -#define GLM_FORCE_RADIANS -#include -#include -#include -#include - -int test_modf() -{ - int Error(0); - - { - float X(1.5f); - float I(0.0f); - float A = glm::modf(X, I); - - Error += I == 1.0f ? 0 : 1; - Error += A == 0.5f ? 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 += I == glm::vec4(1.0f) ? 0 : 1; - Error += glm::all(glm::epsilonEqual(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 += I == glm::dvec4(1.0) ? 0 : 1; - Error += glm::all(glm::epsilonEqual(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 += I == 1.0 ? 0 : 1; - Error += A == 0.5 ? 0 : 1; - } - - return Error; -} - -int test_floatBitsToInt() -{ - int Error = 0; - - { - float A = 1.0f; - int B = glm::floatBitsToInt(A); - float C = glm::intBitsToFloat(B); - int D = *(int*)&A; - Error += B == D ? 0 : 1; - Error += A == C ? 0 : 1; - } - - { - glm::vec2 A(1.0f, 2.0f); - glm::ivec2 B = glm::floatBitsToInt(A); - glm::vec2 C = glm::intBitsToFloat(B); - Error += B.x == *(int*)&(A.x) ? 0 : 1; - Error += B.y == *(int*)&(A.y) ? 0 : 1; - Error += A == C? 0 : 1; - } - - { - glm::vec3 A(1.0f, 2.0f, 3.0f); - glm::ivec3 B = glm::floatBitsToInt(A); - glm::vec3 C = glm::intBitsToFloat(B); - Error += B.x == *(int*)&(A.x) ? 0 : 1; - Error += B.y == *(int*)&(A.y) ? 0 : 1; - Error += B.z == *(int*)&(A.z) ? 0 : 1; - Error += A == C? 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 += B.x == *(int*)&(A.x) ? 0 : 1; - Error += B.y == *(int*)&(A.y) ? 0 : 1; - Error += B.z == *(int*)&(A.z) ? 0 : 1; - Error += B.w == *(int*)&(A.w) ? 0 : 1; - Error += A == C? 0 : 1; - } - - return Error; -} - -int test_floatBitsToUint() -{ - int Error = 0; - - { - float A = 1.0f; - glm::uint B = glm::floatBitsToUint(A); - float C = glm::intBitsToFloat(B); - Error += B == *(glm::uint*)&A ? 0 : 1; - Error += A == C? 0 : 1; - } - - { - glm::vec2 A(1.0f, 2.0f); - glm::uvec2 B = glm::floatBitsToUint(A); - glm::vec2 C = glm::uintBitsToFloat(B); - Error += B.x == *(glm::uint*)&(A.x) ? 0 : 1; - Error += B.y == *(glm::uint*)&(A.y) ? 0 : 1; - Error += A == C ? 0 : 1; - } - - { - glm::vec3 A(1.0f, 2.0f, 3.0f); - glm::uvec3 B = glm::floatBitsToUint(A); - glm::vec3 C = glm::uintBitsToFloat(B); - Error += B.x == *(glm::uint*)&(A.x) ? 0 : 1; - Error += B.y == *(glm::uint*)&(A.y) ? 0 : 1; - Error += B.z == *(glm::uint*)&(A.z) ? 0 : 1; - Error += A == C? 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 += B.x == *(glm::uint*)&(A.x) ? 0 : 1; - Error += B.y == *(glm::uint*)&(A.y) ? 0 : 1; - Error += B.z == *(glm::uint*)&(A.z) ? 0 : 1; - Error += B.w == *(glm::uint*)&(A.w) ? 0 : 1; - Error += A == C? 0 : 1; - } - - return Error; -} - -namespace test_mix -{ - template - struct test - { - T x; - T y; - B a; - T Result; - }; - - test 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} - }; - - test 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} - }; - - test 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)} - }; - - test 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)} - }; - - test 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)} - }; - - test 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)} - }; - - test 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)} - }; - - test TestBVec4[] = - { - {glm::vec4(0.0f), glm::vec4(1.0f), glm::bvec4(false), glm::vec4(0.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)} - }; - - int run() - { - int Error = 0; - - // Float with bool - { - for(std::size_t i = 0; i < sizeof(TestBool) / sizeof(test); ++i) - { - float Result = glm::mix(TestBool[i].x, TestBool[i].y, TestBool[i].a); - Error += glm::epsilonEqual(Result, TestBool[i].Result, glm::epsilon()) ? 0 : 1; - } - } - - // Float with float - { - for(std::size_t i = 0; i < sizeof(TestFloat) / sizeof(test); ++i) - { - float Result = glm::mix(TestFloat[i].x, TestFloat[i].y, TestFloat[i].a); - Error += glm::epsilonEqual(Result, TestFloat[i].Result, glm::epsilon()) ? 0 : 1; - } - } - - // vec2 with bool - { - for(std::size_t i = 0; i < sizeof(TestVec2Bool) / sizeof(test); ++i) - { - glm::vec2 Result = glm::mix(TestVec2Bool[i].x, TestVec2Bool[i].y, TestVec2Bool[i].a); - Error += glm::epsilonEqual(Result.x, TestVec2Bool[i].Result.x, glm::epsilon()) ? 0 : 1; - Error += glm::epsilonEqual(Result.y, TestVec2Bool[i].Result.y, glm::epsilon()) ? 0 : 1; - } - } - - // vec2 with bvec2 - { - for(std::size_t i = 0; i < sizeof(TestBVec2) / sizeof(test); ++i) - { - glm::vec2 Result = glm::mix(TestBVec2[i].x, TestBVec2[i].y, TestBVec2[i].a); - Error += glm::epsilonEqual(Result.x, TestBVec2[i].Result.x, glm::epsilon()) ? 0 : 1; - Error += glm::epsilonEqual(Result.y, TestBVec2[i].Result.y, glm::epsilon()) ? 0 : 1; - } - } - - // vec3 with bool - { - for(std::size_t i = 0; i < sizeof(TestVec3Bool) / sizeof(test); ++i) - { - glm::vec3 Result = glm::mix(TestVec3Bool[i].x, TestVec3Bool[i].y, TestVec3Bool[i].a); - Error += glm::epsilonEqual(Result.x, TestVec3Bool[i].Result.x, glm::epsilon()) ? 0 : 1; - Error += glm::epsilonEqual(Result.y, TestVec3Bool[i].Result.y, glm::epsilon()) ? 0 : 1; - Error += glm::epsilonEqual(Result.z, TestVec3Bool[i].Result.z, glm::epsilon()) ? 0 : 1; - } - } - - // vec3 with bvec3 - { - for(std::size_t i = 0; i < sizeof(TestBVec3) / sizeof(test); ++i) - { - glm::vec3 Result = glm::mix(TestBVec3[i].x, TestBVec3[i].y, TestBVec3[i].a); - Error += glm::epsilonEqual(Result.x, TestBVec3[i].Result.x, glm::epsilon()) ? 0 : 1; - Error += glm::epsilonEqual(Result.y, TestBVec3[i].Result.y, glm::epsilon()) ? 0 : 1; - Error += glm::epsilonEqual(Result.z, TestBVec3[i].Result.z, glm::epsilon()) ? 0 : 1; - } - } - - // vec4 with bool - { - for(std::size_t i = 0; i < sizeof(TestVec4Bool) / sizeof(test); ++i) - { - glm::vec4 Result = glm::mix(TestVec4Bool[i].x, TestVec4Bool[i].y, TestVec4Bool[i].a); - Error += glm::epsilonEqual(Result.x, TestVec4Bool[i].Result.x, glm::epsilon()) ? 0 : 1; - Error += glm::epsilonEqual(Result.y, TestVec4Bool[i].Result.y, glm::epsilon()) ? 0 : 1; - Error += glm::epsilonEqual(Result.z, TestVec4Bool[i].Result.z, glm::epsilon()) ? 0 : 1; - Error += glm::epsilonEqual(Result.w, TestVec4Bool[i].Result.w, glm::epsilon()) ? 0 : 1; - } - } - - // vec4 with bvec4 - { - for(std::size_t i = 0; i < sizeof(TestBVec4) / sizeof(test); ++i) - { - glm::vec4 Result = glm::mix(TestBVec4[i].x, TestBVec4[i].y, TestBVec4[i].a); - Error += glm::epsilonEqual(Result.x, TestBVec4[i].Result.x, glm::epsilon()) ? 0 : 1; - Error += glm::epsilonEqual(Result.y, TestBVec4[i].Result.y, glm::epsilon()) ? 0 : 1; - Error += glm::epsilonEqual(Result.z, TestBVec4[i].Result.z, glm::epsilon()) ? 0 : 1; - Error += glm::epsilonEqual(Result.w, TestBVec4[i].Result.w, glm::epsilon()) ? 0 : 1; - } - } - - return Error; - } -}//namespace test_mix - -namespace test_step -{ - template - struct test - { - EDGE edge; - VEC x; - VEC result; - }; - - test TestVec4Scalar [] = - { - { 0.0f, glm::vec4(1.0f, 2.0f, 3.0f, 4.0f), glm::vec4(1.0f) }, - { 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(0.0f) } - }; - - test 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) } - }; - - int run() - { - int Error = 0; - - // vec4 and float - { - for (std::size_t i = 0; i < sizeof(TestVec4Scalar) / sizeof(test); ++i) - { - glm::vec4 Result = glm::step(TestVec4Scalar[i].edge, TestVec4Scalar[i].x); - Error += glm::all(glm::epsilonEqual(Result, TestVec4Scalar[i].result, glm::epsilon())) ? 0 : 1; - } - } - - // vec4 and vec4 - { - for (std::size_t i = 0; i < sizeof(TestVec4Vector) / sizeof(test); ++i) - { - glm::vec4 Result = glm::step(TestVec4Vector[i].edge, TestVec4Vector[i].x); - Error += glm::all(glm::epsilonEqual(Result, TestVec4Vector[i].result, glm::epsilon())) ? 0 : 1; - } - } - - return Error; - } -}//namespace test_step - -int test_round() -{ - int Error = 0; - - { - float A = glm::round(0.0f); - Error += A == 0.0f ? 0 : 1; - float B = glm::round(0.5f); - Error += B == 1.0f ? 0 : 1; - float C = glm::round(1.0f); - Error += C == 1.0f ? 0 : 1; - float D = glm::round(0.1f); - Error += D == 0.0f ? 0 : 1; - float E = glm::round(0.9f); - Error += E == 1.0f ? 0 : 1; - float F = glm::round(1.5f); - Error += F == 2.0f ? 0 : 1; - float G = glm::round(1.9f); - Error += G == 2.0f ? 0 : 1; - -#if GLM_LANG >= GLM_LANG_CXX11 - float A1 = glm::round(0.0f); - Error += A1 == A ? 0 : 1; - float B1 = glm::round(0.5f); - Error += B1 == B ? 0 : 1; - float C1 = glm::round(1.0f); - Error += C1 == C ? 0 : 1; - float D1 = glm::round(0.1f); - Error += D1 == D ? 0 : 1; - float E1 = glm::round(0.9f); - Error += E1 == E ? 0 : 1; - float F1 = glm::round(1.5f); - Error += F == F ? 0 : 1; - float G1 = glm::round(1.9f); - Error += G1 == G ? 0 : 1; -#endif // GLM_LANG >= GLM_CXX0X - } - - { - float A = glm::round(-0.0f); - Error += A == 0.0f ? 0 : 1; - float B = glm::round(-0.5f); - Error += B == -1.0f ? 0 : 1; - float C = glm::round(-1.0f); - Error += C == -1.0f ? 0 : 1; - float D = glm::round(-0.1f); - Error += D == 0.0f ? 0 : 1; - float E = glm::round(-0.9f); - Error += E == -1.0f ? 0 : 1; - float F = glm::round(-1.5f); - Error += F == -2.0f ? 0 : 1; - float G = glm::round(-1.9f); - Error += G == -2.0f ? 0 : 1; - } - - return Error; -} - -int test_roundEven() -{ - int Error = 0; - - { - float A = glm::roundEven(-1.5f); - Error += glm::epsilonEqual(A, -2.0f, 0.0001f) ? 0 : 1; - Error += 0; - } - { - float A = glm::roundEven(1.5f); - Error += glm::epsilonEqual(A, 2.0f, 0.0001f) ? 0 : 1; - Error += 0; - } - - { - float A = glm::roundEven(-3.5f); - Error += glm::epsilonEqual(A, -4.0f, 0.0001f) ? 0 : 1; - Error += 0; - } - { - float A = glm::roundEven(3.5f); - Error += glm::epsilonEqual(A, 4.0f, 0.0001f) ? 0 : 1; - Error += 0; - } - - { - float A = glm::roundEven(-2.5f); - Error += glm::epsilonEqual(A, -2.0f, 0.0001f) ? 0 : 1; - Error += 0; - } - { - float A = glm::roundEven(2.5f); - Error += glm::epsilonEqual(A, 2.0f, 0.0001f) ? 0 : 1; - Error += 0; - } - - { - float A = glm::roundEven(-2.4f); - Error += glm::epsilonEqual(A, -2.0f, 0.0001f) ? 0 : 1; - Error += 0; - } - { - float A = glm::roundEven(2.4f); - Error += glm::epsilonEqual(A, 2.0f, 0.0001f) ? 0 : 1; - Error += 0; - } - - { - float A = glm::roundEven(-2.6f); - Error += glm::epsilonEqual(A, -3.0f, 0.0001f) ? 0 : 1; - Error += 0; - } - { - float A = glm::roundEven(2.6f); - Error += glm::epsilonEqual(A, 3.0f, 0.0001f) ? 0 : 1; - Error += 0; - } - - { - float A = glm::roundEven(-2.0f); - Error += glm::epsilonEqual(A, -2.0f, 0.0001f) ? 0 : 1; - Error += 0; - } - { - float A = glm::roundEven(2.0f); - Error += glm::epsilonEqual(A, 2.0f, 0.0001f) ? 0 : 1; - Error += 0; - } - - { - float A = glm::roundEven(0.0f); - Error += A == 0.0f ? 0 : 1; - float B = glm::roundEven(0.5f); - Error += B == 0.0f ? 0 : 1; - float C = glm::roundEven(1.0f); - Error += C == 1.0f ? 0 : 1; - float D = glm::roundEven(0.1f); - Error += D == 0.0f ? 0 : 1; - float E = glm::roundEven(0.9f); - Error += E == 1.0f ? 0 : 1; - float F = glm::roundEven(1.5f); - Error += F == 2.0f ? 0 : 1; - float G = glm::roundEven(1.9f); - Error += G == 2.0f ? 0 : 1; - } - - { - float A = glm::roundEven(-0.0f); - Error += A == 0.0f ? 0 : 1; - float B = glm::roundEven(-0.5f); - Error += B == -0.0f ? 0 : 1; - float C = glm::roundEven(-1.0f); - Error += C == -1.0f ? 0 : 1; - float D = glm::roundEven(-0.1f); - Error += D == 0.0f ? 0 : 1; - float E = glm::roundEven(-0.9f); - Error += E == -1.0f ? 0 : 1; - float F = glm::roundEven(-1.5f); - Error += F == -2.0f ? 0 : 1; - float G = glm::roundEven(-1.9f); - Error += G == -2.0f ? 0 : 1; - } - - { - float A = glm::roundEven(1.5f); - Error += A == 2.0f ? 0 : 1; - float B = glm::roundEven(2.5f); - Error += B == 2.0f ? 0 : 1; - float C = glm::roundEven(3.5f); - Error += C == 4.0f ? 0 : 1; - float D = glm::roundEven(4.5f); - Error += D == 4.0f ? 0 : 1; - float E = glm::roundEven(5.5f); - Error += E == 6.0f ? 0 : 1; - float F = glm::roundEven(6.5f); - Error += F == 6.0f ? 0 : 1; - float G = glm::roundEven(7.5f); - Error += G == 8.0f ? 0 : 1; - } - - { - float A = glm::roundEven(-1.5f); - Error += A == -2.0f ? 0 : 1; - float B = glm::roundEven(-2.5f); - Error += B == -2.0f ? 0 : 1; - float C = glm::roundEven(-3.5f); - Error += C == -4.0f ? 0 : 1; - float D = glm::roundEven(-4.5f); - Error += D == -4.0f ? 0 : 1; - float E = glm::roundEven(-5.5f); - Error += E == -6.0f ? 0 : 1; - float F = glm::roundEven(-6.5f); - Error += F == -6.0f ? 0 : 1; - float G = glm::roundEven(-7.5f); - Error += G == -8.0f ? 0 : 1; - } - - return Error; -} - -int test_isnan() -{ - 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; -} - -int test_isinf() -{ - 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; -} - -int main() -{ - int Error(0); - - Error += test_modf(); - Error += test_floatBitsToInt(); - Error += test_floatBitsToUint(); - Error += test_step::run(); - Error += test_mix::run(); - Error += test_round(); - Error += test_roundEven(); - Error += test_isnan(); - //Error += test_isinf(); - - return Error; -} - diff --git a/Libraries/glm-0.9.5.2/test/core/core_func_exponential.cpp b/Libraries/glm-0.9.5.2/test/core/core_func_exponential.cpp deleted file mode 100644 index 04d0036..0000000 --- a/Libraries/glm-0.9.5.2/test/core/core_func_exponential.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2011-01-15 -// Updated : 2011-09-13 -// Licence : This source is under MIT licence -// File : test/core/func_exponential.cpp -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#define GLM_FORCE_RADIANS -#include -#include -#include - -namespace inversesqrt -{ - int test() - { - int Error(0); - - glm::uint ulp(0); - float diff(0.0f); - - for(float f = 0.001f; f < 10.f; f *= 1.001f) - { - glm::lowp_fvec1 lowp_v = glm::inversesqrt(glm::lowp_fvec1(f)); - float defaultp_v = glm::inversesqrt(f); - - ulp = glm::max(glm::float_distance(lowp_v.x, defaultp_v), ulp); - diff = glm::abs(lowp_v.x - defaultp_v); - } - - return Error; - } -}//namespace inversesqrt - -int main() -{ - int Error(0); - - Error += inversesqrt::test(); - - return Error; -} - diff --git a/Libraries/glm-0.9.5.2/test/core/core_func_geometric.cpp b/Libraries/glm-0.9.5.2/test/core/core_func_geometric.cpp deleted file mode 100644 index 88eb4c7..0000000 --- a/Libraries/glm-0.9.5.2/test/core/core_func_geometric.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2011-01-15 -// Updated : 2011-11-14 -// Licence : This source is under MIT licence -// File : test/core/func_geometric.cpp -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#define GLM_FORCE_RADIANS -#include -#include - -int test_reflect() -{ - 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 += C == glm::vec2(1.0, 1.0) ? 0 : 1; - } - - { - glm::dvec2 A(1.0f,-1.0f); - glm::dvec2 B(0.0f, 1.0f); - glm::dvec2 C = glm::reflect(A, B); - Error += C == glm::dvec2(1.0, 1.0) ? 0 : 1; - } - - return Error; -} - -int test_refract() -{ - int Error = 0; - - { - float A(-1.0f); - float B(1.0f); - float C = glm::refract(A, B, 0.5f); - Error += C == -1.0f ? 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::epsilonEqual(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 += C == glm::dvec2(0.0, -1.0) ? 0 : 1; - } - - return Error; -} - -int main() -{ - int Error(0); - - Error += test_reflect(); - Error += test_refract(); - - return Error; -} - diff --git a/Libraries/glm-0.9.5.2/test/core/core_func_integer.cpp b/Libraries/glm-0.9.5.2/test/core/core_func_integer.cpp deleted file mode 100644 index d1fcec8..0000000 --- a/Libraries/glm-0.9.5.2/test/core/core_func_integer.cpp +++ /dev/null @@ -1,235 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2011-05-03 -// Updated : 2011-05-03 -// Licence : This source is under MIT licence -// File : test/core/func_integer.cpp -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#define GLM_FORCE_RADIANS -#include -#include - -enum result -{ - SUCCESS, - FAIL, - ASSERT, - STATIC_ASSERT -}; - -namespace bitfieldExtract -{ - template - struct type - { - genType Value; - sizeType BitFirst; - sizeType BitCount; - genType Return; - result Result; - }; - - typedef type typeU32; - - typeU32 const Data32[] = - { - {0xffffffff, 8, 0, 0x00000000, SUCCESS}, - {0x00000000, 0,32, 0x00000000, SUCCESS}, - {0xffffffff, 0,32, 0xffffffff, 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 - }; - - int test() - { - 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].BitFirst, - Data32[i].BitCount); - - bool Compare = Data32[i].Return == Return; - - if(Data32[i].Result == SUCCESS && Compare) - continue; - else if(Data32[i].Result == FAIL && !Compare) - continue; - - std::cout << "glm::bitfieldExtract test fail on test " << i << std::endl; - return 1; - } - - return 0; - } -}//extractField - -namespace bitfieldReverse -{ - template - struct type - { - genType Value; - genType Return; - result Result; - }; - - typedef type typeU32; - - typeU32 const Data32[] = - { - {0xffffffff, 0xffffffff, SUCCESS}, - {0x00000000, 0x00000000, SUCCESS}, - {0xf0000000, 0x0000000f, SUCCESS}, - }; - - int test() - { - glm::uint count = sizeof(Data32) / sizeof(typeU32); - - for(glm::uint i = 0; i < count; ++i) - { - glm::uint Return = glm::bitfieldReverse( - Data32[i].Value); - - bool Compare = Data32[i].Return == Return; - - if(Data32[i].Result == SUCCESS && Compare) - continue; - else if(Data32[i].Result == FAIL && !Compare) - continue; - - std::cout << "glm::bitfieldReverse test fail on test " << i << std::endl; - return 1; - } - - return 0; - } -}//bitRevert - -namespace findMSB -{ - template - struct type - { - genType Value; - genType Return; - }; - - type const DataI32[] = - { - {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 test() - { - int Error(0); - - for(std::size_t i = 0; i < sizeof(DataI32) / sizeof(type); ++i) - { - int Result = glm::findMSB(DataI32[i].Value); - Error += DataI32[i].Return == Result ? 0 : 1; - assert(!Error); - } - - return Error; - } -}//findMSB - -namespace findLSB -{ - template - struct type - { - genType Value; - genType Return; - }; - - type const DataI32[] = - { - {0x00000001, 0}, - {0x00000003, 0}, - {0x00000002, 1} - }; - - int test() - { - int Error(0); - - for(std::size_t i = 0; i < sizeof(DataI32) / sizeof(type); ++i) - { - int Result = glm::findLSB(DataI32[i].Value); - Error += DataI32[i].Return == Result ? 0 : 1; - assert(!Error); - } - - return Error; - } -}//findLSB - -int main() -{ - int Error = 0; - - std::cout << "sizeof(glm::uint64): " << sizeof(glm::detail::uint64) << std::endl; - - Error += ::bitfieldExtract::test(); - Error += ::bitfieldReverse::test(); - Error += ::findMSB::test(); - Error += ::findLSB::test(); - - return Error; -} diff --git a/Libraries/glm-0.9.5.2/test/core/core_func_matrix.cpp b/Libraries/glm-0.9.5.2/test/core/core_func_matrix.cpp deleted file mode 100644 index 1b609f3..0000000 --- a/Libraries/glm-0.9.5.2/test/core/core_func_matrix.cpp +++ /dev/null @@ -1,251 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2011-01-15 -// Updated : 2012-05-02 -// Licence : This source is under MIT licence -// File : test/core/func_matrix.cpp -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#define GLM_FORCE_RADIANS -#include -#include -#include -#include -#include -#include - -using namespace glm; - -int test_matrixCompMult() -{ - int Error(0); - - { - mat2 m(0, 1, 2, 3); - mat2 n = matrixCompMult(m, m); - Error += n == mat2(0, 1, 4, 9) ? 0 : 1; - } - - { - mat2x3 m(0, 1, 2, 3, 4, 5); - mat2x3 n = matrixCompMult(m, m); - Error += n == mat2x3(0, 1, 4, 9, 16, 25) ? 0 : 1; - } - - { - mat2x4 m(0, 1, 2, 3, 4, 5, 6, 7); - mat2x4 n = matrixCompMult(m, m); - Error += n == mat2x4(0, 1, 4, 9, 16, 25, 36, 49) ? 0 : 1; - } - - { - mat3 m(0, 1, 2, 3, 4, 5, 6, 7, 8); - mat3 n = matrixCompMult(m, m); - Error += n == mat3(0, 1, 4, 9, 16, 25, 36, 49, 64) ? 0 : 1; - } - - { - mat3x2 m(0, 1, 2, 3, 4, 5); - mat3x2 n = matrixCompMult(m, m); - Error += n == mat3x2(0, 1, 4, 9, 16, 25) ? 0 : 1; - } - - { - mat3x4 m(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); - mat3x4 n = matrixCompMult(m, m); - Error += n == mat3x4(0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121) ? 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); - Error += n == mat4(0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225) ? 0 : 1; - } - - { - mat4x2 m(0, 1, 2, 3, 4, 5, 6, 7); - mat4x2 n = matrixCompMult(m, m); - Error += n == mat4x2(0, 1, 4, 9, 16, 25, 36, 49) ? 0 : 1; - } - - { - mat4x3 m(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); - mat4x3 n = matrixCompMult(m, m); - Error += n == mat4x3(0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121) ? 0 : 1; - } - - return Error; -} - -int test_outerProduct() -{ - glm::mat4 m = glm::outerProduct(glm::vec4(1.0f), glm::vec4(1.0f)); - - return 0; -} - -int test_transpose() -{ - int Error(0); - - { - mat2 m(0, 1, 2, 3); - mat2 t = transpose(m); - Error += t == mat2(0, 2, 1, 3) ? 0 : 1; - } - - { - mat2x3 m(0, 1, 2, 3, 4, 5); - mat3x2 t = transpose(m); - Error += t == mat3x2(0, 3, 1, 4, 2, 5) ? 0 : 1; - } - - { - mat2x4 m(0, 1, 2, 3, 4, 5, 6, 7); - mat4x2 t = transpose(m); - Error += t == mat4x2(0, 4, 1, 5, 2, 6, 3, 7) ? 0 : 1; - } - - { - mat3 m(0, 1, 2, 3, 4, 5, 6, 7, 8); - mat3 t = transpose(m); - Error += t == mat3(0, 3, 6, 1, 4, 7, 2, 5, 8) ? 0 : 1; - } - - { - mat3x2 m(0, 1, 2, 3, 4, 5); - mat2x3 t = transpose(m); - Error += t == mat2x3(0, 2, 4, 1, 3, 5) ? 0 : 1; - } - - { - mat3x4 m(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); - mat4x3 t = transpose(m); - Error += t == mat4x3(0, 4, 8, 1, 5, 9, 2, 6, 10, 3, 7, 11) ? 0 : 1; - } - - { - mat4 m(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); - mat4 t = transpose(m); - Error += t == mat4(0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15) ? 0 : 1; - } - - { - mat4x2 m(0, 1, 2, 3, 4, 5, 6, 7); - mat2x4 t = transpose(m); - Error += t == mat2x4(0, 2, 4, 6, 1, 3, 5, 7) ? 0 : 1; - } - - { - mat4x3 m(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); - mat3x4 t = transpose(m); - Error += t == mat3x4(0, 3, 6, 9, 1, 4, 7, 10, 2, 5, 8, 11) ? 0 : 1; - } - - return Error; -} - -int test_determinant() -{ - - - return 0; -} - -int test_inverse() -{ - int Failed(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; - Failed += I4x4 == glm::mat4x4(1) ? 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; - Failed += I3x3 == glm::mat3x3(1) ? 0 : 1; - - glm::mat2x2 A2x2( - glm::vec2(1, 1), - glm::vec2(0, 1)); - glm::mat2x2 B2x2 = glm::inverse(A2x2); - glm::mat2x2 I2x2 = A2x2 * B2x2; - Failed += I2x2 == glm::mat2x2(1) ? 0 : 1; - - - - return Failed; -} - -std::size_t const Count(10000000); - -template -int test_inverse_perf(std::size_t Instance, char const * Message) -{ - std::vector TestInputs; - TestInputs.resize(Count); - std::vector 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(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); - - printf("inverse<%s>(%f): %d\n", Message, 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(); - for(std::size_t i = 0; i < 1; ++i) - { - Error += test_inverse_perf(i, "mat4"); - Error += test_inverse_perf(i, "dmat4"); - } - return Error; -} - diff --git a/Libraries/glm-0.9.5.2/test/core/core_func_noise.cpp b/Libraries/glm-0.9.5.2/test/core/core_func_noise.cpp deleted file mode 100644 index 5d967a6..0000000 --- a/Libraries/glm-0.9.5.2/test/core/core_func_noise.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2011-01-15 -// Updated : 2011-09-13 -// Licence : This source is under MIT licence -// File : test/core/func_noise.cpp -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#define GLM_FORCE_RADIANS - -int main() -{ - int Failed = 0; - - return Failed; -} - diff --git a/Libraries/glm-0.9.5.2/test/core/core_func_packing.cpp b/Libraries/glm-0.9.5.2/test/core/core_func_packing.cpp deleted file mode 100644 index 4364493..0000000 --- a/Libraries/glm-0.9.5.2/test/core/core_func_packing.cpp +++ /dev/null @@ -1,165 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2011-01-15 -// Updated : 2011-09-13 -// Licence : This source is under MIT licence -// File : test/core/func_packing.cpp -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#define GLM_FORCE_RADIANS -#include -#include -#include -#include -#include - -int test_packUnorm2x16() -{ - int Error = 0; -/* - std::vector A; - A.push_back(glm::hvec2(glm::half( 1.0f), glm::half( 0.0f))); - A.push_back(glm::hvec2(glm::half( 0.5f), glm::half( 0.7f))); - A.push_back(glm::hvec2(glm::half( 0.1f), glm::half( 0.2f))); -*/ - std::vector 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 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; - - std::vector 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 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 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 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 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/Libraries/glm-0.9.5.2/test/core/core_func_swizzle.cpp b/Libraries/glm-0.9.5.2/test/core/core_func_swizzle.cpp deleted file mode 100644 index 1d7a7a8..0000000 --- a/Libraries/glm-0.9.5.2/test/core/core_func_swizzle.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2011-10-16 -// Updated : 2011-10-16 -// Licence : This source is under MIT License -// File : test/core/core_func_swizzle.cpp -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#define GLM_FORCE_RADIANS -#define GLM_MESSAGES -#define GLM_SWIZZLE -#include - -int test_ivec2_swizzle() -{ - int Error = 0; - - 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; - - return Error; -} - -int test_ivec3_swizzle() -{ - int Error = 0; - - 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; - - return Error; -} - -int test_ivec4_swizzle() -{ - int Error = 0; - - 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; - - return Error; -} - -int test_vec4_swizzle() -{ - int Error = 0; - - glm::vec4 A(1, 2, 3, 4); - glm::vec4 B = A.wzyx(); - glm::vec4 C = B.wzyx(); - - float f = glm::dot(C.wzyx(), C.xyzw()); - - Error += A != B ? 0 : 1; - Error += A == C ? 0 : 1; - - 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/Libraries/glm-0.9.5.2/test/core/core_func_trigonometric.cpp b/Libraries/glm-0.9.5.2/test/core/core_func_trigonometric.cpp deleted file mode 100644 index 0dda2a3..0000000 --- a/Libraries/glm-0.9.5.2/test/core/core_func_trigonometric.cpp +++ /dev/null @@ -1,19 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2011-01-15 -// Updated : 2011-09-13 -// Licence : This source is under MIT licence -// File : test/core/func_trigonometric.cpp -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#define GLM_FORCE_RADIANS -#include - -int main() -{ - int Failed = 0; - - return Failed; -} - diff --git a/Libraries/glm-0.9.5.2/test/core/core_func_vector_relational.cpp b/Libraries/glm-0.9.5.2/test/core/core_func_vector_relational.cpp deleted file mode 100644 index 46e64df..0000000 --- a/Libraries/glm-0.9.5.2/test/core/core_func_vector_relational.cpp +++ /dev/null @@ -1,19 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2011-01-15 -// Updated : 2011-09-13 -// Licence : This source is under MIT licence -// File : test/core/vector_relational.cpp -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#define GLM_FORCE_RADIANS -#include - -int main() -{ - int Error(0); - - return Error; -} - diff --git a/Libraries/glm-0.9.5.2/test/core/core_setup_message.cpp b/Libraries/glm-0.9.5.2/test/core/core_setup_message.cpp deleted file mode 100644 index 2d2409e..0000000 --- a/Libraries/glm-0.9.5.2/test/core/core_setup_message.cpp +++ /dev/null @@ -1,260 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2011-05-31 -// Updated : 2013-08-27 -// Licence : This source is under MIT License -// File : test/core/setup_message.cpp -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#define GLM_MESSAGES -#include -#include - -int test_compiler() -{ - int Error(0); - - if(GLM_COMPILER & GLM_COMPILER_VC) - { - std::cout << "GLM_COMPILER_VC" << std::endl; - - switch(GLM_COMPILER) - { - case GLM_COMPILER_VC8: - std::cout << "GLM_COMPILER_VC8" << std::endl; - break; - case GLM_COMPILER_VC9: - std::cout << "GLM_COMPILER_VC9" << std::endl; - break; - case GLM_COMPILER_VC10: - std::cout << "GLM_COMPILER_VC10" << std::endl; - break; - case GLM_COMPILER_VC11: - std::cout << "GLM_COMPILER_VC11" << std::endl; - break; - case GLM_COMPILER_VC12: - std::cout << "GLM_COMPILER_VC12" << std::endl; - break; - default: - std::cout << "Visual C++ version not detected" << std::endl; - Error += 1; - break; - } - } - else if(GLM_COMPILER & GLM_COMPILER_GCC) - { - std::cout << "GLM_COMPILER_GCC" << std::endl; - - switch(GLM_COMPILER) - { - case GLM_COMPILER_GCC34: - std::cout << "GLM_COMPILER_GCC34" << std::endl; - break; - case GLM_COMPILER_GCC35: - std::cout << "GLM_COMPILER_GCC35" << std::endl; - break; - case GLM_COMPILER_GCC40: - std::cout << "GLM_COMPILER_GCC40" << std::endl; - break; - case GLM_COMPILER_GCC41: - std::cout << "GLM_COMPILER_GCC41" << std::endl; - break; - case GLM_COMPILER_GCC42: - std::cout << "GLM_COMPILER_GCC42" << std::endl; - break; - case GLM_COMPILER_GCC43: - std::cout << "GLM_COMPILER_GCC43" << std::endl; - break; - case GLM_COMPILER_GCC44: - std::cout << "GLM_COMPILER_GCC44" << std::endl; - break; - case GLM_COMPILER_GCC45: - std::cout << "GLM_COMPILER_GCC45" << std::endl; - break; - case GLM_COMPILER_GCC46: - std::cout << "GLM_COMPILER_GCC46" << std::endl; - break; - case GLM_COMPILER_GCC47: - std::cout << "GLM_COMPILER_GCC47" << std::endl; - break; - case GLM_COMPILER_GCC48: - std::cout << "GLM_COMPILER_GCC48" << std::endl; - break; - case GLM_COMPILER_GCC49: - std::cout << "GLM_COMPILER_GCC49" << std::endl; - break; - default: - std::cout << "GCC version not detected" << std::endl; - Error += 1; - break; - } - } - else if(GLM_COMPILER & GLM_COMPILER_BC) - { - std::cout << "GLM_COMPILER_BC" << std::endl; - } - else if(GLM_COMPILER & GLM_COMPILER_CODEWARRIOR) - { - std::cout << "GLM_COMPILER_CODEWARRIOR" << std::endl; - } - else if(GLM_COMPILER & GLM_COMPILER_CUDA) - { - std::cout << "GLM_COMPILER_CUDA" << std::endl; - } - else if(GLM_COMPILER & GLM_COMPILER_CLANG) - { -# ifdef __clang_major__ - std::cout << "GLM_COMPILER_CLANG " << __clang_major__ << "." << __clang_minor__ << std::endl; -# endif - switch(GLM_COMPILER) - { - case GLM_COMPILER_CLANG26: - std::cout << "GLM_COMPILER_CLANG26" << std::endl; - break; - case GLM_COMPILER_CLANG27: - std::cout << "GLM_COMPILER_CLANG27" << std::endl; - break; - case GLM_COMPILER_CLANG28: - std::cout << "GLM_COMPILER_CLANG28" << std::endl; - break; - case GLM_COMPILER_CLANG29: - std::cout << "GLM_COMPILER_CLANG29" << std::endl; - break; - case GLM_COMPILER_CLANG30: - std::cout << "GLM_COMPILER_CLANG30" << std::endl; - break; - case GLM_COMPILER_CLANG31: - std::cout << "GLM_COMPILER_CLANG31" << std::endl; - break; - case GLM_COMPILER_CLANG32: - std::cout << "GLM_COMPILER_CLANG32" << std::endl; - break; - case GLM_COMPILER_CLANG33: - std::cout << "GLM_COMPILER_CLANG33" << std::endl; - break; - case GLM_COMPILER_CLANG40: - std::cout << "GLM_COMPILER_CLANG40" << std::endl; - break; - case GLM_COMPILER_CLANG41: - std::cout << "GLM_COMPILER_CLANG41" << std::endl; - break; - case GLM_COMPILER_CLANG42: - std::cout << "GLM_COMPILER_CLANG42" << std::endl; - break; - case GLM_COMPILER_CLANG43: - std::cout << "GLM_COMPILER_CLANG43" << std::endl; - break; - default: - std::cout << "Clang version not detected" << std::endl; - break; - } - } - else if(GLM_COMPILER & GLM_COMPILER_LLVM_GCC) - { - std::cout << "GLM_COMPILER_LLVM_GCC" << std::endl; - - } - else if(GLM_COMPILER & GLM_COMPILER_INTEL) - { - std::cout << "GLM_COMPILER_INTEL" << std::endl; - switch(GLM_COMPILER) - { - case GLM_COMPILER_INTEL9: - std::cout << "GLM_COMPILER_INTEL9" << std::endl; - break; - case GLM_COMPILER_INTEL10_0: - std::cout << "GLM_COMPILER_INTEL10_0" << std::endl; - break; - case GLM_COMPILER_INTEL10_1: - std::cout << "GLM_COMPILER_INTEL10_1" << std::endl; - break; - case GLM_COMPILER_INTEL11_0: - std::cout << "GLM_COMPILER_INTEL11_0" << std::endl; - break; - case GLM_COMPILER_INTEL11_1: - std::cout << "GLM_COMPILER_INTEL11_1" << std::endl; - break; - case GLM_COMPILER_INTEL12_1: - std::cout << "GLM_COMPILER_INTEL12_1" << std::endl; - break; - case GLM_COMPILER_INTEL13_0: - std::cout << "GLM_COMPILER_INTEL13_0" << std::endl; - break; - default: - std::cout << "Intel compiler version not detected" << std::endl; - Error += 1; - break; - } - } - else - { - std::cout << "Undetected compiler" << std::endl; - 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::cout << "GLM_MODEL_32" << std::endl; - else if(GLM_MODEL == GLM_MODEL_64) - std::cout << "GLM_MODEL_64" << std::endl; - - return Error; -} - -int test_cpp_version() -{ - std::cout << "__cplusplus: " << __cplusplus << std::endl; - - return 0; -} - -int test_operators() -{ - glm::vec3 A(1.0f); - glm::vec3 B(1.0f); - bool R = A != B; - bool S = A == B; - - return (S && !R) ? 0 : 1; -} - -template -struct vec -{ - -}; - -template