Skip to content

Commit 9f6bcc2

Browse files
committed
Merge branch 'newBuiltinResources' into FileArchiveTweaks
2 parents cf5fec1 + dffbed2 commit 9f6bcc2

22 files changed

+1620
-270
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,6 @@
8484
[submodule "3rdparty/tcpp"]
8585
path = 3rdparty/tcpp
8686
url = git@github.com:Erfan-Ahmadi/tcpp.git
87+
[submodule "3rdparty/imgui"]
88+
path = 3rdparty/imgui
89+
url = git@github.com:ocornut/imgui.git

3rdparty/CMakeLists.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,29 @@ add_library(spirv_cross OBJECT
228228
)
229229
target_compile_definitions(spirv_cross PUBLIC SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS)
230230

231+
if(NBL_BUILD_IMGUI)
232+
add_library(imgui STATIC
233+
"imgui/imconfig.h"
234+
"imgui/imgui_demo.cpp"
235+
"imgui/imgui_draw.cpp"
236+
"imgui/imgui_internal.h"
237+
"imgui/imgui_tables.cpp"
238+
"imgui/imgui_widgets.cpp"
239+
"imgui/imgui.cpp"
240+
"imgui/imgui.h"
241+
"imgui/misc/cpp/imgui_stdlib.cpp"
242+
"imgui/misc/cpp/imgui_stdlib.h"
243+
"imgui/imstb_rectpack.h"
244+
"imgui/imstb_textedit.h"
245+
"imgui/imstb_truetype.h"
246+
)
247+
target_include_directories(imgui
248+
PUBLIC "imgui"
249+
PUBLIC "imgui/misc/cpp"
250+
PUBLIC "imgui/backends"
251+
)
252+
253+
endif()
231254

232255
add_library(aesGladman OBJECT
233256
aesGladman/aes_ni.c
@@ -336,6 +359,9 @@ endif()
336359
if (NBL_BUILD_MITSUBA_LOADER)
337360
list(APPEND NBL_3RDPARTY_TARGETS expat)
338361
endif()
362+
if (NBL_BUILD_IMGUI)
363+
list(APPEND NBL_3RDPARTY_TARGETS imgui)
364+
endif()
339365
if(ENABLE_HLSL)
340366
list(APPEND NBL_3RDPARTY_TARGETS HLSL)
341367
endif()

3rdparty/bullet3

Submodule bullet3 updated 1529 files

3rdparty/imgui

Submodule imgui added at e489e40

CMakeLists.txt

100755100644
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,8 @@ option(NBL_BUILD_TOOLS "Enable building tools (just convert2BAW as for now)" ON)
274274

275275
option(NBL_BUILD_MITSUBA_LOADER "Enable nbl::ext::MitsubaLoader?" OFF) # TODO: once it compies turn this ON by default!
276276

277+
option(NBL_BUILD_IMGUI "Enable nbl::ext::ImGui?" ON)
278+
277279
option(NBL_BUILD_OPTIX "Enable nbl::ext::OptiX?" OFF)
278280
if(NBL_COMPILE_WITH_CUDA)
279281
find_package(OPTIX REQUIRED)

Jenkinsfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
stage('CMake')
2+
{
3+
bat returnStatus: true, script: "cmake -DNBL_COMPILE_WITH_CUDA:BOOL=ON -DNBL_BUILD_OPTIX:BOOL=ON -DNBL_BUILD_MITSUBA_LOADER:BOOL=ON -DNBL_BUILD_RADEON_RAYS:BOOL=ON -DNBL_RUN_TESTS:BOOL=ON -S ./ -B ./build -T v143"
4+
bat "git -C ./3rdparty/gli reset --hard" // due to gli build system bug
5+
bat "cmake -DNBL_COMPILE_WITH_CUDA:BOOL=ON -DNBL_BUILD_OPTIX:BOOL=ON -DNBL_BUILD_MITSUBA_LOADER:BOOL=ON -DNBL_BUILD_RADEON_RAYS:BOOL=ON -DNBL_RUN_TESTS:BOOL=ON -S ./ -B ./build -T v143"
6+
}
7+
8+
stage('Compile Nabla')
9+
{
10+
bat "cmake --build ./build --target Nabla --config Release -j12 -v"
11+
}

cmake/common.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ macro(nbl_create_ext_library_project EXT_NAME LIB_HEADERS LIB_SOURCES LIB_INCLUD
221221
add_dependencies(${LIB_NAME} Nabla)
222222

223223
get_target_property(_NBL_NABLA_TARGET_BINARY_DIR_ Nabla BINARY_DIR)
224+
get_target_property(_BUILTIN_RESOURCES_INCLUDE_SEARCH_DIRECTORY_ nblBuiltinResourceData BUILTIN_RESOURCES_INCLUDE_SEARCH_DIRECTORY)
224225

225226
target_include_directories(${LIB_NAME}
226227
PUBLIC ${_NBL_NABLA_TARGET_BINARY_DIR_}/build/import
@@ -230,6 +231,7 @@ macro(nbl_create_ext_library_project EXT_NAME LIB_HEADERS LIB_SOURCES LIB_INCLUD
230231
PUBLIC ${CMAKE_SOURCE_DIR}/include
231232
PUBLIC ${CMAKE_SOURCE_DIR}/src
232233
PUBLIC ${CMAKE_SOURCE_DIR}/source/Nabla
234+
PUBLIC ${_BUILTIN_RESOURCES_INCLUDE_SEARCH_DIRECTORY_}
233235
PRIVATE ${LIB_INCLUDES}
234236
)
235237
add_dependencies(${LIB_NAME} Nabla)
@@ -363,8 +365,8 @@ endfunction()
363365
# @_BS_TARGET_@ is a builtin resource target
364366

365367
function(LINK_BUILTIN_RESOURCES_TO_TARGET _TARGET_ _BS_TARGET_)
366-
add_dependencies(${EXECUTABLE_NAME} systemTestBuiltinResourceData)
367-
target_link_libraries(${EXECUTABLE_NAME} PUBLIC systemTestBuiltinResourceData)
368+
add_dependencies(${EXECUTABLE_NAME} ${_BS_TARGET_})
369+
target_link_libraries(${EXECUTABLE_NAME} PUBLIC ${_BS_TARGET_})
368370

369371
get_target_property(_BUILTIN_RESOURCES_INCLUDE_SEARCH_DIRECTORY_ ${_BS_TARGET_} BUILTIN_RESOURCES_INCLUDE_SEARCH_DIRECTORY)
370372
target_include_directories(${EXECUTABLE_NAME} PUBLIC "${_BUILTIN_RESOURCES_INCLUDE_SEARCH_DIRECTORY_}")

include/nbl/core/decl/smart_refctd_ptr.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ class smart_refctd_ptr
9898
inline I_REFERENCE_COUNTED& operator[](size_t idx) { return ptr[idx]; }
9999
inline const I_REFERENCE_COUNTED& operator[](size_t idx) const { return ptr[idx]; }
100100

101-
102101
inline explicit operator bool() const { return ptr; }
103102
inline bool operator!() const { return !ptr; }
104103

0 commit comments

Comments
 (0)