diff --git a/DirectXTK_WindowsPhone8.sln b/DirectXTK_WindowsPhone8.sln new file mode 100644 index 000000000..ecab4bba2 --- /dev/null +++ b/DirectXTK_WindowsPhone8.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Express 2012 for Windows Phone +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DirectXTK_WindowsPhone8", "DirectXTK_WindowsPhone8.vcxproj", "{E0B52AE7-E160-4D32-BF3F-910B785E5A8E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM = Debug|ARM + Debug|Win32 = Debug|Win32 + Release|ARM = Release|ARM + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E0B52AE7-E160-4D32-BF3F-910B785E5A8E}.Debug|ARM.ActiveCfg = Debug|ARM + {E0B52AE7-E160-4D32-BF3F-910B785E5A8E}.Debug|ARM.Build.0 = Debug|ARM + {E0B52AE7-E160-4D32-BF3F-910B785E5A8E}.Debug|Win32.ActiveCfg = Debug|Win32 + {E0B52AE7-E160-4D32-BF3F-910B785E5A8E}.Debug|Win32.Build.0 = Debug|Win32 + {E0B52AE7-E160-4D32-BF3F-910B785E5A8E}.Release|ARM.ActiveCfg = Release|ARM + {E0B52AE7-E160-4D32-BF3F-910B785E5A8E}.Release|ARM.Build.0 = Release|ARM + {E0B52AE7-E160-4D32-BF3F-910B785E5A8E}.Release|Win32.ActiveCfg = Release|Win32 + {E0B52AE7-E160-4D32-BF3F-910B785E5A8E}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/DirectXTK_WindowsPhone8.vcxproj b/DirectXTK_WindowsPhone8.vcxproj new file mode 100644 index 000000000..fc54387b7 --- /dev/null +++ b/DirectXTK_WindowsPhone8.vcxproj @@ -0,0 +1,241 @@ + + + + + Debug + Win32 + + + Debug + ARM + + + Release + Win32 + + + Release + ARM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Document + + + Document + + + Document + + + Document + + + Document + + + + {E0B52AE7-E160-4D32-BF3F-910B785E5A8E} + DirectXTK + en-US + $(VCTargetsPath11) + 11.0 + Windows Phone + 8.0 + + + + StaticLibrary + true + v110_wp80 + + + StaticLibrary + true + v110_wp80 + + + StaticLibrary + false + true + v110_wp80 + + + StaticLibrary + false + true + v110_wp80 + + + + + + + + false + DirectXTK + Bin\WindowsPhone8\$(Platform)\$(Configuration)\ + Bin\WindowsPhone8\$(Platform)\$(Configuration)\ + + + + _LIB;_DEBUG;%(PreprocessorDefinitions) + Disabled + + + + + _LIB;NDEBUG;%(PreprocessorDefinitions) + MaxSpeed + true + true + + + + + _LIB;_DEBUG;%(PreprocessorDefinitions) + Disabled + + + + + _LIB;NDEBUG;%(PreprocessorDefinitions) + MaxSpeed + true + true + + + + + Use + pch.h + $(ProjectDir)Inc;%(AdditionalIncludeDirectories) + Level3 + + + Console + false + + + + + + + \ No newline at end of file diff --git a/DirectXTK_WindowsPhone8.vcxproj.filters b/DirectXTK_WindowsPhone8.vcxproj.filters new file mode 100644 index 000000000..0e3435ae5 --- /dev/null +++ b/DirectXTK_WindowsPhone8.vcxproj.filters @@ -0,0 +1,360 @@ + + + + + {771f5f80-d173-49c3-8afb-790e8f7cb0ce} + + + {c52e19b6-8703-49a1-9b36-101a05b4745d} + + + {28d5fa16-99e2-471c-8cd8-2020e81f0024} + + + {7c833235-11d2-4716-a46e-375560545370} + + + + + Inc + + + Inc + + + Inc + + + Inc + + + Inc + + + Inc + + + Src + + + Src + + + Src + + + Src + + + Src + + + Src + + + Src + + + Inc + + + Src + + + Src + + + Inc + + + Src + + + Inc + + + + + Src + + + Src + + + Src + + + Src + + + Src + + + Src + + + Src + + + Src + + + Src + + + Src + + + Src + + + Src + + + Src + + + Src + + + Src + + + Src + + + + + Src\Shaders + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders + + + Src\Shaders + + + Src\Shaders + + + Src\Shaders + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src + + + Src\Shaders + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders\Compiled + + + Src\Shaders + + + Src\Shaders + + + Src\Shaders + + + Src\Shaders + + + + \ No newline at end of file diff --git a/Inc/ScreenGrab.h b/Inc/ScreenGrab.h index 674680f4d..d4d82c970 100644 --- a/Inc/ScreenGrab.h +++ b/Inc/ScreenGrab.h @@ -36,9 +36,13 @@ namespace DirectX _In_ ID3D11Resource* pSource, _In_z_ LPCWSTR fileName ); +#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP) + HRESULT SaveWICTextureToFile( _In_ ID3D11DeviceContext* pContext, _In_ ID3D11Resource* pSource, _In_ REFGUID guidContainerFormat, _In_z_ LPCWSTR fileName, _In_opt_ const GUID* targetFormat = nullptr ); + +#endif } \ No newline at end of file diff --git a/Inc/WICTextureLoader.h b/Inc/WICTextureLoader.h index 19cbfacde..d4935b450 100644 --- a/Inc/WICTextureLoader.h +++ b/Inc/WICTextureLoader.h @@ -29,6 +29,10 @@ #pragma once #endif +#if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP +#error WIC is not supported on Windows Phone +#endif + #include #pragma warning(push) diff --git a/Readme.txt b/Readme.txt index 041fa1b2c..9a70e3d69 100644 --- a/Readme.txt +++ b/Readme.txt @@ -4,11 +4,12 @@ DirectXTK - the DirectX Tool Kit Copyright (c) Microsoft Corporation. All rights reserved. -October 12, 2012 +October 30, 2012 This package contains the "DirectX Tool Kit", a collection of helper classes for writing Direct3D 11 C++ code for Windows Store apps, Windows 8 Win32 desktop -applications, Windows 7 applications, and Windows Vista Direct3D 11.0 applications. +applications, Windows Phone 8 applications, Windows 7 applications, and +Windows Vista Direct3D 11.0 applications. This code is designed to build with either Visual Studio 2012 which includes the Windows 8.0 SDK or Visual Studio 2010 with the standalone Windows 8.0 SDK installed @@ -234,8 +235,9 @@ Commandline options for the MakeSpriteFont tool: Rgba32 High quality and supports multicolored fonts, but wastes space. Bgra4444 - Good choice for color fonts on Windows Store apps, but this format - requires the DirectX 11.1 Runtime and a WDDM 1.2 driver. + Good choice for color fonts on Windows Store apps and Windows Phone + platforms, as this format requires the DirectX 11.1 Runtime and a + WDDM 1.2 driver. CompressedMono The smallest format, and works on all D3D platforms, but it only supports monochromatic font data. This uses a special BC2 @@ -570,6 +572,9 @@ WICTextureLoader.h contains a loader for BMP, JPEG, PNG, TIFF, GIF, HD Photo, an other WIC-supported image formats. This performs any required pixel format conversions or image resizing using WIC at load time as well. +NOTE: WICTextureLoader is not supported on Windows Phone 8, because WIC is not +available on that platform. + NOTE: WICTextureLoader cannot load .TGA files unless the system has a 3rd party WIC codec installed. You must use the DirectXTex library for TGA file format support without relying on an add-on WIC codec. @@ -642,6 +647,9 @@ strange looking screenshot files). The caller can also provide a specific pixel target format GUID to use as well. The caller provides the GUID of the specific file container format to use. +NOTE: SaveWICTextureToFile is not supported on Windows Phone 8, because WIC is not +available on that platform. + Capturing a screenshot: WRL::ComPtr backBuffer; @@ -666,6 +674,9 @@ Further reading: RELEASE HISTORY --------------- +October 30, 2012 + Added project files for Windows Phone 8 + October 12, 2012 Added PrimitiveBatch for drawing user primitives Debug object names for all D3D resources (for PIX and debug layer leak reporting) diff --git a/Src/ScreenGrab.cpp b/Src/ScreenGrab.cpp index b7fa2d645..8dd18b805 100644 --- a/Src/ScreenGrab.cpp +++ b/Src/ScreenGrab.cpp @@ -27,10 +27,12 @@ #include "pch.h" +#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP) #pragma warning(push) #pragma warning(disable : 4005) #include #pragma warning(pop) +#endif #include "ScreenGrab.h" @@ -583,6 +585,8 @@ HRESULT DirectX::SaveDDSTextureToFile( _In_ ID3D11DeviceContext* pContext, } //-------------------------------------------------------------------------------------- +#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP) + namespace DirectX { extern IWICImagingFactory* _GetWIC(); @@ -800,4 +804,6 @@ HRESULT DirectX::SaveWICTextureToFile( _In_ ID3D11DeviceContext* pContext, return hr; return S_OK; -} \ No newline at end of file +} + +#endif // !WINAPI_FAMILY || (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP)