diff --git a/Source/3rdParty/rt64/CMakeLists.txt b/Source/3rdParty/rt64/CMakeLists.txt index c29634452..e7e362d9f 100644 --- a/Source/3rdParty/rt64/CMakeLists.txt +++ b/Source/3rdParty/rt64/CMakeLists.txt @@ -352,6 +352,16 @@ if (RT64_BUILD_PLUGIN) "${PROJECT_SOURCE_DIR}/src/api/rt64_api_common.cpp" "${PROJECT_SOURCE_DIR}/src/api/rt64_api_plugin.cpp" ) + if (WIN32) + target_sources(rt64 PRIVATE + "${PROJECT_SOURCE_DIR}/src/contrib/imgui/backends/imgui_impl_win32.cpp" + ) + target_link_libraries(rt64 + delayimp.lib + Shcore.lib + Dwmapi.lib + ) + endif() endif(RT64_BUILD_PLUGIN) target_link_directories(rt64 PRIVATE ${PROJECT_SOURCE_DIR}/src/contrib/dxc) diff --git a/Source/3rdParty/rt64/examples/rhi_test.cpp b/Source/3rdParty/rt64/examples/rhi_test.cpp index 3a8ea591d..9cd8a4435 100644 --- a/Source/3rdParty/rt64/examples/rhi_test.cpp +++ b/Source/3rdParty/rt64/examples/rhi_test.cpp @@ -8,7 +8,7 @@ namespace RT64 { int main(int argc, char** argv) { std::unique_ptr renderInterface = RT64::CreateVulkanInterface(); -#ifdef _WIN32 +#if defined(_WIN32) // Windows only: Can also use D3D12. const bool useVulkan = true; if (!useVulkan) { diff --git a/Source/3rdParty/rt64/src/gui/rt64_inspector.cpp b/Source/3rdParty/rt64/src/gui/rt64_inspector.cpp index bbd29d65e..cadfe00a9 100644 --- a/Source/3rdParty/rt64/src/gui/rt64_inspector.cpp +++ b/Source/3rdParty/rt64/src/gui/rt64_inspector.cpp @@ -80,7 +80,7 @@ namespace RT64 { switch (graphicsAPI) { case UserConfiguration::GraphicsAPI::D3D12: { -# ifdef _WIN32 +# ifdef _WIN32 && !defined(RT64_BUILD_PLUGIN) D3D12Device *interfaceDevice = static_cast(device); RenderDescriptorRange descriptorRange(RenderDescriptorRangeType::TEXTURE, 0, 1); descriptorSet = interfaceDevice->createDescriptorSet(RenderDescriptorSetDesc(&descriptorRange, 1)); @@ -136,7 +136,7 @@ namespace RT64 { Inspector::~Inspector() { switch (graphicsAPI) { case UserConfiguration::GraphicsAPI::D3D12: { -# ifdef _WIN32 +# if defined(_WIN32) && !defined(RT64_BUILD_PLUGIN) ImGui_ImplDX12_Shutdown(); # else assert(false && "Unsupported Graphics API."); @@ -182,7 +182,7 @@ namespace RT64 { switch (graphicsAPI) { case UserConfiguration::GraphicsAPI::D3D12: { -# ifdef _WIN32 +# if defined(_WIN32) && !defined(RT64_BUILD_PLUGIN) ImGui_ImplDX12_NewFrame(); # else assert(false && "Unsupported Graphics API."); @@ -214,7 +214,7 @@ namespace RT64 { if (drawData != nullptr) { switch (graphicsAPI) { case UserConfiguration::GraphicsAPI::D3D12: { -# ifdef _WIN32 +# if defined(_WIN32) && !defined(RT64_BUILD_PLUGIN) D3D12CommandList *interfaceCommandList = static_cast(commandList); interfaceCommandList->checkDescriptorHeaps(); ImGui_ImplDX12_RenderDrawData(drawData, interfaceCommandList->d3d); diff --git a/Source/3rdParty/rt64/src/hle/rt64_application.cpp b/Source/3rdParty/rt64/src/hle/rt64_application.cpp index d157faf78..1f0ac00dc 100644 --- a/Source/3rdParty/rt64/src/hle/rt64_application.cpp +++ b/Source/3rdParty/rt64/src/hle/rt64_application.cpp @@ -119,7 +119,7 @@ namespace RT64 { // Create a render interface with the preferred backend. switch (userConfig.graphicsAPI) { case UserConfiguration::GraphicsAPI::D3D12: -# ifdef _WIN64 +# if defined(_WIN64) && !defined(RT64_BUILD_PLUGIN) renderInterface = CreateD3D12Interface(); break; # else diff --git a/Source/3rdParty/rt64/src/render/rt64_raster_shader.cpp b/Source/3rdParty/rt64/src/render/rt64_raster_shader.cpp index 3040655b2..63ee92edd 100644 --- a/Source/3rdParty/rt64/src/render/rt64_raster_shader.cpp +++ b/Source/3rdParty/rt64/src/render/rt64_raster_shader.cpp @@ -116,7 +116,7 @@ namespace RT64 { specConstants.emplace_back(4, desc.flags.value); } else { -# if defined(_WIN32) +# if defined(_WIN32) && !defined(RT64_BUILD_PLUGIN) // TODO..... if (useBytes) { vertexShader = device->createShader(vsBytes->data(), vsBytes->size(), "VSMain", shaderFormat); pixelShader = device->createShader(psBytes->data(), psBytes->size(), "PSMain", shaderFormat); @@ -378,7 +378,7 @@ namespace RT64 { uint32_t PSBlobSize = 0; const bool useMSAA = (multisampling.sampleCount > 1); switch (shaderFormat) { -# ifdef _WIN32 +# if defined(_WIN32) && !defined(RT64_BUILD_PLUGIN) case RenderShaderFormat::DXIL: VSBlob = RasterVSDynamicBlobDXIL; PSBlob = useMSAA ? RasterPSDynamicMSBlobDXIL : RasterPSDynamicBlobDXIL;