Skip to content

Commit

Permalink
Add a fix merged to imgui for allowing DX-x86 comp(#ocornut/imgui#2406).
Browse files Browse the repository at this point in the history
  • Loading branch information
giladreich committed Oct 24, 2020
1 parent fce867a commit ad15a22
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 77 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
run: |
cd build
cmake --build . --config ${{ matrix.config.build_type }} -- /M
windeployqt bin/${{ matrix.config.arch }}-${{ env.MSC_VERSION }}/${{ matrix.config.build_type }}
windeployqt ./bin/${{ matrix.config.arch }}-${{ env.MSC_VERSION }}/${{ matrix.config.build_type }}
- uses: actions/upload-artifact@v2
id: upload_artifact
Expand Down
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
.vs/
*.ini
*.user
.vscode/
build*/
Debug/
Release/
x64/
GeneratedFiles/
build*
.vscode/

*.ini
*.user
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.12)
##################################################################################################################
project(QtDirect3D
LANGUAGES C CXX
DESCRIPTION "Qt DirectX Widgets & Demos."
DESCRIPTION "Qt Direct3D Widgets & Examples."
)

include(CMakeOptions.cmake)
Expand All @@ -18,7 +18,7 @@ include(CMakeOptions.cmake)
# Groups CMake pre-defined projects
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

set_property (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY
set_property (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY
VS_STARTUP_PROJECT Direct3D9Widget
)

Expand Down
2 changes: 1 addition & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ if (BUILD_WITH_IMGUI)
add_subdirectory(Direct3D11Widget_ImGui)
endif()

if (INCLUDE_DX12_EXAMPLE AND "${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
if (INCLUDE_DX12_EXAMPLE)
add_subdirectory(Direct3D12Widget_ImGui)
endif()
endif()
4 changes: 4 additions & 0 deletions examples/Direct3D12Widget_ImGui/QtDirect3D12_ImGui.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -127,21 +127,25 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\source\QDirect3D12Widget\ImGui;..\..\thirdparty\imgui;..\..\thirdparty\imgui\examples;$(Qt_INCLUDEPATH_);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>ImTextureID=ImU64;$(Qt_DEFINES_);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\source\QDirect3D12Widget\ImGui;..\..\thirdparty\imgui;..\..\thirdparty\imgui\examples;$(Qt_INCLUDEPATH_);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>ImTextureID=ImU64;$(Qt_DEFINES_);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\source\QDirect3D12Widget\ImGui;..\..\thirdparty\imgui;..\..\thirdparty\imgui\examples;$(Qt_INCLUDEPATH_);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>ImTextureID=ImU64;$(Qt_DEFINES_);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\source\QDirect3D12Widget\ImGui;..\..\thirdparty\imgui;..\..\thirdparty\imgui\examples;$(Qt_INCLUDEPATH_);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>ImTextureID=ImU64;$(Qt_DEFINES_);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down
73 changes: 47 additions & 26 deletions examples/QtDirect3D_All.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QtDirect3D9", "Direct3D9Wid
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QtDirect3D10", "Direct3D10Widget\QtDirect3D10.vcxproj", "{21D450F4-D4EB-4C32-82F6-73E439591B1D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QtDirect3D11", "Direct3D11Widget\QtDirect3D11.vcxproj", "{B9E907AC-964B-415F-8F45-49A7483B285D}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QtDirect3D11", "Direct3D11Widget\QtDirect3D11.vcxproj", "{A323E634-7404-4860-B4C8-55FD3443804C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QtDirect3D12_ImGui", "Direct3D12Widget_ImGui\QtDirect3D12_ImGui.vcxproj", "{04520FA2-F602-472C-9BE7-246A7387100B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QtDirect3D12", "Direct3D12Widget\QtDirect3D12.vcxproj", "{37659FE3-7AA7-4EFB-8E89-F7596DA80A79}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -33,30 +37,6 @@ Global
{B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x64.Build.0 = Release|x64
{B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x86.ActiveCfg = Release|Win32
{B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x86.Build.0 = Release|Win32
{B9E907AC-964B-415F-8F45-49A7483B285D}.Debug|x64.ActiveCfg = Debug|x64
{B9E907AC-964B-415F-8F45-49A7483B285D}.Debug|x64.Build.0 = Debug|x64
{B9E907AC-964B-415F-8F45-49A7483B285D}.Debug|x86.ActiveCfg = Debug|Win32
{B9E907AC-964B-415F-8F45-49A7483B285D}.Debug|x86.Build.0 = Debug|Win32
{B9E907AC-964B-415F-8F45-49A7483B285D}.Release|x64.ActiveCfg = Release|x64
{B9E907AC-964B-415F-8F45-49A7483B285D}.Release|x64.Build.0 = Release|x64
{B9E907AC-964B-415F-8F45-49A7483B285D}.Release|x86.ActiveCfg = Release|Win32
{B9E907AC-964B-415F-8F45-49A7483B285D}.Release|x86.Build.0 = Release|Win32
{B112E33D-BA9B-418C-8D5B-3FDC6898A330}.Debug|x64.ActiveCfg = Debug|x64
{B112E33D-BA9B-418C-8D5B-3FDC6898A330}.Debug|x64.Build.0 = Debug|x64
{B112E33D-BA9B-418C-8D5B-3FDC6898A330}.Debug|x86.ActiveCfg = Debug|Win32
{B112E33D-BA9B-418C-8D5B-3FDC6898A330}.Debug|x86.Build.0 = Debug|Win32
{B112E33D-BA9B-418C-8D5B-3FDC6898A330}.Release|x64.ActiveCfg = Release|x64
{B112E33D-BA9B-418C-8D5B-3FDC6898A330}.Release|x64.Build.0 = Release|x64
{B112E33D-BA9B-418C-8D5B-3FDC6898A330}.Release|x86.ActiveCfg = Release|Win32
{B112E33D-BA9B-418C-8D5B-3FDC6898A330}.Release|x86.Build.0 = Release|Win32
{A7639B86-7FF9-495D-B6D1-53D9785EBA48}.Debug|x64.ActiveCfg = Debug|x64
{A7639B86-7FF9-495D-B6D1-53D9785EBA48}.Debug|x64.Build.0 = Debug|x64
{A7639B86-7FF9-495D-B6D1-53D9785EBA48}.Debug|x86.ActiveCfg = Debug|Win32
{A7639B86-7FF9-495D-B6D1-53D9785EBA48}.Debug|x86.Build.0 = Debug|Win32
{A7639B86-7FF9-495D-B6D1-53D9785EBA48}.Release|x64.ActiveCfg = Release|x64
{A7639B86-7FF9-495D-B6D1-53D9785EBA48}.Release|x64.Build.0 = Release|x64
{A7639B86-7FF9-495D-B6D1-53D9785EBA48}.Release|x86.ActiveCfg = Release|Win32
{A7639B86-7FF9-495D-B6D1-53D9785EBA48}.Release|x86.Build.0 = Release|Win32
{3714A2DD-57EA-49F6-845F-FAF1C1AFA156}.Debug|x64.ActiveCfg = Debug|x64
{3714A2DD-57EA-49F6-845F-FAF1C1AFA156}.Debug|x64.Build.0 = Debug|x64
{3714A2DD-57EA-49F6-845F-FAF1C1AFA156}.Debug|x86.ActiveCfg = Debug|Win32
Expand All @@ -65,6 +45,22 @@ Global
{3714A2DD-57EA-49F6-845F-FAF1C1AFA156}.Release|x64.Build.0 = Release|x64
{3714A2DD-57EA-49F6-845F-FAF1C1AFA156}.Release|x86.ActiveCfg = Release|Win32
{3714A2DD-57EA-49F6-845F-FAF1C1AFA156}.Release|x86.Build.0 = Release|Win32
{A7639B86-7FF9-495D-B6D1-53D9785EBA48}.Debug|x64.ActiveCfg = Debug|x64
{A7639B86-7FF9-495D-B6D1-53D9785EBA48}.Debug|x64.Build.0 = Debug|x64
{A7639B86-7FF9-495D-B6D1-53D9785EBA48}.Debug|x86.ActiveCfg = Debug|Win32
{A7639B86-7FF9-495D-B6D1-53D9785EBA48}.Debug|x86.Build.0 = Debug|Win32
{A7639B86-7FF9-495D-B6D1-53D9785EBA48}.Release|x64.ActiveCfg = Release|x64
{A7639B86-7FF9-495D-B6D1-53D9785EBA48}.Release|x64.Build.0 = Release|x64
{A7639B86-7FF9-495D-B6D1-53D9785EBA48}.Release|x86.ActiveCfg = Release|Win32
{A7639B86-7FF9-495D-B6D1-53D9785EBA48}.Release|x86.Build.0 = Release|Win32
{B112E33D-BA9B-418C-8D5B-3FDC6898A330}.Debug|x64.ActiveCfg = Debug|x64
{B112E33D-BA9B-418C-8D5B-3FDC6898A330}.Debug|x64.Build.0 = Debug|x64
{B112E33D-BA9B-418C-8D5B-3FDC6898A330}.Debug|x86.ActiveCfg = Debug|Win32
{B112E33D-BA9B-418C-8D5B-3FDC6898A330}.Debug|x86.Build.0 = Debug|Win32
{B112E33D-BA9B-418C-8D5B-3FDC6898A330}.Release|x64.ActiveCfg = Release|x64
{B112E33D-BA9B-418C-8D5B-3FDC6898A330}.Release|x64.Build.0 = Release|x64
{B112E33D-BA9B-418C-8D5B-3FDC6898A330}.Release|x86.ActiveCfg = Release|Win32
{B112E33D-BA9B-418C-8D5B-3FDC6898A330}.Release|x86.Build.0 = Release|Win32
{21D450F4-D4EB-4C32-82F6-73E439591B1D}.Debug|x64.ActiveCfg = Debug|x64
{21D450F4-D4EB-4C32-82F6-73E439591B1D}.Debug|x64.Build.0 = Debug|x64
{21D450F4-D4EB-4C32-82F6-73E439591B1D}.Debug|x86.ActiveCfg = Debug|Win32
Expand All @@ -73,14 +69,39 @@ Global
{21D450F4-D4EB-4C32-82F6-73E439591B1D}.Release|x64.Build.0 = Release|x64
{21D450F4-D4EB-4C32-82F6-73E439591B1D}.Release|x86.ActiveCfg = Release|Win32
{21D450F4-D4EB-4C32-82F6-73E439591B1D}.Release|x86.Build.0 = Release|Win32
{A323E634-7404-4860-B4C8-55FD3443804C}.Debug|x64.ActiveCfg = Debug|x64
{A323E634-7404-4860-B4C8-55FD3443804C}.Debug|x64.Build.0 = Debug|x64
{A323E634-7404-4860-B4C8-55FD3443804C}.Debug|x86.ActiveCfg = Debug|Win32
{A323E634-7404-4860-B4C8-55FD3443804C}.Debug|x86.Build.0 = Debug|Win32
{A323E634-7404-4860-B4C8-55FD3443804C}.Release|x64.ActiveCfg = Release|x64
{A323E634-7404-4860-B4C8-55FD3443804C}.Release|x64.Build.0 = Release|x64
{A323E634-7404-4860-B4C8-55FD3443804C}.Release|x86.ActiveCfg = Release|Win32
{A323E634-7404-4860-B4C8-55FD3443804C}.Release|x86.Build.0 = Release|Win32
{04520FA2-F602-472C-9BE7-246A7387100B}.Debug|x64.ActiveCfg = Debug|x64
{04520FA2-F602-472C-9BE7-246A7387100B}.Debug|x64.Build.0 = Debug|x64
{04520FA2-F602-472C-9BE7-246A7387100B}.Debug|x86.ActiveCfg = Debug|Win32
{04520FA2-F602-472C-9BE7-246A7387100B}.Debug|x86.Build.0 = Debug|Win32
{04520FA2-F602-472C-9BE7-246A7387100B}.Release|x64.ActiveCfg = Release|x64
{04520FA2-F602-472C-9BE7-246A7387100B}.Release|x64.Build.0 = Release|x64
{04520FA2-F602-472C-9BE7-246A7387100B}.Release|x86.ActiveCfg = Release|Win32
{04520FA2-F602-472C-9BE7-246A7387100B}.Release|x86.Build.0 = Release|Win32
{37659FE3-7AA7-4EFB-8E89-F7596DA80A79}.Debug|x64.ActiveCfg = Debug|x64
{37659FE3-7AA7-4EFB-8E89-F7596DA80A79}.Debug|x64.Build.0 = Debug|x64
{37659FE3-7AA7-4EFB-8E89-F7596DA80A79}.Debug|x86.ActiveCfg = Debug|Win32
{37659FE3-7AA7-4EFB-8E89-F7596DA80A79}.Debug|x86.Build.0 = Debug|Win32
{37659FE3-7AA7-4EFB-8E89-F7596DA80A79}.Release|x64.ActiveCfg = Release|x64
{37659FE3-7AA7-4EFB-8E89-F7596DA80A79}.Release|x64.Build.0 = Release|x64
{37659FE3-7AA7-4EFB-8E89-F7596DA80A79}.Release|x86.ActiveCfg = Release|Win32
{37659FE3-7AA7-4EFB-8E89-F7596DA80A79}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{B12702AD-ABFB-343A-A199-8E24837244A3} = {C7362413-E4F9-4012-875F-A7D81D9EBE96}
{A7639B86-7FF9-495D-B6D1-53D9785EBA48} = {C7362413-E4F9-4012-875F-A7D81D9EBE96}
{3714A2DD-57EA-49F6-845F-FAF1C1AFA156} = {C7362413-E4F9-4012-875F-A7D81D9EBE96}
{A7639B86-7FF9-495D-B6D1-53D9785EBA48} = {C7362413-E4F9-4012-875F-A7D81D9EBE96}
{04520FA2-F602-472C-9BE7-246A7387100B} = {C7362413-E4F9-4012-875F-A7D81D9EBE96}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B3FAF30B-443F-405A-927E-1FDA8DD61552}
Expand Down
41 changes: 0 additions & 41 deletions examples/QtDirect3D_DX12.sln

This file was deleted.

10 changes: 10 additions & 0 deletions examples/QtDirect3D_ImGui.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QtDirect3D10_ImGui", "Direc
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QtDirect3D11_ImGui", "Direct3D11Widget_ImGui\QtDirect3D11_ImGui.vcxproj", "{A7639B86-7FF9-495D-B6D1-53D9785EBA48}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QtDirect3D12_ImGui", "Direct3D12Widget_ImGui\QtDirect3D12_ImGui.vcxproj", "{04520FA2-F602-472C-9BE7-246A7387100B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Expand Down Expand Up @@ -41,6 +43,14 @@ Global
{A7639B86-7FF9-495D-B6D1-53D9785EBA48}.Release|x64.Build.0 = Release|x64
{A7639B86-7FF9-495D-B6D1-53D9785EBA48}.Release|x86.ActiveCfg = Release|Win32
{A7639B86-7FF9-495D-B6D1-53D9785EBA48}.Release|x86.Build.0 = Release|Win32
{04520FA2-F602-472C-9BE7-246A7387100B}.Debug|x64.ActiveCfg = Debug|x64
{04520FA2-F602-472C-9BE7-246A7387100B}.Debug|x64.Build.0 = Debug|x64
{04520FA2-F602-472C-9BE7-246A7387100B}.Debug|x86.ActiveCfg = Debug|Win32
{04520FA2-F602-472C-9BE7-246A7387100B}.Debug|x86.Build.0 = Debug|Win32
{04520FA2-F602-472C-9BE7-246A7387100B}.Release|x64.ActiveCfg = Release|x64
{04520FA2-F602-472C-9BE7-246A7387100B}.Release|x64.Build.0 = Release|x64
{04520FA2-F602-472C-9BE7-246A7387100B}.Release|x86.ActiveCfg = Release|Win32
{04520FA2-F602-472C-9BE7-246A7387100B}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
1 change: 0 additions & 1 deletion source/QDirect3D12Widget/ImGui/QDirect3D12Widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <QEvent>
#include <QWheelEvent>

//#define ImTextureID D3D12_GPU_DESCRIPTOR_HANDLE * // x32 builds
#include "imgui.h"
#include "imgui_impl_dx12.h"
#include "imgui_impl_win32.h"
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if (NOT EXISTS "${IMGUI_ROOT_DIR}/imgui.h")
else()
message(FATAL_ERROR "[ERROR] Failed to find Git client. Please install Git and try again.")
endif()

set(IMGUI_REPO "https://github.com/ocornut/imgui.git")
set(IMGUI_TAG "v1.76")
message(STATUS "[INFO] Cloning imgui. Please wait...")
Expand Down

0 comments on commit ad15a22

Please sign in to comment.