├── deps ├── glm │ ├── glm │ │ ├── gtx │ │ │ ├── type_trait.inl │ │ │ ├── raw_data.inl │ │ │ ├── type_aligned.inl │ │ │ ├── std_based_type.inl │ │ │ ├── number_precision.inl │ │ │ ├── projection.inl │ │ │ ├── perpendicular.inl │ │ │ ├── mixed_product.inl │ │ │ ├── normal.inl │ │ │ ├── float_notmalize.inl │ │ │ ├── optimum_pow.inl │ │ │ ├── log_base.inl │ │ │ ├── normalize_dot.inl │ │ │ ├── transform.inl │ │ │ ├── handed_coordinate_space.inl │ │ │ ├── orthonormalize.inl │ │ │ ├── scalar_relational.hpp │ │ │ ├── matrix_cross_product.inl │ │ │ ├── projection.hpp │ │ │ ├── polar_coordinates.inl │ │ │ ├── mixed_product.hpp │ │ │ ├── extend.hpp │ │ │ ├── normal.hpp │ │ │ ├── perpendicular.hpp │ │ │ ├── gradient_paint.inl │ │ │ ├── extend.inl │ │ │ ├── log_base.hpp │ │ │ ├── raw_data.hpp │ │ │ ├── matrix_cross_product.hpp │ │ │ ├── orthonormalize.hpp │ │ │ ├── polar_coordinates.hpp │ │ │ ├── closest_point.hpp │ │ │ ├── optimum_pow.hpp │ │ │ ├── closest_point.inl │ │ │ ├── matrix_decompose.hpp │ │ │ ├── string_cast.hpp │ │ │ ├── gradient_paint.hpp │ │ │ ├── wrap.hpp │ │ │ ├── handed_coordinate_space.hpp │ │ │ ├── scalar_relational.inl │ │ │ ├── normalize_dot.hpp │ │ │ ├── spline.hpp │ │ │ ├── transform.hpp │ │ │ ├── matrix_transform_2d.inl │ │ │ ├── vector_angle.inl │ │ │ └── compatibility.inl │ │ ├── detail │ │ │ ├── func_trigonometric_simd.inl │ │ │ ├── type_vec.inl │ │ │ ├── type_mat.inl │ │ │ ├── type_mat4x4_simd.inl │ │ │ ├── func_packing_simd.inl │ │ │ ├── func_vector_relational_simd.inl │ │ │ ├── type_half.hpp │ │ │ ├── _fixes.hpp │ │ │ ├── func_exponential_simd.inl │ │ │ └── precision.hpp │ │ ├── gtc │ │ │ ├── vec1.inl │ │ │ ├── type_precision.inl │ │ │ ├── functions.inl │ │ │ ├── functions.hpp │ │ │ ├── matrix_access.inl │ │ │ ├── matrix_inverse.hpp │ │ │ └── matrix_access.hpp │ │ ├── vec2.hpp │ │ ├── vec3.hpp │ │ ├── vec4.hpp │ │ ├── common.hpp │ │ ├── matrix.hpp │ │ ├── integer.hpp │ │ ├── packing.hpp │ │ ├── geometric.hpp │ │ ├── exponential.hpp │ │ ├── trigonometric.hpp │ │ ├── vector_relational.hpp │ │ ├── simd │ │ │ ├── packing.h │ │ │ ├── vector_relational.h │ │ │ ├── trigonometric.h │ │ │ └── exponential.h │ │ ├── mat3x2.hpp │ │ ├── mat2x4.hpp │ │ ├── mat3x4.hpp │ │ ├── mat4x2.hpp │ │ ├── mat4x3.hpp │ │ └── mat2x3.hpp │ ├── test │ │ ├── bug │ │ │ ├── CMakeLists.txt │ │ │ └── bug_ms_vec_static.cpp │ │ ├── external │ │ │ └── gli │ │ │ │ ├── core │ │ │ │ ├── dummy.cpp │ │ │ │ ├── generate_mipmaps.hpp │ │ │ │ ├── operator.hpp │ │ │ │ ├── size.hpp │ │ │ │ ├── shared_ptr.hpp │ │ │ │ ├── size.inl │ │ │ │ └── shared_array.hpp │ │ │ │ ├── gtx │ │ │ │ ├── wavelet.inl │ │ │ │ ├── compression.inl │ │ │ │ ├── wavelet.hpp │ │ │ │ ├── compression.hpp │ │ │ │ ├── loader_dds10.hpp │ │ │ │ ├── loader_tga.hpp │ │ │ │ ├── gl_texture2d.hpp │ │ │ │ ├── loader.hpp │ │ │ │ ├── loader_dds9.hpp │ │ │ │ ├── gradient.hpp │ │ │ │ ├── loader.inl │ │ │ │ └── fetch.hpp │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── gli.hpp │ │ ├── gtc │ │ │ ├── gtc_quaternion.cpp │ │ │ ├── gtc_vec1.cpp │ │ │ ├── gtc_reciprocal.cpp │ │ │ ├── gtc_matrix_integer.cpp │ │ │ ├── gtc_constants.cpp │ │ │ ├── CMakeLists.txt │ │ │ ├── gtc_functions.cpp │ │ │ ├── gtc_user_defined_types.cpp │ │ │ ├── gtc_matrix_transform.cpp │ │ │ ├── gtc_matrix_inverse.cpp │ │ │ └── gtc_color_space.cpp │ │ ├── gtx │ │ │ ├── gtx_norm.cpp │ │ │ ├── gtx_extend.cpp │ │ │ ├── gtx_normal.cpp │ │ │ ├── gtx_intersect.cpp │ │ │ ├── gtx_projection.cpp │ │ │ ├── gtx_closest_point.cpp │ │ │ ├── gtx_normalize_dot.cpp │ │ │ ├── gtx_optimum_pow.cpp │ │ │ ├── gtx_perpendicular.cpp │ │ │ ├── gtx_orthonormalize.cpp │ │ │ ├── gtx_color_space_YCoCg.cpp │ │ │ ├── gtx_extended_min_max.cpp │ │ │ ├── gtx_fast_exponential.cpp │ │ │ ├── gtx_matrix_operation.cpp │ │ │ ├── gtx_number_precision.cpp │ │ │ ├── gtx_polar_coordinates.cpp │ │ │ ├── gtx_matrix_cross_product.cpp │ │ │ ├── gtx_matrix_major_storage.cpp │ │ │ ├── gtx_matrix_transform_2d.cpp │ │ │ ├── gtx_handed_coordinate_space.cpp │ │ │ ├── gtx_rotate_normalized_axis.cpp │ │ │ ├── gtx_matrix_interpolation.cpp │ │ │ ├── gtx_type_trait.cpp │ │ │ ├── gtx_associated_min_max.cpp │ │ │ ├── gtx_color_space.cpp │ │ │ ├── gtx_matrix_decompose.cpp │ │ │ ├── gtx_compatibility.cpp │ │ │ ├── gtx_gradient_paint.cpp │ │ │ ├── gtx_int_10_10_10_2.cpp │ │ │ ├── gtx_mixed_product.cpp │ │ │ ├── gtx_scalar_multiplication.cpp │ │ │ ├── gtx_range.cpp │ │ │ ├── gtx_matrix_query.cpp │ │ │ ├── gtx_log_base.cpp │ │ │ ├── gtx_integer.cpp │ │ │ └── gtx_vector_query.cpp │ │ ├── core │ │ │ ├── core_func_trigonometric.cpp │ │ │ ├── core_setup_force_cxx98.cpp │ │ │ ├── core_force_unrestricted_gentype.cpp │ │ │ ├── core_func_noise.cpp │ │ │ ├── core_type_float.cpp │ │ │ ├── core_func_vector_relational.cpp │ │ │ ├── core_type_int.cpp │ │ │ ├── core_func_swizzle.cpp │ │ │ └── CMakeLists.txt │ │ ├── glm.cppcheck │ │ └── CMakeLists.txt │ ├── cmake │ │ ├── glm.pc.in │ │ ├── glmBuildConfig.cmake.in │ │ └── glmConfig.cmake.in │ ├── util │ │ └── autoexp.txt │ └── .gitignore ├── glfw │ ├── .DS_Store │ ├── deps │ │ └── .DS_Store │ ├── CMake │ │ ├── glfw3Config.cmake.in │ │ ├── glfw3.pc.in │ │ ├── modules │ │ │ ├── FindOSMesa.cmake │ │ │ └── FindEpollShim.cmake │ │ ├── i686-w64-mingw32.cmake │ │ ├── i686-w64-mingw32-clang.cmake │ │ ├── x86_64-w64-mingw32.cmake │ │ ├── x86_64-w64-mingw32-clang.cmake │ │ ├── cmake_uninstall.cmake.in │ │ ├── Info.plist.in │ │ └── GenerateMappings.cmake │ ├── src │ │ ├── glfw.rc.in │ │ ├── xkb_unicode.h │ │ ├── cocoa_time.h │ │ ├── null_joystick.h │ │ ├── win32_time.h │ │ ├── posix_time.h │ │ └── posix_thread.h │ ├── LICENSE.md │ └── cmake_uninstall.cmake.in ├── glew │ ├── doc │ │ ├── new.png │ │ ├── github.png │ │ ├── glew.png │ │ ├── ogl_sm.jpg │ │ ├── travis.png │ │ ├── khronos.txt │ │ ├── mesa.txt │ │ └── glew.txt │ └── build │ │ ├── glew.rc │ │ ├── glewinfo.rc │ │ └── visualinfo.rc ├── glob │ ├── CMakeLists.txt │ └── glob.h ├── stb │ └── CMakeLists.txt ├── skymodel │ └── CMakeLists.txt └── CMakeLists.txt ├── .github └── FUNDING.yml ├── include └── ada │ ├── time.h │ ├── gl │ ├── textureBump.h │ ├── textureCube.h │ ├── pingpong.h │ ├── textureStreamAudio.h │ ├── textureStreamSequence.h │ ├── textureStreamOMX.h │ ├── textureProps.h │ ├── vertexLayout.h │ ├── textureStreamMMAL.h │ ├── convolutionPyramid.h │ ├── defines.h │ ├── fbo.h │ └── texture.h │ ├── scene │ └── material.h │ ├── shaders │ ├── defaultShaders.h │ ├── default_error.h │ ├── billboard.h │ └── cubemap.h │ ├── fs.h │ ├── devices │ └── holoPlay.h │ └── geom │ └── meshes.h ├── .gitignore ├── src ├── scene │ └── material.cpp ├── time.cpp ├── gl │ ├── pingpong.cpp │ └── textureProps.cpp └── geom │ └── line.cpp ├── CMakeLists.txt ├── cmake ├── FindILCLIENT.cmake ├── FindOMAX.cmake ├── FindGLESv2.cmake ├── FindDRM.cmake └── FindEGL.cmake ├── LICENSE └── .travis.yml /deps/glm/glm/gtx/type_trait.inl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /deps/glm/glm/detail/func_trigonometric_simd.inl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /deps/glm/test/bug/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | glmCreateTestGTC(bug_ms_vec_static) 2 | -------------------------------------------------------------------------------- /deps/glm/test/external/gli/core/dummy.cpp: -------------------------------------------------------------------------------- 1 | int main() 2 | { 3 | 4 | } 5 | -------------------------------------------------------------------------------- /deps/glm/glm/gtc/vec1.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_vec1 2 | /// @file glm/gtc/vec1.inl 3 | -------------------------------------------------------------------------------- /deps/glm/glm/detail/type_vec.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/type_vec.inl 3 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/raw_data.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_raw_data 2 | /// @file glm/gtx/raw_data.inl 3 | -------------------------------------------------------------------------------- /deps/glfw/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patriciogonzalezvivo/ada/HEAD/deps/glfw/.DS_Store -------------------------------------------------------------------------------- /deps/glm/glm/detail/type_mat.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/type_mat.inl 3 | 4 | -------------------------------------------------------------------------------- /deps/glew/doc/new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patriciogonzalezvivo/ada/HEAD/deps/glew/doc/new.png -------------------------------------------------------------------------------- /deps/glew/build/glew.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patriciogonzalezvivo/ada/HEAD/deps/glew/build/glew.rc -------------------------------------------------------------------------------- /deps/glew/doc/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patriciogonzalezvivo/ada/HEAD/deps/glew/doc/github.png -------------------------------------------------------------------------------- /deps/glew/doc/glew.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patriciogonzalezvivo/ada/HEAD/deps/glew/doc/glew.png -------------------------------------------------------------------------------- /deps/glew/doc/ogl_sm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patriciogonzalezvivo/ada/HEAD/deps/glew/doc/ogl_sm.jpg -------------------------------------------------------------------------------- /deps/glew/doc/travis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patriciogonzalezvivo/ada/HEAD/deps/glew/doc/travis.png -------------------------------------------------------------------------------- /deps/glfw/deps/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patriciogonzalezvivo/ada/HEAD/deps/glfw/deps/.DS_Store -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [patriciogonzalezvivo] 4 | -------------------------------------------------------------------------------- /deps/glew/build/glewinfo.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patriciogonzalezvivo/ada/HEAD/deps/glew/build/glewinfo.rc -------------------------------------------------------------------------------- /deps/glew/build/visualinfo.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patriciogonzalezvivo/ada/HEAD/deps/glew/build/visualinfo.rc -------------------------------------------------------------------------------- /deps/glob/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(glob CXX) 2 | set (CMAKE_CXX_STANDARD 14) 3 | add_library(glob STATIC glob.cpp glob.h) 4 | -------------------------------------------------------------------------------- /deps/glm/test/gtc/gtc_quaternion.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patriciogonzalezvivo/ada/HEAD/deps/glm/test/gtc/gtc_quaternion.cpp -------------------------------------------------------------------------------- /deps/glm/glm/vec2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec2.hpp 3 | 4 | #pragma once 5 | 6 | #include "detail/type_vec2.hpp" 7 | -------------------------------------------------------------------------------- /deps/glm/glm/vec3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec3.hpp 3 | 4 | #pragma once 5 | 6 | #include "detail/type_vec3.hpp" 7 | -------------------------------------------------------------------------------- /deps/glm/glm/vec4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec4.hpp 3 | 4 | #pragma once 5 | 6 | #include "detail/type_vec4.hpp" 7 | -------------------------------------------------------------------------------- /include/ada/time.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace ada { 6 | 7 | void sleep_ms(uint64_t value); 8 | 9 | } -------------------------------------------------------------------------------- /deps/glm/glm/common.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/common.hpp 3 | 4 | #pragma once 5 | 6 | #include "detail/func_common.hpp" 7 | -------------------------------------------------------------------------------- /deps/glm/glm/gtc/type_precision.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_swizzle 2 | /// @file glm/gtc/swizzle.inl 3 | 4 | namespace glm 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /deps/glm/glm/matrix.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/matrix.hpp 3 | 4 | #pragma once 5 | 6 | #include "detail/func_matrix.hpp" 7 | -------------------------------------------------------------------------------- /deps/glm/glm/integer.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/integer.hpp 3 | 4 | #pragma once 5 | 6 | #include "detail/func_integer.hpp" 7 | -------------------------------------------------------------------------------- /deps/glm/glm/packing.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/packing.hpp 3 | 4 | #pragma once 5 | 6 | #include "detail/func_packing.hpp" 7 | -------------------------------------------------------------------------------- /deps/glm/test/gtc/gtc_vec1.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error = 0; 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_norm.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error(0); 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /deps/glm/glm/geometric.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/geometric.hpp 3 | 4 | #pragma once 5 | 6 | #include "detail/func_geometric.hpp" 7 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/type_aligned.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_type_aligned 2 | /// @file glm/gtc/type_aligned.inl 3 | 4 | namespace glm 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_extend.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error(0); 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_normal.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error(0); 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /deps/glm/glm/exponential.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/exponential.hpp 3 | 4 | #pragma once 5 | 6 | #include "detail/func_exponential.hpp" 7 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/std_based_type.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_std_based_type 2 | /// @file glm/gtx/std_based_type.inl 3 | 4 | namespace glm 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /deps/glm/test/gtc/gtc_reciprocal.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | return 0; 7 | } 8 | 9 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_intersect.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error(0); 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_projection.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error(0); 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /deps/glfw/CMake/glfw3Config.cmake.in: -------------------------------------------------------------------------------- 1 | include(CMakeFindDependencyMacro) 2 | find_dependency(Threads) 3 | include("${CMAKE_CURRENT_LIST_DIR}/glfw3Targets.cmake") 4 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/number_precision.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_number_precision 2 | /// @file glm/gtx/number_precision.inl 3 | 4 | namespace glm 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /deps/glm/glm/trigonometric.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/trigonometric.hpp 3 | 4 | #pragma once 5 | 6 | #include "detail/func_trigonometric.hpp" 7 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_closest_point.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error(0); 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_normalize_dot.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error(0); 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_optimum_pow.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error(0); 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_perpendicular.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error(0); 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /deps/glm/glm/detail/type_mat4x4_simd.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/type_mat4x4_sse2.inl 3 | 4 | namespace glm 5 | { 6 | 7 | }//namespace glm 8 | -------------------------------------------------------------------------------- /deps/glm/test/gtc/gtc_matrix_integer.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error = 0; 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_orthonormalize.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error(0); 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_color_space_YCoCg.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error(0); 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_extended_min_max.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error(0); 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_fast_exponential.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error(0); 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_matrix_operation.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error(0); 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_number_precision.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error(0); 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_polar_coordinates.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error(0); 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /deps/glm/glm/vector_relational.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vector_relational.hpp 3 | 4 | #pragma once 5 | 6 | #include "detail/func_vector_relational.hpp" 7 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_matrix_cross_product.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error(0); 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_matrix_major_storage.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error(0); 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_matrix_transform_2d.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error(0); 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_handed_coordinate_space.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error(0); 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_rotate_normalized_axis.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error(0); 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /deps/glm/test/core/core_func_trigonometric.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error = 0; 6 | 7 | 8 | return Error; 9 | } 10 | 11 | -------------------------------------------------------------------------------- /deps/glm/test/glm.cppcheck: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /deps/glm/glm/simd/packing.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/packing.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_matrix_interpolation.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error(0); 6 | 7 | return Error; 8 | } 9 | 10 | 11 | -------------------------------------------------------------------------------- /deps/glm/cmake/glm.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | includedir=${prefix}/include 3 | 4 | Name: GLM 5 | Description: OpenGL Mathematics 6 | Version: @GLM_VERSION@ 7 | Cflags: -I${includedir} 8 | -------------------------------------------------------------------------------- /deps/glm/glm/simd/vector_relational.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/vector_relational.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_type_trait.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int Error = 0; 7 | 8 | 9 | 10 | return Error; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /deps/glm/glm/detail/func_packing_simd.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/func_packing_simd.inl 3 | 4 | namespace glm{ 5 | namespace detail 6 | { 7 | 8 | }//namespace detail 9 | }//namespace glm 10 | -------------------------------------------------------------------------------- /deps/glm/glm/simd/trigonometric.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/trigonometric.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | 10 | -------------------------------------------------------------------------------- /deps/glm/test/core/core_setup_force_cxx98.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_FORCE_CXX98 2 | #include 3 | #include 4 | 5 | int main() 6 | { 7 | int Error = 0; 8 | 9 | return Error; 10 | } 11 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_associated_min_max.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int Error(0); 7 | 8 | return Error; 9 | } 10 | -------------------------------------------------------------------------------- /deps/glm/test/core/core_force_unrestricted_gentype.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_FORCE_UNRESTRICTED_GENTYPE 2 | 3 | #include 4 | 5 | int main() 6 | { 7 | int Error = 0; 8 | 9 | return Error; 10 | } 11 | 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | 3 | # glfw 4 | glfw_config.h 5 | glfw3.pc 6 | 7 | # Visual Studio 2019 8 | *.sln 9 | *.vcxproj 10 | *.vcxproj.filters 11 | Debug/ 12 | Release/ 13 | 14 | # CMake 15 | *.cmake 16 | CMakeFiles/ 17 | *.stamp 18 | -------------------------------------------------------------------------------- /deps/glm/glm/detail/func_vector_relational_simd.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/func_vector_relational_simd.inl 3 | 4 | namespace glm{ 5 | namespace detail 6 | { 7 | 8 | }//namespace detail 9 | }//namespace glm 10 | -------------------------------------------------------------------------------- /include/ada/gl/textureBump.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "texture.h" 4 | 5 | namespace ada { 6 | 7 | class TextureBump : public Texture { 8 | public: 9 | virtual bool load(const std::string& _filepath, bool _vFlip); 10 | }; 11 | 12 | } -------------------------------------------------------------------------------- /deps/glm/cmake/glmBuildConfig.cmake.in: -------------------------------------------------------------------------------- 1 | set(GLM_VERSION "@GLM_VERSION@") 2 | set(GLM_INCLUDE_DIRS "@CMAKE_CURRENT_SOURCE_DIR@") 3 | 4 | if (NOT CMAKE_VERSION VERSION_LESS "3.0") 5 | include("${CMAKE_CURRENT_LIST_DIR}/glmTargets.cmake") 6 | endif() 7 | -------------------------------------------------------------------------------- /deps/stb/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(stb CXX) 2 | set(STB_HEADERS stb_image.h stb_image_write.h) 3 | set(STB_SOURCES stb_image.cpp stb_image_write.cpp) 4 | 5 | set_source_files_properties(${STB_SOURCES} PROPERTIES LANGUAGE CXX) 6 | add_library(stb STATIC ${STB_SOURCES} ${STB_HEADERS}) -------------------------------------------------------------------------------- /deps/glm/test/bug/bug_ms_vec_static.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_FORCE_SWIZZLE 2 | #include 3 | 4 | struct Foo 5 | { 6 | static glm::vec2 Bar; 7 | }; 8 | 9 | glm::vec2 Foo::Bar = glm::vec2(1.f, 1.f); 10 | 11 | int main() 12 | { 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /deps/glm/cmake/glmConfig.cmake.in: -------------------------------------------------------------------------------- 1 | set(GLM_VERSION "@GLM_VERSION@") 2 | 3 | @PACKAGE_INIT@ 4 | 5 | set_and_check(GLM_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@") 6 | 7 | if (NOT CMAKE_VERSION VERSION_LESS "3.0") 8 | include("${CMAKE_CURRENT_LIST_DIR}/glmTargets.cmake") 9 | endif() 10 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/projection.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_projection 2 | /// @file glm/gtx/projection.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER vecType proj(vecType const & x, vecType const & Normal) 8 | { 9 | return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal; 10 | } 11 | }//namespace glm 12 | -------------------------------------------------------------------------------- /deps/glm/test/core/core_func_noise.cpp: -------------------------------------------------------------------------------- 1 | struct vec4 2 | { 3 | static int length(); 4 | }; 5 | 6 | int vec4::length() 7 | { 8 | return 4; 9 | } 10 | 11 | int main() 12 | { 13 | int Failed = 0; 14 | 15 | vec4 V; 16 | 17 | int LengthA = V.length(); 18 | int LengthB = vec4::length(); 19 | 20 | return Failed; 21 | } 22 | 23 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/perpendicular.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_perpendicular 2 | /// @file glm/gtx/perpendicular.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER vecType perp 8 | ( 9 | vecType const & x, 10 | vecType const & Normal 11 | ) 12 | { 13 | return x - proj(x, Normal); 14 | } 15 | }//namespace glm 16 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_color_space.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int test_saturation() 4 | { 5 | int Error(0); 6 | 7 | glm::vec4 Color = glm::saturation(1.0f, glm::vec4(1.0, 0.5, 0.0, 1.0)); 8 | 9 | return Error; 10 | } 11 | 12 | int main() 13 | { 14 | int Error(0); 15 | 16 | Error += test_saturation(); 17 | 18 | return Error; 19 | } 20 | -------------------------------------------------------------------------------- /src/scene/material.cpp: -------------------------------------------------------------------------------- 1 | #include "ada/scene/material.h" 2 | #include "ada/string.h" 3 | 4 | namespace ada { 5 | 6 | Material::Material():name("default") { 7 | } 8 | 9 | Material::~Material() { 10 | } 11 | 12 | void Material::feedProperties(Shader& _shader) const { 13 | _shader.addDefine( "MATERIAL_NAME_" + toUpper(name) ); 14 | _shader.mergeDefines( m_defines ); 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.2) 2 | 3 | project(ada) 4 | 5 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/") 6 | 7 | if (NO_X11 OR FORCE_GBM) 8 | add_compile_options(-std=c++14 -DGLM_FORCE_CXX14 -fpermissive -Wno-psabi) 9 | endif() 10 | 11 | # The compiled library code is here 12 | add_subdirectory(deps) 13 | add_subdirectory(src) 14 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/mixed_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_mixed_product 2 | /// @file glm/gtx/mixed_product.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER T mixedProduct 8 | ( 9 | tvec3 const & v1, 10 | tvec3 const & v2, 11 | tvec3 const & v3 12 | ) 13 | { 14 | return dot(cross(v1, v2), v3); 15 | } 16 | }//namespace glm 17 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/normal.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normal 2 | /// @file glm/gtx/normal.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER tvec3 triangleNormal 8 | ( 9 | tvec3 const & p1, 10 | tvec3 const & p2, 11 | tvec3 const & p3 12 | ) 13 | { 14 | return normalize(cross(p1 - p2, p1 - p3)); 15 | } 16 | }//namespace glm 17 | -------------------------------------------------------------------------------- /deps/skymodel/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(skymodel) 2 | 3 | set(SKYMODEL_HEADERS 4 | ArHosekSkyModel.h 5 | ArHosekSkyModelData_CIEXYZ.h 6 | ArHosekSkyModelData_RGB.h 7 | ArHosekSkyModelData_Spectral.h) 8 | 9 | set(SKYMODEL_SOURCES 10 | ArHosekSkyModel.cpp 11 | ) 12 | 13 | set_source_files_properties(${SKYMODEL_SOURCES} PROPERTIES LANGUAGE CXX) 14 | add_library(skymodel STATIC ${SKYMODEL_SOURCES} ${SKYMODEL_HEADERS}) -------------------------------------------------------------------------------- /deps/glm/glm/detail/type_half.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/type_half.hpp 3 | 4 | #pragma once 5 | 6 | #include "setup.hpp" 7 | 8 | namespace glm{ 9 | namespace detail 10 | { 11 | typedef short hdata; 12 | 13 | GLM_FUNC_DECL float toFloat32(hdata value); 14 | GLM_FUNC_DECL hdata toFloat16(float const & value); 15 | 16 | }//namespace detail 17 | }//namespace glm 18 | 19 | #include "type_half.inl" 20 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_matrix_decompose.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error(0); 6 | 7 | glm::mat4 Matrix(1); 8 | 9 | glm::vec3 Scale; 10 | glm::quat Orientation; 11 | glm::vec3 Translation; 12 | glm::vec3 Skew(1); 13 | glm::vec4 Perspective(1); 14 | 15 | glm::decompose(Matrix, Scale, Orientation, Translation, Skew, Perspective); 16 | 17 | return Error; 18 | } 19 | -------------------------------------------------------------------------------- /src/time.cpp: -------------------------------------------------------------------------------- 1 | #include "ada/time.h" 2 | 3 | #ifdef _WIN32 4 | #define NOMINMAX 5 | #include 6 | #include 7 | #include 8 | #else 9 | #include 10 | #endif 11 | 12 | namespace ada { 13 | 14 | void sleep_ms(uint64_t value) { 15 | #if defined(_WIN32) 16 | std::this_thread::sleep_for(std::chrono::microseconds(value)); 17 | #else 18 | usleep(value); 19 | #endif 20 | 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /deps/glm/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | function(glmCreateTestGTC NAME) 2 | if(GLM_TEST_ENABLE) 3 | set(SAMPLE_NAME test-${NAME}) 4 | add_executable(${SAMPLE_NAME} ${NAME}.cpp) 5 | 6 | add_test( 7 | NAME ${SAMPLE_NAME} 8 | COMMAND $ ) 9 | endif(GLM_TEST_ENABLE) 10 | endfunction() 11 | 12 | add_subdirectory(bug) 13 | add_subdirectory(core) 14 | add_subdirectory(gtc) 15 | add_subdirectory(gtx) 16 | 17 | 18 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/float_notmalize.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_float_normalize 2 | /// @file glm/gtx/float_normalize.inl 3 | 4 | #include 5 | 6 | namespace glm 7 | { 8 | template class vecType> 9 | GLM_FUNC_QUALIFIER vecType floatNormalize(vecType const & v) 10 | { 11 | return vecType(v) / static_cast(std::numeric_limits::max()); 12 | } 13 | 14 | }//namespace glm 15 | -------------------------------------------------------------------------------- /deps/glfw/CMake/glfw3.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 4 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 5 | 6 | Name: GLFW 7 | Description: A multi-platform library for OpenGL, window and input 8 | Version: @GLFW_VERSION@ 9 | URL: https://www.glfw.org/ 10 | Requires.private: @GLFW_PKG_CONFIG_REQUIRES_PRIVATE@ 11 | Libs: -L${libdir} -l@GLFW_LIB_NAME@ 12 | Libs.private: @GLFW_PKG_CONFIG_LIBS_PRIVATE@ 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /include/ada/scene/material.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include "glm/glm.hpp" 6 | 7 | #include "ada/fs.h" 8 | #include "ada/gl/shader.h" 9 | 10 | namespace ada { 11 | 12 | class Material : public HaveDefines { 13 | public: 14 | Material(); 15 | virtual ~Material(); 16 | 17 | void feedProperties(Shader& _shader) const; 18 | 19 | std::string name; 20 | 21 | }; 22 | 23 | typedef std::map Materials; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /deps/glm/glm/simd/exponential.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/experimental.h 3 | 4 | #pragma once 5 | 6 | #include "platform.h" 7 | 8 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | 10 | GLM_FUNC_QUALIFIER glm_vec4 glm_vec1_sqrt_lowp(glm_vec4 x) 11 | { 12 | return _mm_mul_ss(_mm_rsqrt_ss(x), x); 13 | } 14 | 15 | GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_sqrt_lowp(glm_vec4 x) 16 | { 17 | return _mm_mul_ps(_mm_rsqrt_ps(x), x); 18 | } 19 | 20 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 21 | -------------------------------------------------------------------------------- /include/ada/gl/textureCube.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "texture.h" 5 | #include "glm/glm.hpp" 6 | 7 | #include "ada/scene/sky.h" 8 | 9 | namespace ada { 10 | 11 | class TextureCube : public Texture { 12 | public: 13 | TextureCube(); 14 | virtual ~TextureCube(); 15 | 16 | virtual bool load(SkyData* _skyData, int _width = 1024 ); 17 | virtual bool load(const std::string &_fileName, bool _vFlip = true); 18 | 19 | virtual void bind(); 20 | 21 | glm::vec3 SH[9]; 22 | }; 23 | 24 | } -------------------------------------------------------------------------------- /deps/glfw/CMake/modules/FindOSMesa.cmake: -------------------------------------------------------------------------------- 1 | # Try to find OSMesa on a Unix system 2 | # 3 | # This will define: 4 | # 5 | # OSMESA_LIBRARIES - Link these to use OSMesa 6 | # OSMESA_INCLUDE_DIR - Include directory for OSMesa 7 | # 8 | # Copyright (c) 2014 Brandon Schaefer 9 | 10 | if (NOT WIN32) 11 | 12 | find_package (PkgConfig) 13 | pkg_check_modules (PKG_OSMESA QUIET osmesa) 14 | 15 | set (OSMESA_INCLUDE_DIR ${PKG_OSMESA_INCLUDE_DIRS}) 16 | set (OSMESA_LIBRARIES ${PKG_OSMESA_LIBRARIES}) 17 | 18 | endif () 19 | -------------------------------------------------------------------------------- /deps/glm/test/external/gli/gtx/wavelet.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-01-09 5 | // Updated : 2010-01-09 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/wavelet.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | -------------------------------------------------------------------------------- /deps/glm/test/gtc/gtc_constants.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int test_epsilon() 4 | { 5 | int Error(0); 6 | 7 | { 8 | float Test = glm::epsilon(); 9 | } 10 | 11 | { 12 | double Test = glm::epsilon(); 13 | } 14 | 15 | return Error; 16 | } 17 | 18 | int main() 19 | { 20 | int Error(0); 21 | 22 | //float MinHalf = 0.0f; 23 | //while (glm::half(MinHalf) == glm::half(0.0f)) 24 | // MinHalf += std::numeric_limits::epsilon(); 25 | Error += test_epsilon(); 26 | 27 | return Error; 28 | } 29 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/optimum_pow.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_optimum_pow 2 | /// @file glm/gtx/optimum_pow.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER genType pow2(genType const & x) 8 | { 9 | return x * x; 10 | } 11 | 12 | template 13 | GLM_FUNC_QUALIFIER genType pow3(genType const & x) 14 | { 15 | return x * x * x; 16 | } 17 | 18 | template 19 | GLM_FUNC_QUALIFIER genType pow4(genType const & x) 20 | { 21 | return (x * x) * (x * x); 22 | } 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /deps/glm/test/external/gli/gtx/compression.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-12-19 5 | // Updated : 2010-01-09 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/compression.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/log_base.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_log_base 2 | /// @file glm/gtx/log_base.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER genType log(genType const & x, genType const & base) 8 | { 9 | assert(x != genType(0)); 10 | return glm::log(x) / glm::log(base); 11 | } 12 | 13 | template class vecType> 14 | GLM_FUNC_QUALIFIER vecType log(vecType const & x, vecType const & base) 15 | { 16 | return glm::log(x) / glm::log(base); 17 | } 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /deps/glm/util/autoexp.txt: -------------------------------------------------------------------------------- 1 | [Visualizer] 2 | 3 | glm::detail::tvec2<*>{ 4 | preview ( 5 | #(#($c.x,$c.y)) 6 | ) 7 | children ( 8 | #([x]: $c.x,[y]: $c.y) 9 | ) 10 | } 11 | 12 | glm::detail::tvec3<*>{ 13 | preview ( 14 | #($e.x,$e.y,$e.z) 15 | ) 16 | children ( 17 | #([x]: $e.x,[y]: $e.y,[z]: $e.z) 18 | ) 19 | } 20 | 21 | glm::detail::tvec4<*>{ 22 | preview ( 23 | #($c.x,$c.y,$c.z,$c.w) 24 | ) 25 | children ( 26 | #([x]: $e.x,[y]: $e.y,[z]: $e.z, #([w]: $e.w)) 27 | ) 28 | } 29 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_compatibility.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error(0); 6 | 7 | Error += glm::isfinite(1.0f) ? 0 : 1; 8 | Error += glm::isfinite(1.0) ? 0 : 1; 9 | Error += glm::isfinite(-1.0f) ? 0 : 1; 10 | Error += glm::isfinite(-1.0) ? 0 : 1; 11 | 12 | Error += glm::all(glm::isfinite(glm::vec4(1.0f))) ? 0 : 1; 13 | Error += glm::all(glm::isfinite(glm::dvec4(1.0))) ? 0 : 1; 14 | Error += glm::all(glm::isfinite(glm::vec4(-1.0f))) ? 0 : 1; 15 | Error += glm::all(glm::isfinite(glm::dvec4(-1.0))) ? 0 : 1; 16 | 17 | return Error; 18 | } 19 | -------------------------------------------------------------------------------- /deps/glm/glm/detail/_fixes.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/_fixes.hpp 3 | 4 | #include 5 | 6 | //! Workaround for compatibility with other libraries 7 | #ifdef max 8 | #undef max 9 | #endif 10 | 11 | //! Workaround for compatibility with other libraries 12 | #ifdef min 13 | #undef min 14 | #endif 15 | 16 | //! Workaround for Android 17 | #ifdef isnan 18 | #undef isnan 19 | #endif 20 | 21 | //! Workaround for Android 22 | #ifdef isinf 23 | #undef isinf 24 | #endif 25 | 26 | //! Workaround for Chrone Native Client 27 | #ifdef log2 28 | #undef log2 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /deps/glfw/CMake/i686-w64-mingw32.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross-compiling with 32-bit MinGW-w64 GCC 2 | SET(CMAKE_SYSTEM_NAME Windows) # Target system name 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "i686-w64-mingw32-gcc") 5 | SET(CMAKE_CXX_COMPILER "i686-w64-mingw32-g++") 6 | SET(CMAKE_RC_COMPILER "i686-w64-mingw32-windres") 7 | SET(CMAKE_RANLIB "i686-w64-mingw32-ranlib") 8 | 9 | # Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/usr/i686-w64-mingw32") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /deps/glfw/CMake/i686-w64-mingw32-clang.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross-compiling with 32-bit MinGW-w64 Clang 2 | SET(CMAKE_SYSTEM_NAME Windows) # Target system name 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "i686-w64-mingw32-clang") 5 | SET(CMAKE_CXX_COMPILER "i686-w64-mingw32-clang++") 6 | SET(CMAKE_RC_COMPILER "i686-w64-mingw32-windres") 7 | SET(CMAKE_RANLIB "i686-w64-mingw32-ranlib") 8 | 9 | # Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/usr/i686-w64-mingw32") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /deps/glfw/CMake/x86_64-w64-mingw32.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross-compiling with 64-bit MinGW-w64 GCC 2 | SET(CMAKE_SYSTEM_NAME Windows) # Target system name 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "x86_64-w64-mingw32-gcc") 5 | SET(CMAKE_CXX_COMPILER "x86_64-w64-mingw32-g++") 6 | SET(CMAKE_RC_COMPILER "x86_64-w64-mingw32-windres") 7 | SET(CMAKE_RANLIB "x86_64-w64-mingw32-ranlib") 8 | 9 | # Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/usr/x86_64-w64-mingw32") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /deps/glfw/CMake/x86_64-w64-mingw32-clang.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross-compiling with 64-bit MinGW-w64 Clang 2 | SET(CMAKE_SYSTEM_NAME Windows) # Target system name 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "x86_64-w64-mingw32-clang") 5 | SET(CMAKE_CXX_COMPILER "x86_64-w64-mingw32-clang++") 6 | SET(CMAKE_RC_COMPILER "x86_64-w64-mingw32-windres") 7 | SET(CMAKE_RANLIB "x86_64-w64-mingw32-ranlib") 8 | 9 | # Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/usr/x86_64-w64-mingw32") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /include/ada/gl/pingpong.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "fbo.h" 4 | 5 | namespace ada { 6 | 7 | class PingPong { 8 | public: 9 | PingPong(); 10 | virtual ~PingPong(); 11 | 12 | void allocate(int _width, int _height, FboType _type, TextureFilter _filter = LINEAR, TextureWrap _wrap = REPEAT, bool _autoclear = true); 13 | void swap(); 14 | void clear(float _alpha = 0.0); 15 | 16 | Fbo& operator[](int n){ return m_fbos[n]; } 17 | 18 | Fbo *src; // Source -> Ping 19 | Fbo *dst; // Destination -> Pong 20 | 21 | private: 22 | Fbo m_fbos[2]; // Real addresses of ping/pong FBO´s 23 | int m_flag; // Integer for making a quick swap 24 | }; 25 | 26 | } -------------------------------------------------------------------------------- /deps/glm/glm/gtx/normalize_dot.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normalize_dot 2 | /// @file glm/gtx/normalize_dot.inl 3 | 4 | namespace glm 5 | { 6 | template class vecType> 7 | GLM_FUNC_QUALIFIER T normalizeDot(vecType const & x, vecType const & y) 8 | { 9 | return glm::dot(x, y) * glm::inversesqrt(glm::dot(x, x) * glm::dot(y, y)); 10 | } 11 | 12 | template class vecType> 13 | GLM_FUNC_QUALIFIER T fastNormalizeDot(vecType const & x, vecType const & y) 14 | { 15 | return glm::dot(x, y) * glm::fastInverseSqrt(glm::dot(x, x) * glm::dot(y, y)); 16 | } 17 | }//namespace glm 18 | -------------------------------------------------------------------------------- /include/ada/shaders/defaultShaders.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace ada 6 | { 7 | 8 | enum DefaultShaders { 9 | VERT_DEFAULT = 0, FRAG_DEFAULT, FRAG_DEFAULT_TEXTURE, 10 | VERT_DEFAULT_SCENE, FRAG_DEFAULT_SCENE, 11 | VERT_BILLBOARD, VERT_DYNAMIC_BILLBOARD, FRAG_DYNAMIC_BILLBOARD, 12 | VERT_CUBEMAP, FRAG_CUBEMAP, 13 | VERT_ERROR, FRAG_ERROR, 14 | VERT_LIGHT, FRAG_LIGHT, 15 | VERT_FILL, FRAG_FILL, 16 | VERT_POINTS, FRAG_POINTS, 17 | FRAG_PLOT, FRAG_FXAA, FRAG_POISSON 18 | }; 19 | 20 | void setVersionFromCode(const std::string& _src); 21 | int getVersion(); 22 | 23 | std::string getDefaultSrc(DefaultShaders _type); 24 | 25 | } // namespace ada 26 | -------------------------------------------------------------------------------- /deps/glm/test/core/core_type_float.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int test_float_size() 4 | { 5 | return 6 | sizeof(glm::float_t) != sizeof(glm::lowp_float) && 7 | sizeof(glm::float_t) != sizeof(glm::mediump_float) && 8 | sizeof(glm::float_t) != sizeof(glm::highp_float); 9 | } 10 | 11 | int test_float_precision() 12 | { 13 | return ( 14 | sizeof(glm::lowp_float) <= sizeof(glm::mediump_float) && 15 | sizeof(glm::mediump_float) <= sizeof(glm::highp_float)) ? 0 : 1; 16 | } 17 | 18 | int test_vec2() 19 | { 20 | return 0; 21 | } 22 | 23 | int main() 24 | { 25 | int Error = 0; 26 | 27 | Error += test_float_size(); 28 | Error += test_float_precision(); 29 | 30 | return Error; 31 | } 32 | -------------------------------------------------------------------------------- /include/ada/gl/textureStreamAudio.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if defined(SUPPORT_LIBAV) 4 | 5 | #include "ada/gl/textureStream.h" 6 | #include 7 | 8 | class TextureStreamAudio : public ada::TextureStream { 9 | public: 10 | TextureStreamAudio(); 11 | virtual ~TextureStreamAudio(); 12 | 13 | virtual bool load(const std::string &_path, bool _vFlip, ada::TextureFilter _filter = ada::LINEAR, ada::TextureWrap _wrap = ada::REPEAT); 14 | virtual bool update(); 15 | virtual void clear(); 16 | private: 17 | static const int m_buf_len = 1024; 18 | std::vector m_buffer_wr, m_buffer_re, m_texture; 19 | float* m_dft_buffer = nullptr; 20 | }; 21 | 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /cmake/FindILCLIENT.cmake: -------------------------------------------------------------------------------- 1 | # This module defines 2 | # ILCLIENT_DIR, where to find png.h, etc. 3 | # ILCLIENT_LIBRARIES, the libraries to link against to use PNG. 4 | # ILCLEINT_FOUND, If false, do not try to use PNG. 5 | 6 | 7 | find_library( ILCLIENT_LIBRARY 8 | NAME libilclient.a 9 | DOC "Path ILCLIENT Library" 10 | PATHS /opt/vc/src/hello_pi/libs/ilclient ) 11 | if (ILCLIENT_LIBRARY) 12 | set(ILCLIENT_INCLUDE_DIR 13 | /opt/vc/src/hello_pi/libs/ilclient) 14 | mark_as_advanced(ILCLIENT_LIBRARY ILCLIENT_INCLUDE_DIR) 15 | 16 | include(FindPackageHandleStandardArgs) 17 | find_package_handle_standard_args(ILCLIENT 18 | ILCLIENT_LIBRARY 19 | ) 20 | endif() 21 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/transform.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_transform 2 | /// @file glm/gtx/transform.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER tmat4x4 translate(tvec3 const & v) 8 | { 9 | return translate(tmat4x4(static_cast(1)), v); 10 | } 11 | 12 | template 13 | GLM_FUNC_QUALIFIER tmat4x4 rotate(T angle, tvec3 const & v) 14 | { 15 | return rotate(tmat4x4(static_cast(1)), angle, v); 16 | } 17 | 18 | template 19 | GLM_FUNC_QUALIFIER tmat4x4 scale(tvec3 const & v) 20 | { 21 | return scale(tmat4x4(static_cast(1)), v); 22 | } 23 | 24 | }//namespace glm 25 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_gradient_paint.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int test_radialGradient() 4 | { 5 | int Error = 0; 6 | 7 | float Gradient = glm::radialGradient(glm::vec2(0), 1.0f, glm::vec2(1), glm::vec2(0.5)); 8 | Error += Gradient != 0.0f ? 0 : 1; 9 | 10 | return Error; 11 | } 12 | 13 | int test_linearGradient() 14 | { 15 | int Error = 0; 16 | 17 | float Gradient = glm::linearGradient(glm::vec2(0), glm::vec2(1), glm::vec2(0.5)); 18 | Error += Gradient != 0.0f ? 0 : 1; 19 | 20 | return Error; 21 | } 22 | 23 | int main() 24 | { 25 | int Error = 0; 26 | 27 | Error += test_radialGradient(); 28 | Error += test_linearGradient(); 29 | 30 | return Error; 31 | } 32 | 33 | 34 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/handed_coordinate_space.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_handed_coordinate_space 2 | /// @file glm/gtx/handed_coordinate_space.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER bool rightHanded 8 | ( 9 | tvec3 const & tangent, 10 | tvec3 const & binormal, 11 | tvec3 const & normal 12 | ) 13 | { 14 | return dot(cross(normal, tangent), binormal) > T(0); 15 | } 16 | 17 | template 18 | GLM_FUNC_QUALIFIER bool leftHanded 19 | ( 20 | tvec3 const & tangent, 21 | tvec3 const & binormal, 22 | tvec3 const & normal 23 | ) 24 | { 25 | return dot(cross(normal, tangent), binormal) < T(0); 26 | } 27 | }//namespace glm 28 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_int_10_10_10_2.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2013-10-25 5 | // Updated : 2013-10-25 6 | // Licence : This source is under MIT licence 7 | // File : test/gtx/associated_min_max.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | #include 12 | 13 | int main() 14 | { 15 | int Error(0); 16 | 17 | return Error; 18 | } 19 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_mixed_product.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2013-10-25 5 | // Updated : 2013-10-25 6 | // Licence : This source is under MIT licence 7 | // File : test/gtx/associated_min_max.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | #include 12 | 13 | int main() 14 | { 15 | int Error(0); 16 | 17 | return Error; 18 | } 19 | -------------------------------------------------------------------------------- /deps/glob/glob.h: -------------------------------------------------------------------------------- 1 | #ifndef GLOB_H 2 | #define GLOB_H 3 | 4 | #include 5 | #include 6 | 7 | namespace glob { 8 | 9 | class glob_impl; 10 | 11 | class glob final { 12 | public: 13 | glob(const std::string &pattern); 14 | ~glob(); 15 | 16 | operator bool() const { 17 | return is_valid(); 18 | } 19 | 20 | void open(const std::string &pattern); 21 | void close(); 22 | 23 | std::string current_match() const; 24 | bool next(); 25 | bool is_valid() const; 26 | 27 | private: 28 | glob(const glob &) = delete; 29 | void operator=(const glob &) = delete; 30 | 31 | private: 32 | std::unique_ptr impl_; 33 | }; 34 | 35 | } // namespace glob 36 | 37 | #endif // !GLOB_H 38 | -------------------------------------------------------------------------------- /deps/glm/test/gtc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | glmCreateTestGTC(gtc_bitfield) 2 | glmCreateTestGTC(gtc_color_space) 3 | glmCreateTestGTC(gtc_constants) 4 | glmCreateTestGTC(gtc_epsilon) 5 | glmCreateTestGTC(gtc_functions) 6 | glmCreateTestGTC(gtc_integer) 7 | glmCreateTestGTC(gtc_matrix_access) 8 | glmCreateTestGTC(gtc_matrix_integer) 9 | glmCreateTestGTC(gtc_matrix_inverse) 10 | glmCreateTestGTC(gtc_matrix_transform) 11 | glmCreateTestGTC(gtc_noise) 12 | glmCreateTestGTC(gtc_packing) 13 | glmCreateTestGTC(gtc_quaternion) 14 | glmCreateTestGTC(gtc_random) 15 | glmCreateTestGTC(gtc_round) 16 | glmCreateTestGTC(gtc_reciprocal) 17 | glmCreateTestGTC(gtc_type_aligned) 18 | glmCreateTestGTC(gtc_type_precision) 19 | glmCreateTestGTC(gtc_type_ptr) 20 | glmCreateTestGTC(gtc_ulp) 21 | glmCreateTestGTC(gtc_vec1) 22 | -------------------------------------------------------------------------------- /deps/glm/test/gtc/gtc_functions.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int test_gauss_1d() 5 | { 6 | int Error = 0; 7 | 8 | std::vector Result(20); 9 | for(std::size_t i = 0, n = Result.size(); i < n; ++i) 10 | Result[i] = glm::gauss(static_cast(i) * 0.1f, 0.0f, 1.0f); 11 | 12 | return Error; 13 | } 14 | 15 | int test_gauss_2d() 16 | { 17 | int Error = 0; 18 | 19 | std::vector Result(20); 20 | for(std::size_t i = 0, n = Result.size(); i < n; ++i) 21 | Result[i] = glm::gauss(glm::vec2(i) * 0.1f, glm::vec2(0.0f), glm::vec2(1.0f)); 22 | 23 | return Error; 24 | } 25 | 26 | int main() 27 | { 28 | int Error = 0; 29 | 30 | Error += test_gauss_1d(); 31 | Error += test_gauss_2d(); 32 | 33 | return Error; 34 | } 35 | 36 | -------------------------------------------------------------------------------- /cmake/FindOMAX.cmake: -------------------------------------------------------------------------------- 1 | # - Find OPENMAX drivers 2 | # 3 | # This module defines: 4 | # 5 | # OPENMAX_INCLUDE_DIR, 6 | # OPENMAX_LIBRARIES, 7 | # OPENMAX_FOUND, 8 | # OPENMAX_DEFINITIONS 9 | # 10 | find_library( OPENMAX_LIBRARY 11 | NAMES libopenmaxil.so 12 | DOC "Path to OpenMAX IL Library" 13 | PATHS /opt/vc/lib) 14 | 15 | if (OPENMAX_LIBRARY) 16 | mark_as_advanced(OPENMAX_LIBRARY) 17 | 18 | include(FindPackageHandleStandardArgs) 19 | find_package_handle_standard_args(OMAX 20 | OPENMAX_LIBRARY 21 | ) 22 | 23 | set(OMAX_LIBRARIES 24 | ${OPENMAX_LIBRARY} 25 | ) 26 | 27 | set(OMAX_DEFINITIONS 28 | HAVE_LIBOPENMAX=2 29 | OMX 30 | OMX_SKIP64BIT 31 | USE_EXTERNAL_OMX 32 | ) 33 | endif() -------------------------------------------------------------------------------- /deps/glm/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | 19 | # Compiled Static libraries 20 | *.lai 21 | *.la 22 | *.a 23 | *.lib 24 | 25 | # Executables 26 | *.exe 27 | *.out 28 | *.app 29 | 30 | # CMake 31 | CMakeCache.txt 32 | CMakeFiles 33 | cmake_install.cmake 34 | install_manifest.txt 35 | *.cmake 36 | # ^ May need to add future .cmake files as exceptions 37 | 38 | # Test logs 39 | Testing/* 40 | 41 | # Test input 42 | test/gtc/*.dds 43 | 44 | # Project Files 45 | Makefile 46 | *.cbp 47 | *.user 48 | 49 | # Misc. 50 | *.log 51 | 52 | # local build(s) 53 | build* 54 | 55 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/orthonormalize.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_orthonormalize 2 | /// @file glm/gtx/orthonormalize.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER tmat3x3 orthonormalize(tmat3x3 const & m) 8 | { 9 | tmat3x3 r = m; 10 | 11 | r[0] = normalize(r[0]); 12 | 13 | T d0 = dot(r[0], r[1]); 14 | r[1] -= r[0] * d0; 15 | r[1] = normalize(r[1]); 16 | 17 | T d1 = dot(r[1], r[2]); 18 | d0 = dot(r[0], r[2]); 19 | r[2] -= r[0] * d0 + r[1] * d1; 20 | r[2] = normalize(r[2]); 21 | 22 | return r; 23 | } 24 | 25 | template 26 | GLM_FUNC_QUALIFIER tvec3 orthonormalize(tvec3 const & x, tvec3 const & y) 27 | { 28 | return normalize(x - y * dot(y, x)); 29 | } 30 | }//namespace glm 31 | -------------------------------------------------------------------------------- /deps/glm/test/core/core_func_vector_relational.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | int test_not() 8 | { 9 | int Error(0); 10 | 11 | { 12 | glm::bvec1 v(false); 13 | Error += glm::all(glm::not_(v)) ? 0 : 1; 14 | } 15 | 16 | { 17 | glm::bvec2 v(false); 18 | Error += glm::all(glm::not_(v)) ? 0 : 1; 19 | } 20 | 21 | { 22 | glm::bvec3 v(false); 23 | Error += glm::all(glm::not_(v)) ? 0 : 1; 24 | } 25 | 26 | { 27 | glm::bvec4 v(false); 28 | Error += glm::all(glm::not_(v)) ? 0 : 1; 29 | } 30 | 31 | return Error; 32 | } 33 | 34 | int main() 35 | { 36 | int Error(0); 37 | 38 | Error += test_not(); 39 | 40 | return Error; 41 | } 42 | 43 | -------------------------------------------------------------------------------- /deps/glfw/CMake/modules/FindEpollShim.cmake: -------------------------------------------------------------------------------- 1 | # Find EpollShim 2 | # Once done, this will define 3 | # 4 | # EPOLLSHIM_FOUND - System has EpollShim 5 | # EPOLLSHIM_INCLUDE_DIRS - The EpollShim include directories 6 | # EPOLLSHIM_LIBRARIES - The libraries needed to use EpollShim 7 | 8 | find_path(EPOLLSHIM_INCLUDE_DIRS NAMES sys/epoll.h sys/timerfd.h HINTS /usr/local/include/libepoll-shim) 9 | find_library(EPOLLSHIM_LIBRARIES NAMES epoll-shim libepoll-shim HINTS /usr/local/lib) 10 | 11 | if (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES) 12 | set(EPOLLSHIM_FOUND TRUE) 13 | endif (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES) 14 | 15 | include(FindPackageHandleStandardArgs) 16 | find_package_handle_standard_args(EpollShim DEFAULT_MSG EPOLLSHIM_LIBRARIES EPOLLSHIM_INCLUDE_DIRS) 17 | mark_as_advanced(EPOLLSHIM_INCLUDE_DIRS EPOLLSHIM_LIBRARIES) 18 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/scalar_relational.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_scalar_relational 2 | /// @file glm/gtx/scalar_relational.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_scalar_relational GLM_GTX_scalar_relational 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Extend a position from a source to a position at a defined length. 10 | /// 11 | /// need to be included to use these functionalities. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_GTX_extend extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup gtx_scalar_relational 25 | /// @{ 26 | 27 | 28 | 29 | /// @} 30 | }//namespace glm 31 | 32 | #include "scalar_relational.inl" 33 | -------------------------------------------------------------------------------- /deps/glfw/src/glfw.rc.in: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | VS_VERSION_INFO VERSIONINFO 5 | FILEVERSION @GLFW_VERSION_MAJOR@,@GLFW_VERSION_MINOR@,@GLFW_VERSION_PATCH@,0 6 | PRODUCTVERSION @GLFW_VERSION_MAJOR@,@GLFW_VERSION_MINOR@,@GLFW_VERSION_PATCH@,0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_NT_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 12 | { 13 | BLOCK "StringFileInfo" 14 | { 15 | BLOCK "040904B0" 16 | { 17 | VALUE "CompanyName", "GLFW" 18 | VALUE "FileDescription", "GLFW @GLFW_VERSION@ DLL" 19 | VALUE "FileVersion", "@GLFW_VERSION@" 20 | VALUE "OriginalFilename", "glfw3.dll" 21 | VALUE "ProductName", "GLFW" 22 | VALUE "ProductVersion", "@GLFW_VERSION@" 23 | } 24 | } 25 | BLOCK "VarFileInfo" 26 | { 27 | VALUE "Translation", 0x409, 1200 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /cmake/FindGLESv2.cmake: -------------------------------------------------------------------------------- 1 | # Finds the GLESv2 library 2 | # 3 | # This will define the following variables:: 4 | # 5 | # GLESv2_FOUND - system has GLESv2 6 | # GLESv2_INCLUDE_DIRS - the GLESv2 include directory 7 | # GLESv2_LIBRARIES - the GLESv2 libraries 8 | # GLESv2_DEFINITIONS - the GLESv2 definitions 9 | # 10 | 11 | find_library(GLESv2_LIBRARIES NAMES GLESv2) 12 | find_path(GLESv2_INCLUDE_DIRS NAMES GLES2/gl2.h OGLES2/GLES2/gl2.h) 13 | find_path(KHR_INCLUDE_DIRS NAMES KHR/khrplatform.h PATH_SUFFIXES OGLES2) 14 | 15 | if(NOT ${KHR_INCLUDE_DIRS} STREQUAL KHR_INCLUDE_DIRS-NOTFOUND) 16 | set(GLESv2_INCLUDE_DIRS ${GLESv2_INCLUDE_DIRS} ${KHR_INCLUDE_DIRS}) 17 | endif() 18 | 19 | message(STATUS KHR ${KHR_INCLUDE_DIRS}) 20 | 21 | include(FindPackageHandleStandardArgs) 22 | find_package_handle_standard_args(GLESv2 DEFAULT_MSG GLESv2_LIBRARIES GLESv2_INCLUDE_DIRS) 23 | 24 | mark_as_advanced(GLESv2_INCLUDE_DIRS GLESv2_LIBRARIES) -------------------------------------------------------------------------------- /include/ada/gl/textureStreamSequence.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "textureStream.h" 4 | #include 5 | 6 | namespace ada { 7 | 8 | class TextureStreamSequence : public TextureStream { 9 | public: 10 | TextureStreamSequence(); 11 | virtual ~TextureStreamSequence(); 12 | 13 | // virtual void setSpeed( float _speed ) {}; 14 | 15 | virtual float getDuration() const; 16 | virtual float getTime() const; 17 | 18 | virtual float getTotalFrames() { return m_frames.size(); }; 19 | virtual float getCurrentFrame() const { return m_currentFrame; }; 20 | 21 | virtual bool load(const std::string& _filepath, bool _vFlip); 22 | virtual bool update(); 23 | virtual void restart(); 24 | virtual void clear(); 25 | 26 | private: 27 | 28 | std::vector m_frames; 29 | size_t m_currentFrame; 30 | size_t m_bits; 31 | 32 | }; 33 | 34 | } -------------------------------------------------------------------------------- /deps/glm/test/gtc/gtc_user_defined_types.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-16 5 | // Updated : 2011-05-27 6 | // Licence : This source is under MIT licence 7 | // File : test/gtc/type_ptr.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #define GLM_FORCE_RADIANS 11 | #include 12 | 13 | int test_make_pointer_vec() 14 | { 15 | int Error = 0; 16 | 17 | glm::func(); 18 | //func(); 19 | 20 | return Error; 21 | } 22 | 23 | int main() 24 | { 25 | int Error = 0; 26 | 27 | Error += test_make_pointer_vec(); 28 | 29 | return Error; 30 | } 31 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/matrix_cross_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_matrix_cross_product 2 | /// @file glm/gtx/matrix_cross_product.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER tmat3x3 matrixCross3 8 | ( 9 | tvec3 const & x 10 | ) 11 | { 12 | tmat3x3 Result(T(0)); 13 | Result[0][1] = x.z; 14 | Result[1][0] = -x.z; 15 | Result[0][2] = -x.y; 16 | Result[2][0] = x.y; 17 | Result[1][2] = x.x; 18 | Result[2][1] = -x.x; 19 | return Result; 20 | } 21 | 22 | template 23 | GLM_FUNC_QUALIFIER tmat4x4 matrixCross4 24 | ( 25 | tvec3 const & x 26 | ) 27 | { 28 | tmat4x4 Result(T(0)); 29 | Result[0][1] = x.z; 30 | Result[1][0] = -x.z; 31 | Result[0][2] = -x.y; 32 | Result[2][0] = x.y; 33 | Result[1][2] = x.x; 34 | Result[2][1] = -x.x; 35 | return Result; 36 | } 37 | 38 | }//namespace glm 39 | -------------------------------------------------------------------------------- /deps/glm/test/external/gli/gtx/wavelet.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-01-09 5 | // Updated : 2010-01-09 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/wavelet.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GTX_WAVELET_INCLUDED 11 | #define GLI_GTX_WAVELET_INCLUDED 12 | 13 | namespace gli{ 14 | namespace gtx{ 15 | namespace wavelet 16 | { 17 | 18 | 19 | }//namespace wavelet 20 | }//namespace gtx 21 | }//namespace gli 22 | 23 | namespace gli{using namespace gtx::wavelet;} 24 | 25 | #include "wavelet.inl" 26 | 27 | #endif//GLI_GTX_WAVELET_INCLUDED 28 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_scalar_multiplication.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_TEMPLATE_ALIASES && !(GLM_COMPILER & GLM_COMPILER_GCC) 4 | #include 5 | 6 | int main() 7 | { 8 | int Error(0); 9 | glm::vec3 v(0.5, 3.1, -9.1); 10 | 11 | Error += glm::all(glm::equal(v, 1.0 * v)) ? 0 : 1; 12 | Error += glm::all(glm::equal(v, 1 * v)) ? 0 : 1; 13 | Error += glm::all(glm::equal(v, 1u * v)) ? 0 : 1; 14 | 15 | glm::mat3 m(1, 2, 3, 4, 5, 6, 7, 8, 9); 16 | glm::vec3 w = 0.5f * m * v; 17 | 18 | Error += glm::all(glm::equal((m*v)/2, w)) ? 0 : 1; 19 | Error += glm::all(glm::equal(m*(v/2), w)) ? 0 : 1; 20 | Error += glm::all(glm::equal((m/2)*v, w)) ? 0 : 1; 21 | Error += glm::all(glm::equal((0.5*m)*v, w)) ? 0 : 1; 22 | Error += glm::all(glm::equal(0.5*(m*v), w)) ? 0 : 1; 23 | 24 | return Error; 25 | } 26 | 27 | #else 28 | 29 | int main() 30 | { 31 | return 0; 32 | } 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/projection.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_projection 2 | /// @file glm/gtx/projection.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_projection GLM_GTX_projection 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Projection of a vector to other one 10 | /// 11 | /// need to be included to use these functionalities. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../geometric.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_GTX_projection extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup gtx_projection 25 | /// @{ 26 | 27 | /// Projects x on Normal. 28 | /// 29 | /// @see gtx_projection 30 | template 31 | GLM_FUNC_DECL vecType proj(vecType const & x, vecType const & Normal); 32 | 33 | /// @} 34 | }//namespace glm 35 | 36 | #include "projection.inl" 37 | -------------------------------------------------------------------------------- /deps/glm/test/external/gli/gtx/compression.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-12-19 5 | // Updated : 2010-01-09 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/compression.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GTX_COMPRESSION_INCLUDED 11 | #define GLI_GTX_COMPRESSION_INCLUDED 12 | 13 | namespace gli{ 14 | namespace gtx{ 15 | namespace compression 16 | { 17 | 18 | 19 | }//namespace compression 20 | }//namespace gtx 21 | }//namespace gli 22 | 23 | namespace gli{using namespace gtx::compression;} 24 | 25 | #include "compression.inl" 26 | 27 | #endif//GLI_GTX_COMPRESSION_INCLUDED 28 | -------------------------------------------------------------------------------- /deps/glm/test/external/gli/core/generate_mipmaps.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-27 5 | // Updated : 2010-09-27 6 | // Licence : This source is under MIT License 7 | // File : gli/core/generate_mipmaps.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GENERATE_MIPMAPS_INCLUDED 11 | #define GLI_GENERATE_MIPMAPS_INCLUDED 12 | 13 | #include "texture2d.hpp" 14 | 15 | namespace gli 16 | { 17 | texture2D generateMipmaps( 18 | texture2D const & Texture, 19 | texture2D::level_type const & BaseLevel); 20 | 21 | }//namespace gli 22 | 23 | #include "generate_mipmaps.inl" 24 | 25 | #endif//GLI_GENERATE_MIPMAPS_INCLUDED 26 | -------------------------------------------------------------------------------- /deps/glm/glm/gtc/functions.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_functions 2 | /// @file glm/gtc/functions.inl 3 | 4 | #include "../detail/func_exponential.hpp" 5 | 6 | namespace glm 7 | { 8 | template 9 | GLM_FUNC_QUALIFIER T gauss 10 | ( 11 | T x, 12 | T ExpectedValue, 13 | T StandardDeviation 14 | ) 15 | { 16 | return exp(-((x - ExpectedValue) * (x - ExpectedValue)) / (static_cast(2) * StandardDeviation * StandardDeviation)) / (StandardDeviation * sqrt(static_cast(6.28318530717958647692528676655900576))); 17 | } 18 | 19 | template 20 | GLM_FUNC_QUALIFIER T gauss 21 | ( 22 | tvec2 const& Coord, 23 | tvec2 const& ExpectedValue, 24 | tvec2 const& StandardDeviation 25 | ) 26 | { 27 | tvec2 const Squared = ((Coord - ExpectedValue) * (Coord - ExpectedValue)) / (static_cast(2) * StandardDeviation * StandardDeviation); 28 | return exp(-(Squared.x + Squared.y)); 29 | } 30 | }//namespace glm 31 | 32 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/polar_coordinates.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_polar_coordinates 2 | /// @file glm/gtx/polar_coordinates.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER tvec3 polar 8 | ( 9 | tvec3 const & euclidean 10 | ) 11 | { 12 | T const Length(length(euclidean)); 13 | tvec3 const tmp(euclidean / Length); 14 | T const xz_dist(sqrt(tmp.x * tmp.x + tmp.z * tmp.z)); 15 | 16 | return tvec3( 17 | asin(tmp.y), // latitude 18 | atan(tmp.x, tmp.z), // longitude 19 | xz_dist); // xz distance 20 | } 21 | 22 | template 23 | GLM_FUNC_QUALIFIER tvec3 euclidean 24 | ( 25 | tvec2 const & polar 26 | ) 27 | { 28 | T const latitude(polar.x); 29 | T const longitude(polar.y); 30 | 31 | return tvec3( 32 | cos(latitude) * sin(longitude), 33 | sin(latitude), 34 | cos(latitude) * cos(longitude)); 35 | } 36 | 37 | }//namespace glm 38 | -------------------------------------------------------------------------------- /src/gl/pingpong.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "ada/gl/pingpong.h" 4 | 5 | namespace ada { 6 | 7 | PingPong::PingPong(): 8 | src(nullptr), dst(nullptr), 9 | m_flag(0) { 10 | } 11 | 12 | PingPong::~PingPong() { 13 | } 14 | 15 | void PingPong::allocate(int _width, int _height, FboType _type, TextureFilter _filter, TextureWrap _wrap, bool _autoclear) { 16 | for(int i = 0; i < 2; i++) 17 | m_fbos[i].allocate(_width, _height, _type, _filter, _wrap, _autoclear); 18 | 19 | clear(); 20 | 21 | // Set everything to 0 22 | m_flag = 0; 23 | swap(); 24 | } 25 | 26 | void PingPong::swap(){ 27 | src = &(m_fbos[(m_flag)%2]); 28 | dst = &(m_fbos[++(m_flag)%2]); 29 | } 30 | 31 | void PingPong::clear(float _alpha) { 32 | for(int i = 0; i < 2; i++){ 33 | m_fbos[i].bind(); 34 | glClearColor(0.0f, 0.0f, 0.0f, _alpha); 35 | glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 36 | m_fbos[i].unbind(); 37 | } 38 | } 39 | 40 | } -------------------------------------------------------------------------------- /deps/glfw/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2002-2006 Marcus Geelnard 2 | 3 | Copyright (c) 2006-2019 Camilla Löwy 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would 16 | be appreciated but is not required. 17 | 18 | 2. Altered source versions must be plainly marked as such, and must not 19 | be misrepresented as being the original software. 20 | 21 | 3. This notice may not be removed or altered from any source 22 | distribution. 23 | 24 | -------------------------------------------------------------------------------- /deps/glm/glm/detail/func_exponential_simd.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/func_exponential_simd.inl 3 | 4 | #include "../simd/exponential.h" 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | namespace glm{ 9 | namespace detail 10 | { 11 | template 12 | struct compute_sqrt 13 | { 14 | GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & v) 15 | { 16 | tvec4 result(uninitialize); 17 | result.data = _mm_sqrt_ps(v.data); 18 | return result; 19 | } 20 | }; 21 | 22 | template <> 23 | struct compute_sqrt 24 | { 25 | GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & v) 26 | { 27 | tvec4 result(uninitialize); 28 | result.data = glm_vec4_sqrt_lowp(v.data); 29 | return result; 30 | } 31 | }; 32 | }//namespace detail 33 | }//namespace glm 34 | 35 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 36 | -------------------------------------------------------------------------------- /deps/glm/test/external/gli/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(NAME gli) 2 | 3 | file(GLOB ROOT_SOURCE *.cpp) 4 | file(GLOB ROOT_INLINE *.inl) 5 | file(GLOB ROOT_HEADER *.hpp) 6 | 7 | file(GLOB_RECURSE CORE_SOURCE ./core/*.cpp) 8 | file(GLOB_RECURSE CORE_INLINE ./core/*.inl) 9 | file(GLOB_RECURSE CORE_HEADER ./core/*.hpp) 10 | 11 | file(GLOB_RECURSE GTX_SOURCE ./gtx/*.cpp) 12 | file(GLOB_RECURSE GTX_INLINE ./gtx/*.inl) 13 | file(GLOB_RECURSE GTX_HEADER ./gtx/*.hpp) 14 | 15 | source_group("Core Files" FILES ${CORE_SOURCE}) 16 | source_group("Core Files" FILES ${CORE_INLINE}) 17 | source_group("Core Files" FILES ${CORE_HEADER}) 18 | source_group("GTX Files" FILES ${GTX_SOURCE}) 19 | source_group("GTX Files" FILES ${GTX_INLINE}) 20 | source_group("GTX Files" FILES ${GTX_HEADER}) 21 | 22 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) 23 | 24 | add_executable(${NAME} 25 | ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} 26 | ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER} 27 | ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER} ) 28 | -------------------------------------------------------------------------------- /deps/glm/test/external/gli/core/operator.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-01-19 5 | // Updated : 2010-01-19 6 | // Licence : This source is under MIT License 7 | // File : gli/core/operator.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_OPERATOR_INCLUDED 11 | #define GLI_OPERATOR_INCLUDED 12 | 13 | #include "texture2d.hpp" 14 | 15 | namespace gli{ 16 | namespace detail 17 | { 18 | 19 | }//namespace detail 20 | 21 | texture2D operator+(texture2D const & TextureA, texture2D const & TextureB); 22 | texture2D operator-(texture2D const & TextureA, texture2D const & TextureB); 23 | 24 | }//namespace gli 25 | 26 | #include "operator.inl" 27 | 28 | #endif//GLI_OPERATOR_INCLUDED 29 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/mixed_product.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_mixed_product 2 | /// @file glm/gtx/mixed_product.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_mixed_product GLM_GTX_mixed_producte 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Mixed product of 3 vectors. 10 | /// 11 | /// need to be included to use these functionalities. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_GTX_mixed_product extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup gtx_mixed_product 25 | /// @{ 26 | 27 | /// @brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension) 28 | template 29 | GLM_FUNC_DECL T mixedProduct( 30 | tvec3 const & v1, 31 | tvec3 const & v2, 32 | tvec3 const & v3); 33 | 34 | /// @} 35 | }// namespace glm 36 | 37 | #include "mixed_product.inl" 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2020, Patricio Gonzalez Vivo 2 | 3 | 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: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | 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. 8 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_range.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #if GLM_HAS_RANGE_FOR 5 | 6 | #include 7 | 8 | int testVec() 9 | { 10 | int Error(0); 11 | glm::vec3 v(1, 2, 3); 12 | 13 | int count = 0; 14 | for(float x : v){ count++; } 15 | Error += count == 3 ? 0 : 1; 16 | 17 | for(float& x : v){ x = 0; } 18 | Error += glm::all(glm::equal(v, glm::vec3(0, 0, 0))) ? 0 : 1; 19 | return Error; 20 | } 21 | 22 | int testMat() 23 | { 24 | int Error(0); 25 | glm::mat4x3 m(1); 26 | 27 | int count = 0; 28 | for(float x : m){ count++; } 29 | Error += count == 12 ? 0 : 1; 30 | 31 | for(float& x : m){ x = 0; } 32 | glm::vec4 v(1, 1, 1, 1); 33 | Error += glm::all(glm::equal(m*v, glm::vec3(0, 0, 0))) ? 0 : 1; 34 | return Error; 35 | } 36 | 37 | int main() 38 | { 39 | int Error(0); 40 | Error += testVec(); 41 | Error += testMat(); 42 | return Error; 43 | } 44 | 45 | #else 46 | 47 | int main() 48 | { 49 | return 0; 50 | } 51 | 52 | #endif//GLM_HAS_RANGE_FOR 53 | -------------------------------------------------------------------------------- /include/ada/gl/textureStreamOMX.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ada/gl/textureStream.h" 4 | 5 | #if defined(DRIVER_BROADCOM) && defined(SUPPORT_OMAX) 6 | 7 | #include 8 | 9 | namespace ada { 10 | 11 | class TextureStreamOMX: public TextureStream { 12 | public: 13 | TextureStreamOMX(); 14 | virtual ~TextureStreamOMX(); 15 | 16 | virtual bool load(const std::string& _filepath, bool _vFlip, TextureFilter _filter = LINEAR, TextureWrap _wrap = REPEAT); 17 | 18 | virtual float getFPS() const { return m_fps; }; 19 | virtual float getDuration() const { return m_duration; }; 20 | virtual float getTotalFrames() const { return m_totalFrames; }; 21 | 22 | virtual bool update() { return true; } 23 | virtual void clear(); 24 | 25 | protected: 26 | static void* decode_video(const char* filename, void* _streamTexture); 27 | 28 | void* m_eglImage; 29 | double m_fps; 30 | double m_duration; 31 | long m_totalFrames; 32 | 33 | std::thread m_thread; 34 | 35 | }; 36 | 37 | } 38 | 39 | #endif -------------------------------------------------------------------------------- /deps/glm/glm/gtx/extend.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_extend 2 | /// @file glm/gtx/extend.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_extend GLM_GTX_extend 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Extend a position from a source to a position at a defined length. 10 | /// 11 | /// need to be included to use these functionalities. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_GTX_extend extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup gtx_extend 25 | /// @{ 26 | 27 | /// Extends of Length the Origin position using the (Source - Origin) direction. 28 | /// @see gtx_extend 29 | template 30 | GLM_FUNC_DECL genType extend( 31 | genType const & Origin, 32 | genType const & Source, 33 | typename genType::value_type const Length); 34 | 35 | /// @} 36 | }//namespace glm 37 | 38 | #include "extend.inl" 39 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/normal.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normal 2 | /// @file glm/gtx/normal.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_extented_min_max (dependence) 6 | /// 7 | /// @defgroup gtx_normal GLM_GTX_normal 8 | /// @ingroup gtx 9 | /// 10 | /// @brief Compute the normal of a triangle. 11 | /// 12 | /// need to be included to use these functionalities. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../glm.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_GTX_normal extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup gtx_normal 26 | /// @{ 27 | 28 | //! Computes triangle normal from triangle points. 29 | //! From GLM_GTX_normal extension. 30 | template 31 | GLM_FUNC_DECL tvec3 triangleNormal( 32 | tvec3 const & p1, 33 | tvec3 const & p2, 34 | tvec3 const & p3); 35 | 36 | /// @} 37 | }//namespace glm 38 | 39 | #include "normal.inl" 40 | -------------------------------------------------------------------------------- /include/ada/gl/textureProps.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include "gl.h" 5 | 6 | namespace ada { 7 | 8 | enum TextureFilter { 9 | LINEAR = 0, // Bilinear, no mipmap. 10 | NEAREST // Nearest neighbour, no mipmap. 11 | // NEAREST_NEAREST,// Nearest neighbour, closest mipmap.` 12 | // LINEAR_NEAREST, // Bilinear, closest mipmap. 13 | // NEAREST_LINEAR, // Nearest neighbour, linear blend of mipmaps. 14 | // LINEAR_LINEAR // Bilinear, linear blend of mipmaps. 15 | }; 16 | 17 | enum TextureWrap { 18 | REPEAT = 0, // Repeat the texture. 19 | CLAMP // Clamp to the edges of the texture. 20 | // MIRROR 21 | }; 22 | 23 | GLenum getFilter( TextureFilter _filter ); 24 | GLenum getMagnificationFilter( TextureFilter _filter ); 25 | GLenum getMinificationFilter( TextureFilter _filter ); 26 | GLenum getWrap( TextureWrap _wrap ); 27 | 28 | #ifndef __EMSCRIPTEN__ 29 | bool screenshot(const std::string& _filename ); 30 | bool screenshot( const std::string& _filename, int _width, int _height); 31 | #endif 32 | 33 | } -------------------------------------------------------------------------------- /deps/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ## GLFW 2 | 3 | if (NOT NO_X11 AND NOT FORCE_GBM AND NOT EMSCRIPTEN) 4 | # Configure GLFW to build only the library. 5 | set(GLFW_BUILD_DOCS OFF CACHE BOOL "") 6 | set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "") 7 | set(GLFW_BUILD_TESTS OFF CACHE BOOL "") 8 | set(GLFW_INSTALL OFF CACHE BOOL "") 9 | add_subdirectory(glfw) 10 | 11 | if(APPLE) 12 | target_compile_options(glfw PRIVATE "-Wno-deprecated-declarations") 13 | endif() 14 | 15 | if(NOT DEFINED OpenGL_GL_PREFERENCE) 16 | # set(OpenGL_GL_PREFERENCE "LEGACY") 17 | set(OPENGL_GL_PREFERENCE "GLVND") 18 | endif() 19 | set(OpenGL_GL_PREFERENCE ${OPENGL_GL_PREFERENCE}) 20 | find_package(OpenGL REQUIRED) 21 | 22 | message(STATUS "OPENGL_LIBRARIES: ${OPENGL_LIBRARIES}") 23 | message(STATUS "OPENGL_opengl_LIBRARY: ${OPENGL_opengl_LIBRARY}") 24 | endif() 25 | 26 | if (WIN32) 27 | add_subdirectory(glew) 28 | endif (WIN32) 29 | 30 | ## stb 31 | add_subdirectory(stb) 32 | 33 | ## Glob 34 | add_subdirectory(glob) 35 | 36 | ## SkyModel 37 | add_subdirectory(skymodel) 38 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/perpendicular.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_perpendicular 2 | /// @file glm/gtx/perpendicular.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_projection (dependence) 6 | /// 7 | /// @defgroup gtx_perpendicular GLM_GTX_perpendicular 8 | /// @ingroup gtx 9 | /// 10 | /// @brief Perpendicular of a vector from other one 11 | /// 12 | /// need to be included to use these functionalities. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../glm.hpp" 18 | #include "../gtx/projection.hpp" 19 | 20 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 21 | # pragma message("GLM: GLM_GTX_perpendicular extension included") 22 | #endif 23 | 24 | namespace glm 25 | { 26 | /// @addtogroup gtx_perpendicular 27 | /// @{ 28 | 29 | //! Projects x a perpendicular axis of Normal. 30 | //! From GLM_GTX_perpendicular extension. 31 | template 32 | GLM_FUNC_DECL vecType perp( 33 | vecType const & x, 34 | vecType const & Normal); 35 | 36 | /// @} 37 | }//namespace glm 38 | 39 | #include "perpendicular.inl" 40 | -------------------------------------------------------------------------------- /deps/glm/test/external/gli/core/size.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-08 5 | // Updated : 2010-09-08 6 | // Licence : This source is under MIT License 7 | // File : gli/core/size.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_CORE_SIZE_INCLUDED 11 | #define GLI_CORE_SIZE_INCLUDED 12 | 13 | #include "texture2d.hpp" 14 | 15 | namespace gli 16 | { 17 | //template 18 | image2D::size_type size( 19 | image2D const & Image, 20 | image2D::size_type const & SizeType); 21 | 22 | //template 23 | texture2D::size_type size( 24 | texture2D const & Texture, 25 | texture2D::size_type const & SizeType); 26 | 27 | }//namespace gli 28 | 29 | #include "size.inl" 30 | 31 | #endif//GLI_CORE_SIZE_INCLUDED 32 | -------------------------------------------------------------------------------- /deps/glm/test/core/core_type_int.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int test_int_size() 4 | { 5 | return 6 | sizeof(glm::int_t) != sizeof(glm::lowp_int) && 7 | sizeof(glm::int_t) != sizeof(glm::mediump_int) && 8 | sizeof(glm::int_t) != sizeof(glm::highp_int); 9 | } 10 | 11 | int test_uint_size() 12 | { 13 | return 14 | sizeof(glm::uint_t) != sizeof(glm::lowp_uint) && 15 | sizeof(glm::uint_t) != sizeof(glm::mediump_uint) && 16 | sizeof(glm::uint_t) != sizeof(glm::highp_uint); 17 | } 18 | 19 | int test_int_precision() 20 | { 21 | return ( 22 | sizeof(glm::lowp_int) <= sizeof(glm::mediump_int) && 23 | sizeof(glm::mediump_int) <= sizeof(glm::highp_int)) ? 0 : 1; 24 | } 25 | 26 | int test_uint_precision() 27 | { 28 | return ( 29 | sizeof(glm::lowp_uint) <= sizeof(glm::mediump_uint) && 30 | sizeof(glm::mediump_uint) <= sizeof(glm::highp_uint)) ? 0 : 1; 31 | } 32 | 33 | int main() 34 | { 35 | int Error = 0; 36 | 37 | Error += test_int_size(); 38 | Error += test_int_precision(); 39 | Error += test_uint_size(); 40 | Error += test_uint_precision(); 41 | 42 | return Error; 43 | } 44 | -------------------------------------------------------------------------------- /src/geom/line.cpp: -------------------------------------------------------------------------------- 1 | #include "ada/geom/line.h" 2 | 3 | namespace ada { 4 | 5 | Line::Line() : m_direction(0.0) { 6 | 7 | } 8 | 9 | Line::Line(const glm::vec3& _p0, const glm::vec3& _p1) { 10 | set(_p0,_p1); 11 | } 12 | 13 | void Line::set(const glm::vec3& _p0, const glm::vec3& _p1) { 14 | m_points[0] = _p0; 15 | m_points[1] = _p1; 16 | m_direction = m_points[1] - m_points[0]; 17 | } 18 | 19 | void Line::setColor(const glm::vec4 &_color) { 20 | m_colors.resize(2); 21 | m_colors[0] = _color; 22 | m_colors[1] = _color; 23 | } 24 | 25 | void Line::setColor(float _r, float _g, float _b, float _a) { 26 | setColor(glm::vec4(_r, _g, _b, _a)); 27 | } 28 | 29 | void Line::setColor(size_t _index, const glm::vec4& _color) { 30 | if (m_colors.empty()) { 31 | m_colors.resize(2); 32 | std::fill(m_colors.begin(),m_colors.begin()+2, _color); 33 | } 34 | else 35 | m_colors[_index] = _color; 36 | } 37 | 38 | glm::vec4 Line::getColorAt(float _t) const { 39 | if (haveColors()) 40 | return m_colors[0] * (1.0f-_t) + m_colors[1] * _t; 41 | else 42 | return glm::vec4(0.0); 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /deps/glm/glm/gtx/gradient_paint.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_gradient_paint 2 | /// @file glm/gtx/gradient_paint.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER T radialGradient 8 | ( 9 | tvec2 const & Center, 10 | T const & Radius, 11 | tvec2 const & Focal, 12 | tvec2 const & Position 13 | ) 14 | { 15 | tvec2 F = Focal - Center; 16 | tvec2 D = Position - Focal; 17 | T Radius2 = pow2(Radius); 18 | T Fx2 = pow2(F.x); 19 | T Fy2 = pow2(F.y); 20 | 21 | T Numerator = (D.x * F.x + D.y * F.y) + sqrt(Radius2 * (pow2(D.x) + pow2(D.y)) - pow2(D.x * F.y - D.y * F.x)); 22 | T Denominator = Radius2 - (Fx2 + Fy2); 23 | return Numerator / Denominator; 24 | } 25 | 26 | template 27 | GLM_FUNC_QUALIFIER T linearGradient 28 | ( 29 | tvec2 const & Point0, 30 | tvec2 const & Point1, 31 | tvec2 const & Position 32 | ) 33 | { 34 | tvec2 Dist = Point1 - Point0; 35 | return (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist); 36 | } 37 | }//namespace glm 38 | -------------------------------------------------------------------------------- /deps/glew/doc/khronos.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2007 The Khronos Group Inc. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a 4 | copy of this software and/or associated documentation files (the 5 | "Materials"), to deal in the Materials without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Materials, and to 8 | permit persons to whom the Materials are furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included 12 | in all copies or substantial portions of the Materials. 13 | 14 | THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 18 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 19 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 20 | MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. 21 | -------------------------------------------------------------------------------- /include/ada/fs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "string.h" 4 | 5 | namespace ada { 6 | 7 | // files 8 | bool urlExists(const std::string& _filename); 9 | bool haveExt(const std::string& _filename, const std::string& _ext); 10 | std::string getExt(const std::string& _filename); 11 | 12 | // paths 13 | std::string getBaseDir (const std::string& filepath); 14 | std::string getAbsPath (const std::string& _filename); 15 | std::string urlResolve(const std::string& _filename, const std::string& _pwd, const StringList& _include_folders); 16 | std::vector glob(const std::string& _pattern); 17 | 18 | // GLSL source code files 19 | std::string loadGlslFrom(const std::string& _path); 20 | std::string loadGlslFrom(const std::string& _path, const StringList& _include_folders, StringList *_dependencies); 21 | bool loadGlslFrom(const std::string& _path, std::string *_into); 22 | bool loadGlslFrom(const std::string& _filename, std::string *_into, const StringList& _include_folders, StringList *_dependencies); 23 | 24 | // Binnaries 25 | std::string encodeBase64(const unsigned char* _src, size_t _size); 26 | size_t decodeBase64(const std::string& _src, unsigned char *_to); 27 | 28 | } -------------------------------------------------------------------------------- /deps/glm/test/external/gli/gli.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-12-19 5 | // Updated : 2010-09-29 6 | // Licence : This source is under MIT License 7 | // File : gli/gli.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | /*! \mainpage OpenGL Image 11 | * 12 | */ 13 | 14 | #ifndef GLI_GLI_INCLUDED 15 | #define GLI_GLI_INCLUDED 16 | 17 | #define GLI_VERSION 31 18 | #define GLI_VERSION_MAJOR 0 19 | #define GLI_VERSION_MINOR 3 20 | #define GLI_VERSION_PATCH 1 21 | #define GLI_VERSION_REVISION 0 22 | 23 | #include "./core/texture2d.hpp" 24 | #include "./core/texture2d_array.hpp" 25 | #include "./core/texture_cube.hpp" 26 | #include "./core/texture_cube_array.hpp" 27 | #include "./core/size.hpp" 28 | #include "./core/operation.hpp" 29 | #include "./core/generate_mipmaps.hpp" 30 | 31 | #endif//GLI_GLI_INCLUDED 32 | -------------------------------------------------------------------------------- /deps/glew/doc/mesa.txt: -------------------------------------------------------------------------------- 1 | Mesa 3-D graphics library 2 | Version: 7.0 3 | 4 | Copyright (C) 1999-2007 Brian Paul All Rights Reserved. 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a 7 | copy of this software and associated documentation files (the "Software"), 8 | to deal in the Software without restriction, including without limitation 9 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 10 | and/or sell copies of the Software, and to permit persons to whom the 11 | Software is furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included 14 | in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 | BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 20 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /include/ada/gl/vertexLayout.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include "gl.h" 8 | #include "shader.h" 9 | 10 | namespace ada { 11 | 12 | struct VertexAttrib { 13 | std::string name; 14 | GLint size; 15 | GLenum type; 16 | GLboolean normalized; 17 | GLvoid* offset; // Can be left as zero; value is overwritten in constructor of VertexLayout 18 | }; 19 | 20 | class VertexLayout { 21 | public: 22 | 23 | VertexLayout(const std::vector& _attribs); 24 | VertexLayout(const std::vector& _attribs, GLint _stride); 25 | virtual ~VertexLayout(); 26 | 27 | void enable(const Shader* _program); 28 | void bind(const Shader* _program); 29 | void unbind(const Shader* _program); 30 | 31 | GLint getStride() const { return m_stride; }; 32 | 33 | bool haveAttrib(const std::string& _attribute); 34 | 35 | void printAttrib(); 36 | 37 | private: 38 | static std::map s_enabledAttribs; // Map from attrib locations to bound shader program 39 | 40 | std::vector m_attribs; 41 | GLint m_stride; 42 | }; 43 | 44 | } -------------------------------------------------------------------------------- /deps/glm/test/external/gli/gtx/loader_dds10.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-26 5 | // Updated : 2010-09-27 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/loader_dds10.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GTX_LOADER_DDS10_INCLUDED 11 | #define GLI_GTX_LOADER_DDS10_INCLUDED 12 | 13 | #include "../gli.hpp" 14 | #include 15 | 16 | namespace gli{ 17 | namespace gtx{ 18 | namespace loader_dds10 19 | { 20 | texture2D loadDDS10( 21 | std::string const & Filename); 22 | 23 | void saveDDS10( 24 | texture2D const & Image, 25 | std::string const & Filename); 26 | 27 | }//namespace loader_dds10 28 | }//namespace gtx 29 | }//namespace gli 30 | 31 | namespace gli{using namespace gtx::loader_dds10;} 32 | 33 | #include "loader_dds10.inl" 34 | 35 | #endif//GLI_GTX_LOADER_DDS10_INCLUDED 36 | -------------------------------------------------------------------------------- /deps/glm/test/external/gli/gtx/loader_tga.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-08 5 | // Updated : 2010-09-27 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/loader_tga.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GTX_LOADER_TGA_INCLUDED 11 | #define GLI_GTX_LOADER_TGA_INCLUDED 12 | 13 | #include "../gli.hpp" 14 | #include 15 | #include 16 | 17 | namespace gli{ 18 | namespace gtx{ 19 | namespace loader_tga 20 | { 21 | texture2D loadTGA( 22 | std::string const & Filename); 23 | 24 | void saveTGA( 25 | texture2D const & Image, 26 | std::string const & Filename); 27 | 28 | }//namespace loader_tga 29 | }//namespace gtx 30 | }//namespace gli 31 | 32 | namespace gli{using namespace gtx::loader_tga;} 33 | 34 | #include "loader_tga.inl" 35 | 36 | #endif//GLI_GTX_LOADER_TGA_INCLUDED 37 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/extend.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_extend 2 | /// @file glm/gtx/extend.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER genType extend 8 | ( 9 | genType const & Origin, 10 | genType const & Source, 11 | genType const & Distance 12 | ) 13 | { 14 | return Origin + (Source - Origin) * Distance; 15 | } 16 | 17 | template 18 | GLM_FUNC_QUALIFIER tvec2 extend 19 | ( 20 | tvec2 const & Origin, 21 | tvec2 const & Source, 22 | T const & Distance 23 | ) 24 | { 25 | return Origin + (Source - Origin) * Distance; 26 | } 27 | 28 | template 29 | GLM_FUNC_QUALIFIER tvec3 extend 30 | ( 31 | tvec3 const & Origin, 32 | tvec3 const & Source, 33 | T const & Distance 34 | ) 35 | { 36 | return Origin + (Source - Origin) * Distance; 37 | } 38 | 39 | template 40 | GLM_FUNC_QUALIFIER tvec4 extend 41 | ( 42 | tvec4 const & Origin, 43 | tvec4 const & Source, 44 | T const & Distance 45 | ) 46 | { 47 | return Origin + (Source - Origin) * Distance; 48 | } 49 | }//namespace glm 50 | -------------------------------------------------------------------------------- /deps/glm/test/external/gli/gtx/gl_texture2d.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-27 5 | // Updated : 2010-10-01 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/gl_texture2d.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GTX_GL_TEXTURE2D_INCLUDED 11 | #define GLI_GTX_GL_TEXTURE2D_INCLUDED 12 | 13 | #include "../gli.hpp" 14 | #include "../gtx/loader.hpp" 15 | 16 | #ifndef GL_VERSION_1_1 17 | #error "ERROR: OpenGL must be included before GLI_GTX_gl_texture2d" 18 | #endif//GL_VERSION_1_1 19 | 20 | namespace gli{ 21 | namespace gtx{ 22 | namespace gl_texture2d 23 | { 24 | GLuint createTexture2D(std::string const & Filename); 25 | }//namespace gl_texture2d 26 | }//namespace gtx 27 | }//namespace gli 28 | 29 | namespace gli{using namespace gtx::gl_texture2d;} 30 | 31 | #include "gl_texture2d.inl" 32 | 33 | #endif//GLI_GTX_GL_TEXTURE2D_INCLUDED 34 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/log_base.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_log_base 2 | /// @file glm/gtx/log_base.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_log_base GLM_GTX_log_base 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Logarithm for any base. base can be a vector or a scalar. 10 | /// 11 | /// need to be included to use these functionalities. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_GTX_log_base extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup gtx_log_base 25 | /// @{ 26 | 27 | /// Logarithm for any base. 28 | /// From GLM_GTX_log_base. 29 | template 30 | GLM_FUNC_DECL genType log( 31 | genType const & x, 32 | genType const & base); 33 | 34 | /// Logarithm for any base. 35 | /// From GLM_GTX_log_base. 36 | template class vecType> 37 | GLM_FUNC_DECL vecType sign( 38 | vecType const & x, 39 | vecType const & base); 40 | 41 | /// @} 42 | }//namespace glm 43 | 44 | #include "log_base.inl" 45 | -------------------------------------------------------------------------------- /deps/glfw/CMake/cmake_uninstall.cmake.in: -------------------------------------------------------------------------------- 1 | 2 | if (NOT EXISTS "@GLFW_BINARY_DIR@/install_manifest.txt") 3 | message(FATAL_ERROR "Cannot find install manifest: \"@GLFW_BINARY_DIR@/install_manifest.txt\"") 4 | endif() 5 | 6 | file(READ "@GLFW_BINARY_DIR@/install_manifest.txt" files) 7 | string(REGEX REPLACE "\n" ";" files "${files}") 8 | 9 | foreach (file ${files}) 10 | message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") 11 | if (EXISTS "$ENV{DESTDIR}${file}") 12 | exec_program("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 13 | OUTPUT_VARIABLE rm_out 14 | RETURN_VALUE rm_retval) 15 | if (NOT "${rm_retval}" STREQUAL 0) 16 | MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") 17 | endif() 18 | elseif (IS_SYMLINK "$ENV{DESTDIR}${file}") 19 | EXEC_PROGRAM("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 20 | OUTPUT_VARIABLE rm_out 21 | RETURN_VALUE rm_retval) 22 | if (NOT "${rm_retval}" STREQUAL 0) 23 | message(FATAL_ERROR "Problem when removing symlink \"$ENV{DESTDIR}${file}\"") 24 | endif() 25 | else() 26 | message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") 27 | endif() 28 | endforeach() 29 | 30 | -------------------------------------------------------------------------------- /deps/glm/test/external/gli/gtx/loader.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-08 5 | // Updated : 2010-09-27 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/loader.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GTX_LOADER_INCLUDED 11 | #define GLI_GTX_LOADER_INCLUDED 12 | 13 | #include "../gli.hpp" 14 | #include "../gtx/loader_dds9.hpp" 15 | #include "../gtx/loader_dds10.hpp" 16 | #include "../gtx/loader_tga.hpp" 17 | 18 | namespace gli{ 19 | namespace gtx{ 20 | namespace loader 21 | { 22 | inline texture2D load( 23 | std::string const & Filename); 24 | 25 | inline void save( 26 | texture2D const & Image, 27 | std::string const & Filename); 28 | 29 | }//namespace loader 30 | }//namespace gtx 31 | }//namespace gli 32 | 33 | namespace gli{using namespace gtx::loader;} 34 | 35 | #include "loader.inl" 36 | 37 | #endif//GLI_GTX_LOADER_INCLUDED 38 | -------------------------------------------------------------------------------- /include/ada/shaders/default_error.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | static const std::string error_vert = R"( 6 | #ifdef GL_ES 7 | precision mediump float; 8 | #endif 9 | 10 | uniform mat4 u_modelViewProjectionMatrix; 11 | 12 | attribute vec4 a_position; 13 | varying vec4 v_position; 14 | 15 | void main(void) { 16 | v_position = a_position; 17 | gl_Position = u_modelViewProjectionMatrix * v_position; 18 | } 19 | )"; 20 | 21 | static const std::string error_frag = R"( 22 | #ifdef GL_ES 23 | precision mediump float; 24 | #endif 25 | 26 | void main(void) { 27 | gl_FragColor = vec4(1.0, 0.0, 1.0, 1.0); 28 | } 29 | )"; 30 | 31 | static const std::string error_vert_300 = R"( 32 | #ifdef GL_ES 33 | precision mediump float; 34 | #endif 35 | 36 | uniform mat4 u_modelViewProjectionMatrix; 37 | 38 | in vec4 a_position; 39 | out vec4 v_position; 40 | 41 | void main(void) { 42 | v_position = a_position; 43 | gl_Position = u_modelViewProjectionMatrix * v_position; 44 | } 45 | )"; 46 | 47 | 48 | static const std::string error_frag_300 = R"( 49 | #ifdef GL_ES 50 | precision mediump float; 51 | #endif 52 | 53 | out vec4 fragColor; 54 | 55 | void main(void) { 56 | fragColor = vec4(1.0, 0.0, 1.0, 1.0); 57 | } 58 | )"; 59 | -------------------------------------------------------------------------------- /deps/glfw/cmake_uninstall.cmake.in: -------------------------------------------------------------------------------- 1 | 2 | if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 3 | message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") 4 | endif() 5 | 6 | file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) 7 | string(REGEX REPLACE "\n" ";" files "${files}") 8 | 9 | foreach (file ${files}) 10 | message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") 11 | if (EXISTS "$ENV{DESTDIR}${file}") 12 | exec_program("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 13 | OUTPUT_VARIABLE rm_out 14 | RETURN_VALUE rm_retval) 15 | if (NOT "${rm_retval}" STREQUAL 0) 16 | MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") 17 | endif() 18 | elseif (IS_SYMLINK "$ENV{DESTDIR}${file}") 19 | EXEC_PROGRAM("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 20 | OUTPUT_VARIABLE rm_out 21 | RETURN_VALUE rm_retval) 22 | if (NOT "${rm_retval}" STREQUAL 0) 23 | message(FATAL_ERROR "Problem when removing symlink \"$ENV{DESTDIR}${file}\"") 24 | endif() 25 | else() 26 | message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") 27 | endif() 28 | endforeach() 29 | 30 | -------------------------------------------------------------------------------- /deps/glm/test/gtc/gtc_matrix_transform.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int test_perspective() 5 | { 6 | int Error = 0; 7 | 8 | glm::mat4 Projection = glm::perspective(glm::pi() * 0.25f, 4.0f / 3.0f, 0.1f, 100.0f); 9 | 10 | return Error; 11 | } 12 | 13 | int test_pick() 14 | { 15 | int Error = 0; 16 | 17 | glm::mat4 Pick = glm::pickMatrix(glm::vec2(1, 2), glm::vec2(3, 4), glm::ivec4(0, 0, 320, 240)); 18 | 19 | return Error; 20 | } 21 | 22 | int test_tweakedInfinitePerspective() 23 | { 24 | int Error = 0; 25 | 26 | glm::mat4 ProjectionA = glm::tweakedInfinitePerspective(45.f, 640.f/480.f, 1.0f); 27 | glm::mat4 ProjectionB = glm::tweakedInfinitePerspective(45.f, 640.f/480.f, 1.0f, 0.001f); 28 | 29 | 30 | return Error; 31 | } 32 | 33 | int test_translate() 34 | { 35 | int Error = 0; 36 | 37 | glm::lowp_vec3 v(1.0); 38 | glm::lowp_mat4 m(0); 39 | glm::lowp_mat4 t = glm::translate(m, v); 40 | 41 | return Error; 42 | } 43 | 44 | int main() 45 | { 46 | int Error = 0; 47 | 48 | Error += test_translate(); 49 | Error += test_tweakedInfinitePerspective(); 50 | Error += test_pick(); 51 | Error += test_perspective(); 52 | 53 | return Error; 54 | } 55 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/raw_data.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_raw_data 2 | /// @file glm/gtx/raw_data.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_raw_data GLM_GTX_raw_data 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Projection of a vector to other one 10 | /// 11 | /// need to be included to use these functionalities. 12 | 13 | #pragma once 14 | 15 | // Dependencies 16 | #include "../detail/setup.hpp" 17 | #include "../detail/type_int.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_GTX_raw_data extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup gtx_raw_data 26 | /// @{ 27 | 28 | //! Type for byte numbers. 29 | //! From GLM_GTX_raw_data extension. 30 | typedef detail::uint8 byte; 31 | 32 | //! Type for word numbers. 33 | //! From GLM_GTX_raw_data extension. 34 | typedef detail::uint16 word; 35 | 36 | //! Type for dword numbers. 37 | //! From GLM_GTX_raw_data extension. 38 | typedef detail::uint32 dword; 39 | 40 | //! Type for qword numbers. 41 | //! From GLM_GTX_raw_data extension. 42 | typedef detail::uint64 qword; 43 | 44 | /// @} 45 | }// namespace glm 46 | 47 | #include "raw_data.inl" 48 | -------------------------------------------------------------------------------- /deps/glm/test/external/gli/gtx/loader_dds9.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-08 5 | // Updated : 2010-09-27 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/loader_dds9.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GTX_LOADER_DDS9_INCLUDED 11 | #define GLI_GTX_LOADER_DDS9_INCLUDED 12 | 13 | #include "../gli.hpp" 14 | #include 15 | 16 | namespace gli{ 17 | namespace gtx{ 18 | namespace loader_dds9 19 | { 20 | texture2D loadDDS9( 21 | std::string const & Filename); 22 | 23 | void saveDDS9( 24 | texture2D const & Texture, 25 | std::string const & Filename); 26 | 27 | void saveTextureCubeDDS9( 28 | textureCube const & Texture, 29 | std::string const & Filename); 30 | 31 | }//namespace loader_dds9 32 | }//namespace gtx 33 | }//namespace gli 34 | 35 | namespace gli{using namespace gtx::loader_dds9;} 36 | 37 | #include "loader_dds9.inl" 38 | 39 | #endif//GLI_GTX_LOADER_DDS9_INCLUDED 40 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_matrix_query.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int test_isNull() 4 | { 5 | int Error(0); 6 | 7 | bool TestA = glm::isNull(glm::mat4(0), 0.00001f); 8 | Error += TestA ? 0 : 1; 9 | 10 | return Error; 11 | } 12 | 13 | int test_isIdentity() 14 | { 15 | int Error(0); 16 | 17 | { 18 | bool TestA = glm::isIdentity(glm::mat2(1), 0.00001f); 19 | Error += TestA ? 0 : 1; 20 | } 21 | { 22 | bool TestA = glm::isIdentity(glm::mat3(1), 0.00001f); 23 | Error += TestA ? 0 : 1; 24 | } 25 | { 26 | bool TestA = glm::isIdentity(glm::mat4(1), 0.00001f); 27 | Error += TestA ? 0 : 1; 28 | } 29 | 30 | return Error; 31 | } 32 | 33 | int test_isNormalized() 34 | { 35 | int Error(0); 36 | 37 | bool TestA = glm::isNormalized(glm::mat4(1), 0.00001f); 38 | Error += TestA ? 0 : 1; 39 | 40 | return Error; 41 | } 42 | 43 | int test_isOrthogonal() 44 | { 45 | int Error(0); 46 | 47 | bool TestA = glm::isOrthogonal(glm::mat4(1), 0.00001f); 48 | Error += TestA ? 0 : 1; 49 | 50 | return Error; 51 | } 52 | 53 | int main() 54 | { 55 | int Error(0); 56 | 57 | Error += test_isNull(); 58 | Error += test_isIdentity(); 59 | Error += test_isNormalized(); 60 | Error += test_isOrthogonal(); 61 | 62 | return Error; 63 | } 64 | 65 | 66 | -------------------------------------------------------------------------------- /deps/glm/test/gtc/gtc_matrix_inverse.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int test_affine() 5 | { 6 | int Error = 0; 7 | 8 | { 9 | glm::mat3 const M( 10 | 2.f, 0.f, 0.f, 11 | 0.f, 2.f, 0.f, 12 | 0.f, 0.f, 1.f); 13 | glm::mat3 const A = glm::affineInverse(M); 14 | glm::mat3 const I = glm::inverse(M); 15 | glm::mat3 const R = glm::affineInverse(A); 16 | 17 | for(glm::length_t i = 0; i < A.length(); ++i) 18 | { 19 | Error += glm::all(glm::epsilonEqual(M[i], R[i], 0.01f)) ? 0 : 1; 20 | Error += glm::all(glm::epsilonEqual(A[i], I[i], 0.01f)) ? 0 : 1; 21 | } 22 | } 23 | 24 | { 25 | glm::mat4 const M( 26 | 2.f, 0.f, 0.f, 0.f, 27 | 0.f, 2.f, 0.f, 0.f, 28 | 0.f, 0.f, 2.f, 0.f, 29 | 0.f, 0.f, 0.f, 1.f); 30 | glm::mat4 const A = glm::affineInverse(M); 31 | glm::mat4 const I = glm::inverse(M); 32 | glm::mat4 const R = glm::affineInverse(A); 33 | 34 | for(glm::length_t i = 0; i < A.length(); ++i) 35 | { 36 | Error += glm::all(glm::epsilonEqual(M[i], R[i], 0.01f)) ? 0 : 1; 37 | Error += glm::all(glm::epsilonEqual(A[i], I[i], 0.01f)) ? 0 : 1; 38 | } 39 | } 40 | 41 | return Error; 42 | } 43 | 44 | int main() 45 | { 46 | int Error = 0; 47 | 48 | Error += test_affine(); 49 | 50 | return Error; 51 | } 52 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/matrix_cross_product.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_matrix_cross_product 2 | /// @file glm/gtx/matrix_cross_product.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_extented_min_max (dependence) 6 | /// 7 | /// @defgroup gtx_matrix_cross_product GLM_GTX_matrix_cross_product 8 | /// @ingroup gtx 9 | /// 10 | /// @brief Build cross product matrices 11 | /// 12 | /// need to be included to use these functionalities. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../glm.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_GTX_matrix_cross_product extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup gtx_matrix_cross_product 26 | /// @{ 27 | 28 | //! Build a cross product matrix. 29 | //! From GLM_GTX_matrix_cross_product extension. 30 | template 31 | GLM_FUNC_DECL tmat3x3 matrixCross3( 32 | tvec3 const & x); 33 | 34 | //! Build a cross product matrix. 35 | //! From GLM_GTX_matrix_cross_product extension. 36 | template 37 | GLM_FUNC_DECL tmat4x4 matrixCross4( 38 | tvec3 const & x); 39 | 40 | /// @} 41 | }//namespace glm 42 | 43 | #include "matrix_cross_product.inl" 44 | -------------------------------------------------------------------------------- /deps/glfw/src/xkb_unicode.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 Linux - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2014 Jonas Ådahl 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | long _glfwKeySym2Unicode(unsigned int keysym); 28 | 29 | -------------------------------------------------------------------------------- /deps/glm/glm/detail/precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/precision.hpp 3 | 4 | #pragma once 5 | 6 | #include "setup.hpp" 7 | 8 | namespace glm 9 | { 10 | enum precision 11 | { 12 | packed_highp, 13 | packed_mediump, 14 | packed_lowp, 15 | 16 | # if GLM_HAS_ALIGNED_TYPE 17 | aligned_highp, 18 | aligned_mediump, 19 | aligned_lowp, 20 | aligned = aligned_highp, 21 | # endif 22 | 23 | highp = packed_highp, 24 | mediump = packed_mediump, 25 | lowp = packed_lowp, 26 | packed = packed_highp, 27 | 28 | # if GLM_HAS_ALIGNED_TYPE && defined(GLM_FORCE_ALIGNED) 29 | defaultp = aligned_highp 30 | # else 31 | defaultp = highp 32 | # endif 33 | }; 34 | 35 | namespace detail 36 | { 37 | template 38 | struct is_aligned 39 | { 40 | static const bool value = false; 41 | }; 42 | 43 | # if GLM_HAS_ALIGNED_TYPE 44 | template<> 45 | struct is_aligned 46 | { 47 | static const bool value = true; 48 | }; 49 | 50 | template<> 51 | struct is_aligned 52 | { 53 | static const bool value = true; 54 | }; 55 | 56 | template<> 57 | struct is_aligned 58 | { 59 | static const bool value = true; 60 | }; 61 | # endif 62 | }//namespace detail 63 | }//namespace glm 64 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/orthonormalize.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_orthonormalize 2 | /// @file glm/gtx/orthonormalize.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_extented_min_max (dependence) 6 | /// 7 | /// @defgroup gtx_orthonormalize GLM_GTX_orthonormalize 8 | /// @ingroup gtx 9 | /// 10 | /// @brief Orthonormalize matrices. 11 | /// 12 | /// need to be included to use these functionalities. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../vec3.hpp" 18 | #include "../mat3x3.hpp" 19 | #include "../geometric.hpp" 20 | 21 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 22 | # pragma message("GLM: GLM_GTX_orthonormalize extension included") 23 | #endif 24 | 25 | namespace glm 26 | { 27 | /// @addtogroup gtx_orthonormalize 28 | /// @{ 29 | 30 | /// Returns the orthonormalized matrix of m. 31 | /// 32 | /// @see gtx_orthonormalize 33 | template 34 | GLM_FUNC_DECL tmat3x3 orthonormalize(tmat3x3 const & m); 35 | 36 | /// Orthonormalizes x according y. 37 | /// 38 | /// @see gtx_orthonormalize 39 | template 40 | GLM_FUNC_DECL tvec3 orthonormalize(tvec3 const & x, tvec3 const & y); 41 | 42 | /// @} 43 | }//namespace glm 44 | 45 | #include "orthonormalize.inl" 46 | -------------------------------------------------------------------------------- /deps/glm/test/external/gli/gtx/gradient.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-12-19 5 | // Updated : 2010-01-09 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/gradient.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GTX_GRADIENT_INCLUDED 11 | #define GLI_GTX_GRADIENT_INCLUDED 12 | 13 | #include "../gli.hpp" 14 | 15 | namespace gli{ 16 | namespace gtx{ 17 | namespace gradient 18 | { 19 | texture2D radial( 20 | texture2D::dimensions_type const & Size, 21 | texture2D::texcoord_type const & Center, 22 | float const & Radius, 23 | texture2D::texcoord_type const & Focal); 24 | 25 | texture2D linear( 26 | texture2D::dimensions_type const & Size, 27 | texture2D::texcoord_type const & Point0, 28 | texture2D::texcoord_type const & Point1); 29 | 30 | }//namespace gradient 31 | }//namespace gtx 32 | }//namespace gli 33 | 34 | namespace gli{using namespace gtx::gradient;} 35 | 36 | #include "gradient.inl" 37 | 38 | #endif//GLI_GTX_GRADIENT_INCLUDED 39 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/polar_coordinates.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_polar_coordinates 2 | /// @file glm/gtx/polar_coordinates.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_polar_coordinates GLM_GTX_polar_coordinates 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Conversion from Euclidean space to polar space and revert. 10 | /// 11 | /// need to be included to use these functionalities. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_GTX_polar_coordinates extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup gtx_polar_coordinates 25 | /// @{ 26 | 27 | /// Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude. 28 | /// 29 | /// @see gtx_polar_coordinates 30 | template 31 | GLM_FUNC_DECL tvec3 polar( 32 | tvec3 const & euclidean); 33 | 34 | /// Convert Polar to Euclidean coordinates. 35 | /// 36 | /// @see gtx_polar_coordinates 37 | template 38 | GLM_FUNC_DECL tvec3 euclidean( 39 | tvec2 const & polar); 40 | 41 | /// @} 42 | }//namespace glm 43 | 44 | #include "polar_coordinates.inl" 45 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/closest_point.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_closest_point 2 | /// @file glm/gtx/closest_point.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_closest_point GLM_GTX_closest_point 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Find the point on a straight line which is the closet of a point. 10 | /// 11 | /// need to be included to use these functionalities. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_GTX_closest_point extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup gtx_closest_point 25 | /// @{ 26 | 27 | /// Find the point on a straight line which is the closet of a point. 28 | /// @see gtx_closest_point 29 | template 30 | GLM_FUNC_DECL tvec3 closestPointOnLine( 31 | tvec3 const & point, 32 | tvec3 const & a, 33 | tvec3 const & b); 34 | 35 | /// 2d lines work as well 36 | template 37 | GLM_FUNC_DECL tvec2 closestPointOnLine( 38 | tvec2 const & point, 39 | tvec2 const & a, 40 | tvec2 const & b); 41 | 42 | /// @} 43 | }// namespace glm 44 | 45 | #include "closest_point.inl" 46 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/optimum_pow.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_optimum_pow 2 | /// @file glm/gtx/optimum_pow.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_optimum_pow GLM_GTX_optimum_pow 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Integer exponentiation of power functions. 10 | /// 11 | /// need to be included to use these functionalities. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_GTX_optimum_pow extension included") 20 | #endif 21 | 22 | namespace glm{ 23 | namespace gtx 24 | { 25 | /// @addtogroup gtx_optimum_pow 26 | /// @{ 27 | 28 | /// Returns x raised to the power of 2. 29 | /// 30 | /// @see gtx_optimum_pow 31 | template 32 | GLM_FUNC_DECL genType pow2(genType const & x); 33 | 34 | /// Returns x raised to the power of 3. 35 | /// 36 | /// @see gtx_optimum_pow 37 | template 38 | GLM_FUNC_DECL genType pow3(genType const & x); 39 | 40 | /// Returns x raised to the power of 4. 41 | /// 42 | /// @see gtx_optimum_pow 43 | template 44 | GLM_FUNC_DECL genType pow4(genType const & x); 45 | 46 | /// @} 47 | }//namespace gtx 48 | }//namespace glm 49 | 50 | #include "optimum_pow.inl" 51 | -------------------------------------------------------------------------------- /include/ada/gl/textureStreamMMAL.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "textureStream.h" 5 | 6 | #if defined(SUPPORT_MMAL) 7 | #include "gl.h" 8 | #include "shader.h" 9 | #include "vbo.h" 10 | 11 | #include "interface/mmal/mmal.h" 12 | #include "interface/mmal/mmal_logging.h" 13 | #include "interface/mmal/mmal_buffer.h" 14 | #include "interface/mmal/util/mmal_util.h" 15 | #include "interface/mmal/util/mmal_util_params.h" 16 | #include "interface/mmal/util/mmal_default_components.h" 17 | #include "interface/mmal/util/mmal_connection.h" 18 | 19 | namespace ada { 20 | 21 | class TextureStreamMMAL : public TextureStream { 22 | public: 23 | TextureStreamMMAL(); 24 | virtual ~TextureStreamMMAL(); 25 | 26 | virtual bool load(const std::string& _filepath, bool _vFlip, TextureFilter _filter = LINEAR, TextureWrap _wrap = REPEAT); 27 | virtual bool update(); 28 | virtual void clear(); 29 | 30 | 31 | protected: 32 | 33 | static void camera_control_callback(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); 34 | static void video_output_callback(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); 35 | 36 | MMAL_COMPONENT_T *camera_component = NULL; 37 | 38 | GLuint m_fbo_id; 39 | GLuint m_old_fbo_id; 40 | GLuint m_egl_img; 41 | Shader m_shader; 42 | Vbo* m_vbo; 43 | }; 44 | 45 | } 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /deps/glm/glm/gtc/functions.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtc_functions 2 | /// @file glm/gtc/functions.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtc_half_float (dependence) 6 | /// @see gtc_quaternion (dependence) 7 | /// 8 | /// @defgroup gtc_functions GLM_GTC_functions 9 | /// @ingroup gtc 10 | /// 11 | /// @brief List of useful common functions. 12 | /// 13 | /// need to be included to use these functionalities. 14 | 15 | #pragma once 16 | 17 | // Dependencies 18 | #include "../detail/setup.hpp" 19 | #include "../detail/precision.hpp" 20 | #include "../detail/type_vec2.hpp" 21 | 22 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTC_functions extension included") 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtc_functions 29 | /// @{ 30 | 31 | /// 1D gauss function 32 | /// 33 | /// @see gtc_epsilon 34 | template 35 | GLM_FUNC_DECL T gauss( 36 | T x, 37 | T ExpectedValue, 38 | T StandardDeviation); 39 | 40 | /// 2D gauss function 41 | /// 42 | /// @see gtc_epsilon 43 | template 44 | GLM_FUNC_DECL T gauss( 45 | tvec2 const& Coord, 46 | tvec2 const& ExpectedValue, 47 | tvec2 const& StandardDeviation); 48 | 49 | /// @} 50 | }//namespace glm 51 | 52 | #include "functions.inl" 53 | 54 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/closest_point.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_closest_point 2 | /// @file glm/gtx/closest_point.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER tvec3 closestPointOnLine 8 | ( 9 | tvec3 const & point, 10 | tvec3 const & a, 11 | tvec3 const & b 12 | ) 13 | { 14 | T LineLength = distance(a, b); 15 | tvec3 Vector = point - a; 16 | tvec3 LineDirection = (b - a) / LineLength; 17 | 18 | // Project Vector to LineDirection to get the distance of point from a 19 | T Distance = dot(Vector, LineDirection); 20 | 21 | if(Distance <= T(0)) return a; 22 | if(Distance >= LineLength) return b; 23 | return a + LineDirection * Distance; 24 | } 25 | 26 | template 27 | GLM_FUNC_QUALIFIER tvec2 closestPointOnLine 28 | ( 29 | tvec2 const & point, 30 | tvec2 const & a, 31 | tvec2 const & b 32 | ) 33 | { 34 | T LineLength = distance(a, b); 35 | tvec2 Vector = point - a; 36 | tvec2 LineDirection = (b - a) / LineLength; 37 | 38 | // Project Vector to LineDirection to get the distance of point from a 39 | T Distance = dot(Vector, LineDirection); 40 | 41 | if(Distance <= T(0)) return a; 42 | if(Distance >= LineLength) return b; 43 | return a + LineDirection * Distance; 44 | } 45 | 46 | }//namespace glm 47 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/matrix_decompose.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_matrix_decompose 2 | /// @file glm/gtx/matrix_decompose.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_matrix_decompose GLM_GTX_matrix_decompose 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Decomposes a model matrix to translations, rotation and scale components 10 | /// 11 | /// need to be included to use these functionalities. 12 | 13 | #pragma once 14 | 15 | // Dependencies 16 | #include "../mat4x4.hpp" 17 | #include "../vec3.hpp" 18 | #include "../vec4.hpp" 19 | #include "../geometric.hpp" 20 | #include "../gtc/quaternion.hpp" 21 | #include "../gtc/matrix_transform.hpp" 22 | 23 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 24 | # pragma message("GLM: GLM_GTX_matrix_decompose extension included") 25 | #endif 26 | 27 | namespace glm 28 | { 29 | /// @addtogroup gtx_matrix_decompose 30 | /// @{ 31 | 32 | /// Decomposes a model matrix to translations, rotation and scale components 33 | /// @see gtx_matrix_decompose 34 | template 35 | GLM_FUNC_DECL bool decompose( 36 | tmat4x4 const & modelMatrix, 37 | tvec3 & scale, tquat & orientation, tvec3 & translation, tvec3 & skew, tvec4 & perspective); 38 | 39 | /// @} 40 | }//namespace glm 41 | 42 | #include "matrix_decompose.inl" 43 | -------------------------------------------------------------------------------- /include/ada/gl/convolutionPyramid.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "vbo.h" 4 | #include "fbo.h" 5 | #include "shader.h" 6 | 7 | #include 8 | 9 | // Reference: 10 | // - Convolution Pyramids, Farbman et al., 2011 (https://www.cse.huji.ac.il/labs/cglab/projects/convpyr/data/convpyr-small.pdf) 11 | // - Rendu (https://github.com/kosua20/Rendu) 12 | // - ofxPoissonFill (https://github.com/LingDong-/ofxPoissonFill) 13 | // 14 | 15 | #define CONVOLUTION_PYRAMID_MAX_LAYERS 12 16 | 17 | namespace ada { 18 | 19 | class ConvolutionPyramid { 20 | public: 21 | ConvolutionPyramid(); 22 | virtual ~ConvolutionPyramid(); 23 | 24 | void allocate(int _width, int _height); 25 | bool isAllocated() const {return m_depth != 0; } 26 | unsigned int getDepth() const { return m_depth; } 27 | const Fbo* getResult(unsigned int index = 0) const; 28 | virtual int getWidth() const { return m_width; }; 29 | virtual int getHeight() const { return m_height; }; 30 | 31 | void process(const Fbo *_fbo); 32 | std::function pass; 33 | 34 | bool fixed; 35 | private: 36 | Fbo m_downs[CONVOLUTION_PYRAMID_MAX_LAYERS]; 37 | Fbo m_ups[CONVOLUTION_PYRAMID_MAX_LAYERS]; 38 | 39 | int m_width; 40 | int m_height; 41 | 42 | unsigned int m_depth; 43 | }; 44 | 45 | } 46 | -------------------------------------------------------------------------------- /deps/glfw/CMake/Info.plist.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${MACOSX_BUNDLE_EXECUTABLE_NAME} 9 | CFBundleGetInfoString 10 | ${MACOSX_BUNDLE_INFO_STRING} 11 | CFBundleIconFile 12 | ${MACOSX_BUNDLE_ICON_FILE} 13 | CFBundleIdentifier 14 | ${MACOSX_BUNDLE_GUI_IDENTIFIER} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleLongVersionString 18 | ${MACOSX_BUNDLE_LONG_VERSION_STRING} 19 | CFBundleName 20 | ${MACOSX_BUNDLE_BUNDLE_NAME} 21 | CFBundlePackageType 22 | APPL 23 | CFBundleShortVersionString 24 | ${MACOSX_BUNDLE_SHORT_VERSION_STRING} 25 | CFBundleSignature 26 | ???? 27 | CFBundleVersion 28 | ${MACOSX_BUNDLE_BUNDLE_VERSION} 29 | CSResourcesFileMapped 30 | 31 | LSRequiresCarbon 32 | 33 | NSHumanReadableCopyright 34 | ${MACOSX_BUNDLE_COPYRIGHT} 35 | NSHighResolutionCapable 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /deps/glm/test/external/gli/gtx/loader.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-08 5 | // Updated : 2010-09-27 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/loader.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace gli{ 11 | namespace gtx{ 12 | namespace loader 13 | { 14 | inline texture2D load 15 | ( 16 | std::string const & Filename 17 | ) 18 | { 19 | if(Filename.find(".dds") != std::string::npos) 20 | return loadDDS10(Filename); 21 | else if(Filename.find(".tga") != std::string::npos) 22 | return loadTGA(Filename); 23 | else 24 | { 25 | assert(0); // File format not supported 26 | return texture2D(); 27 | } 28 | } 29 | 30 | inline void save 31 | ( 32 | texture2D const & Image, 33 | std::string const & Filename 34 | ) 35 | { 36 | if(Filename.find(".dds") != std::string::npos) 37 | saveDDS10(Image, Filename); 38 | else if(Filename.find(".tga") != std::string::npos) 39 | saveTGA(Image, Filename); 40 | else 41 | assert(0); // File format not supported 42 | } 43 | 44 | }//namespace loader 45 | }//namespace gtx 46 | }//namespace gli 47 | -------------------------------------------------------------------------------- /deps/glm/test/gtx/gtx_log_base.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | namespace test_log 7 | { 8 | int run() 9 | { 10 | int Error = 0; 11 | 12 | { 13 | float A = glm::log(10.f, 2.0f); 14 | float B = glm::log2(10.f); 15 | Error += glm::epsilonEqual(A, B, 0.00001f) ? 0 : 1; 16 | } 17 | 18 | { 19 | glm::vec1 A = glm::log(glm::vec1(10.f), glm::vec1(2.0f)); 20 | glm::vec1 B = glm::log2(glm::vec1(10.f)); 21 | Error += glm::all(glm::epsilonEqual(A, B, glm::vec1(0.00001f))) ? 0 : 1; 22 | } 23 | 24 | { 25 | glm::vec2 A = glm::log(glm::vec2(10.f), glm::vec2(2.0f)); 26 | glm::vec2 B = glm::log2(glm::vec2(10.f)); 27 | Error += glm::all(glm::epsilonEqual(A, B, glm::vec2(0.00001f))) ? 0 : 1; 28 | } 29 | 30 | { 31 | glm::vec3 A = glm::log(glm::vec3(10.f), glm::vec3(2.0f)); 32 | glm::vec3 B = glm::log2(glm::vec3(10.f)); 33 | Error += glm::all(glm::epsilonEqual(A, B, glm::vec3(0.00001f))) ? 0 : 1; 34 | } 35 | 36 | { 37 | glm::vec4 A = glm::log(glm::vec4(10.f), glm::vec4(2.0f)); 38 | glm::vec4 B = glm::log2(glm::vec4(10.f)); 39 | Error += glm::all(glm::epsilonEqual(A, B, glm::vec4(0.00001f))) ? 0 : 1; 40 | } 41 | 42 | return Error; 43 | } 44 | }//namespace test_log 45 | 46 | int main() 47 | { 48 | int Error(0); 49 | 50 | Error += test_log::run(); 51 | 52 | return Error; 53 | } 54 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: cpp 2 | compiler: clang 3 | branches: 4 | only: 5 | - main 6 | matrix: 7 | include: 8 | - os: linux 9 | dist: bionic 10 | sudo: required 11 | name: "GLFW 3 shared library" 12 | addons: 13 | apt: 14 | packages: 15 | - xorg-dev 16 | - libglu1-mesa-dev 17 | - libavcodec-dev 18 | - libavfilter-dev 19 | - libavdevice-dev 20 | - libavformat-dev 21 | - libavutil-dev 22 | - libswscale-dev 23 | - libv4l-dev 24 | - libjpeg-dev 25 | - libpng-dev 26 | - libtiff-dev 27 | 28 | script: 29 | - mkdir build 30 | - cd build 31 | - cmake .. 32 | - cmake --build . 33 | 34 | # deploy: 35 | # - provider: launchpad 36 | # slug: ~patriciogv/ada/+git/ada 37 | # oauth_token: 38 | # secure: "OW7GPoeGl8ZPX1ZSXixMgAAhvz2dI3Uif9NnIE7m1A3GMa8ctJKfAULtvjOM/iONYxOZvZeJLmPHYMCY/7L8OdvEJKP4+Dk0qJ/mIfCEKnulTzzjEKvEfos7/0Hjym5D0wVrNZEyiY8rUCm7MDmULHO7BYeBqrJLFJhlr5PZYyY=" 39 | # oauth_token_secret: 40 | # secure: "A8ZuwfRxu+KsEnU7cMOR2J2DIlQVZO4cPdhXehEZzMXQ/e3/hDkIqw/LicGeR+rIwkG+xgeW1CKdUmXBsptmWhnh8pmSV6xFUXJAFGgaXe7I4WILncHk9AngK7hLRKJjBSjZSkJGGXlTrz7b0esNn9Gyh+QiqZ/CQUhErRwTKNA=" -------------------------------------------------------------------------------- /deps/glm/test/external/gli/core/shared_ptr.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-12-19 5 | // Updated : 2005-06-13 6 | // Licence : This source is under MIT License 7 | // File : gli/fetch.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_SHARED_PTR_INCLUDED 11 | #define GLI_SHARED_PTR_INCLUDED 12 | 13 | namespace gli 14 | { 15 | template 16 | class shared_ptr 17 | { 18 | public: 19 | shared_ptr(); 20 | shared_ptr(shared_ptr const & SmartPtr); 21 | shared_ptr(T* pPointer); 22 | ~shared_ptr(); 23 | 24 | T& operator*(); 25 | T* operator->(); 26 | const T& operator*() const; 27 | const T* operator->() const; 28 | shared_ptr& operator=(shared_ptr const & SmartPtr); 29 | shared_ptr& operator=(T* pPointer); 30 | bool operator==(shared_ptr const & SmartPtr) const; 31 | bool operator!=(shared_ptr const & SmartPtr) const; 32 | 33 | private: 34 | int* m_pReference; 35 | T* m_pPointer; 36 | }; 37 | }//namespace gli 38 | 39 | #include "shared_ptr.inl" 40 | 41 | #endif //GLI_SHARED_PTR_INCLUDED 42 | -------------------------------------------------------------------------------- /deps/glm/glm/gtx/string_cast.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_string_cast 2 | /// @file glm/gtx/string_cast.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtc_half_float (dependence) 6 | /// @see gtx_integer (dependence) 7 | /// @see gtx_quaternion (dependence) 8 | /// 9 | /// @defgroup gtx_string_cast GLM_GTX_string_cast 10 | /// @ingroup gtx 11 | /// 12 | /// @brief Setup strings for GLM type values 13 | /// 14 | /// need to be included to use these functionalities. 15 | /// This extension is not supported with CUDA 16 | 17 | #pragma once 18 | 19 | // Dependency: 20 | #include "../glm.hpp" 21 | #include "../gtc/type_precision.hpp" 22 | #include "../gtc/quaternion.hpp" 23 | #include "../gtx/dual_quaternion.hpp" 24 | #include 25 | 26 | #if(GLM_COMPILER & GLM_COMPILER_CUDA) 27 | # error "GLM_GTX_string_cast is not supported on CUDA compiler" 28 | #endif 29 | 30 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 31 | # pragma message("GLM: GLM_GTX_string_cast extension included") 32 | #endif 33 | 34 | namespace glm 35 | { 36 | /// @addtogroup gtx_string_cast 37 | /// @{ 38 | 39 | /// Create a string from a GLM vector or matrix typed variable. 40 | /// @see gtx_string_cast extension. 41 | template