diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2017-11-13 04:14:15 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2017-11-13 04:14:15 +0000 |
| commit | 1b2530749ea3dc4937cdd7aa37e5a144e6d10183 (patch) | |
| tree | de2a77d6c8ce8a33c2b3070c66549f429e43a017 /unityplugin/GhostCubeScene | |
| parent | Updated submodules (diff) | |
| download | DiligentEngine-1b2530749ea3dc4937cdd7aa37e5a144e6d10183.tar.gz DiligentEngine-1b2530749ea3dc4937cdd7aa37e5a144e6d10183.zip | |
Updated to version 2.1
Diffstat (limited to 'unityplugin/GhostCubeScene')
54 files changed, 1937 insertions, 0 deletions
diff --git a/unityplugin/GhostCubeScene/build/GhostCubeScene.Assets.vcxitems b/unityplugin/GhostCubeScene/build/GhostCubeScene.Assets.vcxitems new file mode 100644 index 0000000..7808a78 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/GhostCubeScene.Assets.vcxitems @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup Label="Globals"> + <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> + <HasSharedItems>true</HasSharedItems> + <ItemsProjectGuid>{CAF59C31-47E1-4F26-8455-C5E49F75BB3C}</ItemsProjectGuid> + <ItemsRootNamespace>RenderScript</ItemsRootNamespace> + <ItemsProjectName>GhostCubeScene.Assets</ItemsProjectName> + <CodeSharingProject>248F659F-DAC5-46E8-AC09-60EC9FC95053</CodeSharingProject> + </PropertyGroup> + <ItemDefinitionGroup> + <ClCompile> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory)</AdditionalIncludeDirectories> + </ClCompile> + </ItemDefinitionGroup> + <ItemGroup> + <ProjectCapability Include="SourceItemsFromImports" /> + </ItemGroup> + <ItemGroup> + <None Include="$(MSBuildThisFileDirectory)assets\shaders\Mirror.psh"> + <DeploymentContent>true</DeploymentContent> + <FileType>Document</FileType> + </None> + <None Include="$(MSBuildThisFileDirectory)assets\shaders\Mirror.vsh"> + <DeploymentContent>true</DeploymentContent> + <FileType>Document</FileType> + </None> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/GhostCubeScene.Assets.vcxitems.filters b/unityplugin/GhostCubeScene/build/GhostCubeScene.Assets.vcxitems.filters new file mode 100644 index 0000000..316e269 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/GhostCubeScene.Assets.vcxitems.filters @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="shaders"> + <UniqueIdentifier>{e5ff4d8e-5106-442e-848b-f56d1baa2645}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <None Include="$(MSBuildThisFileDirectory)assets\shaders\Mirror.vsh"> + <Filter>shaders</Filter> + </None> + <None Include="$(MSBuildThisFileDirectory)assets\shaders\Mirror.psh"> + <Filter>shaders</Filter> + </None> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/UWP/Assets/LockScreenLogo.scale-200.png b/unityplugin/GhostCubeScene/build/UWP/Assets/LockScreenLogo.scale-200.png Binary files differnew file mode 100644 index 0000000..735f57a --- /dev/null +++ b/unityplugin/GhostCubeScene/build/UWP/Assets/LockScreenLogo.scale-200.png diff --git a/unityplugin/GhostCubeScene/build/UWP/Assets/SplashScreen.scale-200.png b/unityplugin/GhostCubeScene/build/UWP/Assets/SplashScreen.scale-200.png Binary files differnew file mode 100644 index 0000000..023e7f1 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/UWP/Assets/SplashScreen.scale-200.png diff --git a/unityplugin/GhostCubeScene/build/UWP/Assets/Square150x150Logo.scale-200.png b/unityplugin/GhostCubeScene/build/UWP/Assets/Square150x150Logo.scale-200.png Binary files differnew file mode 100644 index 0000000..af49fec --- /dev/null +++ b/unityplugin/GhostCubeScene/build/UWP/Assets/Square150x150Logo.scale-200.png diff --git a/unityplugin/GhostCubeScene/build/UWP/Assets/Square44x44Logo.scale-200.png b/unityplugin/GhostCubeScene/build/UWP/Assets/Square44x44Logo.scale-200.png Binary files differnew file mode 100644 index 0000000..ce342a2 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/UWP/Assets/Square44x44Logo.scale-200.png diff --git a/unityplugin/GhostCubeScene/build/UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/unityplugin/GhostCubeScene/build/UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png Binary files differnew file mode 100644 index 0000000..f6c02ce --- /dev/null +++ b/unityplugin/GhostCubeScene/build/UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png diff --git a/unityplugin/GhostCubeScene/build/UWP/Assets/StoreLogo.png b/unityplugin/GhostCubeScene/build/UWP/Assets/StoreLogo.png Binary files differnew file mode 100644 index 0000000..7385b56 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/UWP/Assets/StoreLogo.png diff --git a/unityplugin/GhostCubeScene/build/UWP/Assets/Wide310x150Logo.scale-200.png b/unityplugin/GhostCubeScene/build/UWP/Assets/Wide310x150Logo.scale-200.png Binary files differnew file mode 100644 index 0000000..288995b --- /dev/null +++ b/unityplugin/GhostCubeScene/build/UWP/Assets/Wide310x150Logo.scale-200.png diff --git a/unityplugin/GhostCubeScene/build/UWP/GhostCubeScene.vcxproj b/unityplugin/GhostCubeScene/build/UWP/GhostCubeScene.vcxproj new file mode 100644 index 0000000..2571e58 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/UWP/GhostCubeScene.vcxproj @@ -0,0 +1,360 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|ARM"> + <Configuration>Debug</Configuration> + <Platform>ARM</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|ARM"> + <Configuration>Release</Configuration> + <Platform>ARM</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{BDD3DD22-64FA-4E48-BDF0-FD0B1C28C87F}</ProjectGuid> + <Keyword>DirectXApp</Keyword> + <RootNamespace>GhostCubeScene</RootNamespace> + <DefaultLanguage>en-US</DefaultLanguage> + <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion> + <AppContainerApplication>true</AppContainerApplication> + <ApplicationType>Windows Store</ApplicationType> + <WindowsTargetPlatformVersion>10.0.10586.0</WindowsTargetPlatformVersion> + <WindowsTargetPlatformMinVersion>10.0.10240.0</WindowsTargetPlatformMinVersion> + <ApplicationTypeRevision>10.0</ApplicationTypeRevision> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <WholeProgramOptimization>true</WholeProgramOptimization> + <PlatformToolset>v140</PlatformToolset> + <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <WholeProgramOptimization>true</WholeProgramOptimization> + <PlatformToolset>v140</PlatformToolset> + <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <WholeProgramOptimization>true</WholeProgramOptimization> + <PlatformToolset>v140</PlatformToolset> + <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + <Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\ImageContentTask.props" /> + <Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\MeshContentTask.props" /> + <Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\ShaderGraphContentTask.props" /> + </ImportGroup> + <ImportGroup Label="Shared"> + <Import Project="..\..\..\UnityEmulator\build\UWP.Shared\UnityEmulatorUWP.Shared.vcxitems" Label="Shared" /> + <Import Project="..\Windows.Shared\GhostCubeScene.Shared.vcxitems" Label="Shared" /> + <Import Project="..\GhostCubeScene.Assets.vcxitems" Label="Shared" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\..\..\..\diligentcore\Shared\build\UWP\UWP_Win32Dbg.props" /> + <Import Project="..\Windows.Shared\GhostCubeScene.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\..\..\..\diligentcore\Shared\build\UWP\UWP_Win32Rel.props" /> + <Import Project="..\Windows.Shared\GhostCubeScene.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\..\..\..\diligentcore\Shared\build\UWP\UWP_ArmDbg.props" /> + <Import Project="..\Windows.Shared\GhostCubeScene.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\..\..\..\diligentcore\Shared\build\UWP\UWP_ArmRel.props" /> + <Import Project="..\Windows.Shared\GhostCubeScene.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\..\..\..\diligentcore\Shared\build\UWP\UWP_X64Dbg.props" /> + <Import Project="..\Windows.Shared\GhostCubeScene.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\..\..\..\diligentcore\Shared\build\UWP\UWP_X64Rel.props" /> + <Import Project="..\Windows.Shared\GhostCubeScene.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <PackageCertificateKeyFile>GhostCubeScene_TemporaryKey.pfx</PackageCertificateKeyFile> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <IncludePath>$(SamplesRoot)\Samples\SampleBase\src\UWP;$(IncludePath)</IncludePath> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <IncludePath>$(SamplesRoot)\Samples\SampleBase\src\UWP;$(IncludePath)</IncludePath> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'"> + <IncludePath>$(SamplesRoot)\Samples\SampleBase\src\UWP;$(IncludePath)</IncludePath> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'"> + <IncludePath>$(SamplesRoot)\Samples\SampleBase\src\UWP;$(IncludePath)</IncludePath> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <IncludePath>$(SamplesRoot)\Samples\SampleBase\src\UWP;$(IncludePath)</IncludePath> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <IncludePath>$(SamplesRoot)\Samples\SampleBase\src\UWP;$(IncludePath)</IncludePath> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'"> + <Link> + <AdditionalDependencies>mincore.lib;d3d12.lib;dxgi.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\arm; $(VCInstallDir)\lib\arm</AdditionalLibraryDirectories> + </Link> + <ClCompile> + <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> + <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> + <AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'"> + <Link> + <AdditionalDependencies>mincore.lib;d3d12.lib;dxgi.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\arm; $(VCInstallDir)\lib\arm</AdditionalLibraryDirectories> + </Link> + <ClCompile> + <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> + <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> + <AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Link> + <AdditionalDependencies>mincore.lib;d3d12.lib;dxgi.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store; $(VCInstallDir)\lib</AdditionalLibraryDirectories> + </Link> + <ClCompile> + <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> + <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> + <AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Link> + <AdditionalDependencies>mincore.lib;d3d12.lib;dxgi.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store; $(VCInstallDir)\lib</AdditionalLibraryDirectories> + </Link> + <ClCompile> + <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> + <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> + <AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Link> + <AdditionalDependencies>mincore.lib;d3d12.lib;dxgi.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\amd64; $(VCInstallDir)\lib\amd64</AdditionalLibraryDirectories> + </Link> + <ClCompile> + <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> + <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> + <AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Link> + <AdditionalDependencies>mincore.lib;d3d12.lib;dxgi.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\amd64; $(VCInstallDir)\lib\amd64</AdditionalLibraryDirectories> + </Link> + <ClCompile> + <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> + <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> + <AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + </ClCompile> + </ItemDefinitionGroup> + <ItemGroup> + <Image Include="Assets\LockScreenLogo.scale-200.png" /> + <Image Include="Assets\SplashScreen.scale-200.png" /> + <Image Include="Assets\Square150x150Logo.scale-200.png" /> + <Image Include="Assets\Square44x44Logo.scale-200.png" /> + <Image Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" /> + <Image Include="Assets\StoreLogo.png" /> + <Image Include="Assets\Wide310x150Logo.scale-200.png" /> + </ItemGroup> + <ItemGroup> + <AppxManifest Include="Package.appxmanifest"> + <SubType>Designer</SubType> + </AppxManifest> + <CustomBuild Include="..\..\..\build\UWP\bin\DLLs\x64\GhostCubePlugin_64d.dll"> + <FileType>Document</FileType> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy "%(RelativeDir)%(Filename).dll" "$(ProjectDir)Assets"</Command> + <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copying "%(Filename).dll" to "$(ProjectDir)Assets"</Message> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)Assets\%(Filename).dll</Outputs> + </CustomBuild> + <CustomBuild Include="..\..\..\build\UWP\bin\DLLs\x64\GhostCubePlugin_64r.dll"> + <FileType>Document</FileType> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)Assets\%(Filename).dll</Outputs> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy "%(RelativeDir)%(Filename).dll" "$(ProjectDir)Assets"</Command> + <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copying "%(Filename).dll" to "$(ProjectDir)Assets"</Message> + </CustomBuild> + <CustomBuild Include="..\..\..\build\UWP\bin\DLLs\x86\GhostCubePlugin_32d.dll"> + <FileType>Document</FileType> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy "%(RelativeDir)%(Filename).dll" "$(ProjectDir)Assets"</Command> + <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copying "%(Filename).dll" to "$(ProjectDir)Assets"</Message> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)Assets\%(Filename).dll</Outputs> + </CustomBuild> + <CustomBuild Include="..\..\..\build\UWP\bin\DLLs\x86\GhostCubePlugin_32r.dll"> + <FileType>Document</FileType> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy "%(RelativeDir)%(Filename).dll" "$(ProjectDir)Assets"</Command> + <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copying "%(Filename).dll" to "$(ProjectDir)Assets"</Message> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)Assets\%(Filename).dll</Outputs> + </CustomBuild> + <CustomBuild Include="..\..\..\build\UWP\bin\DLLs\ARM\GhostCubePlugin_armd.dll"> + <FileType>Document</FileType> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">copy "%(RelativeDir)%(Filename).dll" "$(ProjectDir)Assets"</Command> + <Message Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">copying "%(Filename).dll" to "$(ProjectDir)Assets"</Message> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(ProjectDir)Assets\%(Filename).dll</Outputs> + </CustomBuild> + <CustomBuild Include="..\..\..\build\UWP\bin\DLLs\ARM\GhostCubePlugin_armr.dll"> + <FileType>Document</FileType> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">copy "%(RelativeDir)%(Filename).dll" "$(ProjectDir)Assets"</Command> + <Message Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">copying "%(Filename).dll" to "$(ProjectDir)Assets"</Message> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(ProjectDir)Assets\%(Filename).dll</Outputs> + </CustomBuild> + <None Include="Assets\GhostCubePlugin_32d.dll"> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</DeploymentContent> + </None> + <None Include="Assets\GhostCubePlugin_32r.dll"> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</DeploymentContent> + </None> + <None Include="Assets\GhostCubePlugin_64d.dll"> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent> + <FileType>Document</FileType> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</DeploymentContent> + </None> + <None Include="Assets\GhostCubePlugin_64r.dll"> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent> + </None> + <None Include="Assets\GhostCubePlugin_armd.dll"> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</DeploymentContent> + </None> + <None Include="Assets\GhostCubePlugin_armr.dll"> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</DeploymentContent> + <DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</DeploymentContent> + </None> + <None Include="GhostCubeScene_TemporaryKey.pfx" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\..\..\diligentcore\Common\build\UWP\Common.vcxproj"> + <Project>{6de3eb2b-8a56-4d27-8a39-587f7a70584c}</Project> + </ProjectReference> + <ProjectReference Include="..\..\..\..\diligentcore\Graphics\GraphicsEngineD3D11\build\UWP\GraphicsEngineD3D11.vcxproj"> + <Project>{29acd2a7-4c49-4973-9673-8f57ef37070f}</Project> + </ProjectReference> + <ProjectReference Include="..\..\..\..\diligentcore\Graphics\GraphicsEngineD3D12\build\UWP\GraphicsEngineD3D12.vcxproj"> + <Project>{1a5a1c1d-c717-4680-a929-40e6324fe048}</Project> + </ProjectReference> + <ProjectReference Include="..\..\..\..\diligentcore\Graphics\GraphicsEngineD3DBase\build\UWP\GraphicsEngineD3DBase.vcxproj"> + <Project>{acd6f956-ff3b-4fe9-8be3-c0eecfdbbf93}</Project> + </ProjectReference> + <ProjectReference Include="..\..\..\..\diligentcore\Graphics\GraphicsEngine\build\UWP\GraphicsEngine.vcxproj"> + <Project>{dfe6435d-cc9d-4ca1-bf4e-5640c522d815}</Project> + </ProjectReference> + <ProjectReference Include="..\..\..\..\diligentcore\Graphics\GraphicsTools\build\UWP\GraphicsTools.vcxproj"> + <Project>{7a1a6e2c-3952-4a57-ad30-abd92aa39c69}</Project> + </ProjectReference> + <ProjectReference Include="..\..\..\..\diligentcore\Platforms\Basic\build\UWP\BasicPlatform.vcxproj"> + <Project>{ff7d4949-dc3e-488b-8f78-1d32f1ca3b4c}</Project> + </ProjectReference> + <ProjectReference Include="..\..\..\..\diligentcore\Platforms\UWP\build\UWP\UniversalWindowsPlatform.vcxproj"> + <Project>{91adc1dd-aa8e-492a-ac19-3e0dab9ad665}</Project> + </ProjectReference> + <ProjectReference Include="..\..\..\UnityEmulator\build\UWP\UnityEmulator.vcxproj"> + <Project>{17597734-2fbf-481f-99d4-3315b70fe3e2}</Project> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + <Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\ImageContentTask.targets" /> + <Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\MeshContentTask.targets" /> + <Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\ShaderGraphContentTask.targets" /> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/UWP/GhostCubeScene.vcxproj.filters b/unityplugin/GhostCubeScene/build/UWP/GhostCubeScene.vcxproj.filters new file mode 100644 index 0000000..c9613a3 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/UWP/GhostCubeScene.vcxproj.filters @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Image Include="Assets\SplashScreen.scale-200.png"> + <Filter>Assets</Filter> + </Image> + <Image Include="Assets\Square44x44Logo.scale-200.png"> + <Filter>Assets</Filter> + </Image> + <Image Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png"> + <Filter>Assets</Filter> + </Image> + <Image Include="Assets\Square150x150Logo.scale-200.png"> + <Filter>Assets</Filter> + </Image> + <Image Include="Assets\StoreLogo.png"> + <Filter>Assets</Filter> + </Image> + <Image Include="Assets\Wide310x150Logo.scale-200.png"> + <Filter>Assets</Filter> + </Image> + <Image Include="Assets\LockScreenLogo.scale-200.png"> + <Filter>Assets</Filter> + </Image> + </ItemGroup> + <ItemGroup> + <AppxManifest Include="Package.appxmanifest" /> + </ItemGroup> + <ItemGroup> + <None Include="GhostCubeScene_TemporaryKey.pfx" /> + <None Include="..\..\..\build\UWP\bin\DLLs\x86\GhostCubePlugin_32d.dll"> + <Filter>SourceDLLs</Filter> + </None> + <None Include="..\..\..\build\UWP\bin\DLLs\x86\GhostCubePlugin_32r.dll"> + <Filter>SourceDLLs</Filter> + </None> + <None Include="..\..\..\build\UWP\bin\DLLs\x64\GhostCubePlugin_64d.dll"> + <Filter>SourceDLLs</Filter> + </None> + <None Include="..\..\..\build\UWP\bin\DLLs\x64\GhostCubePlugin_64r.dll"> + <Filter>SourceDLLs</Filter> + </None> + <None Include="..\..\..\build\UWP\bin\DLLs\ARM\GhostCubePlugin_armd.dll"> + <Filter>SourceDLLs</Filter> + </None> + <None Include="..\..\..\build\UWP\bin\DLLs\ARM\GhostCubePlugin_armr.dll"> + <Filter>SourceDLLs</Filter> + </None> + <None Include="Assets\GhostCubePlugin_64d.dll"> + <Filter>Assets</Filter> + </None> + <None Include="Assets\GhostCubePlugin_64r.dll"> + <Filter>Assets</Filter> + </None> + <None Include="Assets\GhostCubePlugin_32d.dll"> + <Filter>Assets</Filter> + </None> + <None Include="Assets\GhostCubePlugin_32r.dll"> + <Filter>Assets</Filter> + </None> + <None Include="Assets\GhostCubePlugin_armd.dll"> + <Filter>Assets</Filter> + </None> + <None Include="Assets\GhostCubePlugin_armr.dll"> + <Filter>Assets</Filter> + </None> + </ItemGroup> + <ItemGroup> + <Filter Include="Assets"> + <UniqueIdentifier>{1be0445e-de96-4b5e-9c3c-6b6fca9400ee}</UniqueIdentifier> + </Filter> + <Filter Include="SourceDLLs"> + <UniqueIdentifier>{c64a1209-12b4-40a7-9e1f-d482a039c93d}</UniqueIdentifier> + </Filter> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/UWP/GhostCubeScene_TemporaryKey.pfx b/unityplugin/GhostCubeScene/build/UWP/GhostCubeScene_TemporaryKey.pfx Binary files differnew file mode 100644 index 0000000..cbe5c59 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/UWP/GhostCubeScene_TemporaryKey.pfx diff --git a/unityplugin/GhostCubeScene/build/UWP/Package.appxmanifest b/unityplugin/GhostCubeScene/build/UWP/Package.appxmanifest new file mode 100644 index 0000000..68d1400 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/UWP/Package.appxmanifest @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp"> + <Identity Name="c0e3652f-bad5-4d3e-9591-4423d5adfb05" Publisher="CN=Egor" Version="1.0.0.0" /> + <mp:PhoneIdentity PhoneProductId="c0e3652f-bad5-4d3e-9591-4423d5adfb05" PhonePublisherId="00000000-0000-0000-0000-000000000000" /> + <Properties> + <DisplayName>GhostCubeSceneEmulator</DisplayName> + <PublisherDisplayName>Egor</PublisherDisplayName> + <Logo>Assets\StoreLogo.png</Logo> + </Properties> + <Dependencies> + <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" /> + </Dependencies> + <Resources> + <Resource Language="x-generate" /> + </Resources> + <Applications> + <Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="Unity Emulator.App"> + <uap:VisualElements DisplayName="Ghost Cube Scene Unity Emulator" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="UnityEmulator" BackgroundColor="transparent"> + <uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"> + </uap:DefaultTile> + <uap:SplashScreen Image="Assets\SplashScreen.png" /> + </uap:VisualElements> + </Application> + </Applications> + <Capabilities> + <Capability Name="internetClient" /> + </Capabilities> +</Package>
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Win32/!README!.txt b/unityplugin/GhostCubeScene/build/Win32/!README!.txt new file mode 100644 index 0000000..4326d21 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/!README!.txt @@ -0,0 +1,7 @@ +To build the demo for Win32 platform, open ..\..\build\Win32\UnityPlugin.sln solution + +To run the demo, execute one of the run_*.bat files (do not execute run.bat!) + +To run the sample from the Visual Studio, set the following debugging properties: +WorkingDirectory : $(AssetsPath) +Command Arguments : mode={D3D11|D3D12|GL} (do not use spaces!)
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Win32/AndroidManifest.xml b/unityplugin/GhostCubeScene/build/Win32/AndroidManifest.xml new file mode 100644 index 0000000..e6a7d0f --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/AndroidManifest.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.DiligentGrpahics.UnityEmulator" android:versionCode="1" android:versionName="1.0"> + <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="19" /> + <uses-feature android:glEsVersion="0x00030000" android:required="true"> + </uses-feature> + <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"> + </uses-permission> + <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" android:hasCode="true" android:name="com.DiligentGrpahics.UnityEmulator.UnityEmulatorApplication" android:debuggable="true"> + <!-- Our activity is the built-in NativeActivity framework class. + This will take care of integrating with our NDK code. --> + <activity android:name="com.DiligentGrpahics.UnityEmulator.UnityEmulatorNativeActivity" android:label="@string/app_name" android:configChanges="orientation|keyboardHidden"> + <!-- Tell NativeActivity the name of or .so --> + <meta-data android:name="android.app.lib_name" android:value="GhostCubeSceneEmulator" /> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + </application> +</manifest>
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Win32/GhostCubeScene-Debug.vgdbsettings b/unityplugin/GhostCubeScene/build/Win32/GhostCubeScene-Debug.vgdbsettings new file mode 100644 index 0000000..ddc029c --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/GhostCubeScene-Debug.vgdbsettings @@ -0,0 +1,90 @@ +<?xml version="1.0"?> +<VisualGDBProjectSettings2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <ConfigurationName>Debug</ConfigurationName> + <Project xsi:type="com.visualgdb.project.android"> + <CustomSourceDirectories> + <Directories /> + <PathStyle>MinGWWindowsSlash</PathStyle> + </CustomSourceDirectories> + <AndroidProjectPath>$(ProjectDir)</AndroidProjectPath> + </Project> + <Build xsi:type="com.visualgdb.build.android"> + <AndroidPlatform>android-19</AndroidPlatform> + <IsDebugConfiguration>true</IsDebugConfiguration> + <JNIOnlyBuild>false</JNIOnlyBuild> + <AdditionalDirectoriesToDeleteOnClean>bin;obj</AdditionalDirectoriesToDeleteOnClean> + <DeleteANTFilesOnClean>false</DeleteANTFilesOnClean> + <DoNotEditAndroidManifest>false</DoNotEditAndroidManifest> + <CustomActions /> + </Build> + <Debug xsi:type="com.visualgdb.debug.android"> + <AdditionalStartupCommands /> + <AdditionalGDBSettings> + <FilterSpuriousStoppedNotifications>false</FilterSpuriousStoppedNotifications> + <ForceSingleThreadedMode>false</ForceSingleThreadedMode> + <PendingBreakpointsSupported>true</PendingBreakpointsSupported> + <DisableChildRanges>false</DisableChildRanges> + <UseAppleExtensions>false</UseAppleExtensions> + <CanAcceptCommandsWhileRunning>false</CanAcceptCommandsWhileRunning> + <MakeLogFile>false</MakeLogFile> + <IgnoreModuleEventsWhileStepping>true</IgnoreModuleEventsWhileStepping> + <UseRelativePathsOnly>true</UseRelativePathsOnly> + <ExitAction>KillApp</ExitAction> + <Features> + <DisableAutoDetection>false</DisableAutoDetection> + <UseFrameParameter>false</UseFrameParameter> + <SimpleValuesFlagSupported>false</SimpleValuesFlagSupported> + <ListLocalsSupported>false</ListLocalsSupported> + <ByteLevelMemoryCommandsAvailable>false</ByteLevelMemoryCommandsAvailable> + <ThreadInfoSupported>false</ThreadInfoSupported> + <PendingBreakpointsSupported>false</PendingBreakpointsSupported> + <SupportTargetCommand>false</SupportTargetCommand> + </Features> + <DisableDisassembly>false</DisableDisassembly> + <ExamineMemoryWithXCommand>false</ExamineMemoryWithXCommand> + <StepIntoNewInstanceEntry>main</StepIntoNewInstanceEntry> + <ExamineRegistersInRawFormat>true</ExamineRegistersInRawFormat> + <EnableSmartStepping>false</EnableSmartStepping> + <DisableSignals>false</DisableSignals> + </AdditionalGDBSettings> + <LaunchGDBSettings xsi:type="GDBLaunchParametersAndroid" /> + <GenerateCtrlBreakInsteadOfCtrlC>false</GenerateCtrlBreakInsteadOfCtrlC> + <PreferredDevice /> + <UseDefaultInstallDir>true</UseDefaultInstallDir> + <RemotePort>5039</RemotePort> + <LocalPort>5039</LocalPort> + <GDBServerStartupTimeout>10000</GDBServerStartupTimeout> + <AdditionalGDBServerStartupDelay>0</AdditionalGDBServerStartupDelay> + <DoubleSlashWorkaround>false</DoubleSlashWorkaround> + <AlreadyRunningDecision>Relaunch</AlreadyRunningDecision> + <ShowLogCat>true</ShowLogCat> + <EnableThreadNameWatcher>true</EnableThreadNameWatcher> + <LaunchAMStartParameters /> + <StartupActivity /> + <GDBServer /> + <StandaloneExeSettings> + <DeploymentDirectory>/data/local/tmp</DeploymentDirectory> + <WorkingDirectory /> + <CommandLineArguments /> + <Environment> + <Records /> + </Environment> + </StandaloneExeSettings> + </Debug> + <CustomBuild> + <PreBuildActions /> + <PostBuildActions /> + <PreCleanActions /> + <PostCleanActions /> + </CustomBuild> + <CustomDebug> + <PreDebugActions /> + <PostDebugActions /> + <BreakMode>Default</BreakMode> + </CustomDebug> + <CustomShortcuts> + <Shortcuts /> + <ShowMessageAfterExecuting>true</ShowMessageAfterExecuting> + </CustomShortcuts> + <UserDefinedVariables /> +</VisualGDBProjectSettings2>
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Win32/GhostCubeScene-Release.vgdbsettings b/unityplugin/GhostCubeScene/build/Win32/GhostCubeScene-Release.vgdbsettings new file mode 100644 index 0000000..17856d6 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/GhostCubeScene-Release.vgdbsettings @@ -0,0 +1,81 @@ +<?xml version="1.0"?> +<VisualGDBProjectSettings2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <ConfigurationName>Release</ConfigurationName> + <Project xsi:type="com.visualgdb.project.android"> + <CustomSourceDirectories> + <Directories /> + <PathStyle>MinGWWindowsSlash</PathStyle> + </CustomSourceDirectories> + <AndroidProjectPath>$(ProjectDir)</AndroidProjectPath> + </Project> + <Build xsi:type="com.visualgdb.build.android"> + <AndroidPlatform>android-19</AndroidPlatform> + <IsDebugConfiguration>false</IsDebugConfiguration> + <JNIOnlyBuild>false</JNIOnlyBuild> + <AdditionalDirectoriesToDeleteOnClean>bin;obj</AdditionalDirectoriesToDeleteOnClean> + <DeleteANTFilesOnClean>false</DeleteANTFilesOnClean> + <DoNotEditAndroidManifest>false</DoNotEditAndroidManifest> + <CustomActions /> + </Build> + <Debug xsi:type="com.visualgdb.debug.android"> + <AdditionalStartupCommands /> + <AdditionalGDBSettings> + <FilterSpuriousStoppedNotifications>false</FilterSpuriousStoppedNotifications> + <ForceSingleThreadedMode>false</ForceSingleThreadedMode> + <PendingBreakpointsSupported>true</PendingBreakpointsSupported> + <DisableChildRanges>false</DisableChildRanges> + <UseAppleExtensions>false</UseAppleExtensions> + <CanAcceptCommandsWhileRunning>false</CanAcceptCommandsWhileRunning> + <MakeLogFile>false</MakeLogFile> + <IgnoreModuleEventsWhileStepping>true</IgnoreModuleEventsWhileStepping> + <UseRelativePathsOnly>false</UseRelativePathsOnly> + <ExitAction>KillApp</ExitAction> + <Features> + <DisableAutoDetection>false</DisableAutoDetection> + <UseFrameParameter>false</UseFrameParameter> + <SimpleValuesFlagSupported>false</SimpleValuesFlagSupported> + <ListLocalsSupported>false</ListLocalsSupported> + <ByteLevelMemoryCommandsAvailable>false</ByteLevelMemoryCommandsAvailable> + <ThreadInfoSupported>false</ThreadInfoSupported> + <PendingBreakpointsSupported>false</PendingBreakpointsSupported> + <SupportTargetCommand>false</SupportTargetCommand> + </Features> + <DisableDisassembly>false</DisableDisassembly> + <ExamineMemoryWithXCommand>false</ExamineMemoryWithXCommand> + <StepIntoNewInstanceEntry>main</StepIntoNewInstanceEntry> + <ExamineRegistersInRawFormat>true</ExamineRegistersInRawFormat> + <EnableSmartStepping>false</EnableSmartStepping> + <DisableSignals>false</DisableSignals> + </AdditionalGDBSettings> + <LaunchGDBSettings xsi:type="GDBLaunchParametersAndroid" /> + <GenerateCtrlBreakInsteadOfCtrlC>false</GenerateCtrlBreakInsteadOfCtrlC> + <UseDefaultInstallDir>false</UseDefaultInstallDir> + <RemotePort>5039</RemotePort> + <LocalPort>5039</LocalPort> + <GDBServerStartupTimeout>10000</GDBServerStartupTimeout> + <AdditionalGDBServerStartupDelay>0</AdditionalGDBServerStartupDelay> + <DoubleSlashWorkaround>false</DoubleSlashWorkaround> + <AlreadyRunningDecision>Ask</AlreadyRunningDecision> + <ShowLogCat>true</ShowLogCat> + <EnableThreadNameWatcher>true</EnableThreadNameWatcher> + <StandaloneExeSettings> + <DeploymentDirectory>/data/local/tmp</DeploymentDirectory> + </StandaloneExeSettings> + </Debug> + <CustomBuild> + <PreBuildActions /> + <PostBuildActions /> + <PreCleanActions /> + <PostCleanActions /> + </CustomBuild> + <CustomDebug> + <PreDebugActions /> + <PostDebugActions /> + <BreakMode>Default</BreakMode> + </CustomDebug> + <CustomShortcuts> + <Shortcuts /> + <ShowMessageAfterExecuting>true</ShowMessageAfterExecuting> + </CustomShortcuts> + <UserDefinedVariables /> +</VisualGDBProjectSettings2>
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Win32/GhostCubeScene.vcxproj b/unityplugin/GhostCubeScene/build/Win32/GhostCubeScene.vcxproj new file mode 100644 index 0000000..68dc552 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/GhostCubeScene.vcxproj @@ -0,0 +1,264 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|ARM"> + <Configuration>Debug</Configuration> + <Platform>ARM</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|ARM"> + <Configuration>Release</Configuration> + <Platform>ARM</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{516AA088-64B1-4DCF-9631-59F91F0E849A}</ProjectGuid> + <RootNamespace>GhostCubeScene</RootNamespace> + <WindowsTargetPlatformVersion>10.0.10240.0</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'"> + <PlatformToolset>v120</PlatformToolset> + <ConfigurationType>Makefile</ConfigurationType> + </PropertyGroup> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'"> + <PlatformToolset>v120</PlatformToolset> + <ConfigurationType>Makefile</ConfigurationType> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + <Import Project="..\Windows.Shared\GhostCubeScene.Shared.vcxitems" Label="Shared" Condition="Exists('..\Windows.Shared\GhostCubeScene.Shared.vcxitems')" /> + </ImportGroup> + <ImportGroup Label="Shared" /> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\..\..\..\diligentcore\Shared\build\Windows\Win32d.props" /> + <Import Project="..\Windows.Shared\GhostCubeScene.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\..\..\..\diligentcore\Shared\build\Windows\Win64d.props" /> + <Import Project="..\Windows.Shared\GhostCubeScene.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\..\..\..\diligentcore\Shared\build\Windows\Win32r.props" /> + <Import Project="..\Windows.Shared\GhostCubeScene.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\..\..\..\diligentcore\Shared\build\Windows\Win64r.props" /> + <Import Project="..\Windows.Shared\GhostCubeScene.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'"> + <Import Project="..\..\..\..\diligentcore\Shared\build\Windows\Android32d.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'"> + <Import Project="..\..\..\..\diligentcore\Shared\build\Windows\Android32r.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'"> + <NMakeForcedIncludes>$(ProjectDir)..\..\..\..\Common\Android\gcc_Debug.h;$(NMakeForcedIncludes)</NMakeForcedIncludes> + <NMakeOutput>$(ProjectDir)GhostCubeScene-Debug.vgdbsettings</NMakeOutput> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'"> + <NMakeForcedIncludes>$(ProjectDir)..\..\..\..\Common\Android\gcc_Release.h;$(NMakeForcedIncludes)</NMakeForcedIncludes> + <NMakeOutput>$(ProjectDir)GhostCubeScene-Release.vgdbsettings</NMakeOutput> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <SDLCheck>true</SDLCheck> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + </ClCompile> + <Link> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies> + </Link> + <PostBuildEvent> + <Command>copy "$(VC_ExecutablePath_x86_x86)\D3Dcompiler_47.dll" "$(TargetDir)"</Command> + <Message>Copying D3DCompiler_47.dll to $(TargetDir)...</Message> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <SDLCheck>true</SDLCheck> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + </ClCompile> + <Link> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies> + </Link> + <PostBuildEvent> + <Command>copy "$(VC_ExecutablePath_x64_x64)\D3Dcompiler_47.dll" "$(TargetDir)"</Command> + <Message>Copying D3DCompiler_47.dll to $(TargetDir)...</Message> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <SDLCheck>true</SDLCheck> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + </ClCompile> + <Link> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + <SubSystem>Windows</SubSystem> + <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies> + </Link> + <PostBuildEvent> + <Command>copy "$(VC_ExecutablePath_x86_x86)\D3Dcompiler_47.dll" "$(TargetDir)"</Command> + <Message>Copying D3DCompiler_47.dll to $(TargetDir)...</Message> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <SDLCheck>true</SDLCheck> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + </ClCompile> + <Link> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + <SubSystem>Windows</SubSystem> + <AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies> + </Link> + <PostBuildEvent> + <Command>copy "$(VC_ExecutablePath_x64_x64)\D3Dcompiler_47.dll" "$(TargetDir)"</Command> + <Message>Copying D3DCompiler_47.dll to $(TargetDir)...</Message> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemGroup> + <CustomBuild Include="..\..\..\build\Win32\bin\DLLs\x86\GhostCubePlugin_32d.dll"> + <FileType>Document</FileType> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy "%(RelativeDir)%(Filename).dll" "$(TargetDir)" +copy "%(RelativeDir)%(Filename).pdb" "$(TargetDir)"</Command> + <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Copying %(Filename).dll and %(Filename).pdb</Message> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(TargetDir)%(Filename).dll</Outputs> + </CustomBuild> + <CustomBuild Include="..\..\..\build\Win32\bin\DLLs\x86\GhostCubePlugin_32r.dll"> + <FileType>Document</FileType> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy "%(RelativeDir)%(Filename).dll" "$(TargetDir)" +copy "%(RelativeDir)%(Filename).pdb" "$(TargetDir)"</Command> + <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Copying %(Filename).dll and %(Filename).pdb</Message> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(TargetDir)%(Filename).dll</Outputs> + </CustomBuild> + <CustomBuild Include="..\..\..\build\Win32\bin\DLLs\x64\GhostCubePlugin_64d.dll"> + <FileType>Document</FileType> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy "%(RelativeDir)%(Filename).dll" "$(TargetDir)" +copy "%(RelativeDir)%(Filename).pdb" "$(TargetDir)"</Command> + <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Copying %(Filename).dll and %(Filename).pdb</Message> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)%(Filename).dll</Outputs> + </CustomBuild> + <CustomBuild Include="..\..\..\build\Win32\bin\DLLs\x64\GhostCubePlugin_64r.dll"> + <FileType>Document</FileType> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy "%(RelativeDir)%(Filename).dll" "$(TargetDir)" +copy "%(RelativeDir)%(Filename).pdb" "$(TargetDir)"</Command> + <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying %(Filename).dll and %(Filename).pdb</Message> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)%(Filename).dll</Outputs> + </CustomBuild> + <None Include="jni\Android.mk" /> + <None Include="jni\Application.mk" /> + </ItemGroup> + <ItemGroup> + <Xml Include="AndroidManifest.xml" /> + <Xml Include="build.xml" /> + <Xml Include="res\values\strings.xml" /> + <Xml Include="res\values\styles.xml" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\..\..\diligentcore\Common\build\Win32\Common.vcxproj"> + <Project>{7380f7e6-315f-4b4e-92eb-e6aeee865298}</Project> + </ProjectReference> + <ProjectReference Include="..\..\..\..\diligentcore\External\glew\build\Win32\glew_static.vcxproj"> + <Project>{664e6f0d-6784-4760-9565-d54f8eb1edf4}</Project> + </ProjectReference> + <ProjectReference Include="..\..\..\..\diligentcore\Platforms\Android\build\Windows\AndroidPlatform.vcxproj"> + <Project>{e333476e-15e3-4d43-a4cf-8748058b3be9}</Project> + </ProjectReference> + <ProjectReference Include="..\..\..\..\diligentcore\Platforms\Basic\build\Win32\BasicPlatform.vcxproj"> + <Project>{8ada5f93-7a38-4ad8-b8f5-1ffd4d4f630c}</Project> + </ProjectReference> + <ProjectReference Include="..\..\..\..\diligentcore\Platforms\Win32\build\Win32\WindowsPlatform.vcxproj"> + <Project>{58f32677-436b-412a-bbf8-2b1310d82cd8}</Project> + </ProjectReference> + <ProjectReference Include="..\..\..\UnityEmulator\build\Win32\UnityEmulator.vcxproj"> + <Project>{f40021ac-6d7b-4828-81c4-2d04f946a88e}</Project> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <ClCompile Include="..\..\src\Android\AndroidMain.cpp"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + </ClCompile> + <ClCompile Include="..\..\src\GhostCubeScene.cpp"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> + </ClCompile> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Win32/GhostCubeScene.vcxproj.filters b/unityplugin/GhostCubeScene/build/Win32/GhostCubeScene.vcxproj.filters new file mode 100644 index 0000000..3ecc134 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/GhostCubeScene.vcxproj.filters @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="DLLs"> + <UniqueIdentifier>{99c6c817-b02b-4b78-8b27-011a6f68c396}</UniqueIdentifier> + </Filter> + <Filter Include="Android"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Android\src"> + <UniqueIdentifier>{1e08520a-5f84-419f-9ab8-b20c4af153a3}</UniqueIdentifier> + </Filter> + <Filter Include="Android\jni"> + <UniqueIdentifier>{cd80a81f-81ce-45e0-a041-ad1424d39aef}</UniqueIdentifier> + </Filter> + <Filter Include="Android\res"> + <UniqueIdentifier>{450ce8ab-a0ce-402c-97d8-aa38f90f85bd}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <None Include="jni\Application.mk"> + <Filter>Android\jni</Filter> + </None> + <None Include="jni\Android.mk"> + <Filter>Android\jni</Filter> + </None> + </ItemGroup> + <ItemGroup> + <Xml Include="AndroidManifest.xml"> + <Filter>Android</Filter> + </Xml> + <Xml Include="build.xml"> + <Filter>Android</Filter> + </Xml> + <Xml Include="res\values\styles.xml"> + <Filter>Android\res</Filter> + </Xml> + <Xml Include="res\values\strings.xml"> + <Filter>Android\res</Filter> + </Xml> + </ItemGroup> + <ItemGroup> + <CustomBuild Include="..\..\..\build\Win32\bin\DLLs\x86\GhostCubePlugin_32d.dll"> + <Filter>DLLs</Filter> + </CustomBuild> + <CustomBuild Include="..\..\..\build\Win32\bin\DLLs\x86\GhostCubePlugin_32r.dll"> + <Filter>DLLs</Filter> + </CustomBuild> + <CustomBuild Include="..\..\..\build\Win32\bin\DLLs\x64\GhostCubePlugin_64d.dll"> + <Filter>DLLs</Filter> + </CustomBuild> + <CustomBuild Include="..\..\..\build\Win32\bin\DLLs\x64\GhostCubePlugin_64r.dll"> + <Filter>DLLs</Filter> + </CustomBuild> + </ItemGroup> + <ItemGroup> + <ClCompile Include="..\..\src\Android\AndroidMain.cpp"> + <Filter>Android\src</Filter> + </ClCompile> + <ClCompile Include="..\..\src\GhostCubeScene.cpp"> + <Filter>Android\src</Filter> + </ClCompile> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Win32/android_build.txt b/unityplugin/GhostCubeScene/build/Win32/android_build.txt new file mode 100644 index 0000000..226503c --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/android_build.txt @@ -0,0 +1,16 @@ +To build: + +1. cd to AntTweakBar\build\Win32 folder + +2. First time only, initialize the project (do not miss the dot at the end of the command): + android update project -p . + +3. ndk-build + +4. Build the APK + ant debug + +5. Install the APK + adb install -r ./bin/EngineSampleNativeActivity-debug.apk + +6. Run the app on the device
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Win32/build.xml b/unityplugin/GhostCubeScene/build/Win32/build.xml new file mode 100644 index 0000000..b2dcec5 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/build.xml @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="UnityEmulatorNativeActivity" default="help"> + + <!-- The local.properties file is created and updated by the 'android' tool. + It contains the path to the SDK. It should *NOT* be checked into + Version Control Systems. --> + <property file="local.properties" /> + + <!-- The ant.properties file can be created by you. It is only edited by the + 'android' tool to add properties to it. + This is the place to change some Ant specific build properties. + Here are some properties you may want to change/update: + + source.dir + The name of the source directory. Default is 'src'. + out.dir + The name of the output directory. Default is 'bin'. + + For other overridable properties, look at the beginning of the rules + files in the SDK, at tools/ant/build.xml + + Properties related to the SDK location or the project target should + be updated using the 'android' tool with the 'update' action. + + This file is an integral part of the build system for your + application and should be checked into Version Control Systems. + + --> + <property file="ant.properties" /> + + <property name="source.dir" value="../../../UnityEmulator/Src/Android" /> + <property name="asset.dir" value="../assets" /> + + + <!-- if sdk.dir was not set from one of the property file, then + get it from the ANDROID_HOME env var. + This must be done before we load project.properties since + the proguard config can use sdk.dir --> + <property environment="env" /> + <condition property="sdk.dir" value="${env.ANDROID_HOME}"> + <isset property="env.ANDROID_HOME" /> + </condition> + + <!-- The project.properties file is created and updated by the 'android' + tool, as well as ADT. + + This contains project specific properties such as project target, and library + dependencies. Lower level build properties are stored in ant.properties + (or in .classpath for Eclipse projects). + + This file is an integral part of the build system for your + application and should be checked into Version Control Systems. --> + <loadproperties srcFile="project.properties" /> + + <!-- quick check on sdk.dir --> + <fail + message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable." + unless="sdk.dir" + /> + + <!-- + Import per project custom build rules if present at the root of the project. + This is the place to put custom intermediary targets such as: + -pre-build + -pre-compile + -post-compile (This is typically used for code obfuscation. + Compiled code location: ${out.classes.absolute.dir} + If this is not done in place, override ${out.dex.input.absolute.dir}) + -post-package + -post-build + -pre-clean + --> + <import file="custom_rules.xml" optional="true" /> + + <!-- Import the actual build file. + + To customize existing targets, there are two options: + - Customize only one target: + - copy/paste the target into this file, *before* the + <import> task. + - customize it to your needs. + - Customize the whole content of build.xml + - copy/paste the content of the rules files (minus the top node) + into this file, replacing the <import> task. + - customize to your needs. + + *********************** + ****** IMPORTANT ****** + *********************** + In all cases you must update the value of version-tag below to read 'custom' instead of an integer, + in order to avoid having your file be overridden by tools such as "android update project" + --> + <!-- version-tag: 1 --> + <import file="${sdk.dir}/tools/ant/build.xml" /> + +</project> diff --git a/unityplugin/GhostCubeScene/build/Win32/jni/Android.mk b/unityplugin/GhostCubeScene/build/Win32/jni/Android.mk new file mode 100644 index 0000000..f3ec778 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/jni/Android.mk @@ -0,0 +1,117 @@ + +DEPENDENCY_PATH := $(call my-dir) +LOCAL_PATH := $(abspath $(DEPENDENCY_PATH)) + +include $(CLEAR_VARS) +# Project configuration +LOCAL_MODULE := GhostCubeSceneEmulator +LOCAL_CFLAGS := -std=c++11 +LOCAL_CPP_FEATURES := exceptions +LOCAL_LDLIBS := -lGLESv3 -lEGL -llog -landroid + +# !!!!! VERY IMPORTANT !!!!! +# Not too smart gcc linker links libraries in the order they are declared. From each library it only exports the +# methods/functions required to resolve CURRENTLY OUTSTANDING dependencies and ignores the rest. +# If a subsequent library then uses methods/functions that were not originally required by the objects, you will +# have missing dependencies. +LOCAL_STATIC_LIBRARIES := UnityEmulator-prebuilt GraphicsEngine-prebuilt GraphicsTools-prebuilt cpufeatures android_native_app_glue ndk_helper +# These libraries depend on each other +LOCAL_WHOLE_STATIC_LIBRARIES := AndroidPlatform-prebuilt BasicPlatform-prebuilt Common-prebuilt +LOCAL_SHARED_LIBRARIES := GhostCubePlugin-prebuilt GraphicsEngineOpenGL-prebuilt + +# Include paths +PROJECT_ROOT := $(LOCAL_PATH)/../../.. +ENGINE_ROOT := $(PROJECT_ROOT)/../.. +CORE_ROOT := $(ENGINE_ROOT)/diligentcore +TOOLS_ROOT := $(ENGINE_ROOT)/diligenttools +SAMPLES_ROOT := $(ENGINE_ROOT)/diligentsamples + +LOCAL_C_INCLUDES += $(PROJECT_ROOT)/../GhostCubePlugin/PluginSource/src/Unity +# include directories for static libraries are declared in corresponding LOCAL_EXPORT_C_INCLUDES sections + + +# Source files +#VisualGDBAndroid: AutoUpdateSourcesInNextLine +LOCAL_SRC_FILES := ../../../src/Android/AndroidMain.cpp ../../../src/GhostCubeScene.cpp + +include $(BUILD_SHARED_LIBRARY) + + +# Declare pre-built static libraries + +include $(CLEAR_VARS) +# Declare pre-built Common library +LOCAL_MODULE := UnityEmulator-prebuilt +LOCAL_SRC_FILES := $(PROJECT_ROOT)/../UnityEmulator/build/Win32/obj/local/$(TARGET_ARCH_ABI)/libUnityEmulator.a + +# The LOCAL_EXPORT_C_INCLUDES definition ensures that any module that depends on the +# prebuilt one will have its LOCAL_C_INCLUDES automatically prepended with the path to the +# prebuilt's include directory, and will thus be able to find headers inside that. +LOCAL_EXPORT_C_INCLUDES := $(PROJECT_ROOT)/../UnityEmulator/include + +include $(PREBUILT_STATIC_LIBRARY) + + +# Declare pre-built static libraries + +include $(CLEAR_VARS) +# Declare pre-built Common library +LOCAL_MODULE := Common-prebuilt +LOCAL_SRC_FILES := $(CORE_ROOT)/Common/build/Win32/obj/local/$(TARGET_ARCH_ABI)/libCommon.a + +# The LOCAL_EXPORT_C_INCLUDES definition ensures that any module that depends on the +# prebuilt one will have its LOCAL_C_INCLUDES automatically prepended with the path to the +# prebuilt's include directory, and will thus be able to find headers inside that. +LOCAL_EXPORT_C_INCLUDES := $(CORE_ROOT)/Common/include $(CORE_ROOT)/Common/interface $(CORE_ROOT)/Platforms/interface + +include $(PREBUILT_STATIC_LIBRARY) + + +include $(CLEAR_VARS) +# Declare pre-built AndroidPlatform library +LOCAL_MODULE := AndroidPlatform-prebuilt +LOCAL_SRC_FILES := $(CORE_ROOT)/Platforms/Android/build/Windows/obj/local/$(TARGET_ARCH_ABI)/libAndroidPlatform.a +LOCAL_EXPORT_C_INCLUDES := $(CORE_ROOT)/Platforms/interface +include $(PREBUILT_STATIC_LIBRARY) + +include $(CLEAR_VARS) +# Declare pre-built BasicPlatform library +LOCAL_MODULE := BasicPlatform-prebuilt +LOCAL_SRC_FILES := $(CORE_ROOT)/Platforms/Basic/build/Win32/obj/local/$(TARGET_ARCH_ABI)/libBasicPlatform.a +include $(PREBUILT_STATIC_LIBRARY) + + +include $(CLEAR_VARS) +# Declare pre-built GraphicsEngine library +LOCAL_MODULE := GraphicsEngine-prebuilt +LOCAL_SRC_FILES := $(CORE_ROOT)/Graphics/GraphicsEngine/build/Win32/obj/local/$(TARGET_ARCH_ABI)/libGraphicsEngine.a +LOCAL_EXPORT_C_INCLUDES := $(CORE_ROOT)/Graphics/GraphicsEngine/interface +include $(PREBUILT_STATIC_LIBRARY) + + +include $(CLEAR_VARS) +# Declare pre-built GraphicsEngineOpenGL library +LOCAL_MODULE := GraphicsEngineOpenGL-prebuilt +LOCAL_SRC_FILES := $(CORE_ROOT)/Graphics/GraphicsEngineOpenGL/build/Win32/libs/$(TARGET_ARCH_ABI)/libGraphicsEngineOpenGL.so +LOCAL_EXPORT_C_INCLUDES := $(CORE_ROOT)/Graphics/GraphicsEngineOpenGL/interface +include $(PREBUILT_SHARED_LIBRARY) + +include $(CLEAR_VARS) +# Declare pre-built Graphics Tools library +LOCAL_MODULE := GraphicsTools-prebuilt +LOCAL_SRC_FILES := $(CORE_ROOT)/Graphics/GraphicsTools/build/Win32/obj/local/$(TARGET_ARCH_ABI)/libGraphicsTools.a +LOCAL_EXPORT_C_INCLUDES := $(CORE_ROOT)/Graphics/GraphicsTools/include +include $(PREBUILT_STATIC_LIBRARY) + + +include $(CLEAR_VARS) +# Declare pre-built GhostCubePlugin library +LOCAL_MODULE := GhostCubePlugin-prebuilt +LOCAL_SRC_FILES := $(PROJECT_ROOT)/../GhostCubePlugin/PluginSource/build/Win32/libs/$(TARGET_ARCH_ABI)/libGhostCubePlugin.so +include $(PREBUILT_SHARED_LIBRARY) + + +$(call import-module,android/ndk_helper) +$(call import-module,android/native_app_glue) +$(call import-module,android/cpufeatures) + diff --git a/unityplugin/GhostCubeScene/build/Win32/jni/Application.mk b/unityplugin/GhostCubeScene/build/Win32/jni/Application.mk new file mode 100644 index 0000000..08521c2 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/jni/Application.mk @@ -0,0 +1,7 @@ +# Generated by VisualGDB + +DEPENDENCY_PATH := $(call my-dir) +LOCAL_PATH := $(abspath $(DEPENDENCY_PATH)) +include $(LOCAL_PATH)/../../../../../diligentcore/Common/make/AppCommon.mk + +APP_MODULES := GhostCubeSceneEmulator
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Win32/res/drawable-hdpi/ic_launcher.png b/unityplugin/GhostCubeScene/build/Win32/res/drawable-hdpi/ic_launcher.png Binary files differnew file mode 100644 index 0000000..ea01cbf --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/res/drawable-hdpi/ic_launcher.png diff --git a/unityplugin/GhostCubeScene/build/Win32/res/drawable-ldpi/ic_launcher.png b/unityplugin/GhostCubeScene/build/Win32/res/drawable-ldpi/ic_launcher.png Binary files differnew file mode 100644 index 0000000..a3d6a18 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/res/drawable-ldpi/ic_launcher.png diff --git a/unityplugin/GhostCubeScene/build/Win32/res/drawable-mdpi/ic_launcher.png b/unityplugin/GhostCubeScene/build/Win32/res/drawable-mdpi/ic_launcher.png Binary files differnew file mode 100644 index 0000000..8f80897 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/res/drawable-mdpi/ic_launcher.png diff --git a/unityplugin/GhostCubeScene/build/Win32/res/drawable-xhdpi/ic_launcher.png b/unityplugin/GhostCubeScene/build/Win32/res/drawable-xhdpi/ic_launcher.png Binary files differnew file mode 100644 index 0000000..b779a2b --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/res/drawable-xhdpi/ic_launcher.png diff --git a/unityplugin/GhostCubeScene/build/Win32/res/layout/widgets.xml b/unityplugin/GhostCubeScene/build/Win32/res/layout/widgets.xml new file mode 100644 index 0000000..36b64f3 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/res/layout/widgets.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:gravity="top" + android:orientation="vertical" > + + <TextView + android:id="@+id/textViewFPS" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="right" + android:text="0.0 FPS" + android:textAppearance="?android:attr/textAppearanceMedium" + android:textColor="@android:color/white" /> + +</LinearLayout>
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Win32/res/values-v11/styles.xml b/unityplugin/GhostCubeScene/build/Win32/res/values-v11/styles.xml new file mode 100644 index 0000000..541752f --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/res/values-v11/styles.xml @@ -0,0 +1,11 @@ +<resources> + + <!-- + Base application theme for API 11+. This theme completely replaces + AppBaseTheme from res/values/styles.xml on API 11+ devices. + --> + <style name="AppBaseTheme" parent="android:Theme.Holo.Light"> + <!-- API 11 theme customizations can go here. --> + </style> + +</resources>
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Win32/res/values-v14/styles.xml b/unityplugin/GhostCubeScene/build/Win32/res/values-v14/styles.xml new file mode 100644 index 0000000..f20e015 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/res/values-v14/styles.xml @@ -0,0 +1,12 @@ +<resources> + + <!-- + Base application theme for API 14+. This theme completely replaces + AppBaseTheme from BOTH res/values/styles.xml and + res/values-v11/styles.xml on API 14+ devices. + --> + <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar"> + <!-- API 14 theme customizations can go here. --> + </style> + +</resources>
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Win32/res/values/strings.xml b/unityplugin/GhostCubeScene/build/Win32/res/values/strings.xml new file mode 100644 index 0000000..f29ce4e --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/res/values/strings.xml @@ -0,0 +1,6 @@ +<resources> + + <string name="app_name">Ghost cube scene emulator</string> + <string name="plugin_name">GhostCubePlugin</string> + +</resources>
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Win32/res/values/styles.xml b/unityplugin/GhostCubeScene/build/Win32/res/values/styles.xml new file mode 100644 index 0000000..4a10ca4 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/res/values/styles.xml @@ -0,0 +1,20 @@ +<resources> + + <!-- + Base application theme, dependent on API level. This theme is replaced + by AppBaseTheme from res/values-vXX/styles.xml on newer devices. + --> + <style name="AppBaseTheme" parent="android:Theme.Light"> + <!-- + Theme customizations available in newer API levels can go in + res/values-vXX/styles.xml, while customizations related to + backward-compatibility can go here. + --> + </style> + + <!-- Application theme. --> + <style name="AppTheme" parent="AppBaseTheme"> + <!-- All customizations that are NOT specific to a particular API-level can go here. --> + </style> + +</resources>
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Win32/run.bat b/unityplugin/GhostCubeScene/build/Win32/run.bat new file mode 100644 index 0000000..043e72e --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/run.bat @@ -0,0 +1,15 @@ +@echo off +cd ..\. +SET SAMPLE_PATH="..\..\..\..\build\Win32\bin\%~1\GhostCubeScene\GhostCubeScene.exe" + +if not exist %SAMPLE_PATH% ( + rem echo Executable not found in the diligentsamples\build\Win32 directory. Checking parent directory. + SET SAMPLE_PATH="..\"%SAMPLE_PATH% +) + +if not exist %SAMPLE_PATH% ( + echo Executable not found. Please build the solution for the selected configuration. + exit /B 1 +) + +%SAMPLE_PATH% mode=%~2 diff --git a/unityplugin/GhostCubeScene/build/Win32/run_d3d11_32d.bat b/unityplugin/GhostCubeScene/build/Win32/run_d3d11_32d.bat new file mode 100644 index 0000000..fcbcf78 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/run_d3d11_32d.bat @@ -0,0 +1 @@ +call run.bat Debug_Win32 D3D11
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Win32/run_d3d11_32r.bat b/unityplugin/GhostCubeScene/build/Win32/run_d3d11_32r.bat new file mode 100644 index 0000000..5b6c8f9 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/run_d3d11_32r.bat @@ -0,0 +1 @@ +call run.bat Release_Win32 D3D11
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Win32/run_d3d11_64d.bat b/unityplugin/GhostCubeScene/build/Win32/run_d3d11_64d.bat new file mode 100644 index 0000000..7b0b91b --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/run_d3d11_64d.bat @@ -0,0 +1 @@ +call run.bat Debug_x64 D3D11
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Win32/run_d3d11_64r.bat b/unityplugin/GhostCubeScene/build/Win32/run_d3d11_64r.bat new file mode 100644 index 0000000..e0ebaf4 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/run_d3d11_64r.bat @@ -0,0 +1 @@ +call run.bat Release_x64 D3D11
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Win32/run_d3d12_32r.bat b/unityplugin/GhostCubeScene/build/Win32/run_d3d12_32r.bat new file mode 100644 index 0000000..848b7b8 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/run_d3d12_32r.bat @@ -0,0 +1 @@ +call run.bat Release_Win32 D3D12
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Win32/run_d3d12_64d.bat b/unityplugin/GhostCubeScene/build/Win32/run_d3d12_64d.bat new file mode 100644 index 0000000..f74f35c --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/run_d3d12_64d.bat @@ -0,0 +1 @@ +call run.bat Debug_x64 D3D12
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Win32/run_d3d12_64r.bat b/unityplugin/GhostCubeScene/build/Win32/run_d3d12_64r.bat new file mode 100644 index 0000000..21e7b30 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/run_d3d12_64r.bat @@ -0,0 +1 @@ +call run.bat Release_x64 D3D12
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Win32/run_gl_32d.bat b/unityplugin/GhostCubeScene/build/Win32/run_gl_32d.bat new file mode 100644 index 0000000..bd2e2d5 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/run_gl_32d.bat @@ -0,0 +1 @@ +call run.bat Debug_Win32 GL
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Win32/run_gl_32r.bat b/unityplugin/GhostCubeScene/build/Win32/run_gl_32r.bat new file mode 100644 index 0000000..25b66c3 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/run_gl_32r.bat @@ -0,0 +1 @@ +call run.bat Release_Win32 GL
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Win32/run_gl_64d.bat b/unityplugin/GhostCubeScene/build/Win32/run_gl_64d.bat new file mode 100644 index 0000000..c01b4e3 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/run_gl_64d.bat @@ -0,0 +1 @@ +call run.bat Debug_x64 GL
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Win32/run_gl_64r.bat b/unityplugin/GhostCubeScene/build/Win32/run_gl_64r.bat new file mode 100644 index 0000000..3025ab2 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Win32/run_gl_64r.bat @@ -0,0 +1 @@ +call run.bat Release_x64 GL
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Windows.Shared/GhostCubeScene.Shared.vcxitems b/unityplugin/GhostCubeScene/build/Windows.Shared/GhostCubeScene.Shared.vcxitems new file mode 100644 index 0000000..4bdbd66 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Windows.Shared/GhostCubeScene.Shared.vcxitems @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup Label="Globals"> + <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> + <HasSharedItems>true</HasSharedItems> + <ItemsProjectGuid>{f26d9028-cfb4-45bc-9ab9-28e332480564}</ItemsProjectGuid> + <ItemsRootNamespace>GhostCubeScene</ItemsRootNamespace> + <ItemsProjectName>GhostCubeScene.Shared</ItemsProjectName> + <SharedGUID>ee85241f-efeb-4c0a-a2dc-724cc15edec0</SharedGUID> + </PropertyGroup> + <ItemDefinitionGroup> + <ClCompile> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory)</AdditionalIncludeDirectories> + </ClCompile> + </ItemDefinitionGroup> + <ItemGroup> + <ProjectCapability Include="SourceItemsFromImports" /> + </ItemGroup> + <ItemGroup> + <ClCompile Include="$(MSBuildThisFileDirectory)..\..\src\GhostCubeScene.cpp" /> + <ClCompile Include="$(MSBuildThisFileDirectory)..\..\src\GhostCubeSceneResTrsnHelper.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="$(MSBuildThisFileDirectory)..\..\src\GhostCubeScene.h" /> + <ClInclude Include="$(MSBuildThisFileDirectory)..\..\src\GhostCubeSceneResTrsnHelper.h" /> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Windows.Shared/GhostCubeScene.Shared.vcxitems.filters b/unityplugin/GhostCubeScene/build/Windows.Shared/GhostCubeScene.Shared.vcxitems.filters new file mode 100644 index 0000000..674de74 --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Windows.Shared/GhostCubeScene.Shared.vcxitems.filters @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="src"> + <UniqueIdentifier>{c8b2817b-474c-4084-89e1-6e79260fbf11}</UniqueIdentifier> + </Filter> + <Filter Include="include"> + <UniqueIdentifier>{038e521a-1981-43c0-a93a-5dcb35a59f70}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="$(MSBuildThisFileDirectory)..\..\src\GhostCubeScene.cpp"> + <Filter>src</Filter> + </ClCompile> + <ClCompile Include="$(MSBuildThisFileDirectory)..\..\src\GhostCubeSceneResTrsnHelper.cpp"> + <Filter>src</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="$(MSBuildThisFileDirectory)..\..\src\GhostCubeScene.h"> + <Filter>include</Filter> + </ClInclude> + <ClInclude Include="$(MSBuildThisFileDirectory)..\..\src\GhostCubeSceneResTrsnHelper.h"> + <Filter>include</Filter> + </ClInclude> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/Windows.Shared/GhostCubeScene.props b/unityplugin/GhostCubeScene/build/Windows.Shared/GhostCubeScene.props new file mode 100644 index 0000000..a0c341c --- /dev/null +++ b/unityplugin/GhostCubeScene/build/Windows.Shared/GhostCubeScene.props @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ImportGroup Label="PropertySheets" /> + <PropertyGroup Label="UserMacros"> + <ProjectRoot>..\..</ProjectRoot> + <AssetsPath>$(ProjectRoot)\build\assets</AssetsPath> + <EngineRoot>$(ProjectRoot)\..\..</EngineRoot> + <CoreRoot>$(EngineRoot)\diligentcore</CoreRoot> + <ToolsRoot>$(EngineRoot)\diligenttools</ToolsRoot> + </PropertyGroup> + <PropertyGroup> + <IncludePath>$(CoreRoot)\Graphics\GraphicsEngine\interface;$(CoreRoot)\Graphics\GraphicsEngineD3D11\interface;$(CoreRoot)\Graphics\GraphicsEngineD3D12\interface;$(CoreRoot)\Graphics\GraphicsEngineOpenGL\interface;$(CoreRoot)\Common\include;$(CoreRoot)\Common\interface;$(CoreRoot)\Platforms\interface;$(CoreRoot)\Graphics\GraphicsTools\include;$(ProjectRoot)\..\UnityEmulator\Include;$(ProjectRoot)\..\GhostCubePlugin\PluginSource\src\Unity;$(IncludePath)</IncludePath> + </PropertyGroup> + <ItemDefinitionGroup> + <PostBuildEvent /> + <Link> + <AdditionalDependencies>d3d11.lib;d3d12.lib;dxgi.lib;d3dcompiler.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <BuildMacro Include="ProjectRoot"> + <Value>$(ProjectRoot)</Value> + </BuildMacro> + <BuildMacro Include="AssetsPath"> + <Value>$(AssetsPath)</Value> + </BuildMacro> + <BuildMacro Include="EngineRoot"> + <Value>$(EngineRoot)</Value> + </BuildMacro> + <BuildMacro Include="CoreRoot"> + <Value>$(CoreRoot)</Value> + </BuildMacro> + <BuildMacro Include="ToolsRoot"> + <Value>$(ToolsRoot)</Value> + </BuildMacro> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/build/assets/shaders/Mirror.psh b/unityplugin/GhostCubeScene/build/assets/shaders/Mirror.psh new file mode 100644 index 0000000..86b4beb --- /dev/null +++ b/unityplugin/GhostCubeScene/build/assets/shaders/Mirror.psh @@ -0,0 +1,14 @@ + +Texture2D g_tex2Reflection; +SamplerState g_tex2Reflection_sampler; + +struct PSInput +{ + float4 Pos : SV_POSITION; + float2 UV : TEX_COORD; +}; + +float4 main(PSInput In) : SV_Target +{ + return g_tex2Reflection.Sample(g_tex2Reflection_sampler, In.UV); +} diff --git a/unityplugin/GhostCubeScene/build/assets/shaders/Mirror.vsh b/unityplugin/GhostCubeScene/build/assets/shaders/Mirror.vsh new file mode 100644 index 0000000..bdeaaca --- /dev/null +++ b/unityplugin/GhostCubeScene/build/assets/shaders/Mirror.vsh @@ -0,0 +1,33 @@ +cbuffer Constants +{ + float4x4 g_WorldViewProj; +}; + +struct PSInput +{ + float4 Pos : SV_POSITION; + float2 UV : TEX_COORD; +}; + +PSInput main(uint VertId : SV_VertexID) +{ + float4 Pos[] = + { + float4(-0.5, +0.5, 0.0, 1.0), + float4(-0.5, -0.5, 0.0, 1.0), + float4(+0.5, +0.5, 0.0, 1.0), + float4(+0.5, -0.5, 0.0, 1.0) + }; + float2 UV[] = + { + float2(0.0, 1.0), + float2(0.0, 0.0), + float2(1.0, 1.0), + float2(1.0, 0.0) + }; + + PSInput ps; + ps.Pos = mul( Pos[VertId], g_WorldViewProj); + ps.UV = UV[VertId]; + return ps; +} diff --git a/unityplugin/GhostCubeScene/src/Android/AndroidMain.cpp b/unityplugin/GhostCubeScene/src/Android/AndroidMain.cpp new file mode 100644 index 0000000..e2e659c --- /dev/null +++ b/unityplugin/GhostCubeScene/src/Android/AndroidMain.cpp @@ -0,0 +1,58 @@ +/* Copyright 2015-2017 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +// This header must be included, otherwise the linker will somehow fail to find android_main() +#include <unordered_map> +#include <android_native_app_glue.h> +#include "IUnityInterface.h" + +extern "C" void UNITY_INTERFACE_EXPORT UNITY_INTERFACE_API SetMatrixFromUnity + (float m00, float m01, float m02, float m03, + float m10, float m11, float m12, float m13, + float m20, float m21, float m22, float m23, + float m30, float m31, float m32, float m33); + +extern "C" void UNITY_INTERFACE_EXPORT UNITY_INTERFACE_API SetTexturesFromUnity(void* renderTargetHandle, void *depthBufferHandle); + +// Actual implementation of the android_main() +void android_main_impl( struct android_app* state ); + + +void *LoadPluginFunction(const char *name) +{ + static std::unordered_map<std::string, void*> functions_map = + { + {"SetMatrixFromUnity", reinterpret_cast<void*>(SetMatrixFromUnity) }, + {"SetTexturesFromUnity", reinterpret_cast<void*>(SetTexturesFromUnity) } + }; + auto it = functions_map.find(name); + return it != functions_map.end() ? it->second : nullptr; +} + +// When a native library is being loaded, JNI loader looks for the android_main function. +// If the entry does not export that function, it will fail to load. So we have to define +// android_main() in every android native application +void android_main( android_app* state ) +{ + android_main_impl(state); +} diff --git a/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp b/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp new file mode 100644 index 0000000..2fb3a97 --- /dev/null +++ b/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp @@ -0,0 +1,215 @@ +/* Copyright 2015-2017 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +#include "GhostCubeScene.h" +#include "BasicMath.h" +#include <algorithm> +#include "BasicShaderSourceStreamFactory.h" +#include "GraphicsUtilities.h" +#include "MapHelper.h" +#include "CommonlyUsedStates.h" + +#if defined(PLATFORM_WIN32) || defined(PLATFORM_UNIVERSAL_WINDOWS) +# define D3D12_SUPPORTED 1 +#else +# define D3D12_SUPPORTED 0 +#endif + +#if D3D12_SUPPORTED +# include "GhostCubeSceneResTrsnHelper.h" +#endif + +using namespace Diligent; + +UnitySceneBase* CreateScene() +{ + return new GhostCubeScene; +} + + +void GhostCubeScene::OnPluginLoad(TLoadPluginFunction LoadPluginFunctionCallback) +{ + SetMatrixFromUnity = reinterpret_cast<TSetMatrixFromUnity>( LoadPluginFunctionCallback("SetMatrixFromUnity") ); + VERIFY_EXPR(SetMatrixFromUnity != nullptr); + + SetTexturesFromUnity = reinterpret_cast<TSetTexturesFromUnity>( LoadPluginFunctionCallback("SetTexturesFromUnity") ); + VERIFY_EXPR(SetTexturesFromUnity != nullptr); +} + +void GhostCubeScene::OnPluginUnload() +{ +} + +void GhostCubeScene::OnGraphicsInitialized() +{ + auto pDevice = m_DiligentGraphics->GetDevice(); + TextureDesc TexDesc; + TexDesc.Name = "Mirror render target"; + TexDesc.Type = RESOURCE_DIM_TEX_2D; + TexDesc.Width = 1024; + TexDesc.Height = 1024; + TexDesc.Format = TEX_FORMAT_RGBA8_UNORM_SRGB; + TexDesc.BindFlags = BIND_RENDER_TARGET | BIND_SHADER_RESOURCE; + TexDesc.ClearValue.Color[0] = 0.f; + TexDesc.ClearValue.Color[1] = 0.2f; + TexDesc.ClearValue.Color[2] = 0.5f; + TexDesc.ClearValue.Color[3] = 1.0f; + pDevice->CreateTexture(TexDesc, TextureData(), &m_pRenderTarget); + + TexDesc.Name = "Mirror depth buffer"; + TexDesc.Format = TEX_FORMAT_D32_FLOAT; + TexDesc.BindFlags = BIND_DEPTH_STENCIL | BIND_SHADER_RESOURCE; + TexDesc.ClearValue.DepthStencil.Depth = 0.f; + pDevice->CreateTexture(TexDesc, TextureData(), &m_pDepthBuffer); + + auto deviceType = pDevice->GetDeviceCaps().DevType; + { + const auto &SCDesc = m_DiligentGraphics->GetSwapChain()->GetDesc(); + auto UseReverseZ = m_DiligentGraphics->UsesReverseZ(); + + PipelineStateDesc PSODesc; + PSODesc.IsComputePipeline = false; + PSODesc.Name = "Render sample cube PSO"; + PSODesc.GraphicsPipeline.NumRenderTargets = 1; + + PSODesc.GraphicsPipeline.RTVFormats[0] = SCDesc.ColorBufferFormat == TEX_FORMAT_RGBA8_UNORM ? TEX_FORMAT_RGBA8_UNORM_SRGB : SCDesc.ColorBufferFormat; + PSODesc.GraphicsPipeline.DSVFormat = SCDesc.DepthBufferFormat; + PSODesc.GraphicsPipeline.PrimitiveTopologyType = PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE; + PSODesc.GraphicsPipeline.RasterizerDesc.CullMode = CULL_MODE_BACK; + PSODesc.GraphicsPipeline.DepthStencilDesc.DepthFunc = UseReverseZ ? COMPARISON_FUNC_GREATER_EQUAL : COMPARISON_FUNC_LESS_EQUAL; + + ShaderCreationAttribs CreationAttribs; + BasicShaderSourceStreamFactory BasicSSSFactory("shaders"); + CreationAttribs.pShaderSourceStreamFactory = &BasicSSSFactory; + CreationAttribs.SourceLanguage = SHADER_SOURCE_LANGUAGE_HLSL; + CreationAttribs.Desc.DefaultVariableType = SHADER_VARIABLE_TYPE_STATIC; + + CreateUniformBuffer(pDevice, sizeof(float4x4), "Mirror VS constants CB", &m_pMirrorVSConstants); + + RefCntAutoPtr<IShader> pVS; + { + CreationAttribs.Desc.ShaderType = SHADER_TYPE_VERTEX; + CreationAttribs.EntryPoint = "main"; + CreationAttribs.Desc.Name = "Mirror VS"; + CreationAttribs.FilePath = "Mirror.vsh"; + pDevice->CreateShader(CreationAttribs, &pVS); + pVS->GetShaderVariable("Constants")->Set(m_pMirrorVSConstants); + } + + + RefCntAutoPtr<IShader> pPS; + { + CreationAttribs.Desc.ShaderType = SHADER_TYPE_PIXEL; + CreationAttribs.EntryPoint = "main"; + CreationAttribs.Desc.Name = "Mirror PS"; + CreationAttribs.FilePath = "Mirror.psh"; + StaticSamplerDesc StaticSamplers[] = + { + {"g_tex2Reflection", Sam_Aniso4xClamp} + }; + CreationAttribs.Desc.StaticSamplers = StaticSamplers; + CreationAttribs.Desc.NumStaticSamplers = _countof(StaticSamplers); + pDevice->CreateShader(CreationAttribs, &pPS); + pPS->GetShaderVariable("g_tex2Reflection")->Set(m_pRenderTarget->GetDefaultView(TEXTURE_VIEW_SHADER_RESOURCE)); + } + + PSODesc.GraphicsPipeline.pVS = pVS; + PSODesc.GraphicsPipeline.pPS = pPS; + pDevice->CreatePipelineState(PSODesc, &m_pMirrorPSO); + } +#if D3D12_SUPPORTED + m_pStateTransitionHandler.reset(new GhostCubeSceneResTrsnHelper(*this)); +#endif +} + +void GhostCubeScene::Render(UnityRenderingEvent RenderEventFunc, double CurrTime, double ElapsedTime) +{ + auto pDevice = m_DiligentGraphics->GetDevice(); + auto pCtx = m_DiligentGraphics->GetContext(); + auto DevType = pDevice->GetDeviceCaps().DevType; + bool IsDX = DevType == DeviceType::D3D11 || DevType == DeviceType::D3D12; + auto ReverseZ = m_DiligentGraphics->UsesReverseZ(); + + // In OpenGL, render targets must be bound to the pipeline to be cleared + ITextureView *pRTVs[] = { m_pRenderTarget->GetDefaultView(TEXTURE_VIEW_RENDER_TARGET) }; + ITextureView *pDSV = m_pDepthBuffer->GetDefaultView(TEXTURE_VIEW_DEPTH_STENCIL); + pCtx->SetRenderTargets(1, pRTVs, pDSV); + const float ClearColor[] = { 0.f, 0.2f, 0.5f, 1.0f }; + pCtx->ClearRenderTarget(pRTVs[0], ClearColor); + pCtx->ClearDepthStencil(pDSV, CLEAR_DEPTH_FLAG, ReverseZ ? 0.f : 1.f, 0); + + if (DevType == DeviceType::D3D12) + { + // D3D12 context must be flushed so that the commands are submitted before the + // commands issued by the plugin + pCtx->Flush(); + } + + + // Render ghost cube into the mirror texture + { + // Create fake reflection matrix + float4x4 CubeWorldView = scaleMatrix(1,2,1) * rotationY( -static_cast<float>(CurrTime) * 2.0f) * rotationX(-PI_F*0.3f) * translationMatrix(0.f, 0.0f, 10.0f); + float NearPlane = 0.3f; + float FarPlane = 1000.f; + if (ReverseZ) + std::swap(NearPlane, FarPlane); + float aspectRatio = 1.0f; + float4x4 ReflectionCameraProj = Projection(PI_F / 4.f, aspectRatio, NearPlane, FarPlane, IsDX); + auto wvp = CubeWorldView * ReflectionCameraProj; + float ReverseZ = IsDX ? -1.f : +1.f; + SetMatrixFromUnity(wvp._m00, ReverseZ * wvp._m01, wvp._m02, wvp._m03, + wvp._m10, ReverseZ * wvp._m11, wvp._m12, wvp._m13, + wvp._m20, ReverseZ * wvp._m21, wvp._m22, wvp._m23, + wvp._m30, ReverseZ * wvp._m31, wvp._m32, wvp._m33); + + SetTexturesFromUnity(m_pRenderTarget->GetNativeHandle(), m_pDepthBuffer->GetNativeHandle()); + + // Call the plugin + RenderEventFunc(0); + } + + // We need to invalidate the context state since the plugin has used d3d11 context + pCtx->InvalidateState(); + pCtx->SetRenderTargets(0, nullptr, nullptr); + pCtx->SetPipelineState(m_pMirrorPSO); + pCtx->CommitShaderResources(nullptr, COMMIT_SHADER_RESOURCES_FLAG_TRANSITION_RESOURCES); + + { + float4x4 MirrorWorldView = scaleMatrix(5,5,5) * rotationX(PI_F*0.6f) * translationMatrix(0.f, -3.0f, 10.0f); + float NearPlane = 0.3f; + float FarPlane = 1000.f; + if (ReverseZ) + std::swap(NearPlane, FarPlane); + float AspectRatio = static_cast<float>(m_WindowWidth) / static_cast<float>(std::max(m_WindowHeight, 1)); + float4x4 MainCameraProj = Projection(PI_F / 3.f, AspectRatio, NearPlane, FarPlane, IsDX); + auto wvp = MirrorWorldView * MainCameraProj; + MapHelper<float4x4> CBConstants(pCtx, m_pMirrorVSConstants, MAP_WRITE, MAP_FLAG_DISCARD); + *CBConstants = transposeMatrix(wvp); + } + + DrawAttribs DrawAttrs; + DrawAttrs.NumVertices = 4; + DrawAttrs.Topology = PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP; + pCtx->Draw(DrawAttrs); +} diff --git a/unityplugin/GhostCubeScene/src/GhostCubeScene.h b/unityplugin/GhostCubeScene/src/GhostCubeScene.h new file mode 100644 index 0000000..546acaf --- /dev/null +++ b/unityplugin/GhostCubeScene/src/GhostCubeScene.h @@ -0,0 +1,58 @@ +/* Copyright 2015-2017 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +#include "UnitySceneBase.h" +#include "IUnityInterface.h" + +using TSetMatrixFromUnity = void (UNITY_INTERFACE_API *) (float m00, float m01, float m02, float m03, + float m10, float m11, float m12, float m13, + float m20, float m21, float m22, float m23, + float m30, float m31, float m32, float m33); +using TSetTexturesFromUnity = void (UNITY_INTERFACE_API *)(void* renderTargetHandle, void *depthBufferHandle); + +class GhostCubeScene : public UnitySceneBase +{ +public: + virtual void OnPluginLoad(TLoadPluginFunction LoadPluginFunctionCallback)override final; + + virtual void OnPluginUnload()override final; + + virtual void OnGraphicsInitialized()override final; + + virtual void Render(UnityRenderingEvent RenderEventFunc, double CurrTime, double ElapsedTime)override final; + + virtual const char* GetSceneName()override final { return "Ghost Cube Scene"; } + + virtual const char* GetPluginName()override final { return "GhostCubePlugin"; } + +private: + friend class GhostCubeSceneResTrsnHelper; + + TSetMatrixFromUnity SetMatrixFromUnity; + TSetTexturesFromUnity SetTexturesFromUnity; + + Diligent::RefCntAutoPtr<Diligent::ITexture> m_pRenderTarget; + Diligent::RefCntAutoPtr<Diligent::ITexture> m_pDepthBuffer; + Diligent::RefCntAutoPtr<Diligent::IBuffer> m_pMirrorVSConstants; + Diligent::RefCntAutoPtr<Diligent::IPipelineState> m_pMirrorPSO; +};
\ No newline at end of file diff --git a/unityplugin/GhostCubeScene/src/GhostCubeSceneResTrsnHelper.cpp b/unityplugin/GhostCubeScene/src/GhostCubeSceneResTrsnHelper.cpp new file mode 100644 index 0000000..504a633 --- /dev/null +++ b/unityplugin/GhostCubeScene/src/GhostCubeSceneResTrsnHelper.cpp @@ -0,0 +1,62 @@ +/* Copyright 2015-2017 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ +#include <d3d12.h> + +#include "GhostCubeSceneResTrsnHelper.h" +#include "GhostCubeScene.h" +#include "IUnityGraphicsD3D12.h" +#include "TextureD3D12.h" +#include "DeviceContextD3D12.h" +#include "ValidatedCast.h" + + +using namespace Diligent; + +void GhostCubeSceneResTrsnHelper::TransitionResources(int stateCount, UnityGraphicsD3D12ResourceState* states) +{ + if (stateCount == 0) + return; + + auto *pCtx = ValidatedCast<IDeviceContextD3D12>(m_TheScene.m_DiligentGraphics->GetContext()); + for (int i = 0; i < stateCount; ++i) + { + auto &ResState = states[i]; + ITextureD3D12 *pMirrorRT = ValidatedCast<ITextureD3D12>(m_TheScene.m_pRenderTarget.RawPtr()); + ITextureD3D12 *pMirrorDepth = ValidatedCast<ITextureD3D12>(m_TheScene.m_pDepthBuffer.RawPtr()); + ITextureD3D12 *pResToTransition = nullptr; + if (ResState.resource == pMirrorRT->GetD3D12Texture()) + pResToTransition = pMirrorRT; + else if(ResState.resource == pMirrorDepth->GetD3D12Texture()) + pResToTransition = pMirrorDepth; + else + { + UNEXPECTED("Unexpected resource to transition") + } + if (pResToTransition) + { + pCtx->TransitionTextureState(pResToTransition, ResState.expected); + pResToTransition->SetD3D12ResourceState(ResState.current); + } + } + pCtx->Flush(); +} diff --git a/unityplugin/GhostCubeScene/src/GhostCubeSceneResTrsnHelper.h b/unityplugin/GhostCubeScene/src/GhostCubeSceneResTrsnHelper.h new file mode 100644 index 0000000..794c2de --- /dev/null +++ b/unityplugin/GhostCubeScene/src/GhostCubeSceneResTrsnHelper.h @@ -0,0 +1,38 @@ +/* Copyright 2015-2017 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +#include "ResourceStateTransitionHandler.h" + +class GhostCubeScene; +class GhostCubeSceneResTrsnHelper : public IResourceStateTransitionHandler +{ +public: + GhostCubeSceneResTrsnHelper(GhostCubeScene& TheScene) : + m_TheScene(TheScene) + {} + virtual ~GhostCubeSceneResTrsnHelper()override {} + virtual void TransitionResources(int stateCount, UnityGraphicsD3D12ResourceState* states)override final; + +private: + GhostCubeScene& m_TheScene; +}; |
