Browse Source

Fixes for Direct3D example

Nikita Tsukanov 8 years ago
parent
commit
db3db7e987

+ 1 - 0
samples/interop/Direct3DInteropSample/Direct3DInteropSample.csproj

@@ -20,6 +20,7 @@
       <EmbeddedResource Include="MiniCube.fx" />
     </ItemGroup>
     <ItemGroup>
+        <ProjectReference Include="..\..\..\src\Avalonia.DesignerSupport\Avalonia.DesignerSupport.csproj" />
         <ProjectReference Include="..\..\..\src\Avalonia.DotNetFrameworkRuntime\Avalonia.DotNetFrameworkRuntime.csproj" />
         <ProjectReference Include="..\..\..\src\Avalonia.Themes.Default\Avalonia.Themes.Default.csproj" />
         <ProjectReference Include="..\..\..\src\Windows\Avalonia.Direct2D1\Avalonia.Direct2D1.csproj" />

+ 2 - 1
samples/interop/Direct3DInteropSample/MainWindow.cs

@@ -76,6 +76,7 @@ namespace Direct3DInteropSample
             this.GetObservable(ClientSizeProperty).Subscribe(Resize);
             Resize(ClientSize);
             AvaloniaXamlLoader.Load(this);
+            Background = Avalonia.Media.Brushes.Transparent;
         }
 
 
@@ -258,6 +259,6 @@ namespace Direct3DInteropSample
         }
 
 
-        public override IRenderTarget CreateRenderTarget() => new D3DRenderTarget(this);
+        protected override IRenderTarget CreateRenderTarget() => new D3DRenderTarget(this);
     }
 }

+ 1 - 1
samples/interop/Direct3DInteropSample/MainWindow.paml

@@ -1,4 +1,4 @@
-<Window xmlns="https://github.com/avaloniaui" Background="Transparent" Title="Avalonia Direct3D Demo">
+<Window xmlns="https://github.com/avaloniaui" Background="White" Title="Avalonia Direct3D Demo">
     <Grid ColumnDefinitions="*,Auto" Margin="20">
         <StackPanel Grid.Column="1" MinWidth="200">
             <TextBlock>Rotation X</TextBlock>