Browse Source

DiligentTools: add package (#7108)

* DiligentTools: init

* fix trailing, fix platformdefinitions

* fixup

* linux workaround imgui 1.91.8 -> 1.86

* Update xmake.lua

* test OS X

* retry

* --user for python pip

* fixup

* #include <png.h>

* try pkgconf

* test osx

* macosx imgui 1.85

* Try rapidjson & draco

* re

* Test split

* fixup

* fixup

* split

* fixup

* fixup

* split

* clean

* Update xmake.lua

* fix test
Saikari 7 months ago
parent
commit
e219e9b643

+ 2 - 0
packages/d/diligentcore/xmake.lua

@@ -88,6 +88,8 @@ package("diligentcore")
     end)
 
     on_install("windows", "linux", "macosx", function (package)
+        -- Do not enforce /GL
+        io.replace("CMakeLists.txt", [[set(DEFAULT_DILIGENT_MSVC_RELEASE_COMPILE_OPTIONS /GL)]], [[]], {plain = true})
         -- Dump CMakeLists.txt variables related for platform & rendering backend for package defines
         local CMakeLists_content = io.readfile("CMakeLists.txt")
         io.writefile("CMakeLists.txt", CMakeLists_content .. [[

+ 184 - 0
packages/d/diligenttools/patches/v2.5.6/assetloader-include-diligentcore.diff

@@ -0,0 +1,184 @@
+diff --git a/AssetLoader/interface/DXSDKMeshLoader.hpp b/AssetLoader/interface/DXSDKMeshLoader.hpp
+index e52c545..c4a50f7 100644
+--- a/AssetLoader/interface/DXSDKMeshLoader.hpp
++++ b/AssetLoader/interface/DXSDKMeshLoader.hpp
+@@ -29,14 +29,14 @@
+ 
+ #include <vector>
+ 
+-#include "../../../DiligentCore/Primitives/interface/BasicTypes.h"
+-#include "../../../DiligentCore/Graphics/GraphicsEngine/interface/RenderDevice.h"
+-#include "../../../DiligentCore/Graphics/GraphicsEngine/interface/DeviceContext.h"
+-#include "../../../DiligentCore/Graphics/GraphicsEngine/interface/Buffer.h"
+-#include "../../../DiligentCore/Graphics/GraphicsEngine/interface/Texture.h"
+-#include "../../../DiligentCore/Graphics/GraphicsEngine/interface/TextureView.h"
+-#include "../../../DiligentCore/Common/interface/BasicMath.hpp"
+-#include "../../../DiligentCore/Common/interface/RefCntAutoPtr.hpp"
++#include "DiligentCore/Primitives/interface/BasicTypes.h"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/RenderDevice.h"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/DeviceContext.h"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/Buffer.h"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/Texture.h"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/TextureView.h"
++#include "DiligentCore/Common/interface/BasicMath.hpp"
++#include "DiligentCore/Common/interface/RefCntAutoPtr.hpp"
+ 
+ namespace Diligent
+ {
+diff --git a/AssetLoader/interface/GLTFBuilder.hpp b/AssetLoader/interface/GLTFBuilder.hpp
+index 2644476..ec166a2 100644
+--- a/AssetLoader/interface/GLTFBuilder.hpp
++++ b/AssetLoader/interface/GLTFBuilder.hpp
+@@ -33,7 +33,7 @@
+ #include <string>
+ 
+ #include "GLTFLoader.hpp"
+-#include "GraphicsAccessories.hpp"
++#include "DiligentCore/Graphics/GraphicsAccessories/interface/GraphicsAccessories.hpp"
+ 
+ namespace Diligent
+ {
+diff --git a/AssetLoader/interface/GLTFLoader.hpp b/AssetLoader/interface/GLTFLoader.hpp
+index 3b480f7..6e30f26 100644
+--- a/AssetLoader/interface/GLTFLoader.hpp
++++ b/AssetLoader/interface/GLTFLoader.hpp
+@@ -38,13 +38,13 @@
+ #include <limits>
+ #include <algorithm>
+ 
+-#include "../../../DiligentCore/Platforms/interface/PlatformMisc.hpp"
+-#include "../../../DiligentCore/Graphics/GraphicsEngine/interface/RenderDevice.h"
+-#include "../../../DiligentCore/Graphics/GraphicsEngine/interface/DeviceContext.h"
+-#include "../../../DiligentCore/Graphics/GraphicsEngine/interface/GraphicsTypesX.hpp"
+-#include "../../../DiligentCore/Common/interface/RefCntAutoPtr.hpp"
+-#include "../../../DiligentCore/Common/interface/AdvancedMath.hpp"
+-#include "../../../DiligentCore/Common/interface/STDAllocator.hpp"
++#include "DiligentCore/Platforms/interface/PlatformMisc.hpp"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/RenderDevice.h"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/DeviceContext.h"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/GraphicsTypesX.hpp"
++#include "DiligentCore/Common/interface/RefCntAutoPtr.hpp"
++#include "DiligentCore/Common/interface/AdvancedMath.hpp"
++#include "DiligentCore/Common/interface/STDAllocator.hpp"
+ #include "GLTFResourceManager.hpp"
+ 
+ namespace tinygltf
+diff --git a/AssetLoader/interface/GLTFResourceManager.hpp b/AssetLoader/interface/GLTFResourceManager.hpp
+index 3c50661..143f8ea 100644
+--- a/AssetLoader/interface/GLTFResourceManager.hpp
++++ b/AssetLoader/interface/GLTFResourceManager.hpp
+@@ -32,13 +32,13 @@
+ #include <unordered_map>
+ #include <atomic>
+ 
+-#include "../../../DiligentCore/Graphics/GraphicsEngine/interface/RenderDevice.h"
+-#include "../../../DiligentCore/Graphics/GraphicsEngine/interface/DeviceContext.h"
+-#include "../../../DiligentCore/Common/interface/RefCntAutoPtr.hpp"
+-#include "../../../DiligentCore/Common/interface/ObjectBase.hpp"
+-#include "../../../DiligentCore/Graphics/GraphicsTools/interface/BufferSuballocator.h"
+-#include "../../../DiligentCore/Graphics/GraphicsTools/interface/DynamicTextureAtlas.h"
+-#include "../../../DiligentCore/Graphics/GraphicsTools/interface/VertexPoolX.hpp"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/RenderDevice.h"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/DeviceContext.h"
++#include "DiligentCore/Common/interface/RefCntAutoPtr.hpp"
++#include "DiligentCore/Common/interface/ObjectBase.hpp"
++#include "DiligentCore/Graphics/GraphicsTools/interface/BufferSuballocator.h"
++#include "DiligentCore/Graphics/GraphicsTools/interface/DynamicTextureAtlas.h"
++#include "DiligentCore/Graphics/GraphicsTools/interface/VertexPoolX.hpp"
+ 
+ namespace Diligent
+ {
+diff --git a/AssetLoader/src/DXSDKMeshLoader.cpp b/AssetLoader/src/DXSDKMeshLoader.cpp
+index ba49ce9..9a4790c 100644
+--- a/AssetLoader/src/DXSDKMeshLoader.cpp
++++ b/AssetLoader/src/DXSDKMeshLoader.cpp
+@@ -30,11 +30,11 @@
+ #include <cfloat>
+ 
+ #include "DXSDKMeshLoader.hpp"
+-#include "DataBlobImpl.hpp"
+-#include "RefCntAutoPtr.hpp"
+-#include "FileWrapper.hpp"
++#include "DiligentCore/Common/interface/DataBlobImpl.hpp"
++#include "DiligentCore/Common/interface/RefCntAutoPtr.hpp"
++#include "DiligentCore/Common/interface/FileWrapper.hpp"
+ #include "TextureUtilities.h"
+-#include "GraphicsAccessories.hpp"
++#include "DiligentCore/Graphics/GraphicsAccessories/interface/GraphicsAccessories.hpp"
+ 
+ namespace Diligent
+ {
+diff --git a/AssetLoader/src/GLTFBuilder.cpp b/AssetLoader/src/GLTFBuilder.cpp
+index ca92d43..fc22cb6 100644
+--- a/AssetLoader/src/GLTFBuilder.cpp
++++ b/AssetLoader/src/GLTFBuilder.cpp
+@@ -26,7 +26,7 @@
+ 
+ #include "GLTFBuilder.hpp"
+ #include "GLTFLoader.hpp"
+-#include "GraphicsAccessories.hpp"
++#include "DiligentCore/Graphics/GraphicsAccessories/interface/GraphicsAccessories.hpp"
+ 
+ namespace Diligent
+ {
+diff --git a/AssetLoader/src/GLTFLoader.cpp b/AssetLoader/src/GLTFLoader.cpp
+index 3eece7f..1cabc3b 100644
+--- a/AssetLoader/src/GLTFLoader.cpp
++++ b/AssetLoader/src/GLTFLoader.cpp
+@@ -31,20 +31,20 @@
+ #include <limits>
+ 
+ #include "GLTFLoader.hpp"
+-#include "MapHelper.hpp"
+-#include "CommonlyUsedStates.h"
+-#include "DataBlobImpl.hpp"
++#include "DiligentCore/Graphics/GraphicsTools/interface/MapHelper.hpp"
++#include "DiligentCore/Graphics/GraphicsTools/interface/CommonlyUsedStates.h"
++#include "DiligentCore/Common/interface/DataBlobImpl.hpp"
+ #include "Image.h"
+-#include "FileSystem.hpp"
+-#include "FileWrapper.hpp"
+-#include "GraphicsAccessories.hpp"
++#include "DiligentCore/Platforms/interface/FileSystem.hpp"
++#include "DiligentCore/Common/interface/FileWrapper.hpp"
++#include "DiligentCore/Graphics/GraphicsAccessories/interface/GraphicsAccessories.hpp"
+ #include "TextureLoader.h"
+ #include "TextureUtilities.h"
+-#include "GraphicsUtilities.h"
+-#include "Align.hpp"
++#include "DiligentCore/Graphics/GraphicsTools/interface/GraphicsUtilities.h"
++#include "DiligentCore/Common/interface/Align.hpp"
+ #include "GLTFBuilder.hpp"
+-#include "FixedLinearAllocator.hpp"
+-#include "DefaultRawMemoryAllocator.hpp"
++#include "DiligentCore/Common/interface/FixedLinearAllocator.hpp"
++#include "DiligentCore/Common/interface/DefaultRawMemoryAllocator.hpp"
+ 
+ #define TINYGLTF_IMPLEMENTATION
+ #define TINYGLTF_NO_STB_IMAGE
+@@ -53,7 +53,7 @@
+ #if defined(_MSC_VER) && defined(TINYGLTF_ENABLE_DRACO)
+ #    pragma warning(disable : 4127) // warning C4127: conditional expression is constant
+ #endif
+-#include "../../ThirdParty/tinygltf/tiny_gltf.h"
++#include "tiny_gltf.h"
+ 
+ namespace Diligent
+ {
+diff --git a/AssetLoader/src/GLTFResourceManager.cpp b/AssetLoader/src/GLTFResourceManager.cpp
+index 0b1d39f..bdb7f36 100644
+--- a/AssetLoader/src/GLTFResourceManager.cpp
++++ b/AssetLoader/src/GLTFResourceManager.cpp
+@@ -29,9 +29,9 @@
+ 
+ #include <algorithm>
+ 
+-#include "DefaultRawMemoryAllocator.hpp"
+-#include "Align.hpp"
+-#include "GraphicsAccessories.hpp"
++#include "DiligentCore/Common/interface/DefaultRawMemoryAllocator.hpp"
++#include "DiligentCore/Common/interface/Align.hpp"
++#include "DiligentCore/Graphics/GraphicsAccessories/interface/GraphicsAccessories.hpp"
+ 
+ namespace Diligent
+ {

+ 260 - 0
packages/d/diligenttools/patches/v2.5.6/debundle-cmakelists.diff

@@ -0,0 +1,260 @@
+diff --git a/AssetLoader/CMakeLists.txt b/AssetLoader/CMakeLists.txt
+index 2d147c2..540ad49 100644
+--- a/AssetLoader/CMakeLists.txt
++++ b/AssetLoader/CMakeLists.txt
+@@ -28,6 +28,8 @@ PUBLIC
+     interface
+ PRIVATE
+     include
++    ${diligentcore_INCLUDEDIR}
++    ${tinygltf_INCLUDEDIR}
+ )
+ 
+ source_group("source" FILES ${SOURCE})
+@@ -46,38 +48,14 @@ PRIVATE
+     Diligent-JSON
+ )
+ 
+-if (TARGET draco OR TARGET draco_static)
+-    if(TARGET draco)
+-        set(DRACO_TARGET draco)
+-    else()
+-        set(DRACO_TARGET draco_static)
+-    endif()
+-    target_link_libraries(Diligent-AssetLoader PRIVATE ${DRACO_TARGET})
+-    get_target_property(DRACO_SOURCE_DIR ${DRACO_TARGET} SOURCE_DIR)
++if (DILIGENT_ENABLE_DRACO)
++    target_link_libraries(Diligent-AssetLoader PRIVATE ${draco_LINK_LIBRARIES})
+     target_compile_definitions(Diligent-AssetLoader PRIVATE TINYGLTF_ENABLE_DRACO)
+-    target_include_directories(Diligent-AssetLoader PRIVATE "${DRACO_SOURCE_DIR}/src" "${CMAKE_BINARY_DIR}")
+-elseif (DRACO_PATH)
+-    find_library(DRACO_LIBRARY NAMES draco draco_static PATHS "${DRACO_PATH}/lib")
+-    if(DRACO_LIBRARY)
+-        target_link_libraries(Diligent-AssetLoader PRIVATE ${DRACO_LIBRARY})
+-        target_include_directories(Diligent-AssetLoader PRIVATE "${DRACO_PATH}/include")
+-        target_compile_definitions(Diligent-AssetLoader PRIVATE TINYGLTF_ENABLE_DRACO)
+-    else()
+-        message(WARNING "Unable to find draco library. Draco support will be disabled")
+-    endif()
++    target_include_directories(Diligent-AssetLoader PRIVATE "${draco_INCLUDEDIR}")
+ endif()
+ 
+ if(DILIGENT_USE_RAPIDJSON)
+-    FetchContent_DeclareShallowGit(
+-        rapidjson
+-        GIT_REPOSITORY https://github.com/Tencent/rapidjson
+-        GIT_TAG        ab1842a2dae061284c0a62dca1cc6d5e7e37e346
+-    )
+-    set(RAPIDJSON_BUILD_DOC OFF)
+-    set(RAPIDJSON_BUILD_EXAMPLES OFF)
+-    set(RAPIDJSON_BUILD_TESTS OFF)
+-    FetchContent_MakeAvailable(rapidjson)
+-    target_include_directories(Diligent-AssetLoader PRIVATE ${rapidjson_SOURCE_DIR}/include/rapidjson)
++    target_include_directories(Diligent-AssetLoader PRIVATE ${rapidjson_INCLUDEDIR}/rapidjson)
+     target_compile_definitions(Diligent-AssetLoader PRIVATE TINYGLTF_USE_RAPIDJSON TINYGLTF_USE_RAPIDJSON_CRTALLOCATOR)
+ endif()
+ 
+diff --git a/Imgui/CMakeLists.txt b/Imgui/CMakeLists.txt
+index 73b412c..d38827c 100644
+--- a/Imgui/CMakeLists.txt
++++ b/Imgui/CMakeLists.txt
+@@ -52,8 +52,9 @@ add_library(Diligent-Imgui STATIC
+     ${IMGUIZMO_QUAT_SOURCE}
+ )
+ 
+-if(TARGET imgui)
+-    target_link_libraries(Diligent-Imgui PRIVATE imgui)
++if(1)
++    target_link_libraries(Diligent-Imgui PRIVATE ${imgui_LINK_LIBRARIES})
++    target_include_directories(Diligent-Imgui PRIVATE ${imgui_INCLUDEDIR} ${diligentcore_INCLUDEDIR})
+ else()
+     set(DEAR_IMGUI_INTERFACE
+         ${DILIGENT_DEAR_IMGUI_PATH}/imgui.h
+diff --git a/NativeApp/CMakeLists.txt b/NativeApp/CMakeLists.txt
+index 8a183d4..8297947 100644
+--- a/NativeApp/CMakeLists.txt
++++ b/NativeApp/CMakeLists.txt
+@@ -462,6 +462,8 @@ if(PLATFORM_WIN32)
+     target_include_directories(Diligent-NativeAppBase
+     PUBLIC 
+         include/Win32
++    PRIVATE
++        ${diligentcore_INCLUDEDIR}
+     )
+ 
+ elseif(PLATFORM_UNIVERSAL_WINDOWS)
+@@ -495,6 +497,8 @@ elseif(PLATFORM_LINUX)
+     target_include_directories(Diligent-NativeAppBase 
+     PUBLIC 
+         include/Linux
++    PRIVATE
++        ${diligentcore_INCLUDEDIR}
+     )
+     if(VULKAN_SUPPORTED)
+         find_library(XCB_LIBRARY xcb)
+@@ -507,6 +511,8 @@ elseif(PLATFORM_MACOS)
+     target_include_directories(Diligent-NativeAppBase PUBLIC
+         src/MacOS
+         include/MacOS
++    PRIVATE
++        ${diligentcore_INCLUDEDIR}
+     )
+ elseif(PLATFORM_IOS)
+     target_include_directories(Diligent-NativeAppBase PUBLIC
+@@ -528,3 +534,7 @@ source_group("include" FILES ${INCLUDE})
+ set_target_properties(Diligent-NativeAppBase PROPERTIES
+     FOLDER DiligentTools
+ )
++
++if(DILIGENT_INSTALL_TOOLS)
++    install_tools_lib(Diligent-NativeAppBase)
++endif()
+diff --git a/RenderStateNotation/CMakeLists.txt b/RenderStateNotation/CMakeLists.txt
+index 2f76ec8..6129db8 100644
+--- a/RenderStateNotation/CMakeLists.txt
++++ b/RenderStateNotation/CMakeLists.txt
+@@ -2,6 +2,7 @@ cmake_minimum_required (VERSION 3.6)
+ 
+ project(Diligent-RenderStateNotation CXX)
+ 
++set(Diligent-GraphicsEngine_SOURCE_DIR ${diligentcore_INCLUDEDIR}/DiligentCore/Graphics/GraphicsEngine)
+ set(REFLECTED
+     ${Diligent-GraphicsEngine_SOURCE_DIR}/interface/BlendState.h
+     ${Diligent-GraphicsEngine_SOURCE_DIR}/interface/DepthStencilState.h
+@@ -26,8 +27,8 @@ file(COPY ../.clang-format DESTINATION "${RSN_PARSER_GENERATED_HEADERS_DIR}")
+ 
+ find_package(Python3 REQUIRED)
+ 
+-set(LIBCLANG_INSTALL_CMD ${Python3_EXECUTABLE} -m pip install libclang==16.0.6)
+-set(JINJA2_INSTALL_CMD ${Python3_EXECUTABLE} -m pip install jinja2)
++set(LIBCLANG_INSTALL_CMD ${Python3_EXECUTABLE} -m pip install --user libclang==16.0.6)
++set(JINJA2_INSTALL_CMD ${Python3_EXECUTABLE} -m pip install --user jinja2)
+ 
+ if(${Python3_VERSION} VERSION_GREATER_EQUAL "3.12")
+     set(LIBCLANG_INSTALL_CMD ${LIBCLANG_INSTALL_CMD} --break-system-packages)
+@@ -65,15 +66,9 @@ source_group("generated" FILES ${GENERATED})
+ source_group("source"    FILES ${SOURCE})
+ source_group("scripts"   FILES ${SCRIPTS})
+ 
+-if (EXISTS "${CLANG_FORMAT_EXECUTABLE}")
+-    set(FORMATTING_COMMAND "${CLANG_FORMAT_EXECUTABLE}" -i *.hpp --verbose)
+-else()
+-    set(FORMATTING_COMMAND "${CMAKE_COMMAND}" -E echo "clang-format executable is not found: RSN parser headers will not be formatted")
+-endif()
+ 
+ add_custom_command(OUTPUT ${GENERATED}
+                    COMMAND ${Python3_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/scripts/cxx_generator.py" --dir "." --files ${REFLECTED}
+-                   COMMAND ${FORMATTING_COMMAND}
+                    WORKING_DIRECTORY "${RSN_PARSER_GENERATED_HEADERS_DIR}"
+                    DEPENDS ${REFLECTED}
+                    COMMENT "Generating RSN Parser Headers...")
+@@ -91,7 +86,10 @@ PUBLIC
+     interface
+ PRIVATE
+     include
+-    ../../DiligentCore/Graphics/Archiver/interface
++    ${diligentcore_INCLUDEDIR}
++    ${diligentcore_INCLUDEDIR}/DiligentCore/Graphics/GraphicsEngine/interface
++    ${diligentcore_INCLUDEDIR}/DiligentCore/Graphics/Archiver/interface
++    ${nlohmann_json_INCLUDEDIR}
+     ${RSN_PARSER_HEADERS_DIR}
+ )
+ 
+diff --git a/RenderStatePackager/CMakeLists.txt b/RenderStatePackager/CMakeLists.txt
+index ab34ffa..87cadb3 100644
+--- a/RenderStatePackager/CMakeLists.txt
++++ b/RenderStatePackager/CMakeLists.txt
+@@ -22,6 +22,12 @@ add_library(Diligent-RenderStatePackagerLib STATIC
+ target_include_directories(Diligent-RenderStatePackagerLib
+ PUBLIC
+     include
++PRIVATE
++    ${diligentcore_INCLUDEDIR}
++)
++target_link_directories(Diligent-RenderStatePackagerLib
++PRIVATE
++    ${diligentcore_LIBDIR}
+ )
+ 
+ target_link_libraries(Diligent-RenderStatePackagerLib
+@@ -35,29 +41,6 @@ PUBLIC
+ 
+ set_common_target_properties(Diligent-RenderStatePackagerLib)
+ 
+-add_executable(Diligent-RenderStatePackager
+-    src/main.cpp
+-    README.md
+-)
+-set_common_target_properties(Diligent-RenderStatePackager)
+-
+-target_link_libraries(Diligent-RenderStatePackager
+-PRIVATE
+-    Diligent-BuildSettings
+-    Diligent-Common
+-    Diligent-RenderStatePackagerLib
+-)
+-target_include_directories(Diligent-RenderStatePackager
+-PRIVATE
+-    include
+-    ${DILIGENT_ARGS_DIR}
+-)
+-
+-if (DILIGENT_INSTALL_TOOLS)
+-    install(TARGETS Diligent-RenderStatePackager RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}/${DILIGENT_TOOLS_DIR}/$<CONFIG>" OPTIONAL)
++if(DILIGENT_INSTALL_TOOLS)
++    install_tools_lib(Diligent-RenderStatePackagerLib)
+ endif()
+-
+-
+-set_target_properties(Diligent-RenderStatePackagerLib Diligent-RenderStatePackager PROPERTIES
+-    FOLDER DiligentTools
+-)
+diff --git a/TextureLoader/CMakeLists.txt b/TextureLoader/CMakeLists.txt
+index eb1150b..9ffcd31 100644
+--- a/TextureLoader/CMakeLists.txt
++++ b/TextureLoader/CMakeLists.txt
+@@ -34,17 +34,18 @@ set(SOURCE
+ add_library(Diligent-TextureLoader STATIC ${SOURCE} ${INCLUDE} ${INTERFACE})
+ set_common_target_properties(Diligent-TextureLoader)
+ 
+-set_property(SOURCE src/PNGCodec.c src/Image.cpp
+-APPEND PROPERTY INCLUDE_DIRECTORIES
+-    "${CMAKE_CURRENT_SOURCE_DIR}/../ThirdParty/libpng" # png_static target does not define any public include directories
+-    "${CMAKE_CURRENT_BINARY_DIR}/../ThirdParty/libpng" # pnglibconf.h is generated in the binary directory
+-)
+ 
+ target_include_directories(Diligent-TextureLoader
+ PUBLIC
+     interface
+ PRIVATE
+     include
++    ${diligentcore_INCLUDEDIR}
++    ${stb_INCLUDEDIR}
++    ${libpng_INCLUDEDIR}
++    ${libtiff_INCLUDEDIR}
++    ${libjpeg_INCLUDEDIR}
++    ${zlib_INCLUDEDIR}
+ )
+ 
+ source_group("source" FILES ${SOURCE})
+@@ -59,15 +60,15 @@ PRIVATE
+     Diligent-GraphicsEngineInterface 
+     Diligent-GraphicsAccessories
+     Diligent-GraphicsTools
+-    PNG::PNG 
+-    TIFF::TIFF
+-    ZLIB::ZLIB
++    ${libpng_LINK_LIBRARIES}
++    ${libtiff_LINK_LIBRARIES}
++    ${zlib_LINK_LIBRARIES}
+ )
+ 
+-if (NOT DILIGENT_EXTERNAL_LIBJPEG)
++if (1)
+     target_link_libraries(Diligent-TextureLoader
+     PRIVATE
+-        JPEG::JPEG
++        ${libjpeg_LINK_LIBRARIES}
+     )
+ else()
+     target_link_libraries(Diligent-TextureLoader

+ 126 - 0
packages/d/diligenttools/patches/v2.5.6/debundle-thirdparty-cmakelist.diff

@@ -0,0 +1,126 @@
+diff --git a/ThirdParty/CMakeLists.txt b/ThirdParty/CMakeLists.txt
+index 49129b9..eb437d5 100644
+--- a/ThirdParty/CMakeLists.txt
++++ b/ThirdParty/CMakeLists.txt
+@@ -12,74 +12,31 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR
+ endif()
+ 
+ 
+-if (NOT TARGET JPEG::JPEG)
+-    add_subdirectory(libjpeg-9e)
+-    install(FILES libjpeg-9e/README DESTINATION ${LICENSE_INSTALL_PATH} RENAME libjpeg-readme.txt)
+-    list(APPEND THIRD_PARTY_TARGETS LibJpeg)
+-endif()
+-
+-if (NOT TARGET TIFF::TIFF)
+-    add_subdirectory(libtiff)
+-    install(FILES libtiff/COPYRIGHT DESTINATION ${LICENSE_INSTALL_PATH} RENAME libtiff-copyright.txt)
+-    list(APPEND THIRD_PARTY_TARGETS LibTiff)
+-    if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+-        target_compile_options(LibTiff PRIVATE -Wno-shorten-64-to-32)
+-    endif()
+-endif()
+-
+-if (NOT TARGET ZLIB::ZLIB)
+-    include(zlib.cmake)
+-    install(FILES zlib/README DESTINATION ${LICENSE_INSTALL_PATH} RENAME zlib-readme.txt)
+-    list(APPEND THIRD_PARTY_TARGETS ZLib)
+-    if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+-        target_compile_options(ZLib PRIVATE -Wno-shorten-64-to-32)
+-    endif()
+-endif()
+-
+-if (NOT TARGET PNG::PNG)
+-    set(PNG_BUILD_ZLIB ON CACHE BOOL "Use find_package(zlib) to find ZLib location")
+-    set(PNG_SHARED OFF CACHE BOOL "Build shared version of libpng")
+-    set(PNG_TOOLS OFF CACHE BOOL "Build libpng tools")
+-    set(PNG_TESTS OFF CACHE BOOL "Build libpng tests")
+-    set(SKIP_INSTALL_ALL ON)
+-    set(PNG_FRAMEWORK OFF)
+-    if(PLATFORM_TVOS)
+-        # libpng does not support tvOS, but it does support iOS, so we can use the iOS target
+-        set(IOS TRUE)
+-    endif()
+-    add_subdirectory(libpng)
+-    set_target_properties(png_static PROPERTIES POSITION_INDEPENDENT_CODE ON)
+-    set_directory_root_folder(libpng DiligentTools/ThirdParty/png)
+-    install(FILES libpng/LICENSE DESTINATION ${LICENSE_INSTALL_PATH} RENAME lpng-license.txt)
+-    add_library(PNG::PNG ALIAS png_static)
+-    list(APPEND THIRD_PARTY_TARGETS png_static)
+-
+-    if (PLATFORM_EMSCRIPTEN)
+-        set_targets_emscripten_properties(png_static)
+-    endif()
+-endif()
++pkg_check_modules(libpng REQUIRED libpng)
++pkg_check_modules(libtiff REQUIRED libtiff-4)
++pkg_check_modules(libjpeg REQUIRED libjpeg)
++pkg_check_modules(zlib REQUIRED zlib)
++pkg_check_modules(taywee_args REQUIRED taywee_args)
++pkg_check_modules(nlohmann_json REQUIRED nlohmann_json)
++pkg_check_modules(imgui REQUIRED imgui)
++pkg_check_modules(diligentcore REQUIRED diligentcore)
++pkg_check_modules(stb REQUIRED stb)
++pkg_check_modules(tinygltf REQUIRED tinygltf)
+ 
+ 
+ if (NOT DILIGENT_ARGS_DIR)
+-    set(DILIGENT_ARGS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/args" CACHE PATH "args source directory")
++    set(DILIGENT_ARGS_DIR "${taywee_args_INCLUDEDIR}" CACHE PATH "args source directory")
+ endif()
+ if (NOT EXISTS "${DILIGENT_ARGS_DIR}/args.hxx")
+     message(FATAL_ERROR "${DILIGENT_ARGS_DIR}/args.hxx does not exist. This indicates that args submodule is not checked out or DILIGENT_ARGS_DIR variable contains invalid path.")
+ endif()
+-install(FILES "${DILIGENT_ARGS_DIR}/LICENSE" DESTINATION ${LICENSE_INSTALL_PATH} RENAME args-license.txt)
+ 
+ if(NOT IMGUIZMO_QUAT_PATH)
+     set(IMGUIZMO_QUAT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/imGuIZMO.quat CACHE PATH "imGuIZMO.quat source directory")
+ endif()
+ 
+-install(FILES tinygltf/LICENSE DESTINATION ${LICENSE_INSTALL_PATH} RENAME tinygltf-license.txt)
+-install(FILES imGuIZMO.quat/license.txt DESTINATION ${LICENSE_INSTALL_PATH} RENAME imGuIZMO.quat-license.txt)
+-install(FILES stb/LICENSE DESTINATION "${LICENSE_INSTALL_PATH}" RENAME stb-license.txt)
+-install(FILES json/LICENSE.MIT DESTINATION ${LICENSE_INSTALL_PATH} RENAME json-license.txt)
+-
+-
+ add_library(Diligent-JSON INTERFACE)
+-target_include_directories(Diligent-JSON INTERFACE json/single_include/nlohmann)
++target_include_directories(Diligent-JSON INTERFACE ${nlohmann_json_INCLUDEDIR})
+ # WARNING: JSON_DIAGNOSTICS must be consistently defined for all inclusions of json.hpp,
+ #          or there will be hard-to-diagnose run-time crashes.
+ #          It is required by RenderStatePackager even in release builds.
+@@ -87,26 +44,21 @@ target_compile_definitions(Diligent-JSON INTERFACE JSON_DIAGNOSTICS=1)
+ 
+ 
+ if (NOT DILIGENT_DEAR_IMGUI_PATH)
+-    set(DILIGENT_DEAR_IMGUI_PATH "${CMAKE_CURRENT_SOURCE_DIR}/imgui" CACHE PATH "imgui source directory")
++    set(DILIGENT_DEAR_IMGUI_PATH "${imgui_INCLUDEDIR}" CACHE PATH "imgui source directory")
+ endif()
+ if (NOT EXISTS "${DILIGENT_DEAR_IMGUI_PATH}/imgui.h")
+     message(FATAL_ERROR "${DILIGENT_DEAR_IMGUI_PATH}/imgui.h does not exist. This inidcates that imgui submodule is not checked out or DILIGENT_DEAR_IMGUI_PATH variable contains invalid path.")
+ endif()
+-install(FILES "${DILIGENT_DEAR_IMGUI_PATH}/LICENSE.txt" DESTINATION ${LICENSE_INSTALL_PATH} RENAME imgui-license.txt)
+ 
+-if (DILIGENT_ENABLE_DRACO AND (NOT TARGET draco) AND (NOT TARGET draco_static))
+-    message("Fetching Draco repository - this may take a few moments...")
+-    include(FetchContent)
+-    FetchContent_Declare(
+-        draco
+-        GIT_REPOSITORY https://github.com/google/draco
+-        GIT_TAG        1.5.6
+-    )
+-    FetchContent_MakeAvailable(draco)
+-    set_directory_root_folder(${draco_SOURCE_DIR} DiligentTools/ThirdParty/draco)
++if (DILIGENT_ENABLE_DRACO)
++    pkg_check_modules(draco REQUIRED draco)
++endif()
++
++if(DILIGENT_USE_RAPIDJSON)
++    pkg_check_modules(rapidjson REQUIRED RapidJSON)
+ endif()
+ 
+-if(DILIGENT_INSTALL_TOOLS)
++if(0)
+     install(TARGETS ${THIRD_PARTY_TARGETS}
+             ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}/${DILIGENT_TOOLS_DIR}/$<CONFIG>"
+             LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/${DILIGENT_TOOLS_DIR}/$<CONFIG>"

+ 154 - 0
packages/d/diligenttools/patches/v2.5.6/fix-top-cmakelist.diff

@@ -0,0 +1,154 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 212a82e..afede0f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -21,23 +21,116 @@ function(install_tools_lib _TARGET)
+     if(TARGET_TYPE STREQUAL STATIC_LIBRARY)
+         list(APPEND DILIGENT_TOOLS_INSTALL_LIBS_LIST ${_TARGET})
+         set(DILIGENT_TOOLS_INSTALL_LIBS_LIST ${DILIGENT_TOOLS_INSTALL_LIBS_LIST} CACHE INTERNAL "Diligent tools libraries installation list")
++        install(TARGETS				 ${_TARGET}
++                ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
++                LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
++                RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
++        )
++        if (DILIGENT_INSTALL_PDB)
++            install(FILES $<TARGET_PDB_FILE:${_TARGET}> DESTINATION "${CMAKE_INSTALL_BINDIR}" OPTIONAL)
++        endif()
+     elseif(TARGET_TYPE STREQUAL SHARED_LIBRARY)
+         install(TARGETS				 ${_TARGET}
+-                ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}/${DILIGENT_TOOLS_DIR}/$<CONFIG>"
+-                LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/${DILIGENT_TOOLS_DIR}/$<CONFIG>"
+-                RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}/${DILIGENT_TOOLS_DIR}/$<CONFIG>"
++                ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
++                LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
++                RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
+         )
+         if (DILIGENT_INSTALL_PDB)
+-            install(FILES $<TARGET_PDB_FILE:${_TARGET}> DESTINATION "${CMAKE_INSTALL_BINDIR}/${DILIGENT_TOOLS_DIR}/$<CONFIG>" OPTIONAL)
++            install(FILES $<TARGET_PDB_FILE:${_TARGET}> DESTINATION "${CMAKE_INSTALL_BINDIR}" OPTIONAL)
+         endif()
+     endif()
+ 
+     if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/interface")
+         install(DIRECTORY    interface
+-                DESTINATION  "${CMAKE_INSTALL_INCLUDEDIR}/${TARGET_RELATIVE_PATH}/"
++                DESTINATION  "include/DiligentTools/${TARGET_RELATIVE_PATH}"
+         )
+     endif()
+ endfunction()
++include(FindPkgConfig)
++include(BuildUtils.cmake)
++add_library(Diligent-PublicBuildSettings INTERFACE)
++if(PLATFORM_WIN32)
++    set(GL_SUPPORTED       TRUE CACHE INTERNAL "OpenGL is supported on Win32 platform")
++    set(VULKAN_SUPPORTED   TRUE CACHE INTERNAL "Vulkan is supported on Win32 platform")
++    set(WEBGPU_SUPPORTED   TRUE CACHE INTERNAL "WebGPU is supported on Win32 platform")
++    set(ARCHIVER_SUPPORTED TRUE CACHE INTERNAL "Archiver is supported on Win32 platform")
++    target_compile_definitions(Diligent-PublicBuildSettings INTERFACE PLATFORM_WIN32=1)
++elseif(PLATFORM_UNIVERSAL_WINDOWS)
++    set(ARCHIVER_SUPPORTED TRUE CACHE INTERNAL "Archiver is supported on Universal Windows platform")
++    target_compile_definitions(Diligent-PublicBuildSettings INTERFACE PLATFORM_UNIVERSAL_WINDOWS=1)
++elseif(PLATFORM_ANDROID)
++    set(GLES_SUPPORTED     TRUE CACHE INTERNAL "OpenGLES is supported on Android platform")
++    set(VULKAN_SUPPORTED   TRUE CACHE INTERNAL "Vulkan is supported on Android platform")
++    set(ARCHIVER_SUPPORTED TRUE CACHE INTERNAL "Archiver is supported on Android platform")
++    target_compile_definitions(Diligent-PublicBuildSettings INTERFACE PLATFORM_ANDROID=1)
++elseif(PLATFORM_LINUX)
++    set(GL_SUPPORTED       TRUE CACHE INTERNAL "OpenGL is supported on Linux platform")
++    set(VULKAN_SUPPORTED   TRUE CACHE INTERNAL "Vulkan is supported on Linux platform")
++    set(ARCHIVER_SUPPORTED TRUE CACHE INTERNAL "Archiver is supported on Linux platform")
++    target_compile_definitions(Diligent-PublicBuildSettings INTERFACE PLATFORM_LINUX=1)
++elseif(PLATFORM_MACOS)
++    set(GL_SUPPORTED       TRUE CACHE INTERNAL "OpenGL is supported on MacOS platform")
++    set(VULKAN_SUPPORTED   TRUE CACHE INTERNAL "Vulkan is enabled through MoltenVK on MacOS platform")
++    set(ARCHIVER_SUPPORTED TRUE CACHE INTERNAL "Archiver is supported on MacOS platform")
++    target_compile_definitions(Diligent-PublicBuildSettings INTERFACE PLATFORM_MACOS=1 PLATFORM_APPLE=1)
++elseif(PLATFORM_IOS)
++    set(GLES_SUPPORTED TRUE CACHE INTERNAL "OpenGLES is supported on iOS platform")
++    target_compile_definitions(Diligent-PublicBuildSettings INTERFACE PLATFORM_IOS=1 PLATFORM_APPLE=1)
++elseif(PLATFORM_TVOS)
++    target_compile_definitions(Diligent-PublicBuildSettings INTERFACE PLATFORM_TVOS=1 PLATFORM_APPLE=1)
++elseif(PLATFORM_WEB)
++    set(GLES_SUPPORTED     TRUE CACHE INTERNAL "OpenGLES is supported on Web platform")
++    set(WEBGPU_SUPPORTED   TRUE CACHE INTERNAL "WebGPU is supported on Web platform")
++    set(ARCHIVER_SUPPORTED TRUE CACHE INTERNAL "Archiver is supported on Web platform")
++    target_compile_definitions(Diligent-PublicBuildSettings INTERFACE PLATFORM_WEB=1 PLATFORM_EMSCRIPTEN=1)
++else()
++    message(FATAL_ERROR "No PLATFORM_XXX variable defined. Make sure that 'DiligentCore' folder is processed first")
++endif()
++target_compile_definitions(Diligent-PublicBuildSettings
++INTERFACE
++    D3D11_SUPPORTED=$<BOOL:${D3D11_SUPPORTED}>
++    D3D12_SUPPORTED=$<BOOL:${D3D12_SUPPORTED}>
++    GL_SUPPORTED=$<BOOL:${GL_SUPPORTED}>
++    GLES_SUPPORTED=$<BOOL:${GLES_SUPPORTED}>
++    VULKAN_SUPPORTED=$<BOOL:${VULKAN_SUPPORTED}>
++    METAL_SUPPORTED=$<BOOL:${METAL_SUPPORTED}>
++    WEBGPU_SUPPORTED=$<BOOL:${WEBGPU_SUPPORTED}>
++)
++add_library(Diligent-BuildSettings INTERFACE)
++if (PLATFORM_WEB)
++    target_compile_options(Diligent-BuildSettings INTERFACE
++        "-pthread"
++        "-mbulk-memory"
++    )
++endif()
++target_link_libraries(Diligent-BuildSettings INTERFACE Diligent-PublicBuildSettings)
++if(PLATFORM_WIN32)
++	set(Diligent-TargetPlatform Diligent-Win32Platform)
++elseif(PLATFORM_UNIVERSAL_WINDOWS)
++	set(Diligent-TargetPlatform Diligent-UniversalWindowsPlatform)
++elseif(PLATFORM_ANDROID)
++	set(Diligent-TargetPlatform Diligent-AndroidPlatform)
++elseif(PLATFORM_LINUX)
++	set(Diligent-TargetPlatform Diligent-LinuxPlatform)
++elseif(PLATFORM_MACOS OR PLATFORM_IOS OR PLATFORM_TVOS)
++	set(Diligent-TargetPlatform Diligent-ApplePlatform)
++elseif(PLATFORM_WEB)
++	set(Diligent-TargetPlatform Diligent-EmscriptenPlatform)
++else()
++	message(FATAL_ERROR "No PLATFORM_XXX variable defined. Make sure that 'DiligentCore' folder is processed first")
++endif()
++add_library(Diligent-PlatformInterface INTERFACE)
++target_include_directories(Diligent-PlatformInterface INTERFACE ${diligentcore_INCLUDEDIR}/DiligentCore/Platforms/interface)
++add_library(Diligent-GraphicsEngineInterface INTERFACE)
++target_include_directories(Diligent-GraphicsEngineInterface
++INTERFACE
++    ${diligentcore_INCLUDEDIR}/Graphics/GraphicsEngine/interface
++)
++target_link_libraries(Diligent-GraphicsEngineInterface
++INTERFACE
++    Diligent-Primitives
++    Diligent-PublicBuildSettings
++)
+ 
+ add_subdirectory(ThirdParty)
+ add_subdirectory(TextureLoader)
+@@ -46,7 +139,6 @@ add_subdirectory(Imgui)
+ add_subdirectory(NativeApp)
+ 
+ if((PLATFORM_WIN32 OR PLATFORM_LINUX OR PLATFORM_MACOS) AND GL_SUPPORTED)
+-    add_subdirectory(HLSL2GLSLConverter)
+ endif()
+ 
+ add_subdirectory(RenderStateNotation)
+@@ -55,7 +147,6 @@ if((PLATFORM_WIN32 OR PLATFORM_LINUX OR PLATFORM_MACOS) AND ARCHIVER_SUPPORTED A
+     add_subdirectory(RenderStatePackager)
+ endif()
+ 
+-add_subdirectory(Tests)
+ 
+ # Installation instructions
+ if(DILIGENT_INSTALL_TOOLS)
+@@ -65,10 +156,9 @@ if(DILIGENT_INSTALL_TOOLS)
+         "${DILIGENT_TOOLS_INSTALL_LIBS_LIST}"
+         DiligentTools-static                     # Custom target name
+         DiligentTools                            # Folder
+-        "${CMAKE_INSTALL_LIBDIR}/${DILIGENT_TOOLS_DIR}/$<CONFIG>"    # Install destination
++        "${CMAKE_INSTALL_LIBDIR}"    # Install destination
+     )
+ 
+ endif()
+ 
+ # Create a custom target to run source code formatting validation command
+-add_format_validation_target(DiligentTools "${CMAKE_CURRENT_SOURCE_DIR}" DiligentTools)

+ 190 - 0
packages/d/diligenttools/patches/v2.5.6/imgui-include-diligentcore.diff

@@ -0,0 +1,190 @@
+diff --git a/Imgui/interface/ImGuiDiligentRenderer.hpp b/Imgui/interface/ImGuiDiligentRenderer.hpp
+index f3578fc..3ef3af6 100644
+--- a/Imgui/interface/ImGuiDiligentRenderer.hpp
++++ b/Imgui/interface/ImGuiDiligentRenderer.hpp
+@@ -28,10 +28,10 @@
+ #pragma once
+ 
+ #include <memory>
+-#include "../../../DiligentCore/Primitives/interface/BasicTypes.h"
+-#include "../../../DiligentCore/Common/interface/BasicMath.hpp"
+-#include "../../../DiligentCore/Common/interface/RefCntAutoPtr.hpp"
+-#include "../../../DiligentCore/Graphics/GraphicsEngine/interface/GraphicsTypes.h"
++#include "DiligentCore/Primitives/interface/BasicTypes.h"
++#include "DiligentCore/Common/interface/BasicMath.hpp"
++#include "DiligentCore/Common/interface/RefCntAutoPtr.hpp"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/GraphicsTypes.h"
+ #include "imgui.h"
+ 
+ struct ImDrawData;
+diff --git a/Imgui/interface/ImGuiImplDiligent.hpp b/Imgui/interface/ImGuiImplDiligent.hpp
+index 8f66d50..3a35a62 100644
+--- a/Imgui/interface/ImGuiImplDiligent.hpp
++++ b/Imgui/interface/ImGuiImplDiligent.hpp
+@@ -28,7 +28,7 @@
+ #pragma once
+ 
+ #include <memory>
+-#include "../../../DiligentCore/Primitives/interface/BasicTypes.h"
++#include "DiligentCore/Primitives/interface/BasicTypes.h"
+ 
+ namespace Diligent
+ {
+diff --git a/Imgui/interface/ImGuiUtils.hpp b/Imgui/interface/ImGuiUtils.hpp
+index 2e8c8b3..26c525b 100644
+--- a/Imgui/interface/ImGuiUtils.hpp
++++ b/Imgui/interface/ImGuiUtils.hpp
+@@ -33,7 +33,7 @@
+ #include <memory>
+ #include <vector>
+ 
+-#include "../../../DiligentCore/Platforms/Basic/interface/DebugUtilities.hpp"
++#include "DiligentCore/Platforms/Basic/interface/DebugUtilities.hpp"
+ 
+ namespace ImGui
+ {
+diff --git a/Imgui/src/ImGuiDiligentRenderer.cpp b/Imgui/src/ImGuiDiligentRenderer.cpp
+index 3efc3b0..93fff92 100644
+--- a/Imgui/src/ImGuiDiligentRenderer.cpp
++++ b/Imgui/src/ImGuiDiligentRenderer.cpp
+@@ -28,10 +28,10 @@
+ #include <cstddef>
+ #include "ImGuiDiligentRenderer.hpp"
+ #include "ImGuiImplDiligent.hpp"
+-#include "RenderDevice.h"
+-#include "DeviceContext.h"
+-#include "MapHelper.hpp"
+-#include "GraphicsAccessories.hpp"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/RenderDevice.h"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/DeviceContext.h"
++#include "DiligentCore/Graphics/GraphicsTools/interface/MapHelper.hpp"
++#include "DiligentCore/Graphics/GraphicsAccessories/interface/GraphicsAccessories.hpp"
+ 
+ namespace Diligent
+ {
+@@ -752,7 +752,8 @@ void ImGuiDiligentRenderer::CreateFontsTexture()
+     VERIFY_EXPR(m_pTextureVar != nullptr);
+ 
+     // Store our identifier
+-    IO.Fonts->TexID = (ImTextureID)m_pFontSRV;
++    // Fix build https://github.com/DiligentGraphics/DiligentTools/issues/240
++    IO.Fonts->TexID = reinterpret_cast<ImTextureID>(m_pFontSRV.RawPtr());
+ }
+ 
+ float4 ImGuiDiligentRenderer::TransformClipRect(const ImVec2& DisplaySize, const float4& rect) const
+diff --git a/Imgui/src/ImGuiImplAndroid.cpp b/Imgui/src/ImGuiImplAndroid.cpp
+index 435b6a4..996d771 100644
+--- a/Imgui/src/ImGuiImplAndroid.cpp
++++ b/Imgui/src/ImGuiImplAndroid.cpp
+@@ -28,8 +28,8 @@
+ #include "imgui.h"
+ 
+ #include "ImGuiImplAndroid.hpp"
+-#include "GraphicsTypes.h"
+-#include "DebugUtilities.hpp"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/GraphicsTypes.h"
++#include "DiligentCore/Platforms/Basic/interface/DebugUtilities.hpp"
+ 
+ namespace Diligent
+ {
+diff --git a/Imgui/src/ImGuiImplDiligent.cpp b/Imgui/src/ImGuiImplDiligent.cpp
+index 7ec7560..6b3ee4a 100644
+--- a/Imgui/src/ImGuiImplDiligent.cpp
++++ b/Imgui/src/ImGuiImplDiligent.cpp
+@@ -29,11 +29,11 @@
+ #include "imgui.h"
+ #include "ImGuiImplDiligent.hpp"
+ #include "ImGuiDiligentRenderer.hpp"
+-#include "RenderDevice.h"
+-#include "DeviceContext.h"
+-#include "RefCntAutoPtr.hpp"
+-#include "BasicMath.hpp"
+-#include "MapHelper.hpp"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/RenderDevice.h"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/DeviceContext.h"
++#include "DiligentCore/Common/interface/RefCntAutoPtr.hpp"
++#include "DiligentCore/Common/interface/BasicMath.hpp"
++#include "DiligentCore/Graphics/GraphicsTools/interface/MapHelper.hpp"
+ 
+ namespace Diligent
+ {
+diff --git a/Imgui/src/ImGuiImplLinuxX11.cpp b/Imgui/src/ImGuiImplLinuxX11.cpp
+index cb0b262..6cbf3ee 100644
+--- a/Imgui/src/ImGuiImplLinuxX11.cpp
++++ b/Imgui/src/ImGuiImplLinuxX11.cpp
+@@ -47,7 +47,7 @@
+ 
+ #include "imgui.h"
+ 
+-#include "DebugUtilities.hpp"
++#include "DiligentCore/Platforms/Basic/interface/DebugUtilities.hpp"
+ 
+ namespace Diligent
+ {
+diff --git a/Imgui/src/ImGuiImplLinuxXCB.cpp b/Imgui/src/ImGuiImplLinuxXCB.cpp
+index 3c22933..91684fc 100644
+--- a/Imgui/src/ImGuiImplLinuxXCB.cpp
++++ b/Imgui/src/ImGuiImplLinuxXCB.cpp
+@@ -32,7 +32,7 @@
+ #include <X11/keysym.h>
+ #include "xcb_keysyms/xcb_keysyms.h"
+ 
+-#include "DebugUtilities.hpp"
++#include "DiligentCore/Platforms/Basic/interface/DebugUtilities.hpp"
+ 
+ namespace Diligent
+ {
+diff --git a/Imgui/src/ImGuiImplMacOS.mm b/Imgui/src/ImGuiImplMacOS.mm
+index 018fc4a..d9ad5e9 100644
+--- a/Imgui/src/ImGuiImplMacOS.mm
++++ b/Imgui/src/ImGuiImplMacOS.mm
+@@ -23,7 +23,7 @@
+ 
+ #include "imgui.h"
+ #include "ImGuiImplMacOS.hpp"
+-#include "../../ThirdParty/imgui_v1.85/imgui_impl_osx_v1.85.h"
++#include "backends/imgui_impl_osx.h"
+ #import <Cocoa/Cocoa.h>
+ 
+ namespace Diligent
+diff --git a/Imgui/src/ImGuiImplUWP.cpp b/Imgui/src/ImGuiImplUWP.cpp
+index 1feac56..852aa95 100644
+--- a/Imgui/src/ImGuiImplUWP.cpp
++++ b/Imgui/src/ImGuiImplUWP.cpp
+@@ -25,10 +25,10 @@
+  *  of the possibility of such damages.
+  */
+ 
+-#include "WinHPreface.h"
++#include "DiligentCore/Platforms/Win32/interface/WinHPreface.h"
+ #include <wrl.h>
+ #include <wrl/client.h>
+-#include "WinHPostface.h"
++#include "DiligentCore/Platforms/Win32/interface/WinHPostface.h"
+ 
+ #include "imgui.h"
+ #include "ImGuiImplUWP.hpp"
+diff --git a/Imgui/src/ImGuiImplWin32.cpp b/Imgui/src/ImGuiImplWin32.cpp
+index 4be4d63..ca5baec 100644
+--- a/Imgui/src/ImGuiImplWin32.cpp
++++ b/Imgui/src/ImGuiImplWin32.cpp
+@@ -25,15 +25,15 @@
+  *  of the possibility of such damages.
+  */
+ 
+-#include "WinHPreface.h"
++#include "DiligentCore/Platforms/Win32/interface/WinHPreface.h"
+ #include <Windows.h>
+-#include "WinHPostface.h"
++#include "DiligentCore/Platforms/Win32/interface/WinHPostface.h"
+ 
+-#include "GraphicsTypes.h"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/GraphicsTypes.h"
+ #include "imgui.h"
+ #include "ImGuiImplWin32.hpp"
+ #include "backends/imgui_impl_win32.h"
+-#include "DebugUtilities.hpp"
++#include "DiligentCore/Platforms/Basic/interface/DebugUtilities.hpp"
+ 
+ IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
+ 

+ 13 - 0
packages/d/diligenttools/patches/v2.5.6/imguizmo-modified-include-diligentcore.diff

@@ -0,0 +1,13 @@
+diff --git a/ThirdParty/imGuIZMO.quat/imGuIZMO.cpp b/ThirdParty/imGuIZMO.quat/imGuIZMO.cpp
+index 723dc77..c357d41 100644
+--- a/ThirdParty/imGuIZMO.quat/imGuIZMO.cpp
++++ b/ThirdParty/imGuIZMO.quat/imGuIZMO.cpp
+@@ -14,7 +14,7 @@
+ // Modified by Egor Yusov, Diligent Graphics LLC
+ 
+ 
+-#include "BasicMath.hpp"
++#include "DiligentCore/Common/interface/BasicMath.hpp"
+ #include "imGuIZMO.h"
+ 
+ 

+ 258 - 0
packages/d/diligenttools/patches/v2.5.6/nativeapp-include-diligentcore.diff

@@ -0,0 +1,258 @@
+diff --git a/NativeApp/Apple/Source/Classes/iOS/EAGLView.mm b/NativeApp/Apple/Source/Classes/iOS/EAGLView.mm
+index a16d4db..c44e5f5 100644
+--- a/NativeApp/Apple/Source/Classes/iOS/EAGLView.mm
++++ b/NativeApp/Apple/Source/Classes/iOS/EAGLView.mm
+@@ -8,7 +8,7 @@
+ 
+ #import "EAGLView.h"
+ 
+-#include "GraphicsTypes.h"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/GraphicsTypes.h"
+ 
+ @interface EAGLView ()
+ {
+diff --git a/NativeApp/Apple/Source/Classes/iOS/MVKView.mm b/NativeApp/Apple/Source/Classes/iOS/MVKView.mm
+index 76fd8a8..ff8167b 100644
+--- a/NativeApp/Apple/Source/Classes/iOS/MVKView.mm
++++ b/NativeApp/Apple/Source/Classes/iOS/MVKView.mm
+@@ -2,7 +2,7 @@
+ 
+ #import <QuartzCore/CAMetalLayer.h>
+ 
+-#include "GraphicsTypes.h"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/GraphicsTypes.h"
+ 
+ @implementation MVKView
+ 
+diff --git a/NativeApp/Apple/Source/Classes/iOS/MetalView.mm b/NativeApp/Apple/Source/Classes/iOS/MetalView.mm
+index 4263524..afc2844 100644
+--- a/NativeApp/Apple/Source/Classes/iOS/MetalView.mm
++++ b/NativeApp/Apple/Source/Classes/iOS/MetalView.mm
+@@ -2,7 +2,7 @@
+ 
+ #import <QuartzCore/CAMetalLayer.h>
+ 
+-#include "GraphicsTypes.h"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/GraphicsTypes.h"
+ 
+ @implementation MetalView
+ 
+diff --git a/NativeApp/Apple/Source/Classes/tvOS/MetalViewController.mm b/NativeApp/Apple/Source/Classes/tvOS/MetalViewController.mm
+index c5d4eee..28468f7 100644
+--- a/NativeApp/Apple/Source/Classes/tvOS/MetalViewController.mm
++++ b/NativeApp/Apple/Source/Classes/tvOS/MetalViewController.mm
+@@ -6,7 +6,7 @@ See LICENSE folder for this sample’s licensing information.
+ #import "MainUIView.h"
+ 
+ #include "NativeAppBase.hpp"
+-#include "GraphicsTypes.h"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/GraphicsTypes.h"
+ 
+ #import <QuartzCore/CAMetalLayer.h>
+ 
+diff --git a/NativeApp/include/AppBase.hpp b/NativeApp/include/AppBase.hpp
+index 51be237..a7c100b 100644
+--- a/NativeApp/include/AppBase.hpp
++++ b/NativeApp/include/AppBase.hpp
+@@ -27,8 +27,8 @@
+ 
+ #pragma once
+ 
+-#include "BasicTypes.h"
+-#include "FlagEnum.h"
++#include "DiligentCore/Primitives/interface/BasicTypes.h"
++#include "DiligentCore/Primitives/interface/FlagEnum.h"
+ 
+ namespace Diligent
+ {
+diff --git a/NativeApp/include/CommandLineParser.hpp b/NativeApp/include/CommandLineParser.hpp
+index a7e4b70..1118c2b 100644
+--- a/NativeApp/include/CommandLineParser.hpp
++++ b/NativeApp/include/CommandLineParser.hpp
+@@ -33,10 +33,10 @@
+ #include <sstream>
+ #include <cstdlib>
+ 
+-#include "HashUtils.hpp"
+-#include "DebugUtilities.hpp"
+-#include "StringTools.hpp"
+-#include "ParsingTools.hpp"
++#include "DiligentCore/Common/interface/HashUtils.hpp"
++#include "DiligentCore/Platforms/Basic/interface/DebugUtilities.hpp"
++#include "DiligentCore/Common/interface/StringTools.hpp"
++#include "DiligentCore/Common/interface/ParsingTools.hpp"
+ 
+ namespace Diligent
+ {
+diff --git a/NativeApp/include/Emscripten/EmscriptenAppBase.hpp b/NativeApp/include/Emscripten/EmscriptenAppBase.hpp
+index eb9ee75..9c1853e 100644
+--- a/NativeApp/include/Emscripten/EmscriptenAppBase.hpp
++++ b/NativeApp/include/Emscripten/EmscriptenAppBase.hpp
+@@ -25,7 +25,7 @@
+ #pragma once
+ 
+ #include "AppBase.hpp"
+-#include "Timer.hpp"
++#include "DiligentCore/Common/interface/Timer.hpp"
+ 
+ struct EmscriptenMouseEvent;
+ struct EmscriptenWheelEvent;
+diff --git a/NativeApp/include/IOS/IOSAppBase.hpp b/NativeApp/include/IOS/IOSAppBase.hpp
+index 9f76bee..f447ccb 100644
+--- a/NativeApp/include/IOS/IOSAppBase.hpp
++++ b/NativeApp/include/IOS/IOSAppBase.hpp
+@@ -26,7 +26,7 @@
+ #pragma once
+ 
+ #include "AppBase.hpp"
+-#include "Timer.hpp"
++#include "DiligentCore/Common/interface/Timer.hpp"
+ 
+ namespace Diligent
+ {
+diff --git a/NativeApp/include/MacOS/MacOSAppBase.hpp b/NativeApp/include/MacOS/MacOSAppBase.hpp
+index 8540053..6e2fd35 100644
+--- a/NativeApp/include/MacOS/MacOSAppBase.hpp
++++ b/NativeApp/include/MacOS/MacOSAppBase.hpp
+@@ -26,7 +26,7 @@
+ #pragma once
+ 
+ #include "AppBase.hpp"
+-#include "Timer.hpp"
++#include "DiligentCore/Common/interface/Timer.hpp"
+ 
+ namespace Diligent
+ {
+diff --git a/NativeApp/include/TVOS/TVOSAppBase.hpp b/NativeApp/include/TVOS/TVOSAppBase.hpp
+index 39b2c25..409add1 100644
+--- a/NativeApp/include/TVOS/TVOSAppBase.hpp
++++ b/NativeApp/include/TVOS/TVOSAppBase.hpp
+@@ -25,7 +25,7 @@
+ #pragma once
+ 
+ #include "AppBase.hpp"
+-#include "Timer.hpp"
++#include "DiligentCore/Common/interface/Timer.hpp"
+ 
+ namespace Diligent
+ {
+diff --git a/NativeApp/include/UWP/UWPAppBase.hpp b/NativeApp/include/UWP/UWPAppBase.hpp
+index 8db6157..a0e30d3 100644
+--- a/NativeApp/include/UWP/UWPAppBase.hpp
++++ b/NativeApp/include/UWP/UWPAppBase.hpp
+@@ -28,10 +28,10 @@
+ 
+ #include <memory>
+ 
+-#include "WinHPreface.h"
++#include "DiligentCore/Platforms/Win32/interface/WinHPreface.h"
+ #include <wrl.h>
+ #include <wrl/client.h>
+-#include "WinHPostface.h"
++#include "DiligentCore/Platforms/Win32/interface/WinHPostface.h"
+ 
+ #include "AppBase.hpp"
+ #include "Common/StepTimer.h"
+diff --git a/NativeApp/include/Win32/Win32AppBase.hpp b/NativeApp/include/Win32/Win32AppBase.hpp
+index e29df52..4bc8bc4 100644
+--- a/NativeApp/include/Win32/Win32AppBase.hpp
++++ b/NativeApp/include/Win32/Win32AppBase.hpp
+@@ -27,9 +27,9 @@
+ 
+ #pragma once
+ 
+-#include "WinHPreface.h"
++#include "DiligentCore/Platforms/Win32/interface/WinHPreface.h"
+ #include <Windows.h>
+-#include "WinHPostface.h"
++#include "DiligentCore/Platforms/Win32/interface/WinHPostface.h"
+ 
+ #include "AppBase.hpp"
+ 
+diff --git a/NativeApp/src/Android/AndroidAppBase.cpp b/NativeApp/src/Android/AndroidAppBase.cpp
+index 76d7321..3f3de7d 100644
+--- a/NativeApp/src/Android/AndroidAppBase.cpp
++++ b/NativeApp/src/Android/AndroidAppBase.cpp
+@@ -24,7 +24,7 @@
+  */
+ 
+ #include "AndroidAppBase.hpp"
+-#include "Timer.hpp"
++#include "DiligentCore/Common/interface/Timer.hpp"
+ 
+ #include <android/sensor.h>
+ //#include <android/log.h>
+diff --git a/NativeApp/src/Android/AndroidMain.cpp b/NativeApp/src/Android/AndroidMain.cpp
+index 1f9b78b..a4e314d 100644
+--- a/NativeApp/src/Android/AndroidMain.cpp
++++ b/NativeApp/src/Android/AndroidMain.cpp
+@@ -27,7 +27,7 @@
+ #include <jni.h>
+ #include <errno.h>
+ 
+-#include "PlatformDefinitions.h"
++#include "DiligentCore/Platforms/interface/PlatformDefinitions.h"
+ #include "NativeAppBase.hpp"
+ 
+ 
+diff --git a/NativeApp/src/Emscripten/EmscriptenMain.cpp b/NativeApp/src/Emscripten/EmscriptenMain.cpp
+index ff90764..2766137 100644
+--- a/NativeApp/src/Emscripten/EmscriptenMain.cpp
++++ b/NativeApp/src/Emscripten/EmscriptenMain.cpp
+@@ -29,7 +29,7 @@
+ #include <string>
+ 
+ #include "NativeAppBase.hpp"
+-#include "Timer.hpp"
++#include "DiligentCore/Common/interface/Timer.hpp"
+ 
+ 
+ struct NativeAppCallbackData
+diff --git a/NativeApp/src/Linux/LinuxMain.cpp b/NativeApp/src/Linux/LinuxMain.cpp
+index 5a2c8e9..043197a 100644
+--- a/NativeApp/src/Linux/LinuxMain.cpp
++++ b/NativeApp/src/Linux/LinuxMain.cpp
+@@ -27,11 +27,11 @@
+ #include <iomanip>
+ #include <string>
+ 
+-#include "PlatformDefinitions.h"
++#include "DiligentCore/Platforms/interface/PlatformDefinitions.h"
+ #include "NativeAppBase.hpp"
+-#include "StringTools.hpp"
+-#include "Timer.hpp"
+-#include "Errors.hpp"
++#include "DiligentCore/Common/interface/StringTools.hpp"
++#include "DiligentCore/Common/interface/Timer.hpp"
++#include "DiligentCore/Primitives/interface/Errors.hpp"
+ #include "CommandLineParser.hpp"
+ 
+ 
+diff --git a/NativeApp/src/UWP/App.cpp b/NativeApp/src/UWP/App.cpp
+index fbd5e78..90a3452 100644
+--- a/NativeApp/src/UWP/App.cpp
++++ b/NativeApp/src/UWP/App.cpp
+@@ -34,7 +34,7 @@
+ #endif
+ 
+ #include "App.h"
+-#include "StringTools.hpp"
++#include "DiligentCore/Common/interface/StringTools.hpp"
+ 
+ #include <ppltasks.h>
+ 
+diff --git a/NativeApp/src/Win32/WinMain.cpp b/NativeApp/src/Win32/WinMain.cpp
+index a7a1974..95d77ca 100644
+--- a/NativeApp/src/Win32/WinMain.cpp
++++ b/NativeApp/src/Win32/WinMain.cpp
+@@ -37,8 +37,8 @@
+ #include <crtdbg.h>
+ 
+ #include "NativeAppBase.hpp"
+-#include "StringTools.hpp"
+-#include "Timer.hpp"
++#include "DiligentCore/Common/interface/StringTools.hpp"
++#include "DiligentCore/Common/interface/Timer.hpp"
+ 
+ using namespace Diligent;
+ 

+ 200 - 0
packages/d/diligenttools/patches/v2.5.6/renderstatenotation-include-diligentcore.diff

@@ -0,0 +1,200 @@
+diff --git a/RenderStateNotation/include/RenderStateNotationLoaderImpl.hpp b/RenderStateNotation/include/RenderStateNotationLoaderImpl.hpp
+index d9636c3..ff6233a 100644
+--- a/RenderStateNotation/include/RenderStateNotationLoaderImpl.hpp
++++ b/RenderStateNotation/include/RenderStateNotationLoaderImpl.hpp
+@@ -29,10 +29,10 @@
+ #include <unordered_map>
+ 
+ #include "RenderStateNotationLoader.h"
+-#include "RefCntAutoPtr.hpp"
+-#include "ObjectBase.hpp"
+-#include "HashUtils.hpp"
+-#include "RenderStateCache.hpp"
++#include "DiligentCore/Common/interface/RefCntAutoPtr.hpp"
++#include "DiligentCore/Common/interface/ObjectBase.hpp"
++#include "DiligentCore/Common/interface/HashUtils.hpp"
++#include "DiligentCore/Graphics/GraphicsTools/interface/RenderStateCache.hpp"
+ 
+ namespace Diligent
+ {
+diff --git a/RenderStateNotation/include/RenderStateNotationParserImpl.hpp b/RenderStateNotation/include/RenderStateNotationParserImpl.hpp
+index 92294b2..b748bc0 100644
+--- a/RenderStateNotation/include/RenderStateNotationParserImpl.hpp
++++ b/RenderStateNotation/include/RenderStateNotationParserImpl.hpp
+@@ -30,10 +30,10 @@
+ #include <unordered_set>
+ 
+ #include "RenderStateNotationParser.h"
+-#include "RefCntAutoPtr.hpp"
+-#include "ObjectBase.hpp"
+-#include "DynamicLinearAllocator.hpp"
+-#include "HashUtils.hpp"
++#include "DiligentCore/Common/interface/RefCntAutoPtr.hpp"
++#include "DiligentCore/Common/interface/ObjectBase.hpp"
++#include "DiligentCore/Common/interface/DynamicLinearAllocator.hpp"
++#include "DiligentCore/Common/interface/HashUtils.hpp"
+ 
+ namespace Diligent
+ {
+diff --git a/RenderStateNotation/include/pch.h b/RenderStateNotation/include/pch.h
+index 2da62b8..23eb430 100644
+--- a/RenderStateNotation/include/pch.h
++++ b/RenderStateNotation/include/pch.h
+@@ -26,12 +26,12 @@
+ 
+ #pragma once
+ 
+-#include "json.hpp"
++#include "nlohmann/json.hpp"
+ 
+-#include "BasicMath.hpp"
+-#include "RenderDevice.h"
+-#include "DynamicLinearAllocator.hpp"
+-#include "StringTools.hpp"
++#include "DiligentCore/Common/interface/BasicMath.hpp"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/RenderDevice.h"
++#include "DiligentCore/Common/interface/DynamicLinearAllocator.hpp"
++#include "DiligentCore/Common/interface/StringTools.hpp"
+ 
+ #include "generated/CommonParser.hpp"
+ #include "generated/GraphicsTypesParser.hpp"
+diff --git a/RenderStateNotation/interface/RenderStateNotationLoader.h b/RenderStateNotation/interface/RenderStateNotationLoader.h
+index a53f741..e8aefe7 100644
+--- a/RenderStateNotation/interface/RenderStateNotationLoader.h
++++ b/RenderStateNotation/interface/RenderStateNotationLoader.h
+@@ -31,12 +31,12 @@
+ /// \file
+ /// Defines Diligent::IRenderStateNotationLoader interface
+ #include "RenderStateNotationParser.h"
+-#include "../../../DiligentCore/Graphics/GraphicsTools/interface/RenderStateCache.h"
++#include "DiligentCore/Graphics/GraphicsTools/interface/RenderStateCache.h"
+ 
+ 
+ DILIGENT_BEGIN_NAMESPACE(Diligent)
+ 
+-#include "../../../DiligentCore/Primitives/interface/DefineRefMacro.h"
++#include "DiligentCore/Primitives/interface/DefineRefMacro.h"
+ 
+ /// Render state notation loader initialization info.
+ struct RenderStateNotationLoaderCreateInfo
+@@ -196,13 +196,13 @@ typedef struct LoadPipelineStateInfo LoadPipelineStateInfo;
+ 
+ // clang-format on
+ 
+-#include "../../../DiligentCore/Primitives/interface/UndefRefMacro.h"
++#include "DiligentCore/Primitives/interface/UndefRefMacro.h"
+ 
+ // {FD9B12C5-3BC5-4729-A2B4-924DF374B3D3}
+ static DILIGENT_CONSTEXPR INTERFACE_ID IID_RenderStateNotationLoader = {0xFD9B12C5, 0x3BC5, 0x4729, {0xA2, 0xB4, 0x92, 0x4D, 0xF3, 0x74, 0xB3, 0xD3}};
+ 
+ #define DILIGENT_INTERFACE_NAME IRenderStateNotationLoader
+-#include "../../../DiligentCore/Primitives/interface/DefineInterfaceHelperMacros.h"
++#include "DiligentCore/Primitives/interface/DefineInterfaceHelperMacros.h"
+ 
+ #define IRenderStateNotationLoaderInclusiveMethods \
+     IObjectInclusiveMethods;                       \
+@@ -269,7 +269,7 @@ DILIGENT_BEGIN_INTERFACE(IRenderStateNotationLoader, IObject)
+ };
+ DILIGENT_END_INTERFACE
+ 
+-#include "../../../DiligentCore/Primitives/interface/UndefInterfaceHelperMacros.h"
++#include "DiligentCore/Primitives/interface/UndefInterfaceHelperMacros.h"
+ 
+ #if DILIGENT_C_INTERFACE
+ 
+@@ -283,11 +283,11 @@ DILIGENT_END_INTERFACE
+ 
+ #endif
+ 
+-#include "../../../DiligentCore/Primitives/interface/DefineGlobalFuncHelperMacros.h"
++#include "DiligentCore/Primitives/interface/DefineGlobalFuncHelperMacros.h"
+ 
+ void DILIGENT_GLOBAL_FUNCTION(CreateRenderStateNotationLoader)(const RenderStateNotationLoaderCreateInfo REF CreateInfo,
+                                                                IRenderStateNotationLoader**                  ppLoader);
+ 
+-#include "../../../DiligentCore/Primitives/interface/UndefGlobalFuncHelperMacros.h"
++#include "DiligentCore/Primitives/interface/UndefGlobalFuncHelperMacros.h"
+ 
+ DILIGENT_END_NAMESPACE // namespace Diligent
+diff --git a/RenderStateNotation/interface/RenderStateNotationParser.h b/RenderStateNotation/interface/RenderStateNotationParser.h
+index c6a887d..59c418b 100644
+--- a/RenderStateNotation/interface/RenderStateNotationParser.h
++++ b/RenderStateNotation/interface/RenderStateNotationParser.h
+@@ -30,7 +30,7 @@
+ 
+ /// \file
+ /// Defines Diligent::IRenderStateNotationParser interface
+-#include "../../../DiligentCore/Graphics/GraphicsEngine/interface/RenderDevice.h"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/RenderDevice.h"
+ 
+ DILIGENT_BEGIN_NAMESPACE(Diligent)
+ 
+@@ -392,7 +392,7 @@ typedef struct RenderStateNotationParserCreateInfo RenderStateNotationParserCrea
+ static DILIGENT_CONSTEXPR INTERFACE_ID IID_RenderStateNotationParser = {0x355AC9F7, 0x5D9D, 0x423D, {0xAE, 0x35, 0x80, 0xE0, 0x02, 0x8D, 0xE1, 0x7E}};
+ 
+ #define DILIGENT_INTERFACE_NAME IRenderStateNotationParser
+-#include "../../../DiligentCore/Primitives/interface/DefineInterfaceHelperMacros.h"
++#include "DiligentCore/Primitives/interface/DefineInterfaceHelperMacros.h"
+ 
+ #define IRenderStateNotationParserInclusiveMethods \
+     IObjectInclusiveMethods;                       \
+@@ -555,7 +555,7 @@ DILIGENT_BEGIN_INTERFACE(IRenderStateNotationParser, IObject)
+ };
+ DILIGENT_END_INTERFACE
+ 
+-#include "../../../DiligentCore/Primitives/interface/UndefInterfaceHelperMacros.h"
++#include "DiligentCore/Primitives/interface/UndefInterfaceHelperMacros.h"
+ 
+ #if DILIGENT_C_INTERFACE
+ 
+@@ -577,12 +577,12 @@ DILIGENT_END_INTERFACE
+ 
+ #endif
+ 
+-#include "../../../DiligentCore/Primitives/interface/DefineGlobalFuncHelperMacros.h"
++#include "DiligentCore/Primitives/interface/DefineGlobalFuncHelperMacros.h"
+ 
+ void DILIGENT_GLOBAL_FUNCTION(CreateRenderStateNotationParser)(const RenderStateNotationParserCreateInfo REF CreateInfo,
+                                                                IRenderStateNotationParser**                  pParser);
+ 
+ 
+-#include "../../../DiligentCore/Primitives/interface/UndefGlobalFuncHelperMacros.h"
++#include "DiligentCore/Primitives/interface/UndefGlobalFuncHelperMacros.h"
+ 
+ DILIGENT_END_NAMESPACE // namespace Diligent
+diff --git a/RenderStateNotation/src/RenderStateNotationLoaderImpl.cpp b/RenderStateNotation/src/RenderStateNotationLoaderImpl.cpp
+index 00dbb73..5961798 100644
+--- a/RenderStateNotation/src/RenderStateNotationLoaderImpl.cpp
++++ b/RenderStateNotation/src/RenderStateNotationLoaderImpl.cpp
+@@ -25,9 +25,9 @@
+  */
+ 
+ #include "RenderStateNotationLoaderImpl.hpp"
+-#include "DefaultRawMemoryAllocator.hpp"
+-#include "CallbackWrapper.hpp"
+-#include "DynamicLinearAllocator.hpp"
++#include "DiligentCore/Common/interface/DefaultRawMemoryAllocator.hpp"
++#include "DiligentCore/Common/interface/CallbackWrapper.hpp"
++#include "DiligentCore/Common/interface/DynamicLinearAllocator.hpp"
+ 
+ namespace Diligent
+ {
+diff --git a/RenderStateNotation/src/RenderStateNotationParserImpl.cpp b/RenderStateNotation/src/RenderStateNotationParserImpl.cpp
+index 22775b5..49e6045 100644
+--- a/RenderStateNotation/src/RenderStateNotationParserImpl.cpp
++++ b/RenderStateNotation/src/RenderStateNotationParserImpl.cpp
+@@ -32,10 +32,10 @@
+ #include <functional>
+ #include <array>
+ 
+-#include "DataBlobImpl.hpp"
+-#include "FileWrapper.hpp"
+-#include "DefaultRawMemoryAllocator.hpp"
+-#include "GraphicsAccessories.hpp"
++#include "DiligentCore/Common/interface/DataBlobImpl.hpp"
++#include "DiligentCore/Common/interface/FileWrapper.hpp"
++#include "DiligentCore/Common/interface/DefaultRawMemoryAllocator.hpp"
++#include "DiligentCore/Graphics/GraphicsAccessories/interface/GraphicsAccessories.hpp"
+ 
+ namespace Diligent
+ {

+ 98 - 0
packages/d/diligenttools/patches/v2.5.6/renderstatepackager-include-diligentcore.diff

@@ -0,0 +1,98 @@
+diff --git a/RenderStatePackager/include/ParsingEnvironment.hpp b/RenderStatePackager/include/ParsingEnvironment.hpp
+index 496253e..b96fae2 100644
+--- a/RenderStatePackager/include/ParsingEnvironment.hpp
++++ b/RenderStatePackager/include/ParsingEnvironment.hpp
+@@ -29,10 +29,10 @@
+ #include <vector>
+ #include <memory>
+ 
+-#include "ThreadPool.hpp"
+-#include "RefCntAutoPtr.hpp"
+-#include "ArchiverFactory.h"
+-#include "ArchiverFactoryLoader.h"
++#include "DiligentCore/Common/interface/ThreadPool.hpp"
++#include "DiligentCore/Common/interface/RefCntAutoPtr.hpp"
++#include "DiligentCore/Graphics/Archiver/interface/ArchiverFactory.h"
++#include "DiligentCore/Graphics/Archiver/interface/ArchiverFactoryLoader.h"
+ #include "RenderStatePackager.hpp"
+ 
+ namespace Diligent
+diff --git a/RenderStatePackager/include/RenderStatePackager.hpp b/RenderStatePackager/include/RenderStatePackager.hpp
+index e3e132d..61cfe3b 100644
+--- a/RenderStatePackager/include/RenderStatePackager.hpp
++++ b/RenderStatePackager/include/RenderStatePackager.hpp
+@@ -29,12 +29,12 @@
+ #include <vector>
+ #include <unordered_map>
+ 
+-#include "Archiver.h"
+-#include "ThreadPool.hpp"
+-#include "RefCntAutoPtr.hpp"
+-#include "SerializationDevice.h"
++#include "DiligentCore/Graphics/Archiver/interface/Archiver.h"
++#include "DiligentCore/Common/interface/ThreadPool.hpp"
++#include "DiligentCore/Common/interface/RefCntAutoPtr.hpp"
++#include "DiligentCore/Graphics/Archiver/interface/SerializationDevice.h"
+ #include "RenderStateNotationParser.h"
+-#include "HashUtils.hpp"
++#include "DiligentCore/Common/interface/HashUtils.hpp"
+ 
+ namespace Diligent
+ {
+diff --git a/RenderStatePackager/src/ParsingEnvironment.cpp b/RenderStatePackager/src/ParsingEnvironment.cpp
+index fc6a016..2a8f68e 100644
+--- a/RenderStatePackager/src/ParsingEnvironment.cpp
++++ b/RenderStatePackager/src/ParsingEnvironment.cpp
+@@ -25,10 +25,10 @@
+  */
+ 
+ #include "ParsingEnvironment.hpp"
+-#include "DynamicLinearAllocator.hpp"
+-#include "DefaultRawMemoryAllocator.hpp"
+-#include "DataBlobImpl.hpp"
+-#include "FileWrapper.hpp"
++#include "DiligentCore/Common/interface/DynamicLinearAllocator.hpp"
++#include "DiligentCore/Common/interface/DefaultRawMemoryAllocator.hpp"
++#include "DiligentCore/Common/interface/DataBlobImpl.hpp"
++#include "DiligentCore/Common/interface/FileWrapper.hpp"
+ 
+ namespace Diligent
+ {
+diff --git a/RenderStatePackager/src/RenderStatePackager.cpp b/RenderStatePackager/src/RenderStatePackager.cpp
+index 9499958..3e777fa 100644
+--- a/RenderStatePackager/src/RenderStatePackager.cpp
++++ b/RenderStatePackager/src/RenderStatePackager.cpp
+@@ -29,13 +29,13 @@
+ #include <deque>
+ #include <sstream>
+ 
+-#include "GraphicsAccessories.hpp"
+-#include "BasicMath.hpp"
+-#include "DefaultRawMemoryAllocator.hpp"
+-#include "DynamicLinearAllocator.hpp"
+-#include "SerializedPipelineState.h"
+-#include "FileSystem.hpp"
+-#include "FileWrapper.hpp"
++#include "DiligentCore/Graphics/GraphicsAccessories/interface/GraphicsAccessories.hpp"
++#include "DiligentCore/Common/interface/BasicMath.hpp"
++#include "DiligentCore/Common/interface/DefaultRawMemoryAllocator.hpp"
++#include "DiligentCore/Common/interface/DynamicLinearAllocator.hpp"
++#include "DiligentCore/Graphics/Archiver/interface/SerializedPipelineState.h"
++#include "DiligentCore/Platforms/interface/FileSystem.hpp"
++#include "DiligentCore/Common/interface/FileWrapper.hpp"
+ 
+ namespace Diligent
+ {
+diff --git a/RenderStatePackager/src/main.cpp b/RenderStatePackager/src/main.cpp
+index 759ae30..c15d5fb 100644
+--- a/RenderStatePackager/src/main.cpp
++++ b/RenderStatePackager/src/main.cpp
+@@ -24,7 +24,7 @@
+  *  of the possibility of such damages.
+  */
+ 
+-#include "FileWrapper.hpp"
++#include "DiligentCore/Common/interface/FileWrapper.hpp"
+ #include "RenderStateNotationParser.h"
+ #include "ParsingEnvironment.hpp"
+ #include "args.hxx"

+ 325 - 0
packages/d/diligenttools/patches/v2.5.6/textureloader-include-diligentcore.diff

@@ -0,0 +1,325 @@
+diff --git a/TextureLoader/include/TextureLoaderImpl.hpp b/TextureLoader/include/TextureLoaderImpl.hpp
+index 421ec0b..011ab52 100644
+--- a/TextureLoader/include/TextureLoaderImpl.hpp
++++ b/TextureLoader/include/TextureLoaderImpl.hpp
+@@ -27,8 +27,8 @@
+ #include <vector>
+ 
+ #include "TextureLoader.h"
+-#include "RefCntAutoPtr.hpp"
+-#include "ObjectBase.hpp"
++#include "DiligentCore/Common/interface/RefCntAutoPtr.hpp"
++#include "DiligentCore/Common/interface/ObjectBase.hpp"
+ 
+ namespace Diligent
+ {
+diff --git a/TextureLoader/include/pch.h b/TextureLoader/include/pch.h
+index cb71cf2..fa3dfae 100644
+--- a/TextureLoader/include/pch.h
++++ b/TextureLoader/include/pch.h
+@@ -27,8 +27,8 @@
+ 
+ #pragma once
+ 
+-#include "BasicTypes.h"
+-#include "RenderDevice.h"
+-#include "DeviceContext.h"
+-#include "Errors.hpp"
+-#include "DebugUtilities.hpp"
++#include "DiligentCore/Primitives/interface/BasicTypes.h"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/RenderDevice.h"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/DeviceContext.h"
++#include "DiligentCore/Primitives/interface/Errors.hpp"
++#include "DiligentCore/Platforms/Basic/interface/DebugUtilities.hpp"
+diff --git a/TextureLoader/interface/BCTools.h b/TextureLoader/interface/BCTools.h
+index 94fd08c..27fefdb 100644
+--- a/TextureLoader/interface/BCTools.h
++++ b/TextureLoader/interface/BCTools.h
+@@ -26,7 +26,7 @@
+ 
+ #pragma once
+ 
+-#include "../../../DiligentCore/Primitives/interface/BasicTypes.h"
++#include "DiligentCore/Primitives/interface/BasicTypes.h"
+ 
+ DILIGENT_BEGIN_NAMESPACE(Diligent)
+ 
+diff --git a/TextureLoader/interface/Image.h b/TextureLoader/interface/Image.h
+index e3fbfa7..1088a30 100644
+--- a/TextureLoader/interface/Image.h
++++ b/TextureLoader/interface/Image.h
+@@ -27,15 +27,15 @@
+ 
+ #pragma once
+ 
+-#include "../../../DiligentCore/Graphics/GraphicsEngine/interface/GraphicsTypes.h"
+-#include "../../../DiligentCore/Primitives/interface/FileStream.h"
+-#include "../../../DiligentCore/Primitives/interface/DataBlob.h"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/GraphicsTypes.h"
++#include "DiligentCore/Primitives/interface/FileStream.h"
++#include "DiligentCore/Primitives/interface/DataBlob.h"
+ 
+ #if DILIGENT_CPP_INTERFACE
+ #    include <vector>
+ 
+-#    include "../../../DiligentCore/Common/interface/RefCntAutoPtr.hpp"
+-#    include "../../../DiligentCore/Common/interface/ObjectBase.hpp"
++#    include "DiligentCore/Common/interface/RefCntAutoPtr.hpp"
++#    include "DiligentCore/Common/interface/ObjectBase.hpp"
+ #endif
+ 
+ DILIGENT_BEGIN_NAMESPACE(Diligent)
+diff --git a/TextureLoader/interface/TextureLoader.h b/TextureLoader/interface/TextureLoader.h
+index fbe29d7..34ddf7f 100644
+--- a/TextureLoader/interface/TextureLoader.h
++++ b/TextureLoader/interface/TextureLoader.h
+@@ -27,9 +27,9 @@
+ 
+ #pragma once
+ 
+-#include "../../../DiligentCore/Primitives/interface/FileStream.h"
+-#include "../../../DiligentCore/Graphics/GraphicsEngine/interface/RenderDevice.h"
+-#include "../../../DiligentCore/Graphics/GraphicsEngine/interface/Texture.h"
++#include "DiligentCore/Primitives/interface/FileStream.h"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/RenderDevice.h"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/Texture.h"
+ #include "Image.h"
+ 
+ DILIGENT_BEGIN_NAMESPACE(Diligent)
+@@ -141,7 +141,7 @@ static DILIGENT_CONSTEXPR struct INTERFACE_ID IID_TextureLoader =
+     {0xe04fe6d5, 0x8665, 0x4183, {0xa8, 0x72, 0x85, 0x2e, 0xf, 0x7c, 0xe2, 0x42}};
+ 
+ #define DILIGENT_INTERFACE_NAME ITextureLoader
+-#include "../../../DiligentCore/Primitives/interface/DefineInterfaceHelperMacros.h"
++#include "DiligentCore/Primitives/interface/DefineInterfaceHelperMacros.h"
+ 
+ #define ITextureLoaderInclusiveMethods \
+     IObjectInclusiveMethods;           \
+@@ -171,7 +171,7 @@ DILIGENT_BEGIN_INTERFACE(ITextureLoader, IObject)
+ DILIGENT_END_INTERFACE
+ // clang-format on
+ 
+-#include "../../../DiligentCore/Primitives/interface/UndefInterfaceHelperMacros.h"
++#include "DiligentCore/Primitives/interface/UndefInterfaceHelperMacros.h"
+ 
+ #if DILIGENT_C_INTERFACE
+ 
+@@ -184,7 +184,7 @@ DILIGENT_END_INTERFACE
+ 
+ #endif
+ 
+-#include "../../../DiligentCore/Primitives/interface/DefineGlobalFuncHelperMacros.h"
++#include "DiligentCore/Primitives/interface/DefineGlobalFuncHelperMacros.h"
+ 
+ /// Creates a texture loader from image.
+ 
+@@ -234,6 +234,6 @@ bool DILIGENT_GLOBAL_FUNCTION(SaveTextureAsDDS)(const char*           FilePath,
+                                                 const TextureDesc REF Desc,
+                                                 const TextureData REF TexData);
+ 
+-#include "../../../DiligentCore/Primitives/interface/UndefGlobalFuncHelperMacros.h"
++#include "DiligentCore/Primitives/interface/UndefGlobalFuncHelperMacros.h"
+ 
+ DILIGENT_END_NAMESPACE // namespace Diligent
+diff --git a/TextureLoader/interface/TextureUtilities.h b/TextureLoader/interface/TextureUtilities.h
+index 30f5633..59d02a4 100644
+--- a/TextureLoader/interface/TextureUtilities.h
++++ b/TextureLoader/interface/TextureUtilities.h
+@@ -30,15 +30,15 @@
+ /// \file
+ /// Defines texture utilities
+ 
+-#include "../../../DiligentCore/Graphics/GraphicsEngine/interface/GraphicsTypes.h"
+-#include "../../../DiligentCore/Graphics/GraphicsEngine/interface/Texture.h"
+-#include "../../../DiligentCore/Graphics/GraphicsEngine/interface/RenderDevice.h"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/GraphicsTypes.h"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/Texture.h"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/RenderDevice.h"
+ #include "TextureLoader.h"
+ 
+ DILIGENT_BEGIN_NAMESPACE(Diligent)
+ 
+ 
+-#include "../../../DiligentCore/Primitives/interface/DefineGlobalFuncHelperMacros.h"
++#include "DiligentCore/Primitives/interface/DefineGlobalFuncHelperMacros.h"
+ 
+ /// Parameters of the CopyPixels function.
+ struct CopyPixelsAttribs
+@@ -166,6 +166,6 @@ void DILIGENT_GLOBAL_FUNCTION(CreateTextureFromFile)(const Char*               F
+                                                      IRenderDevice*            pDevice,
+                                                      ITexture**                ppTexture);
+ 
+-#include "../../../DiligentCore/Primitives/interface/UndefGlobalFuncHelperMacros.h"
++#include "DiligentCore/Primitives/interface/UndefGlobalFuncHelperMacros.h"
+ 
+ DILIGENT_END_NAMESPACE // namespace Diligent
+diff --git a/TextureLoader/src/BCTools.cpp b/TextureLoader/src/BCTools.cpp
+index ffc2738..cb22170 100644
+--- a/TextureLoader/src/BCTools.cpp
++++ b/TextureLoader/src/BCTools.cpp
+@@ -25,7 +25,7 @@
+  */
+ 
+ #include "BCTools.h"
+-#include "DebugUtilities.hpp"
++#include "DiligentCore/Platforms/Basic/interface/DebugUtilities.hpp"
+ 
+ namespace Diligent
+ {
+diff --git a/TextureLoader/src/DDSLoader.cpp b/TextureLoader/src/DDSLoader.cpp
+index f2b7ac6..abef22f 100644
+--- a/TextureLoader/src/DDSLoader.cpp
++++ b/TextureLoader/src/DDSLoader.cpp
+@@ -48,8 +48,8 @@
+ // clang-format off
+ 
+ #include "TextureLoaderImpl.hpp"
+-#include "FileWrapper.hpp"
+-#include "GraphicsAccessories.hpp"
++#include "DiligentCore/Common/interface/FileWrapper.hpp"
++#include "DiligentCore/Graphics/GraphicsAccessories/interface/GraphicsAccessories.hpp"
+ 
+ #include "dxgiformat.h"
+ 
+diff --git a/TextureLoader/src/Image.cpp b/TextureLoader/src/Image.cpp
+index 1287d97..3d93a3e 100644
+--- a/TextureLoader/src/Image.cpp
++++ b/TextureLoader/src/Image.cpp
+@@ -31,7 +31,7 @@
+ #include <array>
+ 
+ #include "Image.h"
+-#include "Errors.hpp"
++#include "DiligentCore/Primitives/interface/Errors.hpp"
+ 
+ #include "tiffio.h"
+ #include "png.h"
+@@ -39,13 +39,13 @@
+ #include "JPEGCodec.h"
+ #include "SGILoader.h"
+ 
+-#include "DataBlobImpl.hpp"
+-#include "DebugUtilities.hpp"
+-#include "RefCntAutoPtr.hpp"
+-#include "Align.hpp"
+-#include "GraphicsAccessories.hpp"
+-#include "BasicFileStream.hpp"
+-#include "StringTools.hpp"
++#include "DiligentCore/Common/interface/DataBlobImpl.hpp"
++#include "DiligentCore/Platforms/Basic/interface/DebugUtilities.hpp"
++#include "DiligentCore/Common/interface/RefCntAutoPtr.hpp"
++#include "DiligentCore/Common/interface/Align.hpp"
++#include "DiligentCore/Graphics/GraphicsAccessories/interface/GraphicsAccessories.hpp"
++#include "DiligentCore/Common/interface/BasicFileStream.hpp"
++#include "DiligentCore/Common/interface/StringTools.hpp"
+ #include "TextureUtilities.h"
+ 
+ #ifdef __clang__
+@@ -56,7 +56,7 @@
+ #define STB_IMAGE_STATIC
+ #define STBI_ONLY_HDR
+ #define STBI_ONLY_TGA
+-#include "../../ThirdParty/stb/stb_image.h"
++#include "stb/stb_image.h"
+ #ifdef __clang__
+ #    pragma clang diagnostic pop
+ #endif
+diff --git a/TextureLoader/src/KTXLoader.cpp b/TextureLoader/src/KTXLoader.cpp
+index 4eec002..6bba3c4 100644
+--- a/TextureLoader/src/KTXLoader.cpp
++++ b/TextureLoader/src/KTXLoader.cpp
+@@ -29,8 +29,8 @@
+ #include <vector>
+ 
+ #include "TextureLoaderImpl.hpp"
+-#include "GraphicsAccessories.hpp"
+-#include "Align.hpp"
++#include "DiligentCore/Graphics/GraphicsAccessories/interface/GraphicsAccessories.hpp"
++#include "DiligentCore/Common/interface/Align.hpp"
+ 
+ #define GL_RGBA32F            0x8814
+ #define GL_RGBA32UI           0x8D70
+diff --git a/TextureLoader/src/PNGCodec.c b/TextureLoader/src/PNGCodec.c
+index 8958b3d..00a65bf 100644
+--- a/TextureLoader/src/PNGCodec.c
++++ b/TextureLoader/src/PNGCodec.c
+@@ -29,7 +29,7 @@
+ #include <string.h>
+ 
+ #include "png.h"
+-#include "GraphicsTypes.h"
++#include "DiligentCore/Graphics/GraphicsEngine/interface/GraphicsTypes.h"
+ 
+ #include "PNGCodec.h"
+ 
+diff --git a/TextureLoader/src/SGILoader.cpp b/TextureLoader/src/SGILoader.cpp
+index 4dcd499..9560527 100644
+--- a/TextureLoader/src/SGILoader.cpp
++++ b/TextureLoader/src/SGILoader.cpp
+@@ -28,9 +28,9 @@
+ 
+ #include <cstring>
+ 
+-#include "DataBlob.h"
+-#include "PlatformMisc.hpp"
+-#include "Errors.hpp"
++#include "DiligentCore/Primitives/interface/DataBlob.h"
++#include "DiligentCore/Platforms/interface/PlatformMisc.hpp"
++#include "DiligentCore/Primitives/interface/Errors.hpp"
+ 
+ namespace Diligent
+ {
+diff --git a/TextureLoader/src/STBImpl.cpp b/TextureLoader/src/STBImpl.cpp
+index cad37fa..1e95bdb 100644
+--- a/TextureLoader/src/STBImpl.cpp
++++ b/TextureLoader/src/STBImpl.cpp
+@@ -26,4 +26,4 @@
+ 
+ #include <cstring>
+ #define STB_DXT_IMPLEMENTATION
+-#include "../../ThirdParty/stb/stb_dxt.h"
++#include "stb/stb_dxt.h"
+diff --git a/TextureLoader/src/TextureLoaderImpl.cpp b/TextureLoader/src/TextureLoaderImpl.cpp
+index d57dbf3..ad948ca 100644
+--- a/TextureLoader/src/TextureLoaderImpl.cpp
++++ b/TextureLoader/src/TextureLoaderImpl.cpp
+@@ -32,16 +32,16 @@
+ #include <vector>
+ 
+ #include "TextureLoaderImpl.hpp"
+-#include "GraphicsAccessories.hpp"
+-#include "GraphicsUtilities.h"
++#include "DiligentCore/Graphics/GraphicsAccessories/interface/GraphicsAccessories.hpp"
++#include "DiligentCore/Graphics/GraphicsTools/interface/GraphicsUtilities.h"
+ #include "TextureUtilities.h"
+ #include "PNGCodec.h"
+ #include "JPEGCodec.h"
+-#include "ColorConversion.h"
++#include "DiligentCore/Graphics/GraphicsAccessories/interface/ColorConversion.h"
+ #include "Image.h"
+-#include "FileWrapper.hpp"
+-#include "DataBlobImpl.hpp"
+-#include "Align.hpp"
++#include "DiligentCore/Common/interface/FileWrapper.hpp"
++#include "DiligentCore/Common/interface/DataBlobImpl.hpp"
++#include "DiligentCore/Common/interface/Align.hpp"
+ 
+ extern "C"
+ {
+diff --git a/TextureLoader/src/TextureUtilities.cpp b/TextureLoader/src/TextureUtilities.cpp
+index ab0956f..38b4b3e 100644
+--- a/TextureLoader/src/TextureUtilities.cpp
++++ b/TextureLoader/src/TextureUtilities.cpp
+@@ -32,9 +32,9 @@
+ #include <limits>
+ 
+ #include "TextureLoader.h"
+-#include "RefCntAutoPtr.hpp"
+-#include "ColorConversion.h"
+-#include "GraphicsAccessories.hpp"
++#include "DiligentCore/Common/interface/RefCntAutoPtr.hpp"
++#include "DiligentCore/Graphics/GraphicsAccessories/interface/ColorConversion.h"
++#include "DiligentCore/Graphics/GraphicsAccessories/interface/GraphicsAccessories.hpp"
+ 
+ namespace Diligent
+ {

+ 129 - 0
packages/d/diligenttools/xmake.lua

@@ -0,0 +1,129 @@
+package("diligenttools")
+    set_homepage("https://github.com/DiligentGraphics/DiligentTools")
+    set_description("Utilities built on top of core module")
+    set_license("Apache-2.0")
+
+    add_urls("https://github.com/DiligentGraphics/DiligentTools/archive/refs/tags/$(version).tar.gz",
+             "https://github.com/DiligentGraphics/DiligentTools.git", {submodules = false})
+    add_versions("v2.5.6", "6f2a99c15491396463cebe4f7fd1087db677b1531906ddf1864ad43346d3c2fc")
+
+    add_patches("v2.5.6", "patches/v2.5.6/assetloader-include-diligentcore.diff", "a7259d5b9f2e34e1c0632d10a350bc78888dd000b8a28ac478b8e70835aedffc")
+    add_patches("v2.5.6", "patches/v2.5.6/debundle-cmakelists.diff", "43476c90d5448ff5b87115c7a054c378bf130ad759f18dd297fa16307350aa22")
+    add_patches("v2.5.6", "patches/v2.5.6/debundle-thirdparty-cmakelist.diff", "570158e31b0953568cf9b91e559bce5b062e4eb1aae5a0289a8d61af6d38be74")
+    add_patches("v2.5.6", "patches/v2.5.6/fix-top-cmakelist.diff", "8e50585f7f6cf49c883819f62a45dfaadbe16bbe162c63761e111aba64c2c70a")
+    add_patches("v2.5.6", "patches/v2.5.6/imgui-include-diligentcore.diff", "aa388d93decc6cb6ebbbd8ea72f476eb13e4a0871a8a16a14f0285f4ef4b5f97")
+    add_patches("v2.5.6", "patches/v2.5.6/imguizmo-modified-include-diligentcore.diff", "6075c2b985b8657571ce70c3231960e5e2c1f39b7f163d2bf5e1762b359e54ec")
+    add_patches("v2.5.6", "patches/v2.5.6/nativeapp-include-diligentcore.diff", "1e3f89542b2588f4be42b2c7a56f79f1cf0b0f149ea8bb8b6d52cd3c11c49e69")
+    add_patches("v2.5.6", "patches/v2.5.6/renderstatenotation-include-diligentcore.diff", "7095306c24ff1de9a2ae274cd0b4631a341d4c212a48345a4ba6aca7fe7f34a0")
+    add_patches("v2.5.6", "patches/v2.5.6/renderstatepackager-include-diligentcore.diff", "52dedf7f529649ecd837791f8d9758678685699eba82020517e0ede687c0601d")
+    add_patches("v2.5.6", "patches/v2.5.6/textureloader-include-diligentcore.diff", "0613d5dfb5d5ce33a1fc97cb81d8c9a0eca1341639698a0a449c88aa3407b07c")
+
+    add_resources("v2.5.6", "DiligentCore_source", "https://github.com/DiligentGraphics/DiligentCore/archive/refs/tags/v2.5.6.tar.gz", "abc190c05ee7e5ef2bba52fcbc5fdfe2256cce3435efba9cfe263a386653f671")
+
+    add_configs("shared",               {description = "Build shared library.", default = false, type = "boolean", readonly = true})
+    add_configs("rsp",                  {description = "Enable Render State Packager", default = true, type = "boolean"})
+    add_configs("rapidjson",            {description = "Enable rapidjson", default = true, type = "boolean"})
+    add_configs("draco",                {description = "Enable draco", default = true, type = "boolean"})
+
+    add_includedirs("include", "include/DiligentTools")
+
+    add_deps("cmake", "pkgconf")
+    add_deps("python 3.x", {kind = "binary"})
+    add_deps("diligentcore", "libpng", "libtiff", "zlib", "libjpeg", "taywee_args", "nlohmann_json", "stb", "tinygltf")
+
+    if is_plat("windows") then
+        add_deps("imgui", {configs = {win32 = true}})
+    elseif is_plat("linux") then
+        add_deps("imgui 1.89", "libxcb", "libx11", "libxrandr", "libxrender", "libxinerama", "libxfixes", "libxcursor", "libxi", "libxext", "wayland")
+    elseif is_plat("macosx") then
+        add_deps("imgui 1.85", {configs = {osx = true}})
+    end
+
+    if is_plat("windows") then
+        add_syslinks("comdlg32")
+    elseif is_plat("macosx") then
+        add_frameworks("Cocoa")
+    end
+
+    on_load(function (package)
+        local diligentcore = package:dep("diligentcore")
+        if diligentcore then
+            if not diligentcore:is_system() then
+                local diligentcore_fetchinfo = diligentcore:fetch()
+                for _, define in ipairs(diligentcore_fetchinfo.defines) do
+                    package:add("defines", define)
+                end
+            end
+        end
+        if package:config("rapidjson") then
+            package:add("deps", "rapidjson")
+        end
+        if package:config("draco") then
+            package:add("deps", "draco")
+        end
+    end)
+
+    on_install("windows", "linux", "macosx", function (package)
+        local resourcedir = package:resourcedir("DiligentCore_source")
+        if resourcedir then
+            os.cp(
+                path.join(resourcedir, "DiligentCore-2.5.6", "BuildTools", "CMake", "BuildUtils.cmake"), 
+                "BuildUtils.cmake"
+            )
+        end
+        local configs = {"-DDILIGENT_INSTALL_TOOLS=ON"}
+        local diligentcore = package:dep("diligentcore")
+        if diligentcore then
+            if not diligentcore:is_system() then
+                local diligentcore_fetchinfo = diligentcore:fetch()
+                for _, define in ipairs(diligentcore_fetchinfo.defines) do
+                    if define:find("PLATFORM") or define:find("_SUPPORTED") then
+                        table.insert(configs, "-D" .. define .. "=ON")
+                    end
+                end
+            end
+        end
+        table.insert(configs, "-DDILIGENT_NO_RENDER_STATE_PACKAGER=" .. (package:config("rsp") and "OFF" or "ON"))
+        table.insert(configs, "-DDILIGENT_USE_RAPIDJSON=" .. (package:config("rapidjson") and "ON" or "OFF"))
+        table.insert(configs, "-DDILIGENT_ENABLE_DRACO=" .. (package:config("draco") and "ON" or "OFF"))
+        local packagedeps = {}
+        if package:config("draco") then
+            table.insert(packagedeps, "draco")
+        end
+        table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
+        table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
+        import("package.tools.cmake").install(package, configs, {packagedeps = packagedeps})
+    end)
+
+    on_test(function (package)
+        assert(package:check_cxxsnippets({test = [[
+            #include <DiligentTools/AssetLoader/interface/GLTFLoader.hpp>
+            void test() {
+                Diligent::GLTF::Material material;
+                auto count = material.GetNumActiveTextureAttribs();
+            }
+        ]]}, {configs = {languages = "c++17"}}))
+        assert(package:check_cxxsnippets({test = [[
+            #include <DiligentTools/Imgui/interface/ImGuiImplDiligent.hpp>
+            void test() {
+                Diligent::ImGuiDiligentCreateInfo info;
+                Diligent::ImGuiImplDiligent impl(info);
+                impl.InvalidateDeviceObjects();
+            }
+        ]]}, {configs = {languages = "c++17"}}))
+        assert(package:check_cxxsnippets({test = [[
+            #include <DiligentTools/RenderStateNotation/interface/RenderStateNotationLoader.h>
+            void test() {
+                Diligent::LoadPipelineStateInfo LoadInfo;
+                Diligent::GraphicsPipelineStateCreateInfo PipelineCI{};
+                LoadInfo.ModifyPipeline(PipelineCI, LoadInfo.pModifyPipelineData);
+            }
+        ]]}, {configs = {languages = "c++17"}}))
+        assert(package:check_cxxsnippets({test = [[
+            #include <DiligentTools/TextureLoader/interface/TextureUtilities.h>
+            void test() {
+                Diligent::PremultiplyAlphaAttribs Attribs;
+                Diligent::PremultiplyAlpha(Attribs);
+            }
+        ]]}, {configs = {languages = "c++17"}}))
+    end)

+ 7 - 0
packages/i/imgui/port/xmake.lua

@@ -17,6 +17,7 @@ option("sdl3_renderer",    {showmenu = true,  default = false})
 option("sdl3_gpu",         {showmenu = true,  default = false})
 option("vulkan",           {showmenu = true,  default = false})
 option("win32",            {showmenu = true,  default = false})
+option("osx",              {showmenu = true,  default = false})
 option("wgpu",             {showmenu = true,  default = false})
 option("freetype",         {showmenu = true,  default = false})
 option("user_config",      {showmenu = true,  default = nil, type = "string"})
@@ -154,6 +155,12 @@ target("imgui")
         add_headerfiles("(backends/imgui_impl_win32.h)")
     end
 
+    if has_config("osx") then
+        add_frameworks("Cocoa", "Carbon", "GameController")
+        add_files("backends/imgui_impl_osx.mm")
+        add_headerfiles("(backends/imgui_impl_osx.h)")
+    end
+
     if has_config("wgpu") then
         add_files("backends/imgui_impl_wgpu.cpp")
         add_headerfiles("(backends/imgui_impl_wgpu.h)")

+ 5 - 0
packages/i/imgui/xmake.lua

@@ -97,6 +97,7 @@ package("imgui")
     add_configs("sdl3_gpu",         {description = "Enable the sdl3 gpu backend", default = false, type = "boolean"})
     add_configs("vulkan",           {description = "Enable the vulkan backend", default = false, type = "boolean"})
     add_configs("win32",            {description = "Enable the win32 backend", default = false, type = "boolean"})
+    add_configs("osx",              {description = "Enable the OS X backend", default = false, type = "boolean"})
     add_configs("wgpu",             {description = "Enable the wgpu backend", default = false, type = "boolean"})
     add_configs("freetype",         {description = "Use FreeType to build and rasterize the font atlas", default = false, type = "boolean"})
     add_configs("user_config",      {description = "Use user config (disables test!)", default = nil, type = "string"})
@@ -162,6 +163,9 @@ package("imgui")
         if package:config("freetype") then
             package:add("deps", "freetype")
         end
+        if package:config("osx") then
+            package:add("frameworks", "Cocoa", "Carbon", "GameController")
+        end
     end)
 
     on_install(function (package)
@@ -181,6 +185,7 @@ package("imgui")
             sdl3_gpu         = package:config("sdl3_gpu"),
             vulkan           = package:config("vulkan"),
             win32            = package:config("win32"),
+            osx              = package:config("osx"),
             wgpu             = package:config("wgpu"),
             freetype         = package:config("freetype"),
             user_config      = package:config("user_config"),