Browse Source

Fixes for Direct3D example

pull/970/head
Nikita Tsukanov 9 years ago
parent
commit
db3db7e987
  1. 1
      samples/interop/Direct3DInteropSample/Direct3DInteropSample.csproj
  2. 3
      samples/interop/Direct3DInteropSample/MainWindow.cs
  3. 2
      samples/interop/Direct3DInteropSample/MainWindow.paml

1
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" />

3
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);
}
}

2
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>

Loading…
Cancel
Save