Skip to content

Commit c4c6ae2

Browse files
committed
Adding clean version of the application
1 parent 59b0a45 commit c4c6ae2

File tree

485 files changed

+165511
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

485 files changed

+165511
-0
lines changed

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,12 @@
3030
*.exe
3131
*.out
3232
*.app
33+
34+
# Custom
35+
.vs/
36+
bin/
37+
data/raw/*.raw
38+
data/synthetic/*.syn
39+
data/tf1dcp/*.tf1d
40+
data/vollib/*.pvm
41+
data/vollib/*.pvmold

CMakeLists.txt

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
cmake_minimum_required(VERSION 3.9.2 FATAL_ERROR)
2+
project(dev_vs)
3+
4+
# ensure c++11
5+
set(CMAKE_CXX_STANDARD 17)
6+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
7+
8+
message(STATUS "Setting MSVC flags")
9+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHc /std:c++latest")
10+
11+
message(${CMAKE_SYSTEM_PROCESSOR})
12+
message(${CMAKE_SIZEOF_VOID_P}) # 8 for 64 bit and 4 for 32 bit
13+
#message(${PROJECTNAME_ARCHITECTURE})
14+
message(${CMAKE_CURRENT_BINARY_DIR})
15+
16+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin")
17+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin")
18+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin")
19+
set(CMAKE_EXTERNAL_DIRECTORY "${CMAKE_SOURCE_DIR}/external")
20+
#CMAKE_CURRENT_BINARY_DIR
21+
22+
# -- DEFINES
23+
# Using suggestion on using MAKE_STR macro at C++ code from "naoyam"
24+
# . https://github.com/LLNL/lbann/issues/117
25+
set(PATH_TO_RESOURCES ${CMAKE_SOURCE_DIR}/../resources/)
26+
add_definitions(-DCMAKE_PATH_TO_RESOURCES=${PATH_TO_RESOURCES})
27+
28+
# adding libraries folder
29+
add_subdirectory(libs)
30+
31+
# add application
32+
add_subdirectory(cppvolrend)
33+
34+
# cmake -G "Visual Studio 15 2017 Win64"
35+
# https://cognitivewaves.wordpress.com/cmake-and-visual-studio/

CMakeSettings.json

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// CMakeSettings.json schema reference...
2+
// . https://docs.microsoft.com/en-us/cpp/build/cmakesettings-reference
3+
{
4+
"configurations": [
5+
{
6+
"name": "x64-Debug vs2019",
7+
"generator": "Visual Studio 16 2019 Win64",
8+
"configurationType": "Debug",
9+
"inheritEnvironments": [
10+
"platform_x64",
11+
"msvc_x64_x64"
12+
],
13+
"intelliSenseMode": "windows-msvc-x64",
14+
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
15+
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
16+
"cmakeCommandArgs": "",
17+
"buildCommandArgs": "",
18+
"ctestCommandArgs": ""
19+
},
20+
{
21+
"name": "x64-Release vs2019",
22+
"generator": "Visual Studio 16 2019 Win64",
23+
"configurationType": "Release",
24+
"inheritEnvironments": [
25+
"platform_x64",
26+
"msvc_x64_x64"
27+
],
28+
"intelliSenseMode": "windows-msvc-x64",
29+
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
30+
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
31+
"cmakeCommandArgs": "",
32+
"buildCommandArgs": "", //-v is not valid for msbuild
33+
"ctestCommandArgs": ""
34+
},
35+
{
36+
"name": "x64-Debug vs2017",
37+
"generator": "Visual Studio 15 2017 Win64",
38+
"configurationType": "Debug",
39+
"inheritEnvironments": [
40+
"platform_x64",
41+
"msvc_x64_x64"
42+
],
43+
"intelliSenseMode": "windows-msvc-x64",
44+
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
45+
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
46+
"cmakeCommandArgs": "",
47+
"buildCommandArgs": "",
48+
"ctestCommandArgs": ""
49+
},
50+
{
51+
"name": "x64-Release vs2017",
52+
"generator": "Visual Studio 15 2017 Win64",
53+
"configurationType": "Release",
54+
"inheritEnvironments": [
55+
"platform_x64",
56+
"msvc_x64_x64"
57+
],
58+
"intelliSenseMode": "windows-msvc-x64",
59+
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
60+
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
61+
"cmakeCommandArgs": "",
62+
"buildCommandArgs": "", //-v is not valid for msbuild
63+
"ctestCommandArgs": ""
64+
}
65+
]
66+
}

cppvolrend/CMakeLists.txt

+107
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
include_directories(${CMAKE_SOURCE_DIR}/include)
2+
include_directories(${CMAKE_SOURCE_DIR}/libs)
3+
include_directories(${CMAKE_SOURCE_DIR}/external)
4+
include_directories(${CMAKE_SOURCE_DIR}/external/imgui)
5+
include_directories(${CMAKE_SOURCE_DIR}/external/imgui/examples)
6+
7+
#message(${CMAKE_SOURCE_DIR})
8+
link_directories(${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
9+
link_directories(${CMAKE_SOURCE_DIR}/lib)
10+
11+
add_definitions(-DCMAKE_PATH_OUTPUT_DIR=${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
12+
13+
set(PATH_TO_APP_FOLDER ${CMAKE_SOURCE_DIR}/cppvolrend/)
14+
add_definitions(-DCMAKE_PATH_TO_APP_FOLDER=${PATH_TO_APP_FOLDER})
15+
16+
set(PATH_TO_INCLUDE ${CMAKE_SOURCE_DIR}/include/)
17+
add_definitions(-DCMAKE_PATH_TO_INCLUDE=${PATH_TO_INCLUDE})
18+
19+
set(PATH_TO_DATA_FOLDER ${CMAKE_SOURCE_DIR}/data/)
20+
add_definitions(-DCMAKE_PATH_TO_DATA_FOLDER=${PATH_TO_DATA_FOLDER})
21+
22+
# add the executable to be available at ide
23+
add_executable(cppvolrend
24+
main.cpp defines.h
25+
app_freeglut.cpp app_freeglut.h
26+
app_glfw.cpp app_glfw.h
27+
renderingmanager.cpp renderingmanager.h
28+
29+
volrenderbase.cpp volrenderbase.h
30+
31+
# Null Bounding Box Grid
32+
volrendernull.cpp volrendernull.h
33+
34+
${CMAKE_EXTERNAL_DIRECTORY}/imgui/imconfig.h ${CMAKE_EXTERNAL_DIRECTORY}/imgui/imgui_demo.cpp
35+
${CMAKE_EXTERNAL_DIRECTORY}/imgui/imgui.h ${CMAKE_EXTERNAL_DIRECTORY}/imgui/imgui.cpp
36+
${CMAKE_EXTERNAL_DIRECTORY}/imgui/imgui_draw.cpp ${CMAKE_EXTERNAL_DIRECTORY}/imgui/imgui_internal.h
37+
${CMAKE_EXTERNAL_DIRECTORY}/imgui/imgui_widgets.cpp ${CMAKE_EXTERNAL_DIRECTORY}/imgui/imstb_rectpack.h
38+
${CMAKE_EXTERNAL_DIRECTORY}/imgui/imstb_textedit.h ${CMAKE_EXTERNAL_DIRECTORY}/imgui/imstb_truetype.h
39+
${CMAKE_EXTERNAL_DIRECTORY}/imgui/examples/imgui_impl_glut.h ${CMAKE_EXTERNAL_DIRECTORY}/imgui/examples/imgui_impl_glut.cpp
40+
${CMAKE_EXTERNAL_DIRECTORY}/imgui/examples/imgui_impl_opengl2.h ${CMAKE_EXTERNAL_DIRECTORY}/imgui/examples/imgui_impl_opengl2.cpp
41+
${CMAKE_EXTERNAL_DIRECTORY}/imgui/examples/imgui_impl_glfw.h ${CMAKE_EXTERNAL_DIRECTORY}/imgui/examples/imgui_impl_glfw.cpp
42+
${CMAKE_EXTERNAL_DIRECTORY}/imgui/examples/imgui_impl_opengl3.h ${CMAKE_EXTERNAL_DIRECTORY}/imgui/examples/imgui_impl_opengl3.cpp
43+
)
44+
45+
find_package(OpenGL REQUIRED)
46+
link_directories(${OPENGL_gl_LIBRARY})
47+
48+
# . Debug
49+
target_link_libraries(cppvolrend debug ${OPENGL_gl_LIBRARY})
50+
target_link_libraries(cppvolrend debug freeglut/freeglut)
51+
target_link_libraries(cppvolrend debug glfw/debug/glfw3)
52+
target_link_libraries(cppvolrend debug glew/glew32s)
53+
target_link_libraries(cppvolrend debug glew/glew32)
54+
target_link_libraries(cppvolrend debug file_utils)
55+
target_link_libraries(cppvolrend debug gl_utils)
56+
target_link_libraries(cppvolrend debug math_utils)
57+
target_link_libraries(cppvolrend debug vis_utils)
58+
target_link_libraries(cppvolrend debug volvis_utils)
59+
target_link_libraries(cppvolrend debug im_3_12/im)
60+
# . Release
61+
target_link_libraries(cppvolrend optimized ${OPENGL_gl_LIBRARY})
62+
target_link_libraries(cppvolrend optimized freeglut/freeglut)
63+
target_link_libraries(cppvolrend optimized glfw/release/glfw3)
64+
target_link_libraries(cppvolrend optimized glew/glew32s)
65+
target_link_libraries(cppvolrend optimized glew/glew32)
66+
target_link_libraries(cppvolrend optimized file_utils)
67+
target_link_libraries(cppvolrend optimized gl_utils)
68+
target_link_libraries(cppvolrend optimized math_utils)
69+
target_link_libraries(cppvolrend optimized vis_utils)
70+
target_link_libraries(cppvolrend optimized volvis_utils)
71+
target_link_libraries(cppvolrend optimized im_3_12/im)
72+
73+
# add dependency
74+
add_dependencies(cppvolrend file_utils)
75+
add_dependencies(cppvolrend gl_utils)
76+
add_dependencies(cppvolrend math_utils)
77+
add_dependencies(cppvolrend vis_utils)
78+
add_dependencies(cppvolrend volvis_utils)
79+
# . Debug
80+
file(COPY "${CMAKE_SOURCE_DIR}/lib/glew/glew32.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Debug")
81+
file(COPY "${CMAKE_SOURCE_DIR}/lib/freeglut/freeglut.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Debug")
82+
file(COPY "${CMAKE_SOURCE_DIR}/lib/glfw/glfw3.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Debug")
83+
file(COPY "${CMAKE_SOURCE_DIR}/lib/im_3_12/im.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Debug")
84+
file(COPY "${CMAKE_SOURCE_DIR}/lib/im_3_12/im_avi.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Debug")
85+
file(COPY "${CMAKE_SOURCE_DIR}/lib/im_3_12/im_capture.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Debug")
86+
file(COPY "${CMAKE_SOURCE_DIR}/lib/im_3_12/im_fftw.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Debug")
87+
file(COPY "${CMAKE_SOURCE_DIR}/lib/im_3_12/im_jp2.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Debug")
88+
file(COPY "${CMAKE_SOURCE_DIR}/lib/im_3_12/im_lzo.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Debug")
89+
file(COPY "${CMAKE_SOURCE_DIR}/lib/im_3_12/im_process.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Debug")
90+
file(COPY "${CMAKE_SOURCE_DIR}/lib/im_3_12/im_process_omp.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Debug")
91+
file(COPY "${CMAKE_SOURCE_DIR}/lib/im_3_12/im_wmv.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Debug")
92+
file(COPY "${CMAKE_SOURCE_DIR}/lib/im_3_12/zlib1.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Debug")
93+
94+
# . Release
95+
file(COPY "${CMAKE_SOURCE_DIR}/lib/glew/glew32.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Release")
96+
file(COPY "${CMAKE_SOURCE_DIR}/lib/freeglut/freeglut.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Release")
97+
file(COPY "${CMAKE_SOURCE_DIR}/lib/glfw/glfw3.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Release")
98+
file(COPY "${CMAKE_SOURCE_DIR}/lib/im_3_12/im.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Release")
99+
file(COPY "${CMAKE_SOURCE_DIR}/lib/im_3_12/im_avi.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Release")
100+
file(COPY "${CMAKE_SOURCE_DIR}/lib/im_3_12/im_capture.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Release")
101+
file(COPY "${CMAKE_SOURCE_DIR}/lib/im_3_12/im_fftw.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Release")
102+
file(COPY "${CMAKE_SOURCE_DIR}/lib/im_3_12/im_jp2.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Release")
103+
file(COPY "${CMAKE_SOURCE_DIR}/lib/im_3_12/im_lzo.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Release")
104+
file(COPY "${CMAKE_SOURCE_DIR}/lib/im_3_12/im_process.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Release")
105+
file(COPY "${CMAKE_SOURCE_DIR}/lib/im_3_12/im_process_omp.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Release")
106+
file(COPY "${CMAKE_SOURCE_DIR}/lib/im_3_12/im_wmv.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Release")
107+
file(COPY "${CMAKE_SOURCE_DIR}/lib/im_3_12/zlib1.dll" DESTINATION "${CMAKE_SOURCE_DIR}/bin/Release")

0 commit comments

Comments
 (0)