зеркало из https://github.com/microsoft/Win2D.git
Enable the Direct3DInterop example for UAP
This commit is contained in:
Родитель
2e1f280608
Коммит
3979285dea
|
@ -152,6 +152,9 @@
|
|||
</UAPProject>
|
||||
<UAPProject Include="samples\SimpleSample\UAP\SimpleSample.uap.csproj" />
|
||||
<UAPProject Include="samples\CoreWindowExample\UAP\CoreWindowExample.uap.csproj" />
|
||||
<UAPProject Include="samples\ExampleGallery\Direct3DInterop\UAP\ExampleGallery.Direct3DInterop.uap.vcxproj">
|
||||
<BuildInParallel>false</BuildInParallel>
|
||||
</UAPProject>
|
||||
<UAPProject Include="samples\ExampleGallery\BackgroundTask\UAP\ExampleGallery.BackgroundTask.uap.csproj" />
|
||||
<UAPProject Include="samples\ExampleGallery\UAP\ExampleGallery.uap.csproj" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -96,6 +96,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "numerics", "numerics", "{D6
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Workaround1200257", "numerics\Workaround1200257\Workaround1200257.csproj", "{4EDD6AD1-0BD4-40CF-8D02-53597B1A76BA}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ExampleGallery.Direct3DInterop", "ExampleGallery.Direct3DInterop", "{81A681BB-9434-420E-8A27-1656AEFDCA4B}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExampleGallery.Direct3DInterop.uap", "samples\ExampleGallery\Direct3DInterop\UAP\ExampleGallery.Direct3DInterop.uap.vcxproj", "{A81F96D0-4924-40E3-A463-3CB9EE55AA93}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExampleGallery.Direct3DInterop.Shared", "samples\ExampleGallery\Direct3DInterop\Shared\ExampleGallery.Direct3DInterop.Shared.vcxitems", "{8E486BCA-FE9B-4F99-9D2E-A277905E84EB}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
||||
winrt\test.managed\Shared\winrt.test.managed.Shared.projitems*{70fb7b71-d56c-4bf1-9282-27aa58043cc0}*SharedItemsImports = 4
|
||||
|
@ -108,7 +114,9 @@ Global
|
|||
winrt\lib\winrt.lib.Shared.vcxitems*{1574c4de-318f-4555-b72e-97532f720a13}*SharedItemsImports = 9
|
||||
winrt\dll\winrt.dll.Shared.vcxitems*{d3d2a425-69d2-4f8c-98dc-760abc25e535}*SharedItemsImports = 9
|
||||
winrt\dll\winrt.dll.Shared.vcxitems*{8cf21e5d-e0a2-4fe7-8e2b-a025cf52dcfb}*SharedItemsImports = 4
|
||||
samples\ExampleGallery\Direct3DInterop\Shared\ExampleGallery.Direct3DInterop.Shared.vcxitems*{8e486bca-fe9b-4f99-9d2e-a277905e84eb}*SharedItemsImports = 9
|
||||
samples\CoreWindowExample\Shared\CoreWindowExample.Shared.projitems*{3aa4fcff-99f7-4746-957f-79303e9a8952}*SharedItemsImports = 4
|
||||
samples\ExampleGallery\Direct3DInterop\Shared\ExampleGallery.Direct3DInterop.Shared.vcxitems*{a81f96d0-4924-40e3-a463-3cb9ee55aa93}*SharedItemsImports = 4
|
||||
samples\ExampleGallery\Shared\ExampleGallery.Shared.projitems*{f6f2b4ad-0b11-4919-bf8b-08de6fe76170}*SharedItemsImports = 13
|
||||
samples\ExampleGallery\BackgroundTask\Shared\ExampleGallery.BackgroundTask.Shared.projitems*{d77eb5be-c840-4ade-b4f6-1ba9512c4768}*SharedItemsImports = 4
|
||||
winrt\test.internal\winrt.test.internal.shared.vcxitems*{063ab629-aadf-4749-b259-ab815b1aeb01}*SharedItemsImports = 4
|
||||
|
@ -298,6 +306,18 @@ Global
|
|||
{4EDD6AD1-0BD4-40CF-8D02-53597B1A76BA}.Release|Win32.Build.0 = Release|Any CPU
|
||||
{4EDD6AD1-0BD4-40CF-8D02-53597B1A76BA}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{4EDD6AD1-0BD4-40CF-8D02-53597B1A76BA}.Release|x64.Build.0 = Release|Any CPU
|
||||
{A81F96D0-4924-40E3-A463-3CB9EE55AA93}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{A81F96D0-4924-40E3-A463-3CB9EE55AA93}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{A81F96D0-4924-40E3-A463-3CB9EE55AA93}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{A81F96D0-4924-40E3-A463-3CB9EE55AA93}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{A81F96D0-4924-40E3-A463-3CB9EE55AA93}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A81F96D0-4924-40E3-A463-3CB9EE55AA93}.Debug|x64.Build.0 = Debug|x64
|
||||
{A81F96D0-4924-40E3-A463-3CB9EE55AA93}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{A81F96D0-4924-40E3-A463-3CB9EE55AA93}.Release|ARM.Build.0 = Release|ARM
|
||||
{A81F96D0-4924-40E3-A463-3CB9EE55AA93}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{A81F96D0-4924-40E3-A463-3CB9EE55AA93}.Release|Win32.Build.0 = Release|Win32
|
||||
{A81F96D0-4924-40E3-A463-3CB9EE55AA93}.Release|x64.ActiveCfg = Release|x64
|
||||
{A81F96D0-4924-40E3-A463-3CB9EE55AA93}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -335,5 +355,8 @@ Global
|
|||
{75A7926B-B1AE-4806-B332-9561BFE0EDF9} = {BB7C16DA-A97B-4C62-86A2-05739B418676}
|
||||
{BB7C16DA-A97B-4C62-86A2-05739B418676} = {671EACB0-6255-4050-B092-1A874625AD5C}
|
||||
{4EDD6AD1-0BD4-40CF-8D02-53597B1A76BA} = {D6BC00F7-D194-4136-8382-55B222A5C6F1}
|
||||
{81A681BB-9434-420E-8A27-1656AEFDCA4B} = {671EACB0-6255-4050-B092-1A874625AD5C}
|
||||
{A81F96D0-4924-40E3-A463-3CB9EE55AA93} = {81A681BB-9434-420E-8A27-1656AEFDCA4B}
|
||||
{8E486BCA-FE9B-4F99-9D2E-A277905E84EB} = {81A681BB-9434-420E-8A27-1656AEFDCA4B}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
@ -10,10 +10,20 @@ namespace ExampleGallery
|
|||
{
|
||||
using namespace ::DirectX;
|
||||
using namespace Microsoft::Graphics::Canvas;
|
||||
using namespace Microsoft::Graphics::Canvas::DirectX::Direct3D11;
|
||||
using namespace Microsoft::Graphics::Canvas::Numerics;
|
||||
using namespace Microsoft::WRL;
|
||||
|
||||
#if WINVER <= _WIN32_WINNT_WINBLUE
|
||||
// On Windows 8.1, we must use the Microsoft::Graphics::Canvas::Numerics types
|
||||
// when exchanging matrices between different WinRT components.
|
||||
using namespace Microsoft::Graphics::Canvas::Numerics;
|
||||
using namespace Microsoft::Graphics::Canvas::DirectX::Direct3D11;
|
||||
#else
|
||||
// On Windows 10, we can directly use the Windows::Foundation::Numerics::float4x4 type.
|
||||
// See http://blogs.msdn.com/b/win2d/archive/2015/06/02/winrt-vector-and-matrix-types-in-windows-10.aspx
|
||||
using Matrix4x4 = Windows::Foundation::Numerics::float4x4;
|
||||
using namespace Windows::Graphics::DirectX::Direct3D11;
|
||||
#endif
|
||||
|
||||
|
||||
// Interop helper shows how to mix Win2D with Direct3D rendering.
|
||||
// Implemented in C++/CX, this class serves as a bridge between the C# Win2D code
|
||||
|
|
|
@ -18,4 +18,9 @@
|
|||
|
||||
// Win2D headers.
|
||||
#include <Microsoft.Graphics.Canvas.native.h>
|
||||
|
||||
#if WINVER <= _WIN32_WINNT_WINBLUE
|
||||
#include <Microsoft.Graphics.Canvas.DirectX.Direct3D11.interop.h>
|
||||
#else
|
||||
#include <Windows.Graphics.DirectX.Direct3D11.interop.h>
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\..\..\packages\directxtk_uwp.2015.7.29.1\build\native\directxtk_uwp.props" Condition="Exists('..\..\..\..\packages\directxtk_uwp.2015.7.29.1\build\native\directxtk_uwp.props')" />
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\winrt\dll\winrt.dll.uap.vcxproj">
|
||||
<Project>{8cf21e5d-e0a2-4fe7-8e2b-a025cf52dcfb}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{A81F96D0-4924-40E3-A463-3CB9EE55AA93}</ProjectGuid>
|
||||
<RootNamespace>ExampleGallery.Direct3DInterop</RootNamespace>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
|
||||
<AppContainerApplication>true</AppContainerApplication>
|
||||
<ApplicationType>Windows Store</ApplicationType>
|
||||
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
|
||||
<ConvergedProjectType>CodeSharingWindowsRuntimeComponent</ConvergedProjectType>
|
||||
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<NuGetPackageImportStamp>c59169d0</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<Import Project="..\..\..\..\build\Win2D.cpp.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<Import Project="..\Shared\ExampleGallery.Direct3DInterop.Shared.vcxitems" Label="Shared" />
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>../../../../winrt/published;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<Import Project="..\..\..\..\build\Win2D.cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="..\..\..\..\packages\directxtk_uwp.2015.7.29.1\build\native\directxtk_uwp.targets" Condition="Exists('..\..\..\..\packages\directxtk_uwp.2015.7.29.1\build\native\directxtk_uwp.targets')" />
|
||||
</ImportGroup>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\..\..\packages\directxtk_uwp.2015.7.29.1\build\native\directxtk_uwp.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\directxtk_uwp.2015.7.29.1\build\native\directxtk_uwp.props'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\directxtk_uwp.2015.7.29.1\build\native\directxtk_uwp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\directxtk_uwp.2015.7.29.1\build\native\directxtk_uwp.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="directxtk_uwp" version="2015.7.29.1" targetFramework="Native" />
|
||||
</packages>
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\..\..\packages\directxtk_windowsstore_8_1.2015.3.27.2\build\native\directxtk_windowsstore_8_1.props" Condition="Exists('..\..\..\..\packages\directxtk_windowsstore_8_1.2015.3.27.2\build\native\directxtk_windowsstore_8_1.props')" />
|
||||
<Import Project="..\..\..\..\packages\directxtk_windowsstore_8_1.2015.7.29.1\build\native\directxtk_windowsstore_8_1.props" Condition="Exists('..\..\..\..\packages\directxtk_windowsstore_8_1.2015.7.29.1\build\native\directxtk_windowsstore_8_1.props')" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\winrt\dll\winrt.dll.Windows.vcxproj">
|
||||
<Project>{0ae978bb-52e2-40fb-9d0f-2e3a4bd64837}</Project>
|
||||
|
@ -36,13 +36,13 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<Import Project="..\..\..\..\build\Win2D.cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="..\..\..\..\packages\directxtk_windowsstore_8_1.2015.3.27.2\build\native\directxtk_windowsstore_8_1.targets" Condition="Exists('..\..\..\..\packages\directxtk_windowsstore_8_1.2015.3.27.2\build\native\directxtk_windowsstore_8_1.targets')" />
|
||||
<Import Project="..\..\..\..\packages\directxtk_windowsstore_8_1.2015.7.29.1\build\native\directxtk_windowsstore_8_1.targets" Condition="Exists('..\..\..\..\packages\directxtk_windowsstore_8_1.2015.7.29.1\build\native\directxtk_windowsstore_8_1.targets')" />
|
||||
</ImportGroup>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\..\..\packages\directxtk_windowsstore_8_1.2015.3.27.2\build\native\directxtk_windowsstore_8_1.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\directxtk_windowsstore_8_1.2015.3.27.2\build\native\directxtk_windowsstore_8_1.props'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\directxtk_windowsstore_8_1.2015.3.27.2\build\native\directxtk_windowsstore_8_1.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\directxtk_windowsstore_8_1.2015.3.27.2\build\native\directxtk_windowsstore_8_1.targets'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\directxtk_windowsstore_8_1.2015.7.29.1\build\native\directxtk_windowsstore_8_1.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\directxtk_windowsstore_8_1.2015.7.29.1\build\native\directxtk_windowsstore_8_1.props'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\directxtk_windowsstore_8_1.2015.7.29.1\build\native\directxtk_windowsstore_8_1.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\directxtk_windowsstore_8_1.2015.7.29.1\build\native\directxtk_windowsstore_8_1.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="directxtk_windowsstore_8_1" version="2015.3.27.2" targetFramework="Native" />
|
||||
<package id="directxtk_windowsstore_8_1" version="2015.7.29.1" targetFramework="Native" />
|
||||
</packages>
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\..\..\packages\directxtk_windowsphone_8_1.2015.3.27.2\build\native\directxtk_windowsphone_8_1.props" Condition="Exists('..\..\..\..\packages\directxtk_windowsphone_8_1.2015.3.27.2\build\native\directxtk_windowsphone_8_1.props')" />
|
||||
<Import Project="..\..\..\..\packages\directxtk_windowsphone_8_1.2015.7.29.1\build\native\directxtk_windowsphone_8_1.props" Condition="Exists('..\..\..\..\packages\directxtk_windowsphone_8_1.2015.7.29.1\build\native\directxtk_windowsphone_8_1.props')" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\winrt\dll\winrt.dll.WindowsPhone.vcxproj">
|
||||
<Project>{6eabd217-3fd8-4298-929d-857811d8f3fa}</Project>
|
||||
|
@ -37,13 +37,13 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<Import Project="..\..\..\..\build\Win2D.cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="..\..\..\..\packages\directxtk_windowsphone_8_1.2015.3.27.2\build\native\directxtk_windowsphone_8_1.targets" Condition="Exists('..\..\..\..\packages\directxtk_windowsphone_8_1.2015.3.27.2\build\native\directxtk_windowsphone_8_1.targets')" />
|
||||
<Import Project="..\..\..\..\packages\directxtk_windowsphone_8_1.2015.7.29.1\build\native\directxtk_windowsphone_8_1.targets" Condition="Exists('..\..\..\..\packages\directxtk_windowsphone_8_1.2015.7.29.1\build\native\directxtk_windowsphone_8_1.targets')" />
|
||||
</ImportGroup>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\..\..\packages\directxtk_windowsphone_8_1.2015.3.27.2\build\native\directxtk_windowsphone_8_1.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\directxtk_windowsphone_8_1.2015.3.27.2\build\native\directxtk_windowsphone_8_1.props'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\directxtk_windowsphone_8_1.2015.3.27.2\build\native\directxtk_windowsphone_8_1.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\directxtk_windowsphone_8_1.2015.3.27.2\build\native\directxtk_windowsphone_8_1.targets'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\directxtk_windowsphone_8_1.2015.7.29.1\build\native\directxtk_windowsphone_8_1.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\directxtk_windowsphone_8_1.2015.7.29.1\build\native\directxtk_windowsphone_8_1.props'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\directxtk_windowsphone_8_1.2015.7.29.1\build\native\directxtk_windowsphone_8_1.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\directxtk_windowsphone_8_1.2015.7.29.1\build\native\directxtk_windowsphone_8_1.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="directxtk_windowsphone_8_1" version="2015.3.27.2" targetFramework="Native" />
|
||||
<package id="directxtk_windowsphone_8_1" version="2015.7.29.1" targetFramework="Native" />
|
||||
</packages>
|
|
@ -2,6 +2,7 @@
|
|||
//
|
||||
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
|
||||
|
||||
using ExampleGallery.Direct3DInterop;
|
||||
using Microsoft.Graphics.Canvas;
|
||||
using Microsoft.Graphics.Canvas.Effects;
|
||||
using Microsoft.Graphics.Canvas.Text;
|
||||
|
@ -13,10 +14,6 @@ using Windows.UI;
|
|||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
|
||||
#if !WINDOWS_UWP
|
||||
using ExampleGallery.Direct3DInterop;
|
||||
#endif
|
||||
|
||||
namespace ExampleGallery
|
||||
{
|
||||
public sealed partial class Direct3DInteropExample : Page
|
||||
|
@ -28,11 +25,6 @@ namespace ExampleGallery
|
|||
public float BloomBlur { get; set; }
|
||||
|
||||
|
||||
// This example is temporarily disabled for UAP.
|
||||
// We'll turn it on as soon as a UAP NuGet package for the DirectX Tool Kit is available.
|
||||
#if !WINDOWS_UWP
|
||||
|
||||
|
||||
// The TeapotRenderer class is provided by the ExampleGallery.Direct3DInterop project,
|
||||
// which is written in C++/CX. It uses interop to combine Direct3D rendering with Win2D.
|
||||
TeapotRenderer teapot;
|
||||
|
@ -286,39 +278,6 @@ namespace ExampleGallery
|
|||
}
|
||||
|
||||
|
||||
#else // WINDOWS_UWP
|
||||
|
||||
public Direct3DInteropExample()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
void canvas_CreateResources(CanvasAnimatedControl sender, CanvasCreateResourcesEventArgs args)
|
||||
{
|
||||
}
|
||||
|
||||
void canvas_Update(ICanvasAnimatedControl sender, CanvasAnimatedUpdateEventArgs args)
|
||||
{
|
||||
}
|
||||
|
||||
void canvas_Draw(ICanvasAnimatedControl sender, CanvasAnimatedDrawEventArgs args)
|
||||
{
|
||||
args.DrawingSession.DrawText(
|
||||
"This example is temporarily disabled for UAP.\n\n" +
|
||||
"We'll turn it on as soon as a UAP NuGet package\n" +
|
||||
"for the DirectX Tool Kit is available.",
|
||||
sender.Size.ToVector2() / 2,
|
||||
Colors.Red,
|
||||
new CanvasTextFormat
|
||||
{
|
||||
HorizontalAlignment = CanvasHorizontalAlignment.Center,
|
||||
VerticalAlignment = CanvasVerticalAlignment.Center,
|
||||
});
|
||||
}
|
||||
|
||||
#endif // WINDOWS_UWP
|
||||
|
||||
|
||||
private void control_Unloaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// Explicitly remove references to allow the Win2D controls to get garbage collected
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
|
@ -90,6 +90,10 @@
|
|||
<Project>{8cf21e5d-e0a2-4fe7-8e2b-a025cf52dcfb}</Project>
|
||||
<Name>winrt.dll.uap</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Direct3DInterop\UAP\ExampleGallery.Direct3DInterop.uap.vcxproj">
|
||||
<Project>{a81f96d0-4924-40e3-a463-3cb9ee55aa93}</Project>
|
||||
<Name>ExampleGallery.Direct3DInterop.uap</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Effects\ExampleGallery.Effects.csproj">
|
||||
<Project>{2b157b97-cbf7-4014-8655-1456f2807f43}</Project>
|
||||
<Name>ExampleGallery.Effects</Name>
|
||||
|
|
Загрузка…
Ссылка в новой задаче