Skip to content

Commit

Permalink
Update sample to be able use NativeAOT
Browse files Browse the repository at this point in the history
rd.xml file is workaround to SharpDx limitations.
  • Loading branch information
kant2002 committed Jan 4, 2023
1 parent 57948fe commit ecbc5f2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ImGui.NET.SampleProgram/ImGui.NET.SampleProgram.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PublishAot>true</PublishAot>
</PropertyGroup>

<ItemGroup>
Expand All @@ -12,6 +13,10 @@
<PackageReference Include="Veldrid.StartupUtilities" Version="4.8.0" />
<ProjectReference Include="..\ImPlot.NET\ImPlot.NET.csproj" />
</ItemGroup>

<ItemGroup>
<RdXmlFile Include="rd.xml" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="Shaders/GLSL/imgui-vertex.glsl" LogicalName="imgui-vertex.glsl" />
Expand Down
11 changes: 11 additions & 0 deletions src/ImGui.NET.SampleProgram/rd.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<Directives>
<Application>
<Assembly Name="SharpDX.DXGI" Dynamic="Required All">
<Type Name="SharpDX.DXGI.Factory" Dynamic="Required All" />
</Assembly>
<Assembly Name="SharpDX.Direct3D11" Dynamic="Required All">
<Type Name="SharpDX.Direct3D11.Texture2D" Dynamic="Required All" />
</Assembly>
</Application>
</Directives>

0 comments on commit ecbc5f2

Please sign in to comment.