-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '2020_ht1_updates' into master
- Loading branch information
Showing
81 changed files
with
44,238 additions
and
2,522 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,34 @@ | ||
language: cpp | ||
|
||
os: linux | ||
|
||
# Use the latest supported distro, Xenial, released in April 2016… | ||
dist: xenial | ||
|
||
git: | ||
depth: 1 | ||
os: | ||
- linux | ||
- osx | ||
dist: focal | ||
osx_image: xcode12 | ||
|
||
compiler: | ||
- clang | ||
- gcc | ||
- clang | ||
|
||
env: | ||
matrix: | ||
- BUILD_TYPE="Release" | ||
- BUILD_TYPE="Debug" | ||
- BUILD_TYPE="Release" | ||
- BUILD_TYPE="Debug" | ||
|
||
jobs: | ||
exclude: | ||
- os: osx | ||
compiler: gcc | ||
|
||
git: | ||
depth: 1 | ||
|
||
# Xenial only has outdated versions of the packages we could use, but we still | ||
# install them as a way to get all their dependencies installed. | ||
before_install: | ||
- sudo apt-get install -y libassimp-dev | ||
- sudo apt-get install -y libglm-dev | ||
- sudo apt-get install -y libglfw3-dev | ||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get install -y libassimp-dev libglfw3-dev; fi | ||
|
||
script: | ||
- mkdir build || exit 1 | ||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then generator='Xcode'; else generator='Ninja'; fi | ||
- pushd build && { cmake -DCMAKE_CXX_FLAGS="-Wall" \ | ||
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \ | ||
-G Ninja ..; popd; } || exit 1 | ||
-G "$generator" ..; popd; } || exit 1 | ||
- cmake --build build || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
From fa1dc3b8f1603622d33ba3010b9ed5962e8f39c4 Mon Sep 17 00:00:00 2001 | ||
From: Bradley Austin Davis <[email protected]> | ||
Date: Fri, 18 Oct 2019 13:02:32 -0700 | ||
Subject: [PATCH] Fix CMake import | ||
|
||
Using CMake 3.15 & Visual Studio 2019 to build on windows produced a cmake configuration which was unable to be used by clients. Investigating this I was eventually able to determine this was caused by a mismatch in the target properties. Specifically, it was setting the TYPE property to STATIC_LIBRARY even though it was building as a SHARED_LIBRARY. | ||
|
||
This in turn was because the if clause on line `if(@BUILD_SHARED_LIBS@)` of this file was evaluating to `if (ON)` which was then not properly evaluated while under the CMake 2.6 policy. Explicitly setting the `CMP0012` policy to NEW fixes the problem. | ||
--- | ||
assimpTargets.cmake.in | 3 +++ | ||
1 file changed, 3 insertions(+) | ||
|
||
diff --git a/assimpTargets.cmake.in b/assimpTargets.cmake.in | ||
index ab1a8d2c..afef9cbd 100644 | ||
--- a/assimpTargets.cmake.in | ||
+++ b/assimpTargets.cmake.in | ||
@@ -5,6 +5,9 @@ if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) | ||
endif() | ||
cmake_policy(PUSH) | ||
cmake_policy(VERSION 2.6) | ||
+# Required for the evaluation of "if(@BUILD_SHARED_LIBS@)" below to function | ||
+cmake_policy(SET CMP0012 NEW) | ||
+ | ||
#---------------------------------------------------------------- | ||
# Generated CMake target import file. | ||
#---------------------------------------------------------------- | ||
-- | ||
2.28.0.windows.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
From c68ca316e6462504277c49ecd36b23449cb695aa Mon Sep 17 00:00:00 2001 | ||
From: Pierre Moreau <[email protected]> | ||
Date: Mon, 17 Aug 2020 16:35:47 +0200 | ||
Subject: [PATCH] Fix GLM version | ||
|
||
Given the amount of changes going in between revision versions, like | ||
CMake support being removed in 0.9.9.6 and then later re-introduced in | ||
0.9.9.7, it is important to be able to compare the full version of GLM | ||
including its revision number. | ||
|
||
Signed-off-by: Pierre Moreau <[email protected]> | ||
--- | ||
CMakeLists.txt | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 10bb1af..1a49412 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -1,7 +1,7 @@ | ||
cmake_minimum_required(VERSION 3.2 FATAL_ERROR) | ||
cmake_policy(VERSION 3.2) | ||
|
||
-set(GLM_VERSION "0.9.9") | ||
+set(GLM_VERSION "0.9.9.5") | ||
project(glm VERSION ${GLM_VERSION} LANGUAGES CXX) | ||
|
||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") | ||
-- | ||
2.28.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
From a6152b0eecd8c5a56b894030b47c4d75bc5301f8 Mon Sep 17 00:00:00 2001 | ||
From: Nick Overdijk <[email protected]> | ||
Date: Fri, 20 Mar 2020 15:22:05 +0100 | ||
Subject: [PATCH] Always set IMPORTED_CONFIGURATIONS, always add to | ||
IMPORT_CHECK_TARGETS | ||
|
||
Without the IMPORTED_CONFIGURATIONS set, I had errors like: | ||
`ninja: error: 'assimp::assimp-NOTFOUND', needed by 'bin/HeartVision.app/Contents/MacOS/MyApp', missing and no known rule to make it` | ||
|
||
This was only set for linux/windows. | ||
--- | ||
assimpTargets-release.cmake.in | 11 ++++------- | ||
1 file changed, 4 insertions(+), 7 deletions(-) | ||
|
||
diff --git a/assimpTargets-release.cmake.in b/assimpTargets-release.cmake.in | ||
index f3db8f12cd..4245e08446 100644 | ||
--- a/assimpTargets-release.cmake.in | ||
+++ b/assimpTargets-release.cmake.in | ||
@@ -7,6 +7,8 @@ set(CMAKE_IMPORT_FILE_VERSION 1) | ||
|
||
set(ASSIMP_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@) | ||
|
||
+set_property(TARGET assimp::assimp APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) | ||
+ | ||
if(MSVC) | ||
if(MSVC_TOOLSET_VERSION) | ||
set(MSVC_PREFIX "vc${MSVC_TOOLSET_VERSION}") | ||
@@ -39,24 +41,19 @@ if(MSVC) | ||
set(sharedLibraryName "assimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_SHARED_LIBRARY_SUFFIX@") | ||
set(importLibraryName "assimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_IMPORT_LIBRARY_SUFFIX@") | ||
|
||
- # Import target "assimp::assimp" for configuration "Release" | ||
- set_property(TARGET assimp::assimp APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) | ||
set_target_properties(assimp::assimp PROPERTIES | ||
IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/${importLibraryName}" | ||
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/${sharedLibraryName}" | ||
) | ||
- list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp ) | ||
list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/lib/${importLibraryName}") | ||
list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/bin/${sharedLibraryName}" ) | ||
else() | ||
set(staticLibraryName "assimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_STATIC_LIBRARY_SUFFIX@") | ||
|
||
# Import target "assimp::assimp" for configuration "Release" | ||
- set_property(TARGET assimp::assimp APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) | ||
set_target_properties(assimp::assimp PROPERTIES | ||
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/${staticLibraryName}" | ||
) | ||
- list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp ) | ||
list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/lib/${staticLibraryName}") | ||
endif() | ||
|
||
@@ -72,18 +69,18 @@ else() | ||
IMPORTED_SONAME_RELEASE "${sharedLibraryName}" | ||
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/${sharedLibraryName}" | ||
) | ||
- list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp ) | ||
list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/lib/${sharedLibraryName}" ) | ||
else() | ||
set(staticLibraryName "libassimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_STATIC_LIBRARY_SUFFIX@") | ||
set_target_properties(assimp::assimp PROPERTIES | ||
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/${staticLibraryName}" | ||
) | ||
- list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp ) | ||
list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/lib/${staticLibraryName}" ) | ||
endif() | ||
endif() | ||
|
||
+list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp ) | ||
+ | ||
# Commands beyond this point should not need to know the version. | ||
set(CMAKE_IMPORT_FILE_VERSION) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
From f227c66273d08b3e0c5e58a5eaf819a033ecb255 Mon Sep 17 00:00:00 2001 | ||
From: Nick Overdijk <[email protected]> | ||
Date: Mon, 23 Mar 2020 09:59:16 +0100 | ||
Subject: [PATCH] Fix dynamic loading path for OSX | ||
|
||
This commit sets the INSTALL_RPATH to $ORIGIN on not OSX, or the | ||
OSX-sort-of-equivalent @loader_path. It tells the dynamic loader to | ||
check the path 'from the binary directory to the library directory'. | ||
This fixes not being able to find IrrXML.dylib when things are not | ||
installed to a default location. This fixes issue | ||
https://github.com/assimp/assimp/issues/2872 for me. | ||
|
||
The patch is pretty much straight from the book 'professional cmake'. | ||
--- | ||
CMakeLists.txt | 10 ++++++++++ | ||
1 file changed, 10 insertions(+) | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index dcafb649f5..9faa2ae489 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -163,6 +163,16 @@ IF(NOT BUILD_SHARED_LIBS) | ||
SET(LINK_SEARCH_START_STATIC TRUE) | ||
ELSE() | ||
MESSAGE(STATUS "Shared libraries enabled") | ||
+ IF(APPLE) | ||
+ SET(basePoint @loader_path) | ||
+ ELSE() | ||
+ SET(basePoint $ORIGIN) | ||
+ ENDIF() | ||
+ FILE(RELATIVE_PATH relDir | ||
+ ${CMAKE_CURRENT_BINARY_DIR}/${ASSIMP_BIN_INSTALL_DIR} | ||
+ ${CMAKE_CURRENT_BINARY_DIR}/${ASSIMP_LIB_INSTALL_DIR} | ||
+ ) | ||
+ SET(CMAKE_INSTALL_RPATH ${basePoint} ${basePoint}/${relDir}) | ||
ENDIF(NOT BUILD_SHARED_LIBS) | ||
|
||
# Define here the needed parameters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From Pierre Moreau <[email protected]> | ||
Date: Fri, 21 Aug 2020 21:21:21 +0200 | ||
Subject: [Patch] Turn multi-configuration off | ||
|
||
If multi-configuration is detected, assimp will install both Debug and Release | ||
target configurations (which is fine in itself). | ||
However when using `find_package()` on assimp, it loops over all installed | ||
target configurations and ensure that everything is there which will not work | ||
as we only built and installed the Release version so CMake ends up failing due | ||
to trying to locate the referenced libraries from the Debug version. | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index ab1a8d2c..afef9cbd 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -347,7 +347,7 @@ if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) | ||
SET( ASSIMP_BIN_INSTALL_DIR "bin" CACHE STRING | ||
"Path the tool executables are installed to." ) | ||
|
||
-get_cmake_property(is_multi_config GENERATOR_IS_MULTI_CONFIG) | ||
+set(is_multi_config OFF) | ||
|
||
IF (INJECT_DEBUG_POSTFIX AND (is_multi_config OR CMAKE_BUILD_TYPE STREQUAL "Debug")) | ||
SET(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Debug Postfix for lib, samples and tools") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,103 @@ | ||
Revision history for CG_Labs | ||
|
||
|
||
v2019.1 YYYY-MM-DD | ||
v2020.0 2020-08-25 | ||
================== | ||
|
||
New features | ||
------------ | ||
|
||
* For those with GPUs (or GPU drivers) which do not support OpenGL 4.1: check | ||
out the `OpenGL_3.3 branch | ||
<https://github.com/LUGGPublic/CG_Labs/tree/OpenGL_3.3>`_. | ||
* In any of the assignments, you can use *F11* to toggle between windowed and | ||
fullscreen mode. | ||
* In the first assignment for EDAF80, textures for all planets (plus the Sun and | ||
the Moon) are loaded by default, and constants for their orbit and spin | ||
configurations are provided. | ||
* In the second assignment for EDAF80, a set of control points is now provided; | ||
there are represented as small spheres in the 3-D view (once | ||
`parametric_shapes::createSphere()` has been implemented). | ||
* When using the `node::render()` function and GL_KHR_debug is available, all | ||
OpenGL calls will be placed within a `glPushDebugGroup()` and | ||
`glPopDebugGroup()` pair using the node’s name, to improve debugging. | ||
|
||
Improvements | ||
------------ | ||
|
||
* All assignments have received several improvements and tweaks, for example | ||
EDAF80’s third assignment will create and render two spheres by default (one | ||
for the skybox, and one on which Phong shading and normal mapping will be | ||
performed). | ||
* The API of all `parametric_shapes` methods has been modified to be more | ||
consistent and clearer. | ||
* `displayTexture()` no longer takes a camera as input to retrieve the near and | ||
far parameters used to linearise values read from depth textures, but now | ||
take those directly as argument instead. | ||
* The shader for celestial bodies’ rings no longer uses an opacity texture but | ||
instead uses the alpha channel of the diffuse texture. | ||
* Removed unused code and replaced other with standard types. | ||
* The vertical inversion of textures is now performed by STB. | ||
* Re-use functionalities from GLAD | ||
* The `set_uniforms` parameter of several methods of `Node`, has been made | ||
optional. | ||
* Switch Travis to use Ubuntu Focal and add macOS to the tested environment. | ||
* A lot of improvements on the CMake configuration files to modernise them, | ||
make them clearer, remove unnecessary operations, display additional | ||
information when dependencies fail to download or build, etc. | ||
* Reorganise CHANGES.rst and add release date for v2019.1 | ||
|
||
Fixes | ||
----- | ||
|
||
* Do not make helper functions load relative to specific directory | ||
* Do not use `abs()` on floating point numbers | ||
* Trigger a copy of the DLLs for all targets | ||
* Fix typo in `TRSTransform.h` | ||
* Fix typo in `GLStateInspection’s ToString()` | ||
|
||
Dependencies updates | ||
-------------------- | ||
|
||
* Bump CMake requirements to version 3.13 | ||
* CMake: Fix the version of stb and tinyfiledialogs | ||
* Update the downloaded version of GLFW to 3.3.2 | ||
* Update GLM to 0.9.9.5 and require exact version | ||
* Update Dear ImGui to 1.78 and ship with the code | ||
* Re-generate the GLAD files and up to OpenGL 4.6 | ||
* Update assimp requirement to 5.0, update the downloaded version to 5.0.1 and | ||
apply additional fixes | ||
* Update the resources archive | ||
|
||
|
||
v2019.1 2019-09-06 | ||
================== | ||
|
||
New features | ||
------------ | ||
|
||
* Select polygon mode from GUI, and simplify it | ||
* Toggle visualisation of light cones in wireframe mode from the GUI | ||
* Switch between shaders from GUI | ||
* Replace lodepng with stb, to also support JPEG file loading | ||
* Add shader for celestial rings and load it in lab1 | ||
|
||
Improvements | ||
------------ | ||
|
||
* Add a “CHANGES.rst” file that will list the different modifications done, | ||
from now on. | ||
* Ensure Log is destroyed before its clients (GitLab #45) | ||
* Unify the TRS interfaces between the node and the TRSTransform classes, by | ||
using and exposing a TRSTransform instance inside the node class (GitLab #46) | ||
* Select polygon mode from GUI, and simplify it (GitLab #47) | ||
* Toggle visualisation of light cones in wireframe mode from the GUI | ||
* Switch between shaders from GUI (GitLab #48) | ||
* Unify the TRS interfaces between the node and the `TRSTransform` classes, by | ||
using and exposing a `TRSTransform` instance inside the node class | ||
* Edit node::render() to take parent transform | ||
* AppVeyor: switch from VS 2019 Preview to VS 2019 | ||
* README: Add tinyfiledialogs to dependencies | ||
* README: Sort the list of dependencies | ||
|
||
Fixes | ||
----- | ||
|
||
* Ensure Log is destroyed before its clients | ||
* Rename `WindowManager::CreateWindow()` to | ||
`WindowManager::CreateGLFWWindow()`, to avoid conflict with Windows API | ||
macro. | ||
* Replace lodepng with stb, to also support JPEG file loading (GitLab #41) | ||
* Add shader for celestial rings and load it in lab1 (GitLab #51) | ||
* AppVeyor: switch from VS 2019 Preview to VS 2019 | ||
* README: Add tinyfiledialogs to dependencies | ||
* (HEAD -> 2019_updates) README: Sort the list of dependencies |
Oops, something went wrong.