feat: add imgui texture inspector (Thanks claude)

This commit is contained in:
2026-10-11 01:34:49 +02:00
parent 95d1497169
commit 170af2a4e9
18 changed files with 692 additions and 18 deletions
+24
View File
@@ -64,8 +64,32 @@ set(ASSIMP_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(ASSIMP_INJECT_DEBUG_POSTFIX OFF CACHE BOOL "" FORCE)
set(ASSIMP_INSTALL OFF CACHE BOOL "" FORCE)
set(ASSIMP_WARNINGS_AS_ERRORS OFF CACHE BOOL "" FORCE)
# assimp is unbearably slow unoptimized (a big FBX takes ~10s), so build it optimized even in Debug.
# This only affects targets created inside the assimp directory (including its bundled zlib).
set(DESTRUM_SAVED_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
set(DESTRUM_SAVED_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
if (MSVC)
foreach (flags_var CMAKE_C_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG)
string(REPLACE "/RTC1" "" ${flags_var} "${${flags_var}}")
string(REPLACE "/Od" "/O2" ${flags_var} "${${flags_var}}")
string(REPLACE "/Ob0" "/Ob2" ${flags_var} "${${flags_var}}")
endforeach ()
else ()
string(APPEND CMAKE_C_FLAGS_DEBUG " -O2")
string(APPEND CMAKE_CXX_FLAGS_DEBUG " -O2")
endif ()
add_subdirectory(assimp)
# assimp's own CMakeLists appends "/Od" to the Debug flags again, target options come later and win
if (MSVC)
target_compile_options(assimp PRIVATE $<$<CONFIG:Debug>:/O2>)
endif ()
set(CMAKE_C_FLAGS_DEBUG "${DESTRUM_SAVED_C_FLAGS_DEBUG}")
set(CMAKE_CXX_FLAGS_DEBUG "${DESTRUM_SAVED_CXX_FLAGS_DEBUG}")
set(IMGUI_DIR "${CMAKE_CURRENT_LIST_DIR}/imgui")
add_library(imgui STATIC