Refactored C++ Project

This commit is contained in:
Brychan Dempsey 2021-10-05 00:27:45 +13:00
parent 8ad77f2355
commit b96d8066c2
17 changed files with 110 additions and 63 deletions

View File

@ -5,6 +5,8 @@ VisualStudioVersion = 16.0.31702.278
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Camera Renderer CS", "Camera-Renderer_cs\Camera Renderer CS.csproj", "{33A294C7-3146-405C-BCCA-C4E36985D0D7}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Camera Renderer CS", "Camera-Renderer_cs\Camera Renderer CS.csproj", "{33A294C7-3146-405C-BCCA-C4E36985D0D7}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Camera Renderer C++", "Camera-Renderer_cpp\CameraDirect_cpp.vcxproj", "{E764711A-933E-4E87-A081-2C24B25F7699}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM Debug|ARM = Debug|ARM
@ -41,6 +43,30 @@ Global
{33A294C7-3146-405C-BCCA-C4E36985D0D7}.Release|x86.ActiveCfg = Release|x86 {33A294C7-3146-405C-BCCA-C4E36985D0D7}.Release|x86.ActiveCfg = Release|x86
{33A294C7-3146-405C-BCCA-C4E36985D0D7}.Release|x86.Build.0 = Release|x86 {33A294C7-3146-405C-BCCA-C4E36985D0D7}.Release|x86.Build.0 = Release|x86
{33A294C7-3146-405C-BCCA-C4E36985D0D7}.Release|x86.Deploy.0 = Release|x86 {33A294C7-3146-405C-BCCA-C4E36985D0D7}.Release|x86.Deploy.0 = Release|x86
{E764711A-933E-4E87-A081-2C24B25F7699}.Debug|ARM.ActiveCfg = Debug|ARM
{E764711A-933E-4E87-A081-2C24B25F7699}.Debug|ARM.Build.0 = Debug|ARM
{E764711A-933E-4E87-A081-2C24B25F7699}.Debug|ARM.Deploy.0 = Debug|ARM
{E764711A-933E-4E87-A081-2C24B25F7699}.Debug|ARM64.ActiveCfg = Debug|ARM64
{E764711A-933E-4E87-A081-2C24B25F7699}.Debug|ARM64.Build.0 = Debug|ARM64
{E764711A-933E-4E87-A081-2C24B25F7699}.Debug|ARM64.Deploy.0 = Debug|ARM64
{E764711A-933E-4E87-A081-2C24B25F7699}.Debug|x64.ActiveCfg = Debug|x64
{E764711A-933E-4E87-A081-2C24B25F7699}.Debug|x64.Build.0 = Debug|x64
{E764711A-933E-4E87-A081-2C24B25F7699}.Debug|x64.Deploy.0 = Debug|x64
{E764711A-933E-4E87-A081-2C24B25F7699}.Debug|x86.ActiveCfg = Debug|Win32
{E764711A-933E-4E87-A081-2C24B25F7699}.Debug|x86.Build.0 = Debug|Win32
{E764711A-933E-4E87-A081-2C24B25F7699}.Debug|x86.Deploy.0 = Debug|Win32
{E764711A-933E-4E87-A081-2C24B25F7699}.Release|ARM.ActiveCfg = Release|ARM
{E764711A-933E-4E87-A081-2C24B25F7699}.Release|ARM.Build.0 = Release|ARM
{E764711A-933E-4E87-A081-2C24B25F7699}.Release|ARM.Deploy.0 = Release|ARM
{E764711A-933E-4E87-A081-2C24B25F7699}.Release|ARM64.ActiveCfg = Release|ARM64
{E764711A-933E-4E87-A081-2C24B25F7699}.Release|ARM64.Build.0 = Release|ARM64
{E764711A-933E-4E87-A081-2C24B25F7699}.Release|ARM64.Deploy.0 = Release|ARM64
{E764711A-933E-4E87-A081-2C24B25F7699}.Release|x64.ActiveCfg = Release|x64
{E764711A-933E-4E87-A081-2C24B25F7699}.Release|x64.Build.0 = Release|x64
{E764711A-933E-4E87-A081-2C24B25F7699}.Release|x64.Deploy.0 = Release|x64
{E764711A-933E-4E87-A081-2C24B25F7699}.Release|x86.ActiveCfg = Release|Win32
{E764711A-933E-4E87-A081-2C24B25F7699}.Release|x86.Build.0 = Release|Win32
{E764711A-933E-4E87-A081-2C24B25F7699}.Release|x86.Deploy.0 = Release|Win32
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@ -1,7 +1,7 @@
<Application <Application
x:Class="CameraDirect_cpp.App" x:Class="CameraRenderer_cpp.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:CameraDirect_cpp"> xmlns:local="using:CameraRenderer_cpp">
</Application> </Application>

View File

@ -6,7 +6,7 @@
#include "pch.h" #include "pch.h"
#include "DirectXPage.xaml.h" #include "DirectXPage.xaml.h"
using namespace CameraDirect_cpp; using namespace CameraRenderer_cpp;
using namespace Platform; using namespace Platform;
using namespace Windows::ApplicationModel; using namespace Windows::ApplicationModel;

View File

@ -8,7 +8,7 @@
#include "App.g.h" #include "App.g.h"
#include "DirectXPage.xaml.h" #include "DirectXPage.xaml.h"
namespace CameraDirect_cpp namespace CameraRenderer_cpp
{ {
/// <summary> /// <summary>
/// Provides application-specific behavior to supplement the default Application class. /// Provides application-specific behavior to supplement the default Application class.

View File

@ -46,6 +46,7 @@
<WindowsTargetPlatformMinVersion>10.0.17763.0</WindowsTargetPlatformMinVersion> <WindowsTargetPlatformMinVersion>10.0.17763.0</WindowsTargetPlatformMinVersion>
<ApplicationTypeRevision>10.0</ApplicationTypeRevision> <ApplicationTypeRevision>10.0</ApplicationTypeRevision>
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled> <AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
<ProjectName>Camera Renderer C++</ProjectName>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@ -128,7 +129,6 @@
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<Link> <Link>
<AdditionalDependencies>d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies)</AdditionalDependencies>
@ -138,9 +138,9 @@
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
<AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings> <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile> </ClCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
@ -152,9 +152,9 @@
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
<AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings> <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile> </ClCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
@ -166,9 +166,9 @@
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
<AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings> <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile> </ClCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
@ -180,9 +180,9 @@
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
<AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings> <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile> </ClCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@ -194,9 +194,9 @@
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
<AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings> <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile> </ClCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@ -208,9 +208,9 @@
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
<AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings> <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile> </ClCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@ -222,9 +222,9 @@
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
<AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings> <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile> </ClCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@ -236,12 +236,11 @@
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
<AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings> <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile> </ClCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<Image Include="Assets\LockScreenLogo.scale-200.png" /> <Image Include="Assets\LockScreenLogo.scale-200.png" />
<Image Include="Assets\SplashScreen.scale-200.png" /> <Image Include="Assets\SplashScreen.scale-200.png" />
@ -257,13 +256,13 @@
</ClInclude> </ClInclude>
<ClInclude Include="Common\DeviceResources.h" /> <ClInclude Include="Common\DeviceResources.h" />
<ClInclude Include="CameraDirect_cppMain.h" /> <ClInclude Include="CameraDirect_cppMain.h" />
<ClInclude Include="DirectXPage.xaml.h"> <ClInclude Include="DirectXPage.xaml.h">
<DependentUpon>DirectXPage.xaml</DependentUpon> <DependentUpon>DirectXPage.xaml</DependentUpon>
</ClInclude> </ClInclude>
<ClInclude Include="Common\DirectXHelper.h" /> <ClInclude Include="Common\DirectXHelper.h" />
<ClInclude Include="Common\StepTimer.h" /> <ClInclude Include="Common\StepTimer.h" />
<ClInclude Include="Content\Sample3DSceneRenderer.h" /> <ClInclude Include="Content\Sample3DSceneRenderer.h" />
<ClInclude Include="Content\SampleFpsTextRenderer.h" /> <ClInclude Include="Content\SampleFpsTextRenderer.h" />
<ClInclude Include="Content\ShaderStructures.h" /> <ClInclude Include="Content\ShaderStructures.h" />
<ClInclude Include="pch.h" /> <ClInclude Include="pch.h" />
</ItemGroup> </ItemGroup>
@ -272,11 +271,11 @@
<DependentUpon>App.xaml</DependentUpon> <DependentUpon>App.xaml</DependentUpon>
</ClCompile> </ClCompile>
<ClCompile Include="Common\DeviceResources.cpp" /> <ClCompile Include="Common\DeviceResources.cpp" />
<ClCompile Include="CameraDirect_cppMain.cpp" /> <ClCompile Include="CameraDirect_cppMain.cpp" />
<ClCompile Include="DirectXPage.xaml.cpp"> <ClCompile Include="DirectXPage.xaml.cpp">
<DependentUpon>DirectXPage.xaml</DependentUpon> <DependentUpon>DirectXPage.xaml</DependentUpon>
</ClCompile> </ClCompile>
<ClCompile Include="Content\SampleFpsTextRenderer.cpp" /> <ClCompile Include="Content\SampleFpsTextRenderer.cpp" />
<ClCompile Include="Content\Sample3DSceneRenderer.cpp" /> <ClCompile Include="Content\Sample3DSceneRenderer.cpp" />
<ClCompile Include="pch.cpp"> <ClCompile Include="pch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>

View File

@ -8,13 +8,13 @@
<UniqueIdentifier>9a29d315-3729-42f1-8e9a-441e0ca09644</UniqueIdentifier> <UniqueIdentifier>9a29d315-3729-42f1-8e9a-441e0ca09644</UniqueIdentifier>
<Extensions>bmp;fbx;gif;jpg;jpeg;tga;tiff;tif;png</Extensions> <Extensions>bmp;fbx;gif;jpg;jpeg;tga;tiff;tif;png</Extensions>
</Filter> </Filter>
<Filter Include="Content"> <Filter Include="Content">
<UniqueIdentifier>e15b4174-702d-4f9c-b6c9-a413728a0086</UniqueIdentifier> <UniqueIdentifier>e15b4174-702d-4f9c-b6c9-a413728a0086</UniqueIdentifier>
</Filter> </Filter>
<ClInclude Include="Common\DirectXHelper.h"> <ClInclude Include="Common\DirectXHelper.h">
<Filter>Common</Filter> <Filter>Common</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Common\StepTimer.h"> <ClInclude Include="Common\StepTimer.h">
<Filter>Common</Filter> <Filter>Common</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Common\DeviceResources.h"> <ClInclude Include="Common\DeviceResources.h">
@ -23,7 +23,7 @@
<ClCompile Include="Common\DeviceResources.cpp"> <ClCompile Include="Common\DeviceResources.cpp">
<Filter>Common</Filter> <Filter>Common</Filter>
</ClCompile> </ClCompile>
<ClInclude Include="Content\Sample3DSceneRenderer.h"> <ClInclude Include="Content\Sample3DSceneRenderer.h">
<Filter>Content</Filter> <Filter>Content</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Content\SampleFpsTextRenderer.h"> <ClInclude Include="Content\SampleFpsTextRenderer.h">
@ -32,13 +32,13 @@
<ClInclude Include="Content\ShaderStructures.h"> <ClInclude Include="Content\ShaderStructures.h">
<Filter>Content</Filter> <Filter>Content</Filter>
</ClInclude> </ClInclude>
<ClCompile Include="Content\Sample3DSceneRenderer.cpp"> <ClCompile Include="Content\Sample3DSceneRenderer.cpp">
<Filter>Content</Filter> <Filter>Content</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Content\SampleFpsTextRenderer.cpp"> <ClCompile Include="Content\SampleFpsTextRenderer.cpp">
<Filter>Content</Filter> <Filter>Content</Filter>
</ClCompile> </ClCompile>
<FxCompile Include="Content\SamplePixelShader.hlsl"> <FxCompile Include="Content\SamplePixelShader.hlsl">
<Filter>Content</Filter> <Filter>Content</Filter>
</FxCompile> </FxCompile>
<FxCompile Include="Content\SampleVertexShader.hlsl"> <FxCompile Include="Content\SampleVertexShader.hlsl">
@ -63,4 +63,26 @@
<Filter>Assets</Filter> <Filter>Assets</Filter>
</Image> </Image>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="CameraDirect_cppMain.cpp" />
<ClCompile Include="pch.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="CameraDirect_cppMain.h" />
<ClInclude Include="pch.h" />
</ItemGroup>
<ItemGroup>
<Image Include="Assets\StoreLogo.png">
<Filter>Assets</Filter>
</Image>
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest" />
</ItemGroup>
<ItemGroup>
<Page Include="DirectXPage.xaml" />
</ItemGroup>
</Project> </Project>

View File

@ -2,13 +2,13 @@
#include "CameraDirect_cppMain.h" #include "CameraDirect_cppMain.h"
#include "Common\DirectXHelper.h" #include "Common\DirectXHelper.h"
using namespace CameraDirect_cpp; using namespace CameraRenderer_cpp;
using namespace Windows::Foundation; using namespace Windows::Foundation;
using namespace Windows::System::Threading; using namespace Windows::System::Threading;
using namespace Concurrency; using namespace Concurrency;
// Loads and initializes application assets when the application is loaded. // Loads and initializes application assets when the application is loaded.
CameraDirect_cppMain::CameraDirect_cppMain(const std::shared_ptr<DX::DeviceResources>& deviceResources) : CameraRenderer_cppMain::CameraRenderer_cppMain(const std::shared_ptr<DX::DeviceResources>& deviceResources) :
m_deviceResources(deviceResources), m_pointerLocationX(0.0f) m_deviceResources(deviceResources), m_pointerLocationX(0.0f)
{ {
// Register to be notified if the Device is lost or recreated // Register to be notified if the Device is lost or recreated
@ -27,20 +27,20 @@ CameraDirect_cppMain::CameraDirect_cppMain(const std::shared_ptr<DX::DeviceResou
*/ */
} }
CameraDirect_cppMain::~CameraDirect_cppMain() CameraRenderer_cppMain::~CameraRenderer_cppMain()
{ {
// Deregister device notification // Deregister device notification
m_deviceResources->RegisterDeviceNotify(nullptr); m_deviceResources->RegisterDeviceNotify(nullptr);
} }
// Updates application state when the window size changes (e.g. device orientation change) // Updates application state when the window size changes (e.g. device orientation change)
void CameraDirect_cppMain::CreateWindowSizeDependentResources() void CameraRenderer_cppMain::CreateWindowSizeDependentResources()
{ {
// TODO: Replace this with the size-dependent initialization of your app's content. // TODO: Replace this with the size-dependent initialization of your app's content.
m_sceneRenderer->CreateWindowSizeDependentResources(); m_sceneRenderer->CreateWindowSizeDependentResources();
} }
void CameraDirect_cppMain::StartRenderLoop() void CameraRenderer_cppMain::StartRenderLoop()
{ {
// If the animation render loop is already running then do not start another thread. // If the animation render loop is already running then do not start another thread.
if (m_renderLoopWorker != nullptr && m_renderLoopWorker->Status == AsyncStatus::Started) if (m_renderLoopWorker != nullptr && m_renderLoopWorker->Status == AsyncStatus::Started)
@ -67,13 +67,13 @@ void CameraDirect_cppMain::StartRenderLoop()
m_renderLoopWorker = ThreadPool::RunAsync(workItemHandler, WorkItemPriority::High, WorkItemOptions::TimeSliced); m_renderLoopWorker = ThreadPool::RunAsync(workItemHandler, WorkItemPriority::High, WorkItemOptions::TimeSliced);
} }
void CameraDirect_cppMain::StopRenderLoop() void CameraRenderer_cppMain::StopRenderLoop()
{ {
m_renderLoopWorker->Cancel(); m_renderLoopWorker->Cancel();
} }
// Updates the application state once per frame. // Updates the application state once per frame.
void CameraDirect_cppMain::Update() void CameraRenderer_cppMain::Update()
{ {
ProcessInput(); ProcessInput();
@ -87,7 +87,7 @@ void CameraDirect_cppMain::Update()
} }
// Process all input from the user before updating game state // Process all input from the user before updating game state
void CameraDirect_cppMain::ProcessInput() void CameraRenderer_cppMain::ProcessInput()
{ {
// TODO: Add per frame input handling here. // TODO: Add per frame input handling here.
m_sceneRenderer->TrackingUpdate(m_pointerLocationX); m_sceneRenderer->TrackingUpdate(m_pointerLocationX);
@ -95,7 +95,7 @@ void CameraDirect_cppMain::ProcessInput()
// Renders the current frame according to the current application state. // Renders the current frame according to the current application state.
// Returns true if the frame was rendered and is ready to be displayed. // Returns true if the frame was rendered and is ready to be displayed.
bool CameraDirect_cppMain::Render() bool CameraRenderer_cppMain::Render()
{ {
// Don't try to render anything before the first Update. // Don't try to render anything before the first Update.
if (m_timer.GetFrameCount() == 0) if (m_timer.GetFrameCount() == 0)
@ -126,14 +126,14 @@ bool CameraDirect_cppMain::Render()
} }
// Notifies renderers that device resources need to be released. // Notifies renderers that device resources need to be released.
void CameraDirect_cppMain::OnDeviceLost() void CameraRenderer_cppMain::OnDeviceLost()
{ {
m_sceneRenderer->ReleaseDeviceDependentResources(); m_sceneRenderer->ReleaseDeviceDependentResources();
m_fpsTextRenderer->ReleaseDeviceDependentResources(); m_fpsTextRenderer->ReleaseDeviceDependentResources();
} }
// Notifies renderers that device resources may now be recreated. // Notifies renderers that device resources may now be recreated.
void CameraDirect_cppMain::OnDeviceRestored() void CameraRenderer_cppMain::OnDeviceRestored()
{ {
m_sceneRenderer->CreateDeviceDependentResources(); m_sceneRenderer->CreateDeviceDependentResources();
m_fpsTextRenderer->CreateDeviceDependentResources(); m_fpsTextRenderer->CreateDeviceDependentResources();

View File

@ -6,13 +6,13 @@
#include "Content\SampleFpsTextRenderer.h" #include "Content\SampleFpsTextRenderer.h"
// Renders Direct2D and 3D content on the screen. // Renders Direct2D and 3D content on the screen.
namespace CameraDirect_cpp namespace CameraRenderer_cpp
{ {
class CameraDirect_cppMain : public DX::IDeviceNotify class CameraRenderer_cppMain : public DX::IDeviceNotify
{ {
public: public:
CameraDirect_cppMain(const std::shared_ptr<DX::DeviceResources>& deviceResources); CameraRenderer_cppMain(const std::shared_ptr<DX::DeviceResources>& deviceResources);
~CameraDirect_cppMain(); ~CameraRenderer_cppMain();
void CreateWindowSizeDependentResources(); void CreateWindowSizeDependentResources();
void StartTracking() { m_sceneRenderer->StartTracking(); } void StartTracking() { m_sceneRenderer->StartTracking(); }
void TrackingUpdate(float positionX) { m_pointerLocationX = positionX; } void TrackingUpdate(float positionX) { m_pointerLocationX = positionX; }

View File

@ -3,7 +3,7 @@
#include "..\Common\DirectXHelper.h" #include "..\Common\DirectXHelper.h"
using namespace CameraDirect_cpp; using namespace CameraRenderer_cpp;
using namespace DirectX; using namespace DirectX;
using namespace Windows::Foundation; using namespace Windows::Foundation;

View File

@ -4,7 +4,7 @@
#include "ShaderStructures.h" #include "ShaderStructures.h"
#include "..\Common\StepTimer.h" #include "..\Common\StepTimer.h"
namespace CameraDirect_cpp namespace CameraRenderer_cpp
{ {
// This sample renderer instantiates a basic rendering pipeline. // This sample renderer instantiates a basic rendering pipeline.
class Sample3DSceneRenderer class Sample3DSceneRenderer

View File

@ -3,7 +3,7 @@
#include "Common/DirectXHelper.h" #include "Common/DirectXHelper.h"
using namespace CameraDirect_cpp; using namespace CameraRenderer_cpp;
using namespace Microsoft::WRL; using namespace Microsoft::WRL;
// Initializes D2D resources used for text rendering. // Initializes D2D resources used for text rendering.

View File

@ -4,7 +4,7 @@
#include "..\Common\DeviceResources.h" #include "..\Common\DeviceResources.h"
#include "..\Common\StepTimer.h" #include "..\Common\StepTimer.h"
namespace CameraDirect_cpp namespace CameraRenderer_cpp
{ {
// Renders the current FPS value in the bottom right corner of the screen using Direct2D and DirectWrite. // Renders the current FPS value in the bottom right corner of the screen using Direct2D and DirectWrite.
class SampleFpsTextRenderer class SampleFpsTextRenderer

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
namespace CameraDirect_cpp namespace CameraRenderer_cpp
{ {
// Constant buffer used to send MVP matrices to the vertex shader. // Constant buffer used to send MVP matrices to the vertex shader.
struct ModelViewProjectionConstantBuffer struct ModelViewProjectionConstantBuffer

View File

@ -1,8 +1,8 @@
<Page <Page
x:Class="CameraDirect_cpp.DirectXPage" x:Class="CameraRenderer_cpp.DirectXPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:CameraDirect_cpp" xmlns:local="using:CameraRenderer_cpp"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" mc:Ignorable="d"

View File

@ -6,7 +6,7 @@
#include "pch.h" #include "pch.h"
#include "DirectXPage.xaml.h" #include "DirectXPage.xaml.h"
using namespace CameraDirect_cpp; using namespace CameraRenderer_cpp;
using namespace Platform; using namespace Platform;
using namespace Windows::Foundation; using namespace Windows::Foundation;
@ -80,7 +80,7 @@ DirectXPage::DirectXPage():
// Run task on a dedicated high priority background thread. // Run task on a dedicated high priority background thread.
m_inputLoopWorker = ThreadPool::RunAsync(workItemHandler, WorkItemPriority::High, WorkItemOptions::TimeSliced); m_inputLoopWorker = ThreadPool::RunAsync(workItemHandler, WorkItemPriority::High, WorkItemOptions::TimeSliced);
m_main = std::unique_ptr<CameraDirect_cppMain>(new CameraDirect_cppMain(m_deviceResources)); m_main = std::unique_ptr<CameraRenderer_cppMain>(new CameraRenderer_cppMain(m_deviceResources));
m_main->StartRenderLoop(); m_main->StartRenderLoop();
} }

View File

@ -10,7 +10,7 @@
#include "Common\DeviceResources.h" #include "Common\DeviceResources.h"
#include "CameraDirect_cppMain.h" #include "CameraDirect_cppMain.h"
namespace CameraDirect_cpp namespace CameraRenderer_cpp
{ {
/// <summary> /// <summary>
/// A page that hosts a DirectX SwapChainPanel. /// A page that hosts a DirectX SwapChainPanel.
@ -52,7 +52,7 @@ namespace CameraDirect_cpp
// Resources used to render the DirectX content in the XAML page background. // Resources used to render the DirectX content in the XAML page background.
std::shared_ptr<DX::DeviceResources> m_deviceResources; std::shared_ptr<DX::DeviceResources> m_deviceResources;
std::unique_ptr<CameraDirect_cppMain> m_main; std::unique_ptr<CameraRenderer_cppMain> m_main;
bool m_windowVisible; bool m_windowVisible;
}; };
} }

View File

@ -14,7 +14,7 @@
<mp:PhoneIdentity PhoneProductId="7bc5f09c-b343-4491-af0f-5370254b2533" PhonePublisherId="00000000-0000-0000-0000-000000000000"/> <mp:PhoneIdentity PhoneProductId="7bc5f09c-b343-4491-af0f-5370254b2533" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<Properties> <Properties>
<DisplayName>CameraDirect_cpp</DisplayName> <DisplayName>CameraRenderer_cpp</DisplayName>
<PublisherDisplayName>Brych</PublisherDisplayName> <PublisherDisplayName>Brych</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo> <Logo>Assets\StoreLogo.png</Logo>
</Properties> </Properties>
@ -30,12 +30,12 @@
<Applications> <Applications>
<Application Id="App" <Application Id="App"
Executable="$targetnametoken$.exe" Executable="$targetnametoken$.exe"
EntryPoint="CameraDirect_cpp.App"> EntryPoint="CameraRenderer_cpp.App">
<uap:VisualElements <uap:VisualElements
DisplayName="CameraDirect_cpp" DisplayName="Camera Renderer"
Square150x150Logo="Assets\Square150x150Logo.png" Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png" Square44x44Logo="Assets\Square44x44Logo.png"
Description="CameraDirect_cpp" Description="CameraRenderer_cpp"
BackgroundColor="transparent"> BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/> <uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
<uap:SplashScreen Image="Assets\SplashScreen.png" /> <uap:SplashScreen Image="Assets\SplashScreen.png" />