This repository has been archived by the owner on Mar 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
椎名深雪
committed
Nov 3, 2019
1 parent
3f718ad
commit 24d0929
Showing
26 changed files
with
249 additions
and
17 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 |
---|---|---|
|
@@ -42,3 +42,4 @@ include/ | |
|
||
# Imported mesh files | ||
*.mesh | ||
external/embree3 |
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
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,78 @@ | ||
# I'm not famiilar with cmake | ||
# Largely based on https://github.com/AirGuanZ/Atrc/blob/master/cmake/cmake-embree | ||
IF(MSVC) | ||
SET(EMBREE_IGNORE_CMAKE_CXX_FLAGS "-DEMBREE_IGNORE_CMAKE_CXX_FLAGS=ON") | ||
ELSE() | ||
SET(EMBREE_IGNORE_CMAKE_CXX_FLAGS "-DEMBREE_IGNORE_CMAKE_CXX_FLAGS=OFF") | ||
ENDIF() | ||
|
||
if(NOT DEFINED EMBREE_MAX_ISA) | ||
set(EMBREE_MAX_ISA AVX2) | ||
endif() | ||
|
||
set(Embree3_VERSION "3.6.1") | ||
|
||
|
||
ExternalProject_Add( | ||
Embree3 | ||
PREFIX "${PROJECT_SOURCE_DIR}/external/embree3" | ||
URL "https://github.com/embree/embree/archive/v${Embree3_VERSION}.tar.gz" | ||
URL_MD5 d6e043321df048a427eff337eba04cf1 | ||
CMAKE_ARGS | ||
"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}" | ||
"-DEMBREE_TUTORIALS=OFF" | ||
"-DEMBREE_FILTER_FUNCTION=OFF" | ||
"-DEMBREE_RAY_PACKETS=OFF" | ||
"-DEMBREE_TASKING_SYSTEM=INTERNAL" | ||
"-DEMBREE_GEOMETRY_QUAD=OFF" | ||
"-DEMBREE_GEOMETRY_CURVE=OFF" | ||
"-DEMBREE_GEOMETRY_SUBDIVISION=OFF" | ||
"-DEMBREE_GEOMETRY_INSTANCE=OFF" | ||
"-DEMBREE_GEOMETRY_USER=OFF" | ||
"-DEMBREE_GEOMETRY_POINT=OFF" | ||
"-DEMBREE_ISPC_SUPPORT=OFF" | ||
"-DEMBREE_STATIC_LIB=ON" | ||
"-DEMBREE_MAX_ISA=${EMBREE_MAX_ISA}" | ||
"${EMBREE_IGNORE_CMAKE_CXX_FLAGS}" | ||
"-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}" | ||
"-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}" | ||
"-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}" | ||
INSTALL_COMMAND "" | ||
) | ||
|
||
set(EMBREE_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/external/embree3//src/Embree3/include/) | ||
|
||
IF(WIN32) | ||
SET(EMBREE_LIBRARIES | ||
optimized "${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/Release/embree3.lib" | ||
optimized "${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/Release/embree_sse42.lib" | ||
optimized "${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/Release/embree_avx.lib" | ||
optimized "${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/Release/embree_avx2.lib" | ||
optimized "${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/Release/lexers.lib" | ||
optimized "${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/Release/math.lib" | ||
optimized "${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/Release/simd.lib" | ||
optimized "${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/Release/tasking.lib" | ||
optimized "${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/Release/sys.lib" | ||
debug "${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/Debug/embree3.lib" | ||
debug "${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/Debug/embree_sse42.lib" | ||
debug "${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/Debug/embree_avx.lib" | ||
debug "${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/Debug/embree_avx2.lib" | ||
debug "${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/Debug/lexers.lib" | ||
debug "${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/Debug/math.lib" | ||
debug "${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/Debug/simd.lib" | ||
debug "${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/Debug/tasking.lib" | ||
debug "${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/Debug/sys.lib" | ||
) | ||
ELSE() | ||
SET(EMBREE_LIBRARIES | ||
"${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/libembree3.a" | ||
"${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/libembree_sse42.a" | ||
"${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/libembree_avx.a" | ||
"${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/libembree_avx2.a" | ||
"${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/liblexers.a" | ||
"${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/libmath.a" | ||
"${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/libsimd.a" | ||
"${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/libtasking.a" | ||
"${PROJECT_SOURCE_DIR}/lib/embree3/src/Embree3-build/libsys.a" | ||
) | ||
ENDIF() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+312 KB
external/embree3/src/Embree3-build/CMakeFiles/3.15.3/CMakeDetermineCompilerABI_C.bin
Binary file not shown.
Binary file added
BIN
+312 KB
external/embree3/src/Embree3-build/CMakeFiles/3.15.3/CMakeDetermineCompilerABI_CXX.bin
Binary file not shown.
70 changes: 70 additions & 0 deletions
70
external/embree3/src/Embree3-build/CMakeFiles/CMakeError.log
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
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 @@ | ||
empty |
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 @@ | ||
empty |
Empty file.
Empty file.
Empty file.
Empty file.
Binary file not shown.
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
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
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,45 @@ | ||
// MIT License | ||
// | ||
// Copyright (c) 2019 椎名深雪 | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
// in the Software without restriction, including without limitation the rights | ||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in all | ||
// copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
// SOFTWARE. | ||
|
||
#ifndef MIYUKIRENDERER_PROFILER_H | ||
#define MIYUKIRENDERER_PROFILER_H | ||
|
||
#include <chrono> | ||
|
||
|
||
namespace miyuki { | ||
class Profiler { | ||
std::chrono::high_resolution_clock::time_point start; | ||
public: | ||
Profiler() { | ||
start = std::chrono::high_resolution_clock::now(); | ||
} | ||
|
||
template<class T> | ||
std::chrono::duration<T> elapsed() const { | ||
return std::chrono::high_resolution_clock::now() - start; | ||
} | ||
}; | ||
} | ||
|
||
|
||
#endif //MIYUKIRENDERER_PROFILER_H |
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
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
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
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
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
Oops, something went wrong.