Merge branch 'main' into SP3-1-Rendering
# Conflicts: # SHADE_Application/src/Scenes/SBTestScene.cpp # SHADE_Application/src/Scenes/SBTestScene.h # SHADE_Engine/SHADE_Engine.vcxproj # SHADE_Engine/SHADE_Engine.vcxproj.filters
This commit is contained in:
commit
c4ab45ad34
|
@ -31,6 +31,7 @@ x86/
|
|||
bld/
|
||||
[Bb]in/
|
||||
[Bb]in-int/
|
||||
[Bb]in_int/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
|
@ -359,3 +360,5 @@ MigrationBackup/
|
|||
*.vcxproj.filters
|
||||
*.sln
|
||||
*.csproj
|
||||
|
||||
*.filters
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
IncludeDir = {}
|
||||
IncludeDir["assimp"] = "%{wks.location}/Dependencies/assimp"
|
||||
IncludeDir["imgui"] = "%{wks.location}/Dependencies/imgui"
|
||||
IncludeDir["imguizmo"] = "%{wks.location}/Dependencies/imguizmo"
|
||||
IncludeDir["imnodes"] = "%{wks.location}/Dependencies/imnodes"
|
||||
IncludeDir["msdf_atlas_gen"] = "%{wks.location}/Dependencies/msdf"
|
||||
IncludeDir["msdfgen"] = "%{wks.location}/Dependencies/msdf/msdfgen"
|
||||
IncludeDir["spdlog"] = "%{wks.location}/Dependencies/spdlog"
|
||||
IncludeDir["tracy"] = "%{wks.location}/Dependencies/tracy"
|
||||
IncludeDir["VMA"] = "%{wks.location}/Dependencies/VMA"
|
||||
IncludeDir["yamlcpp"] = "%{wks.location}/Dependencies/yamlcpp/include"
|
||||
IncludeDir["RTTR"] = "%{wks.location}/Dependencies/RTTR"
|
||||
IncludeDir["reactphysics3d"] = "%{wks.location}/Dependencies/reactphysics3d"
|
||||
IncludeDir["SDL"] = "%{wks.location}/Dependencies/SDL"
|
||||
IncludeDir["assimp"] = "%{wks.location}\\Dependencies\\assimp"
|
||||
IncludeDir["imgui"] = "%{wks.location}\\Dependencies\\imgui"
|
||||
IncludeDir["imguizmo"] = "%{wks.location}\\Dependencies\\imguizmo"
|
||||
IncludeDir["imnodes"] = "%{wks.location}\\Dependencies\\imnodes"
|
||||
IncludeDir["msdf_atlas_gen"] = "%{wks.location}\\Dependencies\\msdf"
|
||||
IncludeDir["msdfgen"] = "%{wks.location}\\Dependencies\\msdf\\msdfgen"
|
||||
IncludeDir["spdlog"] = "%{wks.location}\\Dependencies\\spdlog"
|
||||
IncludeDir["tracy"] = "%{wks.location}\\Dependencies\\tracy"
|
||||
IncludeDir["VMA"] = "%{wks.location}\\Dependencies\\VMA"
|
||||
IncludeDir["yamlcpp"] = "%{wks.location}\\Dependencies\\yamlcpp\\include"
|
||||
IncludeDir["RTTR"] = "%{wks.location}\\Dependencies\\RTTR"
|
||||
IncludeDir["reactphysics3d"] = "%{wks.location}\\Dependencies\\reactphysics3d"
|
||||
IncludeDir["SDL"] = "%{wks.location}\\Dependencies\\SDL"
|
||||
IncludeDir["VULKAN"] = "$(VULKAN_SDK)"
|
||||
IncludeDir["dotnet"] = "%{wks.location}/Dependencies/dotnet"
|
||||
IncludeDir["dotnet"] = "%{wks.location}\\Dependencies\\dotnet"
|
||||
|
|
|
@ -1,132 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{BDC70008-29DE-FE9D-7255-8ABFDEAACF25}</ProjectGuid>
|
||||
<IgnoreWarnCompileDuplicatedFilename>true</IgnoreWarnCompileDuplicatedFilename>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>SHADE_Application</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</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" />
|
||||
</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" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>..\bin\Debug\</OutDir>
|
||||
<IntDir>..\bin_int\Debug\SHADE_Application\</IntDir>
|
||||
<TargetName>SHADE_Application</TargetName>
|
||||
<TargetExt>.exe</TargetExt>
|
||||
<IncludePath>..\Dependencies\spdlog\include;$(VULKAN_SDK)\include;..\Dependencies\VMA\include;$(VULKAN_SDK)\Source\SPIRV-Reflect;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>..\bin\Release\</OutDir>
|
||||
<IntDir>..\bin_int\Release\SHADE_Application\</IntDir>
|
||||
<TargetName>SHADE_Application</TargetName>
|
||||
<TargetExt>.exe</TargetExt>
|
||||
<IncludePath>..\Dependencies\spdlog\include;$(VULKAN_SDK)\include;..\Dependencies\VMA\include;$(VULKAN_SDK)\Source\SPIRV-Reflect;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>SBpch.h</PrecompiledHeaderFile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<PreprocessorDefinitions>NOMINMAX;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\SHADE_Engine\src;src;..\Dependencies\dotnet\include;..\Dependencies\SDL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\Dependencies\spdlog\lib;..\Dependencies\SDL\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<EntryPointSymbol>wWinMainCRTStartup</EntryPointSymbol>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>SBpch.h</PrecompiledHeaderFile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<PreprocessorDefinitions>NOMINMAX;_RELEASE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\SHADE_Engine\src;src;..\Dependencies\dotnet\include;..\Dependencies\SDL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<Optimization>Full</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\Dependencies\spdlog\lib;..\Dependencies\SDL\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<EntryPointSymbol>wWinMainCRTStartup</EntryPointSymbol>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\Application\SBApplication.h" />
|
||||
<ClInclude Include="src\SBpch.h" />
|
||||
<ClInclude Include="src\Scenes\SBTestScene.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\Application\SBApplication.cpp" />
|
||||
<ClCompile Include="src\SBpch.cpp">
|
||||
<PrecompiledHeader>Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Scenes\SBTestScene.cpp" />
|
||||
<ClCompile Include="src\WinMain.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SHADE_Engine\SHADE_Engine.vcxproj">
|
||||
<Project>{3F92E998-2BF5-783D-D47A-B1F3C0BC44C0}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SHADE_Managed\SHADE_Managed.vcxproj">
|
||||
<Project>{16DB1400-829B-9036-4BD6-D9B3B755D512}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -43,15 +43,24 @@ namespace Sandbox
|
|||
|
||||
SDL_Init(SDL_INIT_EVERYTHING);
|
||||
window.Create(hInstance, hPrevInstance, lpCmdLine, nCmdShow);
|
||||
|
||||
// Create Systems
|
||||
SHADE::SHSystemManager::CreateSystem<SHADE::SHGraphicsSystem>();
|
||||
SHADE::SHSystemManager::CreateSystem<SHADE::SHScriptEngine>();
|
||||
SHADE::SHGraphicsSystem* graphicsSystem = static_cast<SHADE::SHGraphicsSystem*>(SHADE::SHSystemManager::GetSystem<SHADE::SHGraphicsSystem>());
|
||||
|
||||
// Create Routines
|
||||
SHADE::SHSystemManager::RegisterRoutine<SHADE::SHScriptEngine, SHADE::SHScriptEngine::FrameSetUpRoutine>();
|
||||
SHADE::SHSystemManager::RegisterRoutine<SHADE::SHScriptEngine, SHADE::SHScriptEngine::UpdateRoutine>();
|
||||
SHADE::SHSystemManager::RegisterRoutine<SHADE::SHScriptEngine, SHADE::SHScriptEngine::LateUpdateRoutine>();
|
||||
SHADE::SHSystemManager::RegisterRoutine<SHADE::SHScriptEngine, SHADE::SHScriptEngine::FrameCleanUpRoutine>();
|
||||
SHADE::SHSystemManager::RegisterRoutine<SHADE::SHGraphicsSystem, SHADE::SHGraphicsSystem::BatcherDispatcherRoutine>();
|
||||
SHADE::SHSystemManager::RegisterRoutine<SHADE::SHGraphicsSystem, SHADE::SHGraphicsSystem::BeginRoutine>();
|
||||
SHADE::SHSystemManager::RegisterRoutine<SHADE::SHGraphicsSystem, SHADE::SHGraphicsSystem::RenderRoutine>();
|
||||
SHADE::SHSystemManager::RegisterRoutine<SHADE::SHGraphicsSystem, SHADE::SHGraphicsSystem::EndRoutine>();
|
||||
SHADE::SHComponentManager::CreateComponentSparseSet<SHADE::SHRenderable>();
|
||||
|
||||
|
||||
// Set up graphics system and windows
|
||||
graphicsSystem->SetWindow(&window);
|
||||
sdlWindow = SDL_CreateWindowFrom(window.GetHWND());
|
||||
//auto [w, h] = window.GetWindowSize();
|
||||
|
@ -63,9 +72,6 @@ namespace Sandbox
|
|||
#else
|
||||
#endif
|
||||
|
||||
// Set up scripting
|
||||
SHADE::SHScriptEngine::Init();
|
||||
|
||||
SHSceneManager::InitSceneManager<SBTestScene>("TestScene");
|
||||
}
|
||||
|
||||
|
@ -103,7 +109,6 @@ namespace Sandbox
|
|||
SHADE::SHEditor::Exit();
|
||||
#endif
|
||||
SHSceneManager::Exit();
|
||||
SHADE::SHScriptEngine::Exit();
|
||||
SHADE::SHSystemManager::Exit();
|
||||
SDL_DestroyWindow(sdlWindow);
|
||||
SDL_Quit();
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "Graphics/MiddleEnd/Interface/SHRenderable.h"
|
||||
#include "Scene/SHSceneManager.h"
|
||||
#include "Graphics/MiddleEnd/Interface/SHGraphicsSystem.h"
|
||||
#include "Scripting/SHScriptEngine.h"
|
||||
#include "Math/Transform/SHTransformComponent.h"
|
||||
|
||||
using namespace SHADE;
|
||||
|
@ -50,6 +51,10 @@ namespace Sandbox
|
|||
renderable.TransformMatrix.Translate(0.0f, 0.0f, 2.0f);
|
||||
|
||||
transform.SetWorldPosition (SHVec3 (0.0f, 0.0f, 2.0f));
|
||||
|
||||
// Add script
|
||||
SHADE::SHScriptEngine* scriptEngine = static_cast<SHADE::SHScriptEngine*>(SHADE::SHSystemManager::GetSystem<SHADE::SHScriptEngine>());
|
||||
scriptEngine->AddScript(*SHADE::SHEntityManager::GetEntityByID(testEntity), "TestScript");
|
||||
}
|
||||
void SBTestScene::Update(float dt)
|
||||
{
|
||||
|
@ -59,6 +64,10 @@ namespace Sandbox
|
|||
transform.SetWorldRotation (rotation, 0.0f, 0.0f);
|
||||
|
||||
rotation += dt * 10.0f;
|
||||
|
||||
// Destroy entity if space is pressed
|
||||
if (GetKeyState(VK_SPACE) & 0x8000)
|
||||
SHADE::SHEntityManager::DestroyEntity(testObj);
|
||||
}
|
||||
|
||||
void SBTestScene::Render()
|
||||
|
|
|
@ -1,383 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{3F92E998-2BF5-783D-D47A-B1F3C0BC44C0}</ProjectGuid>
|
||||
<IgnoreWarnCompileDuplicatedFilename>true</IgnoreWarnCompileDuplicatedFilename>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>SHADE_Engine</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</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" />
|
||||
</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" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>..\bin\Debug\</OutDir>
|
||||
<IntDir>..\bin_int\Debug\SHADE_Engine\</IntDir>
|
||||
<TargetName>SHADE_Engine</TargetName>
|
||||
<TargetExt>.dll</TargetExt>
|
||||
<IncludePath>..\Dependencies\assimp\include;..\Dependencies\imgui;..\Dependencies\imguizmo;..\Dependencies\imnodes;..\Dependencies\msdf;..\Dependencies\msdf\msdfgen;..\Dependencies\spdlog\include;..\Dependencies\tracy;..\Dependencies\VMA\include;..\Dependencies\yamlcpp\include;..\Dependencies\SDL\include;..\Dependencies\RTTR\include;..\Dependencies\reactphysics3d\include;$(VULKAN_SDK)\include;$(VULKAN_SDK)\Source\SPIRV-Reflect;..\Dependencies\dotnet\include;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>..\bin\Release\</OutDir>
|
||||
<IntDir>..\bin_int\Release\SHADE_Engine\</IntDir>
|
||||
<TargetName>SHADE_Engine</TargetName>
|
||||
<TargetExt>.dll</TargetExt>
|
||||
<IncludePath>..\Dependencies\assimp\include;..\Dependencies\imgui;..\Dependencies\imguizmo;..\Dependencies\imnodes;..\Dependencies\msdf;..\Dependencies\msdf\msdfgen;..\Dependencies\spdlog\include;..\Dependencies\tracy;..\Dependencies\VMA\include;..\Dependencies\yamlcpp\include;..\Dependencies\SDL\include;..\Dependencies\RTTR\include;..\Dependencies\reactphysics3d\include;$(VULKAN_SDK)\include;$(VULKAN_SDK)\Source\SPIRV-Reflect;..\Dependencies\dotnet\include;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>SHpch.h</PrecompiledHeaderFile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<PreprocessorDefinitions>_LIB;_GLFW_INCLUDE_NONE;MSDFGEN_USE_CPP11;NOMINMAX;SH_API_EXPORT;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>vulkan-1.lib;SDL2.lib;SDL2main.lib;shaderc_shared.lib;shlwapi.lib;assimp-vc142-mtd.lib;librttr_core_d.lib;spdlogd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>libs;$(VULKAN_SDK)\Lib;..\Dependencies\assimp\lib\Debug;..\Dependencies\assimp\lib\Release;..\Dependencies\RTTR\lib;..\Dependencies\SDL\lib;..\Dependencies\spdlog\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ImportLibrary>..\bin\Debug\SHADE_Engine.lib</ImportLibrary>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /s /r /y /q "$(SolutionDir)/Dependencies/spdlog/bin" "$(OutDir)"
|
||||
xcopy /r /y /q "$(SolutionDir)/Dependencies/SDL/lib/SDL2.dll" "$(OutDir)"
|
||||
xcopy /s /r /y /q "$(SolutionDir)/Dependencies/dotnet/bin" "$(OutDir)"</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>SHpch.h</PrecompiledHeaderFile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<PreprocessorDefinitions>_LIB;_GLFW_INCLUDE_NONE;MSDFGEN_USE_CPP11;NOMINMAX;SH_API_EXPORT;_RELEASE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<Optimization>Full</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>vulkan-1.lib;SDL2.lib;SDL2main.lib;shaderc_shared.lib;shlwapi.lib;assimp-vc142-mt.lib;librttr_core.lib;spdlog.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>libs;$(VULKAN_SDK)\Lib;..\Dependencies\assimp\lib\Debug;..\Dependencies\assimp\lib\Release;..\Dependencies\RTTR\lib;..\Dependencies\SDL\lib;..\Dependencies\spdlog\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ImportLibrary>..\bin\Release\SHADE_Engine.lib</ImportLibrary>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /s /r /y /q "$(SolutionDir)/Dependencies/spdlog/bin" "$(OutDir)"
|
||||
xcopy /r /y /q "$(SolutionDir)/Dependencies/SDL/lib/SDL2.dll" "$(OutDir)"
|
||||
xcopy /s /r /y /q "$(SolutionDir)/Dependencies/dotnet/bin" "$(OutDir)"</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\Common\SHCommonTypes.h" />
|
||||
<ClInclude Include="src\ECS_Base\Components\SHComponent.h" />
|
||||
<ClInclude Include="src\ECS_Base\Components\SHComponentGroup.h" />
|
||||
<ClInclude Include="src\ECS_Base\Entity\SHEntity.h" />
|
||||
<ClInclude Include="src\ECS_Base\Events\SHEntityCreationEvent.h" />
|
||||
<ClInclude Include="src\ECS_Base\Events\SHEntityDestroyedEvent.h" />
|
||||
<ClInclude Include="src\ECS_Base\General\SHFamily.h" />
|
||||
<ClInclude Include="src\ECS_Base\General\SHHandleGenerator.h" />
|
||||
<ClInclude Include="src\ECS_Base\General\SHSparseBase.h" />
|
||||
<ClInclude Include="src\ECS_Base\General\SHSparseSet.h" />
|
||||
<ClInclude Include="src\ECS_Base\General\SHSparseSetContainer.h" />
|
||||
<ClInclude Include="src\ECS_Base\Managers\SHComponentManager.h" />
|
||||
<ClInclude Include="src\ECS_Base\Managers\SHEntityManager.h" />
|
||||
<ClInclude Include="src\ECS_Base\Managers\SHSystemManager.h" />
|
||||
<ClInclude Include="src\ECS_Base\SHECSMacros.h" />
|
||||
<ClInclude Include="src\ECS_Base\System\SHFixedSystemRoutine.h" />
|
||||
<ClInclude Include="src\ECS_Base\System\SHRoutineStats.h" />
|
||||
<ClInclude Include="src\ECS_Base\System\SHSystem.h" />
|
||||
<ClInclude Include="src\ECS_Base\System\SHSystemRoutine.h" />
|
||||
<ClInclude Include="src\ECS_Base\UnitTesting\SHECSUnitTest.h" />
|
||||
<ClInclude Include="src\ECS_Base\UnitTesting\SHTestComponents.h" />
|
||||
<ClInclude Include="src\ECS_Base\UnitTesting\SHTestSystems.h" />
|
||||
<ClInclude Include="src\Editor\SHEditor.h" />
|
||||
<ClInclude Include="src\Engine\SHEngine.h" />
|
||||
<ClInclude Include="src\Events\SHEvent.h" />
|
||||
<ClInclude Include="src\Events\SHEventDefines.h" />
|
||||
<ClInclude Include="src\Events\SHEventManager.hpp" />
|
||||
<ClInclude Include="src\Events\SHEventReceiver.h" />
|
||||
<ClInclude Include="src\FRC\SHFramerateController.h" />
|
||||
<ClInclude Include="src\Filesystem\SHFileSystem.h" />
|
||||
<ClInclude Include="src\Graphics\Buffers\SHVkBuffer.h" />
|
||||
<ClInclude Include="src\Graphics\Commands\SHCommandPoolResetMode.h" />
|
||||
<ClInclude Include="src\Graphics\Commands\SHVkCommandBuffer.h" />
|
||||
<ClInclude Include="src\Graphics\Commands\SHVkCommandPool.h" />
|
||||
<ClInclude Include="src\Graphics\Debugging\SHValidationLayersQuery.h" />
|
||||
<ClInclude Include="src\Graphics\Debugging\SHVkDebugMessenger.h" />
|
||||
<ClInclude Include="src\Graphics\Debugging\SHVulkanDebugUtil.h" />
|
||||
<ClInclude Include="src\Graphics\Descriptors\SHDescriptorPoolManager.h" />
|
||||
<ClInclude Include="src\Graphics\Descriptors\SHDescriptorPoolStorage.h" />
|
||||
<ClInclude Include="src\Graphics\Descriptors\SHDescriptorSetUpdater.h" />
|
||||
<ClInclude Include="src\Graphics\Descriptors\SHVkDescriptorPool.h" />
|
||||
<ClInclude Include="src\Graphics\Descriptors\SHVkDescriptorSetGroup.h" />
|
||||
<ClInclude Include="src\Graphics\Descriptors\SHVkDescriptorSetLayout.h" />
|
||||
<ClInclude Include="src\Graphics\Devices\SHVkLogicalDevice.h" />
|
||||
<ClInclude Include="src\Graphics\Devices\SHVkPhysicalDevice.h" />
|
||||
<ClInclude Include="src\Graphics\Devices\SHVkPhysicalDeviceLibrary.h" />
|
||||
<ClInclude Include="src\Graphics\Framebuffer\SHVkFramebuffer.h" />
|
||||
<ClInclude Include="src\Graphics\Images\SHImageViewDetails.h" />
|
||||
<ClInclude Include="src\Graphics\Images\SHVkImage.h" />
|
||||
<ClInclude Include="src\Graphics\Images\SHVkImageView.h" />
|
||||
<ClInclude Include="src\Graphics\Images\SHVkSampler.h" />
|
||||
<ClInclude Include="src\Graphics\Instance\SHVkInstance.h" />
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Batching\SHBatch.h" />
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Batching\SHBatcher.h" />
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Batching\SHSuperBatch.h" />
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\GlobalData\SHGraphicsGlobalData.h" />
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHCamera.h" />
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHGraphicsConstants.h" />
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHGraphicsSystem.h" />
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHMaterial.h" />
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHMaterial.hpp" />
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHMaterialInstance.h" />
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHMaterialInstance.hpp" />
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHMeshLibrary.h" />
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHRenderTarget.h" />
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHRenderable.h" />
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHRenderer.h" />
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHViewport.h" />
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Meshes\SHMeshData.h" />
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Meshes\SHPrimitiveGenerator.h" />
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\PerFrame\SHPerFrameData.h" />
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\PerFrame\SHRenderContext.h" />
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Pipeline\SHPipelineLibrary.h" />
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Shaders\SHShaderModuleLibrary.h" />
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Shaders\SHShaderSourceLibrary.h" />
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Shaders\SHShaderType.h" />
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Textures\SHTextureLibrary.h" />
|
||||
<ClInclude Include="src\Graphics\Pipeline\SHPipelineLayoutParams.h" />
|
||||
<ClInclude Include="src\Graphics\Pipeline\SHPipelineState.h" />
|
||||
<ClInclude Include="src\Graphics\Pipeline\SHPipelineType.h" />
|
||||
<ClInclude Include="src\Graphics\Pipeline\SHPushConstantInterface.h" />
|
||||
<ClInclude Include="src\Graphics\Pipeline\SHVkPipeline.h" />
|
||||
<ClInclude Include="src\Graphics\Pipeline\SHVkPipelineLayout.h" />
|
||||
<ClInclude Include="src\Graphics\Queues\SHVkQueue.h" />
|
||||
<ClInclude Include="src\Graphics\RenderGraph\SHRenderGraph.h" />
|
||||
<ClInclude Include="src\Graphics\Renderpass\SHVkAttachDescGen.h" />
|
||||
<ClInclude Include="src\Graphics\Renderpass\SHVkAttachment.h" />
|
||||
<ClInclude Include="src\Graphics\Renderpass\SHVkRenderpass.h" />
|
||||
<ClInclude Include="src\Graphics\Renderpass\SHVkSubpassDescription.h" />
|
||||
<ClInclude Include="src\Graphics\Renderpass\SHVkSubpassParams.h" />
|
||||
<ClInclude Include="src\Graphics\SHVkUtil.h" />
|
||||
<ClInclude Include="src\Graphics\SHVulkanDefines.h" />
|
||||
<ClInclude Include="src\Graphics\SHVulkanIncludes.h" />
|
||||
<ClInclude Include="src\Graphics\Shaders\BlockInterface\SHShaderBlockInterface.h" />
|
||||
<ClInclude Include="src\Graphics\Shaders\SHShaderReflected.h" />
|
||||
<ClInclude Include="src\Graphics\Shaders\SHVkShaderModule.h" />
|
||||
<ClInclude Include="src\Graphics\Shaders\spirv-reflect\spirv_reflect.h" />
|
||||
<ClInclude Include="src\Graphics\Swapchain\SHSwapchainParams.h" />
|
||||
<ClInclude Include="src\Graphics\Swapchain\SHVkSwapchain.h" />
|
||||
<ClInclude Include="src\Graphics\Synchronization\SHVkFence.h" />
|
||||
<ClInclude Include="src\Graphics\Synchronization\SHVkSemaphore.h" />
|
||||
<ClInclude Include="src\Graphics\VertexDescriptors\SHVertexAttribute.h" />
|
||||
<ClInclude Include="src\Graphics\Windowing\SHWindow.h" />
|
||||
<ClInclude Include="src\Graphics\Windowing\SHWindowMap.h" />
|
||||
<ClInclude Include="src\Graphics\Windowing\Surface\SHVkSurface.h" />
|
||||
<ClInclude Include="src\Math\Geometry\SHBoundingBox.h" />
|
||||
<ClInclude Include="src\Math\Geometry\SHShape.h" />
|
||||
<ClInclude Include="src\Math\SHMath.h" />
|
||||
<ClInclude Include="src\Math\SHMathHelpers.h" />
|
||||
<ClInclude Include="src\Math\SHMathHelpers.hpp" />
|
||||
<ClInclude Include="src\Math\SHMatrix.h" />
|
||||
<ClInclude Include="src\Math\SHQuaternion.h" />
|
||||
<ClInclude Include="src\Math\Transform\SHTransform.h" />
|
||||
<ClInclude Include="src\Math\Transform\SHTransformComponent.h" />
|
||||
<ClInclude Include="src\Math\Transform\SHTransformSystem.h" />
|
||||
<ClInclude Include="src\Math\Vector\SHVec2.h" />
|
||||
<ClInclude Include="src\Math\Vector\SHVec3.h" />
|
||||
<ClInclude Include="src\Math\Vector\SHVec4.h" />
|
||||
<ClInclude Include="src\Meta\SHIsDetected.h" />
|
||||
<ClInclude Include="src\Resource\Handle.h" />
|
||||
<ClInclude Include="src\Resource\Handle.hpp" />
|
||||
<ClInclude Include="src\Resource\ResourceLibrary.h" />
|
||||
<ClInclude Include="src\Resource\ResourceLibrary.hpp" />
|
||||
<ClInclude Include="src\Resource\SparseSet.h" />
|
||||
<ClInclude Include="src\Resource\SparseSet.hpp" />
|
||||
<ClInclude Include="src\SHCommonTypes.h" />
|
||||
<ClInclude Include="src\SH_API.h" />
|
||||
<ClInclude Include="src\SHpch.h" />
|
||||
<ClInclude Include="src\Scene\SHScene.h" />
|
||||
<ClInclude Include="src\Scene\SHSceneGraph.h" />
|
||||
<ClInclude Include="src\Scene\SHSceneManager.h" />
|
||||
<ClInclude Include="src\Scripting\SHDotNetRuntime.h" />
|
||||
<ClInclude Include="src\Scripting\SHDotNetRuntime.hpp" />
|
||||
<ClInclude Include="src\Scripting\SHScriptEngine.h" />
|
||||
<ClInclude Include="src\Tools\SHException.h" />
|
||||
<ClInclude Include="src\Tools\SHExceptionHandler.h" />
|
||||
<ClInclude Include="src\Tools\SHFileUtilties.h" />
|
||||
<ClInclude Include="src\Tools\SHLogger.h" />
|
||||
<ClInclude Include="src\Tools\SHStringUtils.h" />
|
||||
<ClInclude Include="src\Tools\SHStringUtils.hpp" />
|
||||
<ClInclude Include="src\Tools\SHUtilities.h" />
|
||||
<ClInclude Include="src\Tools\SHUtilities.hpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\ECS_Base\Components\SHComponent.cpp" />
|
||||
<ClCompile Include="src\ECS_Base\Components\SHComponentGroup.cpp" />
|
||||
<ClCompile Include="src\ECS_Base\Entity\SHEntity.cpp" />
|
||||
<ClCompile Include="src\ECS_Base\Managers\SHComponentManager.cpp" />
|
||||
<ClCompile Include="src\ECS_Base\Managers\SHEntityManager.cpp" />
|
||||
<ClCompile Include="src\ECS_Base\Managers\SHSystemManager.cpp" />
|
||||
<ClCompile Include="src\ECS_Base\System\SHFixedSystemRoutine.cpp" />
|
||||
<ClCompile Include="src\ECS_Base\System\SHSystemRoutine.cpp" />
|
||||
<ClCompile Include="src\ECS_Base\UnitTesting\SHECSUnitTest.cpp" />
|
||||
<ClCompile Include="src\Editor\SHEditor.cpp" />
|
||||
<ClCompile Include="src\Engine\SHEngine.cpp" />
|
||||
<ClCompile Include="src\FRC\SHFramerateController.cpp" />
|
||||
<ClCompile Include="src\Filesystem\SHFileSystem.cpp" />
|
||||
<ClCompile Include="src\Graphics\Buffers\SHVkBuffer.cpp" />
|
||||
<ClCompile Include="src\Graphics\Commands\SHVkCommandBuffer.cpp" />
|
||||
<ClCompile Include="src\Graphics\Commands\SHVkCommandPool.cpp" />
|
||||
<ClCompile Include="src\Graphics\Debugging\SHValidationLayersQuery.cpp" />
|
||||
<ClCompile Include="src\Graphics\Debugging\SHVkDebugMessenger.cpp" />
|
||||
<ClCompile Include="src\Graphics\Debugging\SHVulkanDebugUtil.cpp" />
|
||||
<ClCompile Include="src\Graphics\Descriptors\SHDescriptorPoolManager.cpp" />
|
||||
<ClCompile Include="src\Graphics\Descriptors\SHDescriptorPoolStorage.cpp" />
|
||||
<ClCompile Include="src\Graphics\Descriptors\SHDescriptorSetUpdater.cpp" />
|
||||
<ClCompile Include="src\Graphics\Descriptors\SHVkDescriptorPool.cpp" />
|
||||
<ClCompile Include="src\Graphics\Descriptors\SHVkDescriptorSetGroup.cpp" />
|
||||
<ClCompile Include="src\Graphics\Descriptors\SHVkDescriptorSetLayout.cpp" />
|
||||
<ClCompile Include="src\Graphics\Devices\SHVkLogicalDevice.cpp" />
|
||||
<ClCompile Include="src\Graphics\Devices\SHVkPhysicalDevice.cpp" />
|
||||
<ClCompile Include="src\Graphics\Devices\SHVkPhysicalDeviceLibrary.cpp" />
|
||||
<ClCompile Include="src\Graphics\Framebuffer\SHVkFramebuffer.cpp" />
|
||||
<ClCompile Include="src\Graphics\Images\SHVkImage.cpp" />
|
||||
<ClCompile Include="src\Graphics\Images\SHVkImageView.cpp" />
|
||||
<ClCompile Include="src\Graphics\Images\SHVkSampler.cpp" />
|
||||
<ClCompile Include="src\Graphics\Instance\SHVkInstance.cpp" />
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Batching\SHBatch.cpp" />
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Batching\SHBatcher.cpp" />
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Batching\SHSuperBatch.cpp" />
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\GlobalData\SHGraphicsGlobalData.cpp" />
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Interface\SHCamera.cpp" />
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Interface\SHGraphicsSystem.cpp" />
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Interface\SHMaterial.cpp" />
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Interface\SHMaterialInstance.cpp" />
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Interface\SHMeshLibrary.cpp" />
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Interface\SHRenderTarget.cpp" />
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Interface\SHRenderable.cpp" />
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Interface\SHRenderer.cpp" />
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Interface\SHViewport.cpp" />
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Meshes\SHPrimitiveGenerator.cpp" />
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\PerFrame\SHPerFrameData.cpp" />
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\PerFrame\SHRenderContext.cpp" />
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Pipeline\SHPipelineLibrary.cpp" />
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Shaders\SHShaderModuleLibrary.cpp" />
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Shaders\SHShaderSourceLibrary.cpp" />
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Textures\SHTextureLibrary.cpp" />
|
||||
<ClCompile Include="src\Graphics\Pipeline\SHPipelineState.cpp" />
|
||||
<ClCompile Include="src\Graphics\Pipeline\SHPushConstantInterface.cpp" />
|
||||
<ClCompile Include="src\Graphics\Pipeline\SHVkPipeline.cpp" />
|
||||
<ClCompile Include="src\Graphics\Pipeline\SHVkPipelineLayout.cpp" />
|
||||
<ClCompile Include="src\Graphics\Queues\SHVkQueue.cpp" />
|
||||
<ClCompile Include="src\Graphics\RenderGraph\SHRenderGraph.cpp" />
|
||||
<ClCompile Include="src\Graphics\Renderpass\SHVkAttachDescGen.cpp" />
|
||||
<ClCompile Include="src\Graphics\Renderpass\SHVkRenderpass.cpp" />
|
||||
<ClCompile Include="src\Graphics\Renderpass\SHVkSubpassParams.cpp" />
|
||||
<ClCompile Include="src\Graphics\SHVkUtil.cpp" />
|
||||
<ClCompile Include="src\Graphics\SHVulkanIncludes.cpp" />
|
||||
<ClCompile Include="src\Graphics\Shaders\BlockInterface\SHShaderBlockInterface.cpp" />
|
||||
<ClCompile Include="src\Graphics\Shaders\SHShaderReflected.cpp" />
|
||||
<ClCompile Include="src\Graphics\Shaders\SHVkShaderModule.cpp" />
|
||||
<ClCompile Include="src\Graphics\Shaders\spirv-reflect\spirv_reflect.cpp" />
|
||||
<ClCompile Include="src\Graphics\Swapchain\SHVkSwapchain.cpp" />
|
||||
<ClCompile Include="src\Graphics\Synchronization\SHVkFence.cpp" />
|
||||
<ClCompile Include="src\Graphics\Synchronization\SHVkSemaphore.cpp" />
|
||||
<ClCompile Include="src\Graphics\VertexDescriptors\SHVertexAttribute.cpp" />
|
||||
<ClCompile Include="src\Graphics\Windowing\SHWIndowMap.cpp" />
|
||||
<ClCompile Include="src\Graphics\Windowing\SHWindow.cpp" />
|
||||
<ClCompile Include="src\Graphics\Windowing\Surface\SHVkSurface.cpp" />
|
||||
<ClCompile Include="src\Math\Geometry\SHBoundingBox.cpp" />
|
||||
<ClCompile Include="src\Math\Geometry\SHShape.cpp" />
|
||||
<ClCompile Include="src\Math\SHMathHelpers.cpp" />
|
||||
<ClCompile Include="src\Math\SHMatrix.cpp" />
|
||||
<ClCompile Include="src\Math\SHQuaternion.cpp" />
|
||||
<ClCompile Include="src\Math\Transform\SHTransform.cpp" />
|
||||
<ClCompile Include="src\Math\Transform\SHTransformComponent.cpp" />
|
||||
<ClCompile Include="src\Math\Transform\SHTransformSystem.cpp" />
|
||||
<ClCompile Include="src\Math\Vector\SHVec2.cpp" />
|
||||
<ClCompile Include="src\Math\Vector\SHVec3.cpp" />
|
||||
<ClCompile Include="src\Math\Vector\SHVec4.cpp" />
|
||||
<ClCompile Include="src\Resource\ResourceLibrary.cpp" />
|
||||
<ClCompile Include="src\SHpch.cpp">
|
||||
<PrecompiledHeader>Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Scene\SHSceneGraph.cpp" />
|
||||
<ClCompile Include="src\Scene\SHSceneManager.cpp" />
|
||||
<ClCompile Include="src\Scripting\SHDotNetRuntime.cpp" />
|
||||
<ClCompile Include="src\Scripting\SHScriptEngine.cpp" />
|
||||
<ClCompile Include="src\Tools\SHException.cpp" />
|
||||
<ClCompile Include="src\Tools\SHExceptionHandler.cpp" />
|
||||
<ClCompile Include="src\Tools\SHFileUtilties.cpp" />
|
||||
<ClCompile Include="src\Tools\SHLogger.cpp" />
|
||||
<ClCompile Include="src\Tools\SHStringUtils.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Dependencies\yamlcpp\yaml-cpp.vcxproj">
|
||||
<Project>{88F1A057-74BE-FB62-9DD7-E90A890331F1}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Dependencies\msdf\msdfgen\msdfgen.vcxproj">
|
||||
<Project>{8900D8DD-F5DF-5679-FEF7-E14F6A56BDDA}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Dependencies\msdf\msdf-atlas-gen.vcxproj">
|
||||
<Project>{38BD587B-248B-4C81-0D1F-BDA7F98B28E6}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Dependencies\reactphysics3d\reactphysics3d.vcxproj">
|
||||
<Project>{2ECAB41A-1A98-A820-032C-1947EF988485}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Dependencies\imgui\ImGui.vcxproj">
|
||||
<Project>{C0FF640D-2C14-8DBE-F595-301E616989EF}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -1,877 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Common">
|
||||
<UniqueIdentifier>{8EEA3EAC-7A8C-6982-6347-7DD64F88F0D2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ECS_Base">
|
||||
<UniqueIdentifier>{1AB26817-067F-C322-2F98-B1CA1BC4F8B0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ECS_Base\Components">
|
||||
<UniqueIdentifier>{EFD23933-5B34-1741-E4A1-5DF350024E00}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ECS_Base\Entity">
|
||||
<UniqueIdentifier>{261D0942-92A8-7606-9BB9-F9FA07C4D206}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ECS_Base\Events">
|
||||
<UniqueIdentifier>{BEBC9142-2A48-FF06-3359-82FB9F635B07}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ECS_Base\General">
|
||||
<UniqueIdentifier>{07FEB307-F3F6-D259-1C29-B8DE0881B265}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ECS_Base\Managers">
|
||||
<UniqueIdentifier>{37718753-A387-85E9-ECFE-100B58545671}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ECS_Base\System">
|
||||
<UniqueIdentifier>{EE037863-5A8F-E527-63A0-681CCFAA4128}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ECS_Base\UnitTesting">
|
||||
<UniqueIdentifier>{078AA1A3-F318-2B6D-9C37-3F6888A53B13}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Editor">
|
||||
<UniqueIdentifier>{8C1A20B0-78BC-4A86-6177-5EDA4DB8D1D6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Engine">
|
||||
<UniqueIdentifier>{DBC7D3B0-C769-FE86-B024-12DB9C6585D7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Events">
|
||||
<UniqueIdentifier>{3A8963B1-262B-8E87-0FE6-A1DBFB2615D8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FRC">
|
||||
<UniqueIdentifier>{80E7870B-ECF0-877C-756C-9E7CE174937C}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Filesystem">
|
||||
<UniqueIdentifier>{8A8E2B37-7646-6D84-DF4D-46E0CB240875}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics">
|
||||
<UniqueIdentifier>{1653CE33-0220-293F-2B39-17E717655ECD}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\Buffers">
|
||||
<UniqueIdentifier>{92C817CE-7EC1-3620-A7F3-1BA5934B162C}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\Commands">
|
||||
<UniqueIdentifier>{17C745C0-83DD-4356-CC54-CF7738AA14DE}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\Debugging">
|
||||
<UniqueIdentifier>{51443AC7-3D28-FB1C-A688-F56F928BE59E}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\Descriptors">
|
||||
<UniqueIdentifier>{573A6CF2-43C9-F5BB-ECE7-09B7D8550662}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\Devices">
|
||||
<UniqueIdentifier>{08DBDC43-F4D3-FB95-1D06-E11A095EDBA1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\Framebuffer">
|
||||
<UniqueIdentifier>{4AD5CA42-3664-540C-DF82-6807CBF064B2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\Images">
|
||||
<UniqueIdentifier>{FB5EE099-67EA-4D5E-70FB-D052DC05AA5E}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\Instance">
|
||||
<UniqueIdentifier>{BA26540B-263D-52A1-6FB4-DDC2DB092329}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\MiddleEnd">
|
||||
<UniqueIdentifier>{4B204703-3704-0859-A064-02AC8C67F2DA}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\MiddleEnd\Batching">
|
||||
<UniqueIdentifier>{7A02D7B0-E60F-0597-6FF6-0082DB02D14D}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\MiddleEnd\GlobalData">
|
||||
<UniqueIdentifier>{85EFB65D-F107-9E87-BAB4-2D21268C3221}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\MiddleEnd\Interface">
|
||||
<UniqueIdentifier>{EBA1D3FF-D75C-C3AB-8014-3CF66CAE0D3C}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\MiddleEnd\Meshes">
|
||||
<UniqueIdentifier>{1F603FFC-8B22-7386-D4D2-011340D44B64}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\MiddleEnd\PerFrame">
|
||||
<UniqueIdentifier>{8CDBA7C9-F8E8-D5AF-81CF-D19AEDDBA166}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\MiddleEnd\Pipeline">
|
||||
<UniqueIdentifier>{D04C14FB-3C5A-42E1-C540-3ECC314D0E98}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\MiddleEnd\Shaders">
|
||||
<UniqueIdentifier>{2460C057-1070-6C28-7929-D14665585BC1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\MiddleEnd\Textures">
|
||||
<UniqueIdentifier>{7E76F08B-EA83-1E72-736A-1A5DDF76EA28}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\Pipeline">
|
||||
<UniqueIdentifier>{FBD334F8-67EA-328E-B061-BEAF1CB70316}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\Queues">
|
||||
<UniqueIdentifier>{1DD51CAD-8960-8A71-9271-0D66FE7BE671}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\RenderGraph">
|
||||
<UniqueIdentifier>{57DAB30C-4369-3DD6-EC87-51D1D8F54D7C}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\Renderpass">
|
||||
<UniqueIdentifier>{9C0DAFD9-086F-8CE7-91DC-D299FD3CC3A6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\Shaders">
|
||||
<UniqueIdentifier>{EF2D07CC-DB26-261E-0459-0BA3F0B0052A}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\Shaders\BlockInterface">
|
||||
<UniqueIdentifier>{3AEF06DD-A6D2-151D-AFD5-43591B38DC6D}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\Shaders\spirv-reflect">
|
||||
<UniqueIdentifier>{245F5AB0-1085-2417-F9CA-A9E2E58F49E3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\Swapchain">
|
||||
<UniqueIdentifier>{03DB39DE-EFBE-FA33-581F-F5864422E5B5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\Synchronization">
|
||||
<UniqueIdentifier>{576DF841-4392-47C2-6CDD-2C52586146E0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\VertexDescriptors">
|
||||
<UniqueIdentifier>{75F29FE5-6102-4CB6-CABB-B0D4B6EA3A4F}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\Windowing">
|
||||
<UniqueIdentifier>{5BAB2A92-478F-EBE7-B0EF-E53A9CF2D569}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Graphics\Windowing\Surface">
|
||||
<UniqueIdentifier>{B3B14D12-9FC1-F9E2-087B-5E01F4A9E87B}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Math">
|
||||
<UniqueIdentifier>{AFF4887C-9B2B-8A0D-4418-7010302E060F}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Math\Geometry">
|
||||
<UniqueIdentifier>{EAD6C33D-5697-3F74-1FD2-88F18B518450}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Math\Transform">
|
||||
<UniqueIdentifier>{3AB383AD-2681-77B3-0F15-E8D9FB815318}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Math\Vector">
|
||||
<UniqueIdentifier>{F1B75745-5D6D-D03A-E661-CA115216C73E}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Meta">
|
||||
<UniqueIdentifier>{AC05897C-983C-8A0D-4129-70102D3F060F}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Resource">
|
||||
<UniqueIdentifier>{ED6CDF9B-D939-3AA7-0253-284FEE7E6F35}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Scene">
|
||||
<UniqueIdentifier>{B3F7140E-1F0C-3DBF-E88D-E01E546139F0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Scripting">
|
||||
<UniqueIdentifier>{985A7358-04C5-27CF-4D03-D974B9AC0524}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Tools">
|
||||
<UniqueIdentifier>{16CF2D0E-82E3-55BF-4B65-F91EB73852F0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\Common\SHCommonTypes.h">
|
||||
<Filter>Common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ECS_Base\Components\SHComponent.h">
|
||||
<Filter>ECS_Base\Components</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ECS_Base\Components\SHComponentGroup.h">
|
||||
<Filter>ECS_Base\Components</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ECS_Base\Entity\SHEntity.h">
|
||||
<Filter>ECS_Base\Entity</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ECS_Base\Events\SHEntityCreationEvent.h">
|
||||
<Filter>ECS_Base\Events</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ECS_Base\Events\SHEntityDestroyedEvent.h">
|
||||
<Filter>ECS_Base\Events</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ECS_Base\General\SHFamily.h">
|
||||
<Filter>ECS_Base\General</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ECS_Base\General\SHHandleGenerator.h">
|
||||
<Filter>ECS_Base\General</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ECS_Base\General\SHSparseBase.h">
|
||||
<Filter>ECS_Base\General</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ECS_Base\General\SHSparseSet.h">
|
||||
<Filter>ECS_Base\General</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ECS_Base\General\SHSparseSetContainer.h">
|
||||
<Filter>ECS_Base\General</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ECS_Base\Managers\SHComponentManager.h">
|
||||
<Filter>ECS_Base\Managers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ECS_Base\Managers\SHEntityManager.h">
|
||||
<Filter>ECS_Base\Managers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ECS_Base\Managers\SHSystemManager.h">
|
||||
<Filter>ECS_Base\Managers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ECS_Base\SHECSMacros.h">
|
||||
<Filter>ECS_Base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ECS_Base\System\SHFixedSystemRoutine.h">
|
||||
<Filter>ECS_Base\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ECS_Base\System\SHRoutineStats.h">
|
||||
<Filter>ECS_Base\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ECS_Base\System\SHSystem.h">
|
||||
<Filter>ECS_Base\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ECS_Base\System\SHSystemRoutine.h">
|
||||
<Filter>ECS_Base\System</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ECS_Base\UnitTesting\SHECSUnitTest.h">
|
||||
<Filter>ECS_Base\UnitTesting</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ECS_Base\UnitTesting\SHTestComponents.h">
|
||||
<Filter>ECS_Base\UnitTesting</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ECS_Base\UnitTesting\SHTestSystems.h">
|
||||
<Filter>ECS_Base\UnitTesting</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Editor\SHEditor.h">
|
||||
<Filter>Editor</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Engine\SHEngine.h">
|
||||
<Filter>Engine</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Events\SHEvent.h">
|
||||
<Filter>Events</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Events\SHEventDefines.h">
|
||||
<Filter>Events</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Events\SHEventManager.hpp">
|
||||
<Filter>Events</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Events\SHEventReceiver.h">
|
||||
<Filter>Events</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\FRC\SHFramerateController.h">
|
||||
<Filter>FRC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Filesystem\SHFileSystem.h">
|
||||
<Filter>Filesystem</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Buffers\SHVkBuffer.h">
|
||||
<Filter>Graphics\Buffers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Commands\SHCommandPoolResetMode.h">
|
||||
<Filter>Graphics\Commands</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Commands\SHVkCommandBuffer.h">
|
||||
<Filter>Graphics\Commands</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Commands\SHVkCommandPool.h">
|
||||
<Filter>Graphics\Commands</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Debugging\SHValidationLayersQuery.h">
|
||||
<Filter>Graphics\Debugging</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Debugging\SHVkDebugMessenger.h">
|
||||
<Filter>Graphics\Debugging</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Debugging\SHVulkanDebugUtil.h">
|
||||
<Filter>Graphics\Debugging</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Descriptors\SHDescriptorPoolManager.h">
|
||||
<Filter>Graphics\Descriptors</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Descriptors\SHDescriptorPoolStorage.h">
|
||||
<Filter>Graphics\Descriptors</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Descriptors\SHDescriptorSetUpdater.h">
|
||||
<Filter>Graphics\Descriptors</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Descriptors\SHVkDescriptorPool.h">
|
||||
<Filter>Graphics\Descriptors</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Descriptors\SHVkDescriptorSetGroup.h">
|
||||
<Filter>Graphics\Descriptors</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Descriptors\SHVkDescriptorSetLayout.h">
|
||||
<Filter>Graphics\Descriptors</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Devices\SHVkLogicalDevice.h">
|
||||
<Filter>Graphics\Devices</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Devices\SHVkPhysicalDevice.h">
|
||||
<Filter>Graphics\Devices</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Devices\SHVkPhysicalDeviceLibrary.h">
|
||||
<Filter>Graphics\Devices</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Framebuffer\SHVkFramebuffer.h">
|
||||
<Filter>Graphics\Framebuffer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Images\SHImageViewDetails.h">
|
||||
<Filter>Graphics\Images</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Images\SHVkImage.h">
|
||||
<Filter>Graphics\Images</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Images\SHVkImageView.h">
|
||||
<Filter>Graphics\Images</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Images\SHVkSampler.h">
|
||||
<Filter>Graphics\Images</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Instance\SHVkInstance.h">
|
||||
<Filter>Graphics\Instance</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Batching\SHBatch.h">
|
||||
<Filter>Graphics\MiddleEnd\Batching</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Batching\SHBatcher.h">
|
||||
<Filter>Graphics\MiddleEnd\Batching</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Batching\SHSuperBatch.h">
|
||||
<Filter>Graphics\MiddleEnd\Batching</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\GlobalData\SHGraphicsGlobalData.h">
|
||||
<Filter>Graphics\MiddleEnd\GlobalData</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHCamera.h">
|
||||
<Filter>Graphics\MiddleEnd\Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHGraphicsConstants.h">
|
||||
<Filter>Graphics\MiddleEnd\Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHGraphicsSystem.h">
|
||||
<Filter>Graphics\MiddleEnd\Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHMaterial.h">
|
||||
<Filter>Graphics\MiddleEnd\Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHMaterial.hpp">
|
||||
<Filter>Graphics\MiddleEnd\Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHMaterialInstance.h">
|
||||
<Filter>Graphics\MiddleEnd\Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHMaterialInstance.hpp">
|
||||
<Filter>Graphics\MiddleEnd\Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHMeshLibrary.h">
|
||||
<Filter>Graphics\MiddleEnd\Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHRenderTarget.h">
|
||||
<Filter>Graphics\MiddleEnd\Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHRenderable.h">
|
||||
<Filter>Graphics\MiddleEnd\Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHRenderer.h">
|
||||
<Filter>Graphics\MiddleEnd\Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHViewport.h">
|
||||
<Filter>Graphics\MiddleEnd\Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Meshes\SHMeshData.h">
|
||||
<Filter>Graphics\MiddleEnd\Meshes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Meshes\SHPrimitiveGenerator.h">
|
||||
<Filter>Graphics\MiddleEnd\Meshes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\PerFrame\SHPerFrameData.h">
|
||||
<Filter>Graphics\MiddleEnd\PerFrame</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\PerFrame\SHRenderContext.h">
|
||||
<Filter>Graphics\MiddleEnd\PerFrame</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Pipeline\SHPipelineLibrary.h">
|
||||
<Filter>Graphics\MiddleEnd\Pipeline</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Shaders\SHShaderModuleLibrary.h">
|
||||
<Filter>Graphics\MiddleEnd\Shaders</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Shaders\SHShaderSourceLibrary.h">
|
||||
<Filter>Graphics\MiddleEnd\Shaders</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Shaders\SHShaderType.h">
|
||||
<Filter>Graphics\MiddleEnd\Shaders</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\MiddleEnd\Textures\SHTextureLibrary.h">
|
||||
<Filter>Graphics\MiddleEnd\Textures</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Pipeline\SHPipelineLayoutParams.h">
|
||||
<Filter>Graphics\Pipeline</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Pipeline\SHPipelineState.h">
|
||||
<Filter>Graphics\Pipeline</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Pipeline\SHPipelineType.h">
|
||||
<Filter>Graphics\Pipeline</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Pipeline\SHPushConstantInterface.h">
|
||||
<Filter>Graphics\Pipeline</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Pipeline\SHVkPipeline.h">
|
||||
<Filter>Graphics\Pipeline</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Pipeline\SHVkPipelineLayout.h">
|
||||
<Filter>Graphics\Pipeline</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Queues\SHVkQueue.h">
|
||||
<Filter>Graphics\Queues</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\RenderGraph\SHRenderGraph.h">
|
||||
<Filter>Graphics\RenderGraph</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Renderpass\SHVkAttachDescGen.h">
|
||||
<Filter>Graphics\Renderpass</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Renderpass\SHVkAttachment.h">
|
||||
<Filter>Graphics\Renderpass</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Renderpass\SHVkRenderpass.h">
|
||||
<Filter>Graphics\Renderpass</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Renderpass\SHVkSubpassDescription.h">
|
||||
<Filter>Graphics\Renderpass</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Renderpass\SHVkSubpassParams.h">
|
||||
<Filter>Graphics\Renderpass</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\SHVkUtil.h">
|
||||
<Filter>Graphics</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\SHVulkanDefines.h">
|
||||
<Filter>Graphics</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\SHVulkanIncludes.h">
|
||||
<Filter>Graphics</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Shaders\BlockInterface\SHShaderBlockInterface.h">
|
||||
<Filter>Graphics\Shaders\BlockInterface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Shaders\SHShaderReflected.h">
|
||||
<Filter>Graphics\Shaders</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Shaders\SHVkShaderModule.h">
|
||||
<Filter>Graphics\Shaders</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Shaders\spirv-reflect\spirv_reflect.h">
|
||||
<Filter>Graphics\Shaders\spirv-reflect</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Swapchain\SHSwapchainParams.h">
|
||||
<Filter>Graphics\Swapchain</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Swapchain\SHVkSwapchain.h">
|
||||
<Filter>Graphics\Swapchain</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Synchronization\SHVkFence.h">
|
||||
<Filter>Graphics\Synchronization</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Synchronization\SHVkSemaphore.h">
|
||||
<Filter>Graphics\Synchronization</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\VertexDescriptors\SHVertexAttribute.h">
|
||||
<Filter>Graphics\VertexDescriptors</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Windowing\SHWindow.h">
|
||||
<Filter>Graphics\Windowing</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Windowing\SHWindowMap.h">
|
||||
<Filter>Graphics\Windowing</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Graphics\Windowing\Surface\SHVkSurface.h">
|
||||
<Filter>Graphics\Windowing\Surface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Math\Geometry\SHBoundingBox.h">
|
||||
<Filter>Math\Geometry</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Math\Geometry\SHShape.h">
|
||||
<Filter>Math\Geometry</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Math\SHMath.h">
|
||||
<Filter>Math</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Math\SHMathHelpers.h">
|
||||
<Filter>Math</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Math\SHMathHelpers.hpp">
|
||||
<Filter>Math</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Math\SHMatrix.h">
|
||||
<Filter>Math</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Math\SHQuaternion.h">
|
||||
<Filter>Math</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Math\Transform\SHTransform.h">
|
||||
<Filter>Math\Transform</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Math\Transform\SHTransformComponent.h">
|
||||
<Filter>Math\Transform</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Math\Transform\SHTransformSystem.h">
|
||||
<Filter>Math\Transform</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Math\Vector\SHVec2.h">
|
||||
<Filter>Math\Vector</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Math\Vector\SHVec3.h">
|
||||
<Filter>Math\Vector</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Math\Vector\SHVec4.h">
|
||||
<Filter>Math\Vector</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Meta\SHIsDetected.h">
|
||||
<Filter>Meta</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Resource\Handle.h">
|
||||
<Filter>Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Resource\Handle.hpp">
|
||||
<Filter>Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Resource\ResourceLibrary.h">
|
||||
<Filter>Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Resource\ResourceLibrary.hpp">
|
||||
<Filter>Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Resource\SparseSet.h">
|
||||
<Filter>Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Resource\SparseSet.hpp">
|
||||
<Filter>Resource</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\SHCommonTypes.h" />
|
||||
<ClInclude Include="src\SH_API.h" />
|
||||
<ClInclude Include="src\SHpch.h" />
|
||||
<ClInclude Include="src\Scene\SHScene.h">
|
||||
<Filter>Scene</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Scene\SHSceneGraph.h">
|
||||
<Filter>Scene</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Scene\SHSceneManager.h">
|
||||
<Filter>Scene</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Scripting\SHDotNetRuntime.h">
|
||||
<Filter>Scripting</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Scripting\SHDotNetRuntime.hpp">
|
||||
<Filter>Scripting</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Scripting\SHScriptEngine.h">
|
||||
<Filter>Scripting</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Tools\SHException.h">
|
||||
<Filter>Tools</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Tools\SHExceptionHandler.h">
|
||||
<Filter>Tools</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Tools\SHFileUtilties.h">
|
||||
<Filter>Tools</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Tools\SHLogger.h">
|
||||
<Filter>Tools</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Tools\SHStringUtils.h">
|
||||
<Filter>Tools</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Tools\SHStringUtils.hpp">
|
||||
<Filter>Tools</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Tools\SHUtilities.h">
|
||||
<Filter>Tools</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Tools\SHUtilities.hpp">
|
||||
<Filter>Tools</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\ECS_Base\Components\SHComponent.cpp">
|
||||
<Filter>ECS_Base\Components</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ECS_Base\Components\SHComponentGroup.cpp">
|
||||
<Filter>ECS_Base\Components</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ECS_Base\Entity\SHEntity.cpp">
|
||||
<Filter>ECS_Base\Entity</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ECS_Base\Managers\SHComponentManager.cpp">
|
||||
<Filter>ECS_Base\Managers</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ECS_Base\Managers\SHEntityManager.cpp">
|
||||
<Filter>ECS_Base\Managers</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ECS_Base\Managers\SHSystemManager.cpp">
|
||||
<Filter>ECS_Base\Managers</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ECS_Base\System\SHFixedSystemRoutine.cpp">
|
||||
<Filter>ECS_Base\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ECS_Base\System\SHSystemRoutine.cpp">
|
||||
<Filter>ECS_Base\System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ECS_Base\UnitTesting\SHECSUnitTest.cpp">
|
||||
<Filter>ECS_Base\UnitTesting</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Editor\SHEditor.cpp">
|
||||
<Filter>Editor</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Engine\SHEngine.cpp">
|
||||
<Filter>Engine</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\FRC\SHFramerateController.cpp">
|
||||
<Filter>FRC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Filesystem\SHFileSystem.cpp">
|
||||
<Filter>Filesystem</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Buffers\SHVkBuffer.cpp">
|
||||
<Filter>Graphics\Buffers</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Commands\SHVkCommandBuffer.cpp">
|
||||
<Filter>Graphics\Commands</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Commands\SHVkCommandPool.cpp">
|
||||
<Filter>Graphics\Commands</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Debugging\SHValidationLayersQuery.cpp">
|
||||
<Filter>Graphics\Debugging</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Debugging\SHVkDebugMessenger.cpp">
|
||||
<Filter>Graphics\Debugging</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Debugging\SHVulkanDebugUtil.cpp">
|
||||
<Filter>Graphics\Debugging</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Descriptors\SHDescriptorPoolManager.cpp">
|
||||
<Filter>Graphics\Descriptors</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Descriptors\SHDescriptorPoolStorage.cpp">
|
||||
<Filter>Graphics\Descriptors</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Descriptors\SHDescriptorSetUpdater.cpp">
|
||||
<Filter>Graphics\Descriptors</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Descriptors\SHVkDescriptorPool.cpp">
|
||||
<Filter>Graphics\Descriptors</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Descriptors\SHVkDescriptorSetGroup.cpp">
|
||||
<Filter>Graphics\Descriptors</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Descriptors\SHVkDescriptorSetLayout.cpp">
|
||||
<Filter>Graphics\Descriptors</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Devices\SHVkLogicalDevice.cpp">
|
||||
<Filter>Graphics\Devices</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Devices\SHVkPhysicalDevice.cpp">
|
||||
<Filter>Graphics\Devices</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Devices\SHVkPhysicalDeviceLibrary.cpp">
|
||||
<Filter>Graphics\Devices</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Framebuffer\SHVkFramebuffer.cpp">
|
||||
<Filter>Graphics\Framebuffer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Images\SHVkImage.cpp">
|
||||
<Filter>Graphics\Images</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Images\SHVkImageView.cpp">
|
||||
<Filter>Graphics\Images</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Images\SHVkSampler.cpp">
|
||||
<Filter>Graphics\Images</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Instance\SHVkInstance.cpp">
|
||||
<Filter>Graphics\Instance</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Batching\SHBatch.cpp">
|
||||
<Filter>Graphics\MiddleEnd\Batching</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Batching\SHBatcher.cpp">
|
||||
<Filter>Graphics\MiddleEnd\Batching</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Batching\SHSuperBatch.cpp">
|
||||
<Filter>Graphics\MiddleEnd\Batching</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\GlobalData\SHGraphicsGlobalData.cpp">
|
||||
<Filter>Graphics\MiddleEnd\GlobalData</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Interface\SHCamera.cpp">
|
||||
<Filter>Graphics\MiddleEnd\Interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Interface\SHGraphicsSystem.cpp">
|
||||
<Filter>Graphics\MiddleEnd\Interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Interface\SHMaterial.cpp">
|
||||
<Filter>Graphics\MiddleEnd\Interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Interface\SHMaterialInstance.cpp">
|
||||
<Filter>Graphics\MiddleEnd\Interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Interface\SHMeshLibrary.cpp">
|
||||
<Filter>Graphics\MiddleEnd\Interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Interface\SHRenderTarget.cpp">
|
||||
<Filter>Graphics\MiddleEnd\Interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Interface\SHRenderable.cpp">
|
||||
<Filter>Graphics\MiddleEnd\Interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Interface\SHRenderer.cpp">
|
||||
<Filter>Graphics\MiddleEnd\Interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Interface\SHViewport.cpp">
|
||||
<Filter>Graphics\MiddleEnd\Interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Meshes\SHPrimitiveGenerator.cpp">
|
||||
<Filter>Graphics\MiddleEnd\Meshes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\PerFrame\SHPerFrameData.cpp">
|
||||
<Filter>Graphics\MiddleEnd\PerFrame</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\PerFrame\SHRenderContext.cpp">
|
||||
<Filter>Graphics\MiddleEnd\PerFrame</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Pipeline\SHPipelineLibrary.cpp">
|
||||
<Filter>Graphics\MiddleEnd\Pipeline</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Shaders\SHShaderModuleLibrary.cpp">
|
||||
<Filter>Graphics\MiddleEnd\Shaders</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Shaders\SHShaderSourceLibrary.cpp">
|
||||
<Filter>Graphics\MiddleEnd\Shaders</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\MiddleEnd\Textures\SHTextureLibrary.cpp">
|
||||
<Filter>Graphics\MiddleEnd\Textures</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Pipeline\SHPipelineState.cpp">
|
||||
<Filter>Graphics\Pipeline</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Pipeline\SHPushConstantInterface.cpp">
|
||||
<Filter>Graphics\Pipeline</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Pipeline\SHVkPipeline.cpp">
|
||||
<Filter>Graphics\Pipeline</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Pipeline\SHVkPipelineLayout.cpp">
|
||||
<Filter>Graphics\Pipeline</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Queues\SHVkQueue.cpp">
|
||||
<Filter>Graphics\Queues</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\RenderGraph\SHRenderGraph.cpp">
|
||||
<Filter>Graphics\RenderGraph</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Renderpass\SHVkAttachDescGen.cpp">
|
||||
<Filter>Graphics\Renderpass</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Renderpass\SHVkRenderpass.cpp">
|
||||
<Filter>Graphics\Renderpass</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Renderpass\SHVkSubpassParams.cpp">
|
||||
<Filter>Graphics\Renderpass</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\SHVkUtil.cpp">
|
||||
<Filter>Graphics</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\SHVulkanIncludes.cpp">
|
||||
<Filter>Graphics</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Shaders\BlockInterface\SHShaderBlockInterface.cpp">
|
||||
<Filter>Graphics\Shaders\BlockInterface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Shaders\SHShaderReflected.cpp">
|
||||
<Filter>Graphics\Shaders</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Shaders\SHVkShaderModule.cpp">
|
||||
<Filter>Graphics\Shaders</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Shaders\spirv-reflect\spirv_reflect.cpp">
|
||||
<Filter>Graphics\Shaders\spirv-reflect</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Swapchain\SHVkSwapchain.cpp">
|
||||
<Filter>Graphics\Swapchain</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Synchronization\SHVkFence.cpp">
|
||||
<Filter>Graphics\Synchronization</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Synchronization\SHVkSemaphore.cpp">
|
||||
<Filter>Graphics\Synchronization</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\VertexDescriptors\SHVertexAttribute.cpp">
|
||||
<Filter>Graphics\VertexDescriptors</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Windowing\SHWIndowMap.cpp">
|
||||
<Filter>Graphics\Windowing</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Windowing\SHWindow.cpp">
|
||||
<Filter>Graphics\Windowing</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Graphics\Windowing\Surface\SHVkSurface.cpp">
|
||||
<Filter>Graphics\Windowing\Surface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Math\Geometry\SHBoundingBox.cpp">
|
||||
<Filter>Math\Geometry</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Math\Geometry\SHShape.cpp">
|
||||
<Filter>Math\Geometry</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Math\SHMathHelpers.cpp">
|
||||
<Filter>Math</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Math\SHMatrix.cpp">
|
||||
<Filter>Math</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Math\SHQuaternion.cpp">
|
||||
<Filter>Math</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Math\Transform\SHTransform.cpp">
|
||||
<Filter>Math\Transform</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Math\Transform\SHTransformComponent.cpp">
|
||||
<Filter>Math\Transform</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Math\Transform\SHTransformSystem.cpp">
|
||||
<Filter>Math\Transform</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Math\Vector\SHVec2.cpp">
|
||||
<Filter>Math\Vector</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Math\Vector\SHVec3.cpp">
|
||||
<Filter>Math\Vector</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Math\Vector\SHVec4.cpp">
|
||||
<Filter>Math\Vector</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Resource\ResourceLibrary.cpp">
|
||||
<Filter>Resource</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SHpch.cpp" />
|
||||
<ClCompile Include="src\Scene\SHSceneGraph.cpp">
|
||||
<Filter>Scene</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Scene\SHSceneManager.cpp">
|
||||
<Filter>Scene</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Scripting\SHDotNetRuntime.cpp">
|
||||
<Filter>Scripting</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Scripting\SHScriptEngine.cpp">
|
||||
<Filter>Scripting</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Tools\SHException.cpp">
|
||||
<Filter>Tools</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Tools\SHExceptionHandler.cpp">
|
||||
<Filter>Tools</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Tools\SHFileUtilties.cpp">
|
||||
<Filter>Tools</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Tools\SHLogger.cpp">
|
||||
<Filter>Tools</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Tools\SHStringUtils.cpp">
|
||||
<Filter>Tools</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -25,22 +25,22 @@ project "SHADE_Engine"
|
|||
|
||||
externalincludedirs
|
||||
{
|
||||
"%{IncludeDir.assimp}/include",
|
||||
"%{IncludeDir.assimp}\\include",
|
||||
"%{IncludeDir.imgui}",
|
||||
"%{IncludeDir.imguizmo}",
|
||||
"%{IncludeDir.imnodes}",
|
||||
"%{IncludeDir.msdf_atlas_gen}",
|
||||
"%{IncludeDir.msdfgen}",
|
||||
"%{IncludeDir.spdlog}/include",
|
||||
"%{IncludeDir.spdlog}\\include",
|
||||
"%{IncludeDir.tracy}",
|
||||
"%{IncludeDir.VMA}/include",
|
||||
"%{IncludeDir.VMA}\\include",
|
||||
"%{IncludeDir.yamlcpp}",
|
||||
"%{IncludeDir.SDL}/include",
|
||||
"%{IncludeDir.RTTR}/include",
|
||||
"%{IncludeDir.reactphysics3d}/include",
|
||||
"%{IncludeDir.VULKAN}/include",
|
||||
"%{IncludeDir.VULKAN}/Source/SPIRV-Reflect",
|
||||
"%{IncludeDir.dotnet}/include",
|
||||
"%{IncludeDir.SDL}\\include",
|
||||
"%{IncludeDir.RTTR}\\include",
|
||||
"%{IncludeDir.reactphysics3d}\\include",
|
||||
"%{IncludeDir.VULKAN}\\include",
|
||||
"%{IncludeDir.VULKAN}\\Source\\SPIRV-Reflect",
|
||||
"%{IncludeDir.dotnet}\\include",
|
||||
}
|
||||
|
||||
externalwarnings "Off"
|
||||
|
@ -100,9 +100,9 @@ project "SHADE_Engine"
|
|||
|
||||
postbuildcommands
|
||||
{
|
||||
"xcopy /s /r /y /q \"%{IncludeDir.spdlog}/bin\" \"$(OutDir)\"",
|
||||
"xcopy /r /y /q \"%{IncludeDir.SDL}/lib/SDL2.dll\" \"$(OutDir)\"",
|
||||
"xcopy /s /r /y /q \"%{IncludeDir.dotnet}/bin\" \"$(OutDir)\""
|
||||
"xcopy /s /r /y /q \"%{IncludeDir.spdlog}\\bin\" \"$(OutDir)\"",
|
||||
"xcopy /r /y /q \"%{IncludeDir.SDL}\\lib\\SDL2.dll\" \"$(OutDir)\"",
|
||||
"xcopy /s /r /y /q \"%{IncludeDir.dotnet}\\bin\" \"$(OutDir)\""
|
||||
}
|
||||
|
||||
warnings 'Extra'
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace SHADE
|
|||
SHEventHandle(T::*callback)(SHEventPtr);
|
||||
|
||||
public:
|
||||
SHEventReceiverSpec(T* obj, void(T::* cb)(SHEventPtr))
|
||||
SHEventReceiverSpec(T* obj, SHEventHandle(T::* cb)(SHEventPtr))
|
||||
:SHEventReceiver(), object{ obj }, callback{ cb }
|
||||
{
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "SHPch.h"
|
||||
#include "SHpch.h"
|
||||
#include <iostream>
|
||||
#include <unordered_map>
|
||||
#include "SHVkPhysicalDeviceLibrary.h"
|
||||
|
@ -180,10 +180,13 @@ namespace SHADE
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
SHLOG_TRACE("Successfully queried Physical Devices:");
|
||||
for (auto const& device : physicalDevices)
|
||||
{
|
||||
SHLOG_TRACE(std::string_view (std::string("\t-") + GetDeviceTypeName(device.getProperties().deviceType) + device.getProperties().deviceName.operator std::string()));
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,12 +21,18 @@
|
|||
|
||||
namespace SHADE
|
||||
{
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* Static Data Member Definitions */
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
||||
//SHTransformSystem::TransformUpdateRoutine SHTransformSystem::UpdateRoutine;
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* Constructors & Destructor Definitions */
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
||||
SHTransformSystem::SHTransformSystem()
|
||||
: SHSystemRoutine { "Transform Routine", false }
|
||||
SHTransformSystem::TransformUpdateRoutine::TransformUpdateRoutine()
|
||||
: SHSystemRoutine { "Transform Update", false }
|
||||
{}
|
||||
|
||||
|
||||
|
@ -34,7 +40,7 @@ namespace SHADE
|
|||
/* Public Function Member Definitions */
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
||||
void SHTransformSystem::Execute(double dt) noexcept
|
||||
void SHTransformSystem::TransformUpdateRoutine::Execute(double) noexcept
|
||||
{
|
||||
// Get the current scene graph to traverse and update
|
||||
const auto& SCENE_GRAPH = SHSceneManager::GetCurrentSceneGraph();
|
||||
|
@ -53,7 +59,7 @@ namespace SHADE
|
|||
for (const auto* child : node->GetChildren())
|
||||
{
|
||||
// Active states of entities should sync with scene nodes
|
||||
const bool IS_NODE_ACTIVE = child->isActive;
|
||||
const bool IS_NODE_ACTIVE = child->IsActive();
|
||||
|
||||
#ifdef _DEBUG
|
||||
const bool IS_ENTITY_ACTIVE = SHEntityManager::GetEntityByID(child->GetEntityID())->GetActive();
|
||||
|
|
|
@ -21,15 +21,14 @@ namespace SHADE
|
|||
/* Type Definitions */
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
||||
class SH_API SHTransformSystem : public SHSystemRoutine
|
||||
class SH_API SHTransformSystem : public SHSystem
|
||||
{
|
||||
public:
|
||||
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/* Constructors & Destructor */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
|
||||
SHTransformSystem ();
|
||||
SHTransformSystem () = default;
|
||||
~SHTransformSystem () = default;
|
||||
|
||||
SHTransformSystem (const SHTransformSystem&) = delete;
|
||||
|
@ -43,10 +42,37 @@ namespace SHADE
|
|||
SHTransformSystem& operator= (SHTransformSystem&&) = delete;
|
||||
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/* Function Members */
|
||||
/* System Routines */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
|
||||
class TransformUpdateRoutine : public SHSystemRoutine
|
||||
{
|
||||
public:
|
||||
/*-------------------------------------------------------------------------------*/
|
||||
/* Constructors & Destructor */
|
||||
/*-------------------------------------------------------------------------------*/
|
||||
|
||||
TransformUpdateRoutine ();
|
||||
~TransformUpdateRoutine () = default;
|
||||
|
||||
TransformUpdateRoutine (const TransformUpdateRoutine&) = delete;
|
||||
TransformUpdateRoutine (TransformUpdateRoutine&&) = delete;
|
||||
|
||||
/*-------------------------------------------------------------------------------*/
|
||||
/* Operator Overloads */
|
||||
/*-------------------------------------------------------------------------------*/
|
||||
|
||||
TransformUpdateRoutine& operator= (const TransformUpdateRoutine&) = delete;
|
||||
TransformUpdateRoutine& operator= (TransformUpdateRoutine&&) = delete;
|
||||
|
||||
/*-------------------------------------------------------------------------------*/
|
||||
/* Function Members */
|
||||
/*-------------------------------------------------------------------------------*/
|
||||
|
||||
void Execute(double dt) noexcept override;
|
||||
};
|
||||
|
||||
//static TransformUpdateRoutine UpdateRoutine;
|
||||
|
||||
private:
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
|
|
|
@ -25,14 +25,14 @@ namespace SHADE
|
|||
/*-----------------------------------------------------------------------------------*/
|
||||
|
||||
SHSceneNode::SHSceneNode(EntityID eid, SHSceneNode* parent) noexcept
|
||||
: isActive { true }
|
||||
: active { true }
|
||||
, entityID { eid }
|
||||
, parent { parent }
|
||||
{}
|
||||
|
||||
|
||||
SHSceneNode::SHSceneNode(const SHSceneNode& rhs) noexcept
|
||||
: isActive { rhs.isActive }
|
||||
: active { rhs.active }
|
||||
, entityID { rhs.entityID }
|
||||
, parent { rhs.parent }
|
||||
{
|
||||
|
@ -40,7 +40,7 @@ namespace SHADE
|
|||
}
|
||||
|
||||
SHSceneNode::SHSceneNode(SHSceneNode&& rhs) noexcept
|
||||
: isActive { rhs.isActive }
|
||||
: active { rhs.active }
|
||||
, entityID { rhs.entityID }
|
||||
, parent { rhs.parent }
|
||||
{
|
||||
|
@ -52,7 +52,7 @@ namespace SHADE
|
|||
if (this == &rhs)
|
||||
return *this;
|
||||
|
||||
isActive = rhs.isActive;
|
||||
active = rhs.active;
|
||||
entityID = rhs.entityID;
|
||||
parent = rhs.parent;
|
||||
|
||||
|
@ -64,7 +64,7 @@ namespace SHADE
|
|||
|
||||
SHSceneNode& SHSceneNode::operator=(SHSceneNode&& rhs) noexcept
|
||||
{
|
||||
isActive = rhs.isActive;
|
||||
active = rhs.active;
|
||||
entityID = rhs.entityID;
|
||||
parent = rhs.parent;
|
||||
|
||||
|
@ -104,6 +104,11 @@ namespace SHADE
|
|||
/* Getter Function Definitions */
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
||||
bool SHSceneNode::IsActive() const noexcept
|
||||
{
|
||||
return active;
|
||||
}
|
||||
|
||||
EntityID SHSceneNode::GetEntityID() const noexcept
|
||||
{
|
||||
return entityID;
|
||||
|
@ -154,7 +159,7 @@ namespace SHADE
|
|||
if (root != nullptr)
|
||||
return root;
|
||||
|
||||
SHLOG_WARNING("Scene has no root object!")
|
||||
SHLOG_ERROR("Scene has no root object!")
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -171,7 +176,7 @@ namespace SHADE
|
|||
const auto NODE_ITER = entityNodeMap.find(entityID);
|
||||
if (NODE_ITER == entityNodeMap.end())
|
||||
{
|
||||
SHLOG_WARNING("Entity {} cannot be found in the scene! Unable to Get Scene node!", entityID)
|
||||
SHLOG_ERROR("Entity {} cannot be found in the scene! Unable to Get Scene node!", entityID)
|
||||
return nullptr;
|
||||
}
|
||||
////////////////////////////////////////
|
||||
|
@ -192,7 +197,7 @@ namespace SHADE
|
|||
const auto NODE_ITER = entityNodeMap.find(entityID);
|
||||
if (NODE_ITER == entityNodeMap.end())
|
||||
{
|
||||
SHLOG_WARNING("Entity {} cannot be found in the scene! Unable to get Parent node!", entityID)
|
||||
SHLOG_ERROR("Entity {} cannot be found in the scene! Unable to get Parent node!", entityID)
|
||||
return nullptr;
|
||||
}
|
||||
////////////////////////////////////////
|
||||
|
@ -213,7 +218,7 @@ namespace SHADE
|
|||
const auto NODE_ITER = entityNodeMap.find(entityID);
|
||||
if (NODE_ITER == entityNodeMap.end())
|
||||
{
|
||||
SHLOG_WARNING("Entity {} cannot be found in the scene!", entityID)
|
||||
SHLOG_ERROR("Entity {} cannot be found in the scene!", entityID)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -248,7 +253,7 @@ namespace SHADE
|
|||
const auto NODE_ITER = entityNodeMap.find(entityID);
|
||||
if (NODE_ITER == entityNodeMap.end())
|
||||
{
|
||||
SHLOG_WARNING("Entity {} cannot be found in the scene!", entityID)
|
||||
SHLOG_ERROR("Entity {} cannot be found in the scene!", entityID)
|
||||
return nullptr;
|
||||
}
|
||||
////////////////////////////////////////
|
||||
|
@ -269,7 +274,7 @@ namespace SHADE
|
|||
const auto NODE_ITER = entityNodeMap.find(entityID);
|
||||
if (NODE_ITER == entityNodeMap.end())
|
||||
{
|
||||
SHLOG_WARNING("Entity {} cannot be found in the scene!", entityID)
|
||||
SHLOG_ERROR("Entity {} cannot be found in the scene!", entityID)
|
||||
return root->GetChildren();
|
||||
}
|
||||
////////////////////////////////////////
|
||||
|
@ -277,6 +282,27 @@ namespace SHADE
|
|||
return NODE_ITER->second->GetChildren();
|
||||
}
|
||||
|
||||
bool SHSceneGraph::IsActiveInHierarchy(EntityID entityID) const noexcept
|
||||
{
|
||||
////////////////////////////////////////
|
||||
// Error handling
|
||||
if (!SHEntityManager::IsValidEID(entityID))
|
||||
{
|
||||
SHLOG_ERROR("Entity {} is invalid!", entityID)
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto NODE_ITER = entityNodeMap.find(entityID);
|
||||
if (NODE_ITER == entityNodeMap.end())
|
||||
{
|
||||
SHLOG_ERROR("Entity {} cannot be found in the scene!", entityID)
|
||||
return false;
|
||||
}
|
||||
////////////////////////////////////////
|
||||
|
||||
return NODE_ITER->second->IsActive();
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* Setter Function Definitions */
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
@ -289,7 +315,7 @@ namespace SHADE
|
|||
}
|
||||
|
||||
// Handle self assignment
|
||||
if (parentNode == parent)
|
||||
if (parent && parentNode->entityID == parent->entityID)
|
||||
return;
|
||||
|
||||
if (parent)
|
||||
|
@ -300,6 +326,16 @@ namespace SHADE
|
|||
parent->AddChild(this);
|
||||
}
|
||||
|
||||
void SHSceneNode::SetActive(bool newActiveState) noexcept
|
||||
{
|
||||
active = newActiveState;
|
||||
|
||||
for (auto* child : children)
|
||||
{
|
||||
SetActive(newActiveState);
|
||||
}
|
||||
}
|
||||
|
||||
void SHSceneGraph::SetParent(EntityID entityID, SHSceneNode* parent) const noexcept
|
||||
{
|
||||
////////////////////////////////////////
|
||||
|
@ -318,6 +354,9 @@ namespace SHADE
|
|||
}
|
||||
////////////////////////////////////////
|
||||
|
||||
if (parent == nullptr)
|
||||
parent = root;
|
||||
|
||||
NODE_ITER->second->SetParent(parent);
|
||||
}
|
||||
|
||||
|
@ -340,14 +379,14 @@ namespace SHADE
|
|||
auto NODE_ITER = entityNodeMap.find(entityID);
|
||||
if (NODE_ITER == entityNodeMap.end())
|
||||
{
|
||||
SHLOG_WARNING("Entity {} cannot be found in the scene! Unable to set parent!", entityID)
|
||||
SHLOG_ERROR("Entity {} cannot be found in the scene! Unable to set parent!", entityID)
|
||||
return;
|
||||
}
|
||||
|
||||
auto PARENT_ITER = entityNodeMap.find(parent);
|
||||
if (PARENT_ITER == entityNodeMap.end())
|
||||
{
|
||||
SHLOG_WARNING("Entity {} cannot be found in the scene! Unable to parent to Entity {}", parent, entityID)
|
||||
SHLOG_ERROR("Entity {} cannot be found in the scene! Unable to parent to Entity {}", parent, entityID)
|
||||
return;
|
||||
}
|
||||
////////////////////////////////////////
|
||||
|
@ -476,7 +515,7 @@ namespace SHADE
|
|||
auto NODE_ITER = entityNodeMap.find(entityID);
|
||||
if (NODE_ITER == entityNodeMap.end())
|
||||
{
|
||||
SHLOG_WARNING("Entity {} does not exist in the scene!", entityID)
|
||||
SHLOG_ERROR("Entity {} does not exist in the scene!", entityID)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,12 +38,6 @@ namespace SHADE
|
|||
friend class SHSceneGraph;
|
||||
|
||||
public:
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/* Data Members */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
|
||||
bool isActive;
|
||||
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/* Constructors & Destructor */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
|
@ -60,6 +54,7 @@ namespace SHADE
|
|||
/* Getter Functions */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
|
||||
[[nodiscard]] bool IsActive () const noexcept;
|
||||
[[nodiscard]] EntityID GetEntityID () const noexcept;
|
||||
[[nodiscard]] SHSceneNode* GetParent () const noexcept;
|
||||
[[nodiscard]] const std::vector<SHSceneNode*>& GetChildren () const noexcept;
|
||||
|
@ -71,6 +66,7 @@ namespace SHADE
|
|||
/*---------------------------------------------------------------------------------*/
|
||||
|
||||
void SetParent (SHSceneNode* parentNode) noexcept;
|
||||
void SetActive (bool newActiveState) noexcept;
|
||||
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/* Function Members */
|
||||
|
@ -88,6 +84,7 @@ namespace SHADE
|
|||
/* Data Members */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
|
||||
bool active;
|
||||
EntityID entityID;
|
||||
SHSceneNode* parent;
|
||||
std::vector<SHSceneNode*> children;
|
||||
|
@ -128,6 +125,8 @@ namespace SHADE
|
|||
[[nodiscard]] SHSceneNode* GetChild (EntityID entityID, EntityID childEntityID) const noexcept;
|
||||
[[nodiscard]] const std::vector<SHSceneNode*>& GetChildren (EntityID entityID) const noexcept;
|
||||
|
||||
[[nodiscard]] bool IsActiveInHierarchy (EntityID entityID) const noexcept;
|
||||
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/* Setter Functions */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
#include "SHScene.h"
|
||||
#include <functional>
|
||||
#include "SH_API.h"
|
||||
|
||||
//Project Headers
|
||||
#include "SH_API.h"
|
||||
|
|
|
@ -16,39 +16,27 @@ of DigiPen Institute of Technology is prohibited.
|
|||
// Standard Library
|
||||
#include <fstream> // std::fstream
|
||||
#include <filesystem> // std::filesystem::canonical, std::filesystem::remove
|
||||
#include <memory> // std::shared_ptr
|
||||
// Project Headers
|
||||
#include "Tools/SHLogger.h"
|
||||
#include "Tools/SHStringUtils.h"
|
||||
#include "ECS_Base/Events/SHEntityDestroyedEvent.h"
|
||||
#include "Events/SHEvent.h"
|
||||
#include "Events/SHEventReceiver.h"
|
||||
#include "Events/SHEventManager.hpp"
|
||||
|
||||
namespace SHADE
|
||||
{
|
||||
/*--------------------------------------------------------------------------------*/
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* Static Definitions */
|
||||
/*--------------------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------------------*/
|
||||
const std::string SHScriptEngine::DEFAULT_CSHARP_NAMESPACE = std::string("SHADE");
|
||||
SHDotNetRuntime SHScriptEngine::dotNet { false };
|
||||
SHScriptEngine::CsFuncPtr SHScriptEngine::csEngineInit = nullptr;
|
||||
SHScriptEngine::CsFuncPtr SHScriptEngine::csEngineLoadScripts = nullptr;
|
||||
SHScriptEngine::CsFuncPtr SHScriptEngine::csEngineUnloadScripts = nullptr;
|
||||
SHScriptEngine::CsFuncPtr SHScriptEngine::csEngineReloadScripts = nullptr;
|
||||
SHScriptEngine::CsFuncPtr SHScriptEngine::csEngineExit = nullptr;
|
||||
SHScriptEngine::CsFuncPtr SHScriptEngine::csScriptsFrameSetUp = nullptr;
|
||||
SHScriptEngine::CsFuncPtr SHScriptEngine::csScriptsExecuteFixedUpdate = nullptr;
|
||||
SHScriptEngine::CsFuncPtr SHScriptEngine::csScriptsExecuteUpdate = nullptr;
|
||||
SHScriptEngine::CsFuncPtr SHScriptEngine::csScriptsExecuteLateUpdate = nullptr;
|
||||
SHScriptEngine::CsFuncPtr SHScriptEngine::csScriptsFrameCleanUp = nullptr;
|
||||
SHScriptEngine::CsScriptManipFuncPtr SHScriptEngine::csScriptsAdd = nullptr;
|
||||
SHScriptEngine::CsScriptBasicFuncPtr SHScriptEngine::csScriptsRemoveAll = nullptr;
|
||||
SHScriptEngine::CsScriptOptionalFuncPtr SHScriptEngine::csScriptsRemoveAllImmediately = nullptr;
|
||||
SHScriptEngine::CsScriptSerialiseFuncPtr SHScriptEngine::csScriptsSerialise = nullptr;
|
||||
SHScriptEngine::CsScriptDeserialiseFuncPtr SHScriptEngine::csScriptDeserialise = nullptr;
|
||||
SHScriptEngine::CsScriptSerialiseYamlFuncPtr SHScriptEngine::csScriptsSerialiseYaml = nullptr;
|
||||
SHScriptEngine::CsScriptSerialiseYamlFuncPtr SHScriptEngine::csScriptDeserialiseYaml = nullptr;
|
||||
SHScriptEngine::CsScriptEditorFuncPtr SHScriptEngine::csEditorRenderScripts = nullptr;
|
||||
const std::string SHScriptEngine::CSPROJ_DIR = "..\\..\\TempScriptsFolder";
|
||||
const std::string SHScriptEngine::CSPROJ_PATH = std::string(CSPROJ_DIR) + "\\SHADE_Scripting.csproj";
|
||||
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* Lifecycle Functions */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
void SHScriptEngine::Init()
|
||||
{
|
||||
// Do not allow initialization if already initialised
|
||||
|
@ -72,14 +60,8 @@ namespace SHADE
|
|||
// Initialise the CSharp Engine
|
||||
csEngineInit();
|
||||
|
||||
// Link events
|
||||
// - Entity Destruction
|
||||
/*onEntityDestroy = [this](const SHEntity& e)
|
||||
{
|
||||
csScriptsRemoveAll(e.GetEID());
|
||||
csGOLibNotifyDestroyEntity(e.GetEID());
|
||||
};
|
||||
ECS::OnEntityDestroy += onEntityDestroy;*/
|
||||
// Register entity creation events
|
||||
registerEvents();
|
||||
}
|
||||
void SHScriptEngine::UnloadScriptAssembly()
|
||||
{
|
||||
|
@ -118,9 +100,9 @@ namespace SHADE
|
|||
dotNet.Exit();
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* Script Manipulation Functions */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
bool SHScriptEngine::AddScript(const SHEntity& entity, const std::string_view& scriptName)
|
||||
{
|
||||
return csScriptsAdd(entity.GetEID(), scriptName.data());
|
||||
|
@ -137,7 +119,7 @@ namespace SHADE
|
|||
/*---------------------------------------------------------------------------------*/
|
||||
/* Script Serialisation Functions */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
std::string SHScriptEngine::SerialiseScripts(const SHEntity& entity)
|
||||
std::string SHScriptEngine::SerialiseScripts(const SHEntity& entity) const
|
||||
{
|
||||
// Create buffer needed to store serialised script data
|
||||
constexpr int BUFFER_SIZE = 10240;
|
||||
|
@ -159,41 +141,40 @@ namespace SHADE
|
|||
return result;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* Script Serialisation Functions */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
void SHScriptEngine::DeserialiseScript(const SHEntity& entity, const std::string& yaml)
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
void SHScriptEngine::DeserialiseScript(const SHEntity& entity, const std::string& yaml) const
|
||||
{
|
||||
csScriptDeserialise(entity.GetEID(), yaml.c_str());
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* Script Editor Functions */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
void SHScriptEngine::RenderScriptsInInspector(const SHEntity& entity)
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
void SHScriptEngine::RenderScriptsInInspector(const SHEntity& entity) const
|
||||
{
|
||||
csEditorRenderScripts(entity.GetEID());
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* Static Utility Functions */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
bool SHScriptEngine::BuildScriptAssembly(bool debug)
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
bool SHScriptEngine::BuildScriptAssembly(bool debug) const
|
||||
{
|
||||
constexpr std::string_view BUILD_LOG_PATH = "../Build.log";
|
||||
static const std::string BUILD_LOG_PATH = "../Build.log";
|
||||
|
||||
// Generate csproj file if it doesn't exist
|
||||
static const std::filesystem::path CSPROJ_PATH = "../SHADE_Scripting.csproj";
|
||||
if (!std::filesystem::exists(CSPROJ_PATH))
|
||||
{
|
||||
GenerateScriptsCsProjFile(CSPROJ_PATH);
|
||||
}
|
||||
|
||||
// Prepare directory (delete useless files)
|
||||
deleteFolder("net5.0");
|
||||
deleteFolder("ref");
|
||||
deleteFolder("../SHADE_Scripting");
|
||||
deleteFolder("../obj");
|
||||
deleteFolder(CSPROJ_DIR + "\\net5.0");
|
||||
deleteFolder(CSPROJ_DIR + "\\ref");
|
||||
deleteFolder(CSPROJ_DIR + "\\obj");
|
||||
deleteFolder(CSPROJ_DIR + "\\bin");
|
||||
|
||||
// Attempt to build the assembly
|
||||
std::ostringstream oss;
|
||||
|
@ -203,7 +184,7 @@ namespace SHADE
|
|||
const bool BUILD_SUCCESS = execProcess
|
||||
(
|
||||
L"C:\\Windows\\system32\\cmd.exe",
|
||||
L"/K \"dotnet build \"../SHADE_Scripting.csproj\" -c Debug -o \"./tmp/\" -fl -flp:LogFile=build.log;Verbosity=quiet & exit\""
|
||||
L"/K \"" + generateBuildCommand(debug) + L" & exit\""
|
||||
) == 0;
|
||||
if (BUILD_SUCCESS)
|
||||
{
|
||||
|
@ -221,6 +202,7 @@ namespace SHADE
|
|||
|
||||
// Clean up built files
|
||||
deleteFolder("./tmp");
|
||||
deleteFolder(CSPROJ_DIR + "\\obj");
|
||||
|
||||
// Read the build log and output to the console
|
||||
dumpBuildLog(BUILD_LOG_PATH);
|
||||
|
@ -230,7 +212,7 @@ namespace SHADE
|
|||
return BUILD_SUCCESS;
|
||||
}
|
||||
|
||||
void SHScriptEngine::GenerateScriptsCsProjFile(const std::filesystem::path& path)
|
||||
void SHScriptEngine::GenerateScriptsCsProjFile(const std::filesystem::path& path) const
|
||||
{
|
||||
// Sample
|
||||
static std::string_view FILE_CONTENTS =
|
||||
|
@ -241,11 +223,11 @@ namespace SHADE
|
|||
<Configurations>Release;Debug</Configurations>\n\
|
||||
</PropertyGroup>\n\
|
||||
<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n\
|
||||
<OutputPath>.\\bin_Release-x64</OutputPath>\n\
|
||||
<OutputPath>.\\bin\\Release</OutputPath>\n\
|
||||
<PlatformTarget>x64</PlatformTarget>\n\
|
||||
</PropertyGroup>\n\
|
||||
<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\"> \n\
|
||||
<OutputPath>.\\bin_Debug-x64</OutputPath>\n\
|
||||
<OutputPath>.\\bin\\Debug</OutputPath>\n\
|
||||
<PlatformTarget>x64</PlatformTarget>\n\
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>\n\
|
||||
<Optimize>false</Optimize>\n\
|
||||
|
@ -264,7 +246,8 @@ namespace SHADE
|
|||
</ItemGroup>\n\
|
||||
<ItemGroup>\n\
|
||||
<Reference Include=\"SHADE_Managed\">\n\
|
||||
<HintPath>.\\bin\\SHADE_Managed.dll</HintPath>\n\
|
||||
<HintPath Condition=\"Exists('..\\bin\\Debug\\SHADE_Managed.dll')\">..\\bin\\Debug\\SHADE_Managed.dll</HintPath>\
|
||||
<HintPath Condition=\"Exists('..\\bin\\Release\\SHADE_Managed.dll')\">..\\bin\\Release\\SHADE_Managed.dll</HintPath>\
|
||||
</Reference>\n\
|
||||
</ItemGroup>\n\
|
||||
</Project>";
|
||||
|
@ -281,9 +264,19 @@ namespace SHADE
|
|||
file.close();
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* Event Handler Functions */
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
SHEventHandle SHScriptEngine::onEntityDestroyed(SHEventPtr eventPtr)
|
||||
{
|
||||
auto eventData = reinterpret_cast<const SHEventSpec<SHEntityDestroyedEvent>*>(eventPtr.get());
|
||||
csScriptsRemoveAll(eventData->data->eid);
|
||||
return eventData->handle;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* Helper Functions */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
void SHScriptEngine::loadFunctions()
|
||||
{
|
||||
std::ostringstream oss;
|
||||
|
@ -401,6 +394,17 @@ namespace SHADE
|
|||
);*/
|
||||
}
|
||||
|
||||
void SHScriptEngine::registerEvents()
|
||||
{
|
||||
// Register for entity destroyed event
|
||||
std::shared_ptr<SHEventReceiverSpec<SHScriptEngine>> destroyedEventReceiver
|
||||
{
|
||||
std::make_shared<SHEventReceiverSpec<SHScriptEngine>>(this, &SHScriptEngine::onEntityDestroyed)
|
||||
};
|
||||
ReceiverPtr receiver = std::dynamic_pointer_cast<SHEventReceiver>(destroyedEventReceiver);
|
||||
SHEventManager::SubscribeTo(SH_ENTITY_DESTROYED_EVENT, receiver);
|
||||
}
|
||||
|
||||
void SHScriptEngine::dumpBuildLog(const std::string_view& buildLogPath)
|
||||
{
|
||||
std::ifstream buildLog(buildLogPath);
|
||||
|
@ -423,7 +427,7 @@ namespace SHADE
|
|||
}
|
||||
}
|
||||
}
|
||||
void SHScriptEngine::deleteFile(const std::string_view& filePath)
|
||||
void SHScriptEngine::deleteFile(const std::string& filePath)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -432,7 +436,7 @@ namespace SHADE
|
|||
catch (...) {} // Ignore deletion failures
|
||||
}
|
||||
|
||||
void SHScriptEngine::deleteFolder(const std::string_view& filePath)
|
||||
void SHScriptEngine::deleteFolder(const std::string& filePath)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -441,7 +445,7 @@ namespace SHADE
|
|||
catch (...) {} // Ignore deletion failures
|
||||
}
|
||||
|
||||
bool SHScriptEngine::fileExists(const std::string_view& filePath)
|
||||
bool SHScriptEngine::fileExists(const std::filesystem::path& filePath)
|
||||
{
|
||||
std::error_code error;
|
||||
if (std::filesystem::exists(filePath, error))
|
||||
|
@ -483,8 +487,8 @@ namespace SHADE
|
|||
DWORD status;
|
||||
while (true)
|
||||
{
|
||||
const auto SUCCESS = GetExitCodeProcess(procInfo.hProcess, &status);
|
||||
if (!SUCCESS)
|
||||
const auto EXEC_SUCCESS = GetExitCodeProcess(procInfo.hProcess, &status);
|
||||
if (!EXEC_SUCCESS)
|
||||
{
|
||||
auto err = GetLastError();
|
||||
std::ostringstream oss;
|
||||
|
@ -503,4 +507,12 @@ namespace SHADE
|
|||
}
|
||||
}
|
||||
|
||||
std::wstring SHScriptEngine::generateBuildCommand(bool debug)
|
||||
{
|
||||
std::wostringstream oss;
|
||||
oss << "dotnet build \"" << SHStringUtils::StrToWstr(CSPROJ_PATH) << "\" -c ";
|
||||
oss << debug ? "Debug" : "Release";
|
||||
oss << " -o \"./tmp/\" -fl -flp:LogFile=build.log;Verbosity=quiet";
|
||||
return oss.str();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,10 +15,14 @@ of DigiPen Institute of Technology is prohibited.
|
|||
#include <filesystem>
|
||||
|
||||
// Project Headers
|
||||
#include "SH_API.h"
|
||||
#include "SHDotNetRuntime.h"
|
||||
#include "ECS_Base/SHECSMacros.h"
|
||||
#include "ECS_Base/Entity/SHEntity.h"
|
||||
#include "SH_API.h"
|
||||
#include "ECS_Base/System/SHSystem.h"
|
||||
#include "ECS_Base/System/SHSystemRoutine.h"
|
||||
#include "Events/SHEventDefines.h"
|
||||
#include "Events/SHEvent.h"
|
||||
|
||||
namespace SHADE
|
||||
{
|
||||
|
@ -26,13 +30,41 @@ namespace SHADE
|
|||
/// Manages initialisation of the DotNetRuntime and interfacing with CLR code written
|
||||
/// and executed on .NET.
|
||||
/// </summary>
|
||||
class SH_API SHScriptEngine
|
||||
class SH_API SHScriptEngine final : public SHSystem
|
||||
{
|
||||
public:
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/* Type Definitions */
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
class SH_API FrameSetUpRoutine final : public SHSystemRoutine
|
||||
{
|
||||
public:
|
||||
FrameSetUpRoutine();
|
||||
void Execute(double dt) noexcept override final;
|
||||
};
|
||||
class SH_API UpdateRoutine final : public SHSystemRoutine
|
||||
{
|
||||
public:
|
||||
UpdateRoutine();
|
||||
void Execute(double dt) noexcept override final;
|
||||
};
|
||||
class SH_API LateUpdateRoutine final : public SHSystemRoutine
|
||||
{
|
||||
public:
|
||||
LateUpdateRoutine();
|
||||
void Execute(double dt) noexcept override final;
|
||||
};
|
||||
class SH_API FrameCleanUpRoutine final : public SHSystemRoutine
|
||||
{
|
||||
public:
|
||||
FrameCleanUpRoutine();
|
||||
void Execute(double dt) noexcept override final;
|
||||
};
|
||||
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/* Constructor */
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
SHScriptEngine() = delete;
|
||||
SHScriptEngine() = default;
|
||||
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/* Lifecycle Functions */
|
||||
|
@ -41,33 +73,33 @@ namespace SHADE
|
|||
/// Initialises the DotNetRuntime and retrieves function pointers to all
|
||||
/// functions on the CLR used to interface with the engine.
|
||||
/// </summary>
|
||||
static void Init();
|
||||
void Init() override;
|
||||
/// <summary>
|
||||
/// Loads the managed script assembly. Ensure this is only called after
|
||||
/// UnloadScriptAssembly() has been called.
|
||||
/// </summary>
|
||||
static void UnloadScriptAssembly();
|
||||
void UnloadScriptAssembly();
|
||||
/// <summary>
|
||||
/// Unloads the managed script assembly.
|
||||
/// Take note that this will clear all existing scripts, ensure that the scene
|
||||
/// is saved before doing so.
|
||||
/// </summary>
|
||||
static void LoadScriptAssembly();
|
||||
void LoadScriptAssembly();
|
||||
/// <summary>
|
||||
/// Reloads the managed script assembly.
|
||||
/// Take note that this will clear all existing scripts, ensure that the scene
|
||||
/// is saved before doing so.
|
||||
/// </summary>
|
||||
static void ReloadScriptAssembly();
|
||||
void ReloadScriptAssembly();
|
||||
/// <summary>
|
||||
/// Executes the FixedUpdate()s of the Scripts that are attached to
|
||||
/// Entities.
|
||||
/// </summary>
|
||||
static void ExecuteFixedUpdates();
|
||||
void ExecuteFixedUpdates();
|
||||
/// <summary>
|
||||
/// Shuts down the DotNetRuntime.
|
||||
/// </summary>
|
||||
static void Exit();
|
||||
void Exit() override;
|
||||
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/* Script Manipulation Functions */
|
||||
|
@ -84,14 +116,14 @@ namespace SHADE
|
|||
/// True if successfully added. False otherwise with the error logged to the
|
||||
/// console.
|
||||
/// </returns>
|
||||
static bool AddScript(const SHEntity& entity, const std::string_view& scriptName);
|
||||
bool AddScript(const SHEntity& entity, const std::string_view& scriptName);
|
||||
/// <summary>
|
||||
/// Removes all Scripts attached to the specified Entity. Does not do anything
|
||||
/// if the specified Entity is invalid or does not have any Scripts
|
||||
/// attached.
|
||||
/// </summary>
|
||||
/// <param name="entity">The entity to remove the scripts from.</param>
|
||||
static void RemoveAllScripts(const SHEntity& entity);
|
||||
void RemoveAllScripts(const SHEntity& entity);
|
||||
/// <summary>
|
||||
/// Removes all Scripts attached to the specified Entity. Unlike
|
||||
/// RemoveAllScripts(), this removes all the scripts immediately.
|
||||
|
@ -103,7 +135,7 @@ namespace SHADE
|
|||
/// Whether or not to call OnDestroy on the scripts. This is ignored if not in
|
||||
/// play mode.
|
||||
/// </param>
|
||||
static void RemoveAllScriptsImmediately(const SHEntity& entity, bool callOnDestroy);
|
||||
void RemoveAllScriptsImmediately(const SHEntity& entity, bool callOnDestroy);
|
||||
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/* Script Serialisation Functions */
|
||||
|
@ -116,7 +148,7 @@ namespace SHADE
|
|||
/// <returns>
|
||||
/// String that represents the set of scripts attached to the specified Entity.
|
||||
/// </returns>
|
||||
static std::string SerialiseScripts(const SHEntity& entity);
|
||||
std::string SerialiseScripts(const SHEntity& entity) const;
|
||||
/// <summary>
|
||||
/// Loads the specified JSON string and creates a Script for the specified Entity
|
||||
/// based on the specified JSON string.
|
||||
|
@ -125,7 +157,7 @@ namespace SHADE
|
|||
/// <param name="yaml">
|
||||
/// The YAML string that represents the Script to load into the Entity.
|
||||
/// </param>
|
||||
static void DeserialiseScript(const SHEntity& entity, const std::string& yaml);
|
||||
void DeserialiseScript(const SHEntity& entity, const std::string& yaml) const;
|
||||
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/* Script Editor Functions */
|
||||
|
@ -138,7 +170,7 @@ namespace SHADE
|
|||
/// rendering code.
|
||||
/// </summary>
|
||||
/// <param name="entity">The Entity to render the Scripts of.</param>
|
||||
static void RenderScriptsInInspector(const SHEntity& entity);
|
||||
void RenderScriptsInInspector(const SHEntity& entity) const;
|
||||
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/* Static Utility Functions */
|
||||
|
@ -153,12 +185,12 @@ namespace SHADE
|
|||
/// can be debugged.
|
||||
/// </param>
|
||||
/// <returns>Whether or not the build succeeded.</returns>
|
||||
static bool BuildScriptAssembly(bool debug = false);
|
||||
bool BuildScriptAssembly(bool debug = false) const;
|
||||
/// <summary>
|
||||
/// Generates a .csproj file for editing and compiling the C# scripts.
|
||||
/// </summary>
|
||||
/// <param name="path">File path to the generated file.</param>
|
||||
static void GenerateScriptsCsProjFile(const std::filesystem::path& path);
|
||||
void GenerateScriptsCsProjFile(const std::filesystem::path& path) const;
|
||||
|
||||
private:
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
|
@ -178,45 +210,56 @@ namespace SHADE
|
|||
/*-----------------------------------------------------------------------------*/
|
||||
static constexpr std::string_view DEFAULT_CSHARP_LIB_NAME = "SHADE_Managed";
|
||||
static constexpr std::string_view MANAGED_SCRIPT_LIB_NAME = "SHADE_Scripting";
|
||||
static const std::string CSPROJ_DIR;
|
||||
static const std::string CSPROJ_PATH;
|
||||
static const std::string DEFAULT_CSHARP_NAMESPACE;
|
||||
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/* Data Members */
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
static SHDotNetRuntime dotNet;
|
||||
SHDotNetRuntime dotNet { false };
|
||||
// Function Pointers to CLR Code
|
||||
// - Engine Lifecycle
|
||||
static CsFuncPtr csEngineInit;
|
||||
static CsFuncPtr csEngineLoadScripts;
|
||||
static CsFuncPtr csEngineUnloadScripts;
|
||||
static CsFuncPtr csEngineReloadScripts;
|
||||
static CsFuncPtr csEngineExit;
|
||||
CsFuncPtr csEngineInit = nullptr;
|
||||
CsFuncPtr csEngineLoadScripts = nullptr;
|
||||
CsFuncPtr csEngineUnloadScripts = nullptr;
|
||||
CsFuncPtr csEngineReloadScripts = nullptr;
|
||||
CsFuncPtr csEngineExit = nullptr;
|
||||
// - Scripts Store
|
||||
static CsFuncPtr csScriptsFrameSetUp;
|
||||
static CsFuncPtr csScriptsExecuteFixedUpdate;
|
||||
static CsFuncPtr csScriptsExecuteUpdate;
|
||||
static CsFuncPtr csScriptsExecuteLateUpdate;
|
||||
static CsFuncPtr csScriptsFrameCleanUp;
|
||||
static CsScriptManipFuncPtr csScriptsAdd;
|
||||
static CsScriptBasicFuncPtr csScriptsRemoveAll;
|
||||
static CsScriptOptionalFuncPtr csScriptsRemoveAllImmediately;
|
||||
static CsScriptSerialiseFuncPtr csScriptsSerialise;
|
||||
static CsScriptDeserialiseFuncPtr csScriptDeserialise;
|
||||
static CsScriptSerialiseYamlFuncPtr csScriptsSerialiseYaml;
|
||||
static CsScriptSerialiseYamlFuncPtr csScriptDeserialiseYaml;
|
||||
CsFuncPtr csScriptsFrameSetUp = nullptr;
|
||||
CsFuncPtr csScriptsExecuteFixedUpdate = nullptr;
|
||||
CsFuncPtr csScriptsExecuteUpdate = nullptr;
|
||||
CsFuncPtr csScriptsExecuteLateUpdate = nullptr;
|
||||
CsFuncPtr csScriptsFrameCleanUp = nullptr;
|
||||
CsScriptManipFuncPtr csScriptsAdd = nullptr;
|
||||
CsScriptBasicFuncPtr csScriptsRemoveAll = nullptr;
|
||||
CsScriptOptionalFuncPtr csScriptsRemoveAllImmediately = nullptr;
|
||||
CsScriptSerialiseFuncPtr csScriptsSerialise = nullptr;
|
||||
CsScriptDeserialiseFuncPtr csScriptDeserialise = nullptr;
|
||||
CsScriptSerialiseYamlFuncPtr csScriptsSerialiseYaml = nullptr;
|
||||
CsScriptSerialiseYamlFuncPtr csScriptDeserialiseYaml = nullptr;
|
||||
// - Editor
|
||||
static CsScriptEditorFuncPtr csEditorRenderScripts;
|
||||
CsScriptEditorFuncPtr csEditorRenderScripts = nullptr;
|
||||
// Delegates
|
||||
/*ECS::EntityEvent::Delegate onEntityCreate;
|
||||
ECS::EntityEvent::Delegate onEntityDestroy;*/
|
||||
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/* Event Handler Functions */
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
SHEventHandle onEntityDestroyed(SHEventPtr eventPtr);
|
||||
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/* Helper Functions */
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/// <summary>
|
||||
/// Loads all the function pointers to CLR code that we need to execute.
|
||||
/// </summary>
|
||||
static void loadFunctions();
|
||||
void loadFunctions();
|
||||
/// <summary>
|
||||
/// Registers events for the scripting system
|
||||
/// </summary>
|
||||
void registerEvents();
|
||||
/// <summary>
|
||||
/// Reads the file via the specified path that represents a build log of error
|
||||
/// and warning messages.
|
||||
|
@ -230,18 +273,19 @@ namespace SHADE
|
|||
/// Deletes the file as specified by the file path.
|
||||
/// </summary>
|
||||
/// <param name="filePath">File path to the file to delete.</param>
|
||||
static void deleteFile(const std::string_view& filePath);
|
||||
static void deleteFile(const std::string& filePath);
|
||||
/// <summary>
|
||||
/// Deletes the folder and all files in it as specified by the file path.
|
||||
/// </summary>
|
||||
/// <param name="filePath">File path to the file to delete.</param>
|
||||
static void deleteFolder(const std::string_view& filePath);
|
||||
static void deleteFolder(const std::string& filePath);
|
||||
/// <summary>
|
||||
/// Checks if a specified file exists.
|
||||
/// </summary>
|
||||
/// <param name="filePath">File path to the file to check.</param>
|
||||
/// <returns> True if the file exists </returns>
|
||||
static bool fileExists(const std::string_view& filePath);
|
||||
static bool fileExists(const std::filesystem::path& filePath);
|
||||
static DWORD execProcess(const std::wstring& path, const std::wstring& args);
|
||||
static std::wstring generateBuildCommand(bool debug);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
/************************************************************************************//*!
|
||||
\file SHScriptEngineRoutines.cpp
|
||||
\author Tng Kah Wei, kahwei.tng, 390009620
|
||||
\par email: kahwei.tng\@digipen.edu
|
||||
\date Sep 17, 2021
|
||||
\brief Contains the implementation or functions of SystemRoutines in the
|
||||
SHScriptEngine class.
|
||||
|
||||
Copyright (C) 2021 DigiPen Institute of Technology.
|
||||
Reproduction or disclosure of this file or its contents without the prior written consent
|
||||
of DigiPen Institute of Technology is prohibited.
|
||||
*//*************************************************************************************/
|
||||
// Precompiled Headers
|
||||
#include <SHpch.h>
|
||||
// Primary Header
|
||||
#include "SHScriptEngine.h"
|
||||
|
||||
namespace SHADE
|
||||
{
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* System Routine Functions - FrameSetUpRoutine */
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
SHScriptEngine::FrameSetUpRoutine::FrameSetUpRoutine()
|
||||
: SHSystemRoutine("Script Engine Frame Set Up", false)
|
||||
{}
|
||||
void SHScriptEngine::FrameSetUpRoutine::Execute(double) noexcept
|
||||
{
|
||||
reinterpret_cast<SHScriptEngine*>(system)->csScriptsFrameSetUp();
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* System Routine Functions - UpdateRoutine */
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
SHScriptEngine::UpdateRoutine::UpdateRoutine()
|
||||
: SHSystemRoutine("Script Engine Update", false)
|
||||
{}
|
||||
void SHScriptEngine::UpdateRoutine::Execute(double) noexcept
|
||||
{
|
||||
reinterpret_cast<SHScriptEngine*>(system)->csScriptsExecuteUpdate();
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* System Routine Functions - LateUpdateRoutine */
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
SHScriptEngine::LateUpdateRoutine::LateUpdateRoutine()
|
||||
: SHSystemRoutine("Script Engine Late Update", false)
|
||||
{}
|
||||
void SHScriptEngine::LateUpdateRoutine::Execute(double) noexcept
|
||||
{
|
||||
reinterpret_cast<SHScriptEngine*>(system)->csScriptsExecuteLateUpdate();
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* System Routine Functions - FrameCleanUpRoutine */
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
SHScriptEngine::FrameCleanUpRoutine::FrameCleanUpRoutine()
|
||||
: SHSystemRoutine("Script Engine Frame Clean Up", false)
|
||||
{}
|
||||
void SHScriptEngine::FrameCleanUpRoutine::Execute(double) noexcept
|
||||
{
|
||||
reinterpret_cast<SHScriptEngine*>(system)->csScriptsFrameCleanUp();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
/************************************************************************************//*!
|
||||
\file SHLog.cpp
|
||||
\author Tng Kah Wei, kahwei.tng, 390009620
|
||||
\par email: kahwei.tng\@digipen.edu
|
||||
\date Sep 17, 2022
|
||||
\brief Contains the definition of functions of the SHLog static class.
|
||||
|
||||
Copyright (C) 2022 DigiPen Institute of Technology.
|
||||
Reproduction or disclosure of this file or its contents without the prior written consent
|
||||
of DigiPen Institute of Technology is prohibited.
|
||||
*//*************************************************************************************/
|
||||
// Precompiled Header
|
||||
#include "SHpch.h"
|
||||
// Primary Header
|
||||
#include "SHLog.h"
|
||||
// Project Includes
|
||||
#include "SHLogger.h"
|
||||
|
||||
namespace SHADE
|
||||
{
|
||||
void SHLog::Info(const std::string& msg) noexcept
|
||||
{
|
||||
SHLOG_INFO(msg)
|
||||
}
|
||||
|
||||
void SHLog::Warning(const std::string& msg) noexcept
|
||||
{
|
||||
SHLOG_WARNING(msg)
|
||||
}
|
||||
|
||||
|
||||
void SHLog::Error(const std::string& msg) noexcept
|
||||
{
|
||||
SHLOG_ERROR(msg)
|
||||
}
|
||||
|
||||
void SHLog::Critical(const std::string& msg) noexcept
|
||||
{
|
||||
SHLOG_CRITICAL(msg)
|
||||
}
|
||||
|
||||
void SHLog::Floor() noexcept
|
||||
{
|
||||
SHLOG_FLOOR()
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void SHLog::Trace(const std::string& msg) noexcept
|
||||
{
|
||||
SHLOG_TRACE(msg)
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
/************************************************************************************//*!
|
||||
\file SHLog.h
|
||||
\author Tng Kah Wei, kahwei.tng, 390009620
|
||||
\par email: kahwei.tng\@digipen.edu
|
||||
\date Sep 17, 2022
|
||||
\brief Contains the SHLog static class.
|
||||
|
||||
Copyright (C) 2022 DigiPen Institute of Technology.
|
||||
Reproduction or disclosure of this file or its contents without the prior written consent
|
||||
of DigiPen Institute of Technology is prohibited.
|
||||
*//*************************************************************************************/
|
||||
|
||||
// Standard Library
|
||||
#include <string>
|
||||
// Project Headers
|
||||
#include "SH_API.h"
|
||||
|
||||
namespace SHADE
|
||||
{
|
||||
/*!************************************************************************************
|
||||
|
||||
\class SHLog
|
||||
|
||||
\brief
|
||||
Static class that contains wrapper functions for SHLogger's macros.
|
||||
|
||||
**************************************************************************************/
|
||||
class SH_API SHLog
|
||||
{
|
||||
public:
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/* Constructor */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
SHLog() = delete;
|
||||
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/* Logging Functions */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
static void Info(const std::string& msg) noexcept;
|
||||
static void Warning(const std::string& msg) noexcept;
|
||||
static void Error(const std::string& msg) noexcept;
|
||||
static void Critical(const std::string& msg) noexcept;
|
||||
static void Floor() noexcept;
|
||||
#ifdef _DEBUG
|
||||
static void Trace(const std::string& msg) noexcept;
|
||||
#endif
|
||||
};
|
||||
}
|
|
@ -21,6 +21,9 @@ of DigiPen Institute of Technology is prohibited.
|
|||
#include <msclr\marshal_cppstd.h>
|
||||
// External Dependencies
|
||||
#include "ECS_Base/Managers/SHEntityManager.h"
|
||||
#include "Scene/SHSceneManager.h"
|
||||
#include "Scene/SHSceneGraph.h"
|
||||
#include "Tools/SHLog.h"
|
||||
// Project Headers
|
||||
#include "Utility/Convert.hxx"
|
||||
#include "Utility/Debug.hxx"
|
||||
|
@ -124,27 +127,31 @@ namespace SHADE
|
|||
return T();
|
||||
}
|
||||
|
||||
// Get Transform component and get the children list
|
||||
throw gcnew System::NotImplementedException;
|
||||
//Pls::Transform* tf = Pls::ECS::GetComponent<Pls::Transform>(entity);
|
||||
//if (tf == nullptr)
|
||||
// return T();
|
||||
// Get Entity's SceneGraphNode
|
||||
SHSceneNode* sceneGraphNode = SHSceneManager::GetCurrentSceneGraph().GetNode(entity);
|
||||
if (sceneGraphNode == nullptr)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "[ECS_CLI] Failed to retrieve SceneGraphNode of entity #" << entity << ". This should not happen!";
|
||||
SHLog::Warning(oss.str());
|
||||
return T();
|
||||
}
|
||||
|
||||
//// Search direct children first
|
||||
//for (const auto& child : tf->GetChildren())
|
||||
//{
|
||||
// T component = GetComponent<T>(child);
|
||||
// if (component != nullptr)
|
||||
// return component;
|
||||
//}
|
||||
// Search direct children first
|
||||
for (const auto& child : sceneGraphNode->GetChildren())
|
||||
{
|
||||
T component = GetComponent<T>(child->GetEntityID());
|
||||
if (component != nullptr)
|
||||
return component;
|
||||
}
|
||||
|
||||
//// Search their children
|
||||
//for (const auto& child : tf->GetChildren())
|
||||
//{
|
||||
// T script = GetComponentInChildren<T>(child);
|
||||
// if (script != nullptr)
|
||||
// return script;
|
||||
//}
|
||||
// Search their children
|
||||
for (const auto& child : sceneGraphNode->GetChildren())
|
||||
{
|
||||
T component = GetComponentInChildren<T>(child->GetEntityID());
|
||||
if (component != nullptr)
|
||||
return component;
|
||||
}
|
||||
|
||||
// None here
|
||||
return T();
|
||||
|
|
|
@ -56,7 +56,7 @@ namespace SHADE
|
|||
}
|
||||
bool GameObject::IsActiveInHierarchy::get()
|
||||
{
|
||||
throw gcnew System::NotImplementedException();
|
||||
return true; // TODO: Update once we have an equivalent on the Entity object
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
|
|
|
@ -19,7 +19,7 @@ of DigiPen Institute of Technology is prohibited.
|
|||
namespace SHADE
|
||||
{
|
||||
///<summary>
|
||||
/// CLR version of the the PlushieEngine's Vector2 class that represents a
|
||||
/// CLR version of the the SHADE Engine's Vector2 class that represents a
|
||||
/// 2-Dimensional Vector. Designed to closely match Unity's Vector2 struct.
|
||||
/// </summary>
|
||||
[System::Runtime::InteropServices::StructLayout(System::Runtime::InteropServices::LayoutKind::Sequential)]
|
||||
|
|
|
@ -20,6 +20,7 @@ of DigiPen Institute of Technology is prohibited.
|
|||
#include <sstream>
|
||||
// External Dependencies
|
||||
#include "ECS_Base/Managers/SHEntityManager.h"
|
||||
#include "Tools/SHLog.h"
|
||||
// Project Headers
|
||||
#include "Utility/Debug.hxx"
|
||||
#include "Utility/Convert.hxx"
|
||||
|
@ -148,34 +149,37 @@ namespace SHADE
|
|||
if (!EntityUtils::IsValid(entity))
|
||||
throw gcnew System::ArgumentException("Invalid Entity provided to get a Script from.");
|
||||
|
||||
|
||||
// Check if entity exists in the script storage
|
||||
if (!scripts.ContainsKey(entity))
|
||||
{
|
||||
return T();
|
||||
}
|
||||
|
||||
// Get Transform component and get the children list
|
||||
throw gcnew System::NotImplementedException;
|
||||
//Pls::Transform* tf = Pls::ECS::GetComponent<Pls::Transform>(Convert::ToNative(entity));
|
||||
//if (tf == nullptr)
|
||||
// return T();
|
||||
// Get Entity's SceneGraphNode
|
||||
SHSceneNode* sceneGraphNode = SHSceneManager::GetCurrentSceneGraph().GetNode(entity);
|
||||
if (sceneGraphNode == nullptr)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "[ECS_CLI] Failed to retrieve SceneGraphNode of entity #" << entity << ". This should not happen!";
|
||||
SHLog::Warning(oss.str());
|
||||
return T();
|
||||
}
|
||||
|
||||
//// Search direct children first
|
||||
//for (const auto& child : tf->GetChildren())
|
||||
//{
|
||||
// T script = GetScript<T>(Convert::ToCLI(child));
|
||||
// if (script != nullptr)
|
||||
// return script;
|
||||
//}
|
||||
// Search direct children first
|
||||
for (const auto& child : sceneGraphNode->GetChildren())
|
||||
{
|
||||
T script = GetScript<T>(child->GetEntityID());
|
||||
if (script != nullptr)
|
||||
return script;
|
||||
}
|
||||
|
||||
//// Search their children
|
||||
//for (const auto& child : tf->GetChildren())
|
||||
//{
|
||||
// T script = GetScriptInChildren<T>(Convert::ToCLI(child));
|
||||
// if (script != nullptr)
|
||||
// return script;
|
||||
//}
|
||||
// Search their children
|
||||
for (const auto& child : sceneGraphNode->GetChildren())
|
||||
{
|
||||
T script = GetScript<T>(child->GetEntityID());
|
||||
if (script != nullptr)
|
||||
return script;
|
||||
}
|
||||
|
||||
// None here
|
||||
return T();
|
||||
|
@ -233,7 +237,6 @@ namespace SHADE
|
|||
if (!EntityUtils::IsValid(entity))
|
||||
throw gcnew System::ArgumentException("Invalid Entity provided to remove a Script from.");
|
||||
|
||||
|
||||
// Check if entity exists in the script storage
|
||||
if (!scripts.ContainsKey(entity))
|
||||
{
|
||||
|
@ -264,7 +267,6 @@ namespace SHADE
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
// Check if entity exists in the script storage
|
||||
if (!scripts.ContainsKey(entity))
|
||||
{
|
||||
|
@ -286,13 +288,6 @@ namespace SHADE
|
|||
void ScriptStore::RemoveAllScripts(Entity entity)
|
||||
{
|
||||
SAFE_NATIVE_CALL_BEGIN
|
||||
// Check if entity exists
|
||||
if (!EntityUtils::IsValid(entity))
|
||||
{
|
||||
Debug::LogError("[ScriptStore] Attempted to remove Scripts from an invalid Entity!");
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if entity exists in the script storage
|
||||
if (!scripts.ContainsKey(entity))
|
||||
return;
|
||||
|
@ -309,13 +304,6 @@ namespace SHADE
|
|||
void ScriptStore::RemoveAllScriptsImmediately(Entity entity, bool callOnDestroy)
|
||||
{
|
||||
SAFE_NATIVE_CALL_BEGIN
|
||||
// Check if entity exists
|
||||
if (!EntityUtils::IsValid(entity))
|
||||
{
|
||||
Debug::LogError("[ScriptStore] Attempted to remove Scripts from an invalid Entity!");
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if entity exists in the script storage
|
||||
if (!scripts.ContainsKey(entity))
|
||||
return;
|
||||
|
@ -384,10 +372,7 @@ namespace SHADE
|
|||
while (disposalQueue.Count > 0)
|
||||
{
|
||||
Script^ script = disposalQueue.Dequeue();
|
||||
/*if (Application::IsPlaying)
|
||||
{
|
||||
script->OnDestroy();
|
||||
}*/
|
||||
auto entity = script->Owner.GetEntity();
|
||||
auto scriptList = scripts[script->Owner.GetEntity()];
|
||||
scriptList->Remove(script);
|
||||
|
@ -495,7 +480,6 @@ namespace SHADE
|
|||
if (!EntityUtils::IsValid(entity))
|
||||
return true;
|
||||
|
||||
|
||||
// Check if entity exists in the script storage
|
||||
if (!scripts.ContainsKey(entity))
|
||||
return true;
|
||||
|
@ -665,7 +649,7 @@ namespace SHADE
|
|||
|
||||
// Entity Validity Check
|
||||
if (nativeEntity == nullptr)
|
||||
throw gcnew System::InvalidOperationException("Attempted to get native Component to an invalid Entity.");
|
||||
return false;
|
||||
|
||||
// Check active state
|
||||
return nativeEntity->GetActive();
|
||||
|
|
|
@ -0,0 +1,242 @@
|
|||
/************************************************************************************//*!
|
||||
\file ReflectionUtilities.cxx
|
||||
\author Tng Kah Wei, kahwei.tng, 390009620
|
||||
\par email: kahwei.tng\@digipen.edu
|
||||
\date Nov 6, 2021
|
||||
\brief Contains the definition of the functions for the ReflectionUtilities
|
||||
managed static class.
|
||||
|
||||
Note: This file is written in C++17/CLI.
|
||||
|
||||
Copyright (C) 2021 DigiPen Institute of Technology.
|
||||
Reproduction or disclosure of this file or its contents without the prior written consent
|
||||
of DigiPen Institute of Technology is prohibited.
|
||||
*//*************************************************************************************/
|
||||
// Precompiled Headers
|
||||
#include "SHpch.h"
|
||||
// Primary Header
|
||||
#include "Serialisation/ReflectionUtilities.hxx"
|
||||
// Project Includes
|
||||
#include "SerializeFieldAttribute.hxx"
|
||||
#include "Utility/Convert.hxx"
|
||||
#include "Math/Vector2.hxx"
|
||||
#include "Math/Vector3.hxx"
|
||||
#include "Utility/Debug.hxx"
|
||||
|
||||
/*-------------------------------------------------------------------------------------*/
|
||||
/* Macro Functions */
|
||||
/*-------------------------------------------------------------------------------------*/
|
||||
/// <summary>
|
||||
/// Macro expansion that is used in RapidJsonValueToField() to retrieve the specified
|
||||
/// member of a Vector type that is stored into a Vector named "vec".
|
||||
/// </summary>
|
||||
/// <param name="MEMBER">The name of the member to retrieve.</param>
|
||||
#define PRIMITIVE_VECTOR_FIELD_ASSIGN(MEMBER) \
|
||||
iter = jsonValue.FindMember(#MEMBER); \
|
||||
if (iter != jsonValue.MemberEnd()) \
|
||||
{ \
|
||||
vec.MEMBER = iter->value.GetDouble(); \
|
||||
} \
|
||||
|
||||
/*-------------------------------------------------------------------------------------*/
|
||||
/* Function Definitions */
|
||||
/*-------------------------------------------------------------------------------------*/
|
||||
namespace SHADE
|
||||
{
|
||||
System::Collections::Generic::IEnumerable<System::Reflection::FieldInfo^>^ ReflectionUtilities::GetInstanceFields(System::Object^ object)
|
||||
{
|
||||
using namespace System::Reflection;
|
||||
|
||||
return object->GetType()->GetFields
|
||||
(
|
||||
BindingFlags::Public | BindingFlags::NonPublic | BindingFlags::Instance
|
||||
);
|
||||
}
|
||||
|
||||
bool ReflectionUtilities::FieldIsSerialisable(System::Reflection::FieldInfo^ fieldInfo)
|
||||
{
|
||||
return fieldInfo->IsPublic || fieldInfo->GetCustomAttributes(SerializeField::typeid, true)->Length > 0;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/* Serialisation Functions */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
void ReflectionUtilities::Serialise(System::Object^ object, YAML::Emitter& yaml)
|
||||
{
|
||||
using namespace System::Reflection;
|
||||
|
||||
// Create YAML object
|
||||
yaml << YAML::Key << Convert::ToNative(object->GetType()->FullName);
|
||||
yaml << YAML::BeginMap;
|
||||
|
||||
// Get all fields
|
||||
System::Collections::Generic::IEnumerable<FieldInfo^>^ fields = GetInstanceFields(object);
|
||||
for each (FieldInfo^ field in fields)
|
||||
{
|
||||
// Ignore private and non-SerialiseField
|
||||
if (!FieldIsSerialisable(field))
|
||||
continue;
|
||||
|
||||
// Serialise
|
||||
writeFieldIntoYaml(field, object, yaml);
|
||||
}
|
||||
|
||||
yaml << YAML::EndMap;
|
||||
}
|
||||
void ReflectionUtilities::Deserialise(YAML::Node& yamlNode, Object^ object)
|
||||
{
|
||||
using namespace System::Reflection;
|
||||
|
||||
// Load the YAML
|
||||
if (!yamlNode.IsMap())
|
||||
{
|
||||
// Invalid
|
||||
Debug::LogError
|
||||
(
|
||||
System::String::Format("[ReflectionUtilities] Invalid YAML Node provided for deserialization of \"{0}\" script.",
|
||||
object->GetType()->FullName)
|
||||
);
|
||||
return;
|
||||
}
|
||||
// Get all fields
|
||||
System::Collections::Generic::IEnumerable<FieldInfo^>^ fields = GetInstanceFields(object);
|
||||
for each (FieldInfo^ field in fields)
|
||||
{
|
||||
// Ignore private and non-SerialiseField
|
||||
if (!FieldIsSerialisable(field))
|
||||
continue;
|
||||
|
||||
// Deserialise
|
||||
const std::string FIELD_NAME = Convert::ToNative(field->Name);
|
||||
if (yamlNode[FIELD_NAME])
|
||||
{
|
||||
writeYamlIntoField(field, object, yamlNode[FIELD_NAME]);
|
||||
}
|
||||
}
|
||||
}
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/* Serialization Helper Functions */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
void ReflectionUtilities::writeFieldIntoYaml(System::Reflection::FieldInfo^ fieldInfo, Object^ object, YAML::Emitter& yaml)
|
||||
{
|
||||
// Field Name
|
||||
yaml << YAML::Key << Convert::ToNative(fieldInfo->Name);
|
||||
|
||||
// Field Value
|
||||
yaml << YAML::Value;
|
||||
if (fieldInsertYaml<System::Int16> (fieldInfo, object, yaml) ||
|
||||
fieldInsertYaml<System::Int32> (fieldInfo, object, yaml) ||
|
||||
fieldInsertYaml<System::Int64> (fieldInfo, object, yaml) ||
|
||||
fieldInsertYaml<System::UInt16>(fieldInfo, object, yaml) ||
|
||||
fieldInsertYaml<System::UInt32>(fieldInfo, object, yaml) ||
|
||||
fieldInsertYaml<System::UInt64>(fieldInfo, object, yaml) ||
|
||||
fieldInsertYaml<System::Byte> (fieldInfo, object, yaml) ||
|
||||
fieldInsertYaml<bool> (fieldInfo, object, yaml) ||
|
||||
fieldInsertYaml<float> (fieldInfo, object, yaml) ||
|
||||
fieldInsertYaml<double> (fieldInfo, object, yaml))
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if (fieldInfo->FieldType->IsSubclassOf(System::Enum::typeid))
|
||||
{
|
||||
yaml << safe_cast<int>(fieldInfo->GetValue(object));
|
||||
}
|
||||
else if (fieldInfo->FieldType == System::String::typeid)
|
||||
{
|
||||
System::String^ str = safe_cast<System::String^>(fieldInfo->GetValue(object));
|
||||
yaml << Convert::ToNative(str);
|
||||
}
|
||||
else if (fieldInfo->FieldType == Vector2::typeid)
|
||||
{
|
||||
Vector2 vec = safe_cast<Vector2>(fieldInfo->GetValue(object));
|
||||
yaml << YAML::BeginSeq << YAML::Flow << vec.x << vec.y << YAML::EndSeq;
|
||||
}
|
||||
else if (fieldInfo->FieldType == Vector3::typeid)
|
||||
{
|
||||
Vector3 vec = safe_cast<Vector3>(fieldInfo->GetValue(object));
|
||||
yaml << YAML::BeginSeq << YAML::Flow << vec.x << vec.y << vec.z << YAML::EndSeq;
|
||||
}
|
||||
else // Not any of the supported types
|
||||
{
|
||||
Debug::LogWarning(Convert::ToNative(System::String::Format
|
||||
(
|
||||
"[ReflectionUtilities] Failed to parse \"{0}\" of \"{1}\" type for serialization.",
|
||||
fieldInfo->Name, fieldInfo->FieldType)
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
void ReflectionUtilities::writeYamlIntoField(System::Reflection::FieldInfo^ fieldInfo, Object^ object, YAML::Node& node)
|
||||
{
|
||||
if (fieldInfo->FieldType == System::Int16::typeid)
|
||||
{
|
||||
fieldInfo->SetValue(object, node.as<int>());
|
||||
}
|
||||
if (fieldAssignYaml<System::Int16> (fieldInfo, object, node) ||
|
||||
fieldAssignYaml<System::Int32> (fieldInfo, object, node) ||
|
||||
fieldAssignYaml<System::Int64> (fieldInfo, object, node) ||
|
||||
fieldAssignYaml<System::UInt16>(fieldInfo, object, node) ||
|
||||
fieldAssignYaml<System::UInt32>(fieldInfo, object, node) ||
|
||||
fieldAssignYaml<System::UInt64>(fieldInfo, object, node) ||
|
||||
fieldAssignYaml<System::Byte> (fieldInfo, object, node) ||
|
||||
fieldAssignYaml<bool> (fieldInfo, object, node) ||
|
||||
fieldAssignYaml<float> (fieldInfo, object, node) ||
|
||||
fieldAssignYaml<double> (fieldInfo, object, node))
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if (fieldInfo->FieldType->IsSubclassOf(System::Enum::typeid))
|
||||
{
|
||||
fieldInfo->SetValue(object, node.as<int>());
|
||||
}
|
||||
else if (fieldInfo->FieldType == System::String::typeid)
|
||||
{
|
||||
fieldInfo->SetValue(object, Convert::ToCLI(node.as<std::string>()));
|
||||
}
|
||||
else if (fieldInfo->FieldType == Vector2::typeid)
|
||||
{
|
||||
if (node.IsSequence() && node.size() == 2)
|
||||
{
|
||||
Vector2 vec;
|
||||
vec.x = node[0].as<float>();
|
||||
vec.y = node[1].as<float>();
|
||||
fieldInfo->SetValue(object, vec);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug::LogWarning
|
||||
(
|
||||
System::String::Format("[ReflectionUtilities] Invalid YAML Node provided for deserialization of a Vector2 \"{0}\" field in \"{1}\" script.",
|
||||
fieldInfo->Name, object->GetType()->FullName)
|
||||
);
|
||||
}
|
||||
}
|
||||
else if (fieldInfo->FieldType == Vector3::typeid)
|
||||
{
|
||||
if (node.IsSequence() && node.size() == 3)
|
||||
{
|
||||
Vector3 vec;
|
||||
vec.x = node[0].as<float>();
|
||||
vec.y = node[1].as<float>();
|
||||
vec.z = node[2].as<float>();
|
||||
fieldInfo->SetValue(object, vec);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug::LogWarning
|
||||
(
|
||||
System::String::Format("[ReflectionUtilities] Invalid YAML Node provided for deserialization of a Vector3 \"{0}\" field in \"{1}\" script.",
|
||||
fieldInfo->Name, object->GetType()->FullName)
|
||||
);
|
||||
}
|
||||
}
|
||||
else // Not any of the supported types
|
||||
{
|
||||
Debug::LogWarning(Convert::ToNative(System::String::Format
|
||||
(
|
||||
"[ReflectionUtilities] Failed to parse \"{0}\" of \"{1}\" type for deserialisation.",
|
||||
fieldInfo->Name, fieldInfo->FieldType)
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
/************************************************************************************//*!
|
||||
\file ReflectionUtilities.h++
|
||||
\author Tng Kah Wei, kahwei.tng, 390009620
|
||||
\par email: kahwei.tng\@digipen.edu
|
||||
\date Sep 16, 2022
|
||||
\brief Contains the definition of the template functions of the managed
|
||||
ReflectionUtilities static class.
|
||||
|
||||
Note: This file is written in C++17/CLI.
|
||||
|
||||
Copyright (C) 2022 DigiPen Institute of Technology.
|
||||
Reproduction or disclosure of this file or its contents without the prior written consent
|
||||
of DigiPen Institute of Technology is prohibited.
|
||||
*//*************************************************************************************/
|
||||
#pragma once
|
||||
|
||||
// Primary Header
|
||||
#include "ReflectionUtilities.hxx"
|
||||
|
||||
namespace SHADE
|
||||
{
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/* Serialization Helper Functions */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
template<typename FieldType>
|
||||
bool ReflectionUtilities::fieldInsertYaml(System::Reflection::FieldInfo^ fieldInfo, System::Object^ object, YAML::Emitter& emitter)
|
||||
{
|
||||
if (fieldInfo->FieldType == FieldType::typeid)
|
||||
{
|
||||
emitter << safe_cast<FieldType>(fieldInfo->GetValue(object));
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
template<typename FieldType>
|
||||
bool ReflectionUtilities::fieldAssignYaml(System::Reflection::FieldInfo^ fieldInfo, Object^ object, YAML::Node& node)
|
||||
{
|
||||
return fieldAssignYaml<FieldType, FieldType>(fieldInfo, object, node);
|
||||
}
|
||||
|
||||
template<typename FieldType, typename CastType>
|
||||
bool ReflectionUtilities::fieldAssignYaml(System::Reflection::FieldInfo^ fieldInfo, Object^ object, YAML::Node& node)
|
||||
{
|
||||
if (fieldInfo->FieldType == FieldType::typeid)
|
||||
{
|
||||
fieldInfo->SetValue(object, node.as<CastType>());
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
/************************************************************************************//*!
|
||||
\file ReflectionUtilities.hxx
|
||||
\author Tng Kah Wei, kahwei.tng, 390009620
|
||||
\par email: kahwei.tng\@digipen.edu
|
||||
\date Nov 6, 2021
|
||||
\brief Contains the definition of the managed ReflectionUtilities static class.
|
||||
|
||||
Note: This file is written in C++17/CLI.
|
||||
|
||||
Copyright (C) 2021 DigiPen Institute of Technology.
|
||||
Reproduction or disclosure of this file or its contents without the prior written consent
|
||||
of DigiPen Institute of Technology is prohibited.
|
||||
*//*************************************************************************************/
|
||||
#pragma once
|
||||
|
||||
// External Dependencies
|
||||
#include <yaml-cpp/yaml.h>
|
||||
|
||||
namespace SHADE
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains useful static functions for working with Reflection.
|
||||
/// </summary>
|
||||
private ref class ReflectionUtilities abstract sealed
|
||||
{
|
||||
public:
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/* Utility Functions */
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/// <summary>
|
||||
/// Retrieves a set of all non-static (instance) fields from a specified object.
|
||||
/// </summary>
|
||||
/// <param name="object">The object to get non-static fields from.</param>
|
||||
/// <returns>Immutable list of non-static fields.</returns>
|
||||
static System::Collections::Generic::IEnumerable<System::Reflection::FieldInfo^>^ GetInstanceFields(System::Object^ object);
|
||||
/// <summary>
|
||||
/// Checks if a specified field is a candidate for serialisation. This means that
|
||||
/// the field is public or private with the [SerialiseField] attribute.
|
||||
/// </summary>
|
||||
/// <param name="fieldInfo">The field to check.</param>
|
||||
/// <returns>
|
||||
/// True if the specified field is a candidate for serialisation.
|
||||
/// </returns>
|
||||
static bool FieldIsSerialisable(System::Reflection::FieldInfo^ fieldInfo);
|
||||
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/* Serialisation Functions */
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/// <summary>
|
||||
/// Creates a JSON node that represents the specified object and its associated
|
||||
/// serialisable fields. Public fields and fields marked with the SerialiseField
|
||||
/// attribute will be serialised.
|
||||
/// </summary>
|
||||
/// <param name="object">The object to serialise.</param>
|
||||
static void Serialise(System::Object^ object, YAML::Emitter& yaml);
|
||||
/// <summary>
|
||||
/// Deserialises a YAML node that contains a map of Scripts and copies the
|
||||
/// deserialised data into the specified object if there are matching fields.
|
||||
/// </summary>
|
||||
/// <param name="yamlNode">
|
||||
/// The JSON string that contains the data to copy into this PlushieScript
|
||||
/// object.
|
||||
/// </param>
|
||||
/// <param name="object">The object to copy deserialised data into.</param>
|
||||
static void Deserialise(YAML::Node& yamlNode, Object^ object);
|
||||
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/* Serialization Helper Functions */
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
static void writeFieldIntoYaml(System::Reflection::FieldInfo^ fieldInfo, Object^ object, YAML::Emitter& yaml);
|
||||
template<typename FieldType>
|
||||
static bool fieldInsertYaml(System::Reflection::FieldInfo^ fieldInfo, System::Object^ object, YAML::Emitter& emitter);
|
||||
static void writeYamlIntoField(System::Reflection::FieldInfo^ fieldInfo, Object^ object, YAML::Node& node);
|
||||
template<typename FieldType>
|
||||
static bool fieldAssignYaml(System::Reflection::FieldInfo^ fieldInfo, Object^ object, YAML::Node& node);
|
||||
template<typename FieldType, typename CastType>
|
||||
static bool fieldAssignYaml(System::Reflection::FieldInfo^ fieldInfo, Object^ object, YAML::Node& node);
|
||||
};
|
||||
}
|
||||
|
||||
#include "ReflectionUtilities.h++"
|
|
@ -0,0 +1,27 @@
|
|||
/************************************************************************************//*!
|
||||
\file SerializeFieldAttribute.cxx
|
||||
\author Tng Kah Wei, kahwei.tng, 390009620
|
||||
\par email: kahwei.tng\@digipen.edu
|
||||
\date Nov 5, 2021
|
||||
\brief Contains the definition of the functions of the managed SerializeField
|
||||
Attribute class.
|
||||
|
||||
Note: This file is written in C++17/CLI.
|
||||
|
||||
Copyright (C) 2021 DigiPen Institute of Technology.
|
||||
Reproduction or disclosure of this file or its contents without the prior written consent
|
||||
of DigiPen Institute of Technology is prohibited.
|
||||
*//*************************************************************************************/
|
||||
// Precompiled Headers
|
||||
#include "SHpch.h"
|
||||
// Primary Header
|
||||
#include "SerializeFieldAttribute.hxx"
|
||||
|
||||
namespace SHADE
|
||||
{
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/* Constructors */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
SerializeField::SerializeField()
|
||||
{}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
/************************************************************************************//*!
|
||||
\file SerializeFieldAttribute.hxx
|
||||
\author Tng Kah Wei, kahwei.tng, 390009620
|
||||
\par email: kahwei.tng\@digipen.edu
|
||||
\date Nov 5, 2021
|
||||
\brief Contains the definition of the managed SerializeField Attribute class with
|
||||
the declaration of functions for working with it.
|
||||
|
||||
Note: This file is written in C++17/CLI.
|
||||
|
||||
Copyright (C) 2021 DigiPen Institute of Technology.
|
||||
Reproduction or disclosure of this file or its contents without the prior written consent
|
||||
of DigiPen Institute of Technology is prohibited.
|
||||
*//*************************************************************************************/
|
||||
#pragma once
|
||||
|
||||
namespace SHADE
|
||||
{
|
||||
/// <summary>
|
||||
/// Simple attribute to mark that a field in a Script should be serialised.
|
||||
/// </summary>
|
||||
[System::AttributeUsage(System::AttributeTargets::Field)]
|
||||
public ref class SerializeField : public System::Attribute
|
||||
{
|
||||
public:
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/* Constructors */
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
/// <summary>
|
||||
/// Default Constructor
|
||||
/// </summary>
|
||||
SerializeField();
|
||||
};
|
||||
}
|
||||
|
|
@ -18,6 +18,8 @@ of DigiPen Institute of Technology is prohibited.
|
|||
#include "Debug.hxx"
|
||||
// Standard Libraries
|
||||
#include <sstream>
|
||||
// External Libraries
|
||||
#include "Tools/SHLog.h"
|
||||
// Project Headers
|
||||
#include "Convert.hxx"
|
||||
|
||||
|
@ -28,11 +30,11 @@ namespace SHADE
|
|||
/*---------------------------------------------------------------------------------*/
|
||||
void Debug::Log(const std::string& str)
|
||||
{
|
||||
std::cout << str << std::endl;
|
||||
SHLog::Info(str);
|
||||
}
|
||||
void Debug::Log(System::String^ str)
|
||||
{
|
||||
System::Console::WriteLine(str);
|
||||
SHLog::Info(Convert::ToNative(str));
|
||||
}
|
||||
|
||||
void Debug::Log(System::String^ str, Object^ owner)
|
||||
|
@ -47,15 +49,15 @@ namespace SHADE
|
|||
{
|
||||
std::ostringstream oss;
|
||||
oss << "[" << throwerName << "] " << Convert::ToNative(str);
|
||||
std::cout << oss.str() << std::endl;
|
||||
Log(oss.str());
|
||||
}
|
||||
void Debug::LogWarning(const std::string& str)
|
||||
{
|
||||
std::cout << str << std::endl;
|
||||
SHLog::Warning(str);
|
||||
}
|
||||
void Debug::LogWarning(System::String^ str)
|
||||
{
|
||||
System::Console::WriteLine(str);
|
||||
SHLog::Warning(Convert::ToNative(str));
|
||||
}
|
||||
void Debug::LogWarning(System::String^ str, Object^ thrower)
|
||||
{
|
||||
|
@ -70,15 +72,15 @@ namespace SHADE
|
|||
{
|
||||
std::ostringstream oss;
|
||||
oss << "[" << throwerName << "] " << Convert::ToNative(str);
|
||||
std::cout << oss.str() << std::endl;
|
||||
LogWarning(oss.str());
|
||||
}
|
||||
void Debug::LogError(const std::string& str)
|
||||
{
|
||||
std::cout << str << std::endl;
|
||||
SHLog::Error(str);
|
||||
}
|
||||
void Debug::LogError(System::String^ str)
|
||||
{
|
||||
System::Console::WriteLine(str);
|
||||
SHLog::Error(Convert::ToNative(str));
|
||||
}
|
||||
void Debug::LogError(System::String^ str, Object^ thrower)
|
||||
{
|
||||
|
@ -88,7 +90,7 @@ namespace SHADE
|
|||
{
|
||||
std::ostringstream oss;
|
||||
oss << "[" << throwerName << "] -> " << Convert::ToNative(str);
|
||||
std::cout << oss.str() << std::endl;
|
||||
LogError(oss.str());
|
||||
}
|
||||
void Debug::LogError(System::String^ str, System::String^ throwerName)
|
||||
{
|
||||
|
@ -111,12 +113,12 @@ namespace SHADE
|
|||
{
|
||||
std::ostringstream oss;
|
||||
oss << "[" << throwerName << "] Unhandled exception: " << Convert::ToNative(exception->ToString());
|
||||
std::cout << oss.str() << std::endl;
|
||||
LogError(oss.str());
|
||||
}
|
||||
void Debug::LogExceptionNative(const std::exception& exception, const std::string& throwerName)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "[" << throwerName << "] Unhandled exception: " << exception.what();
|
||||
std::cout << oss.str() << std::endl;
|
||||
LogError(oss.str());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
using SHADE;
|
||||
|
||||
public class TestScript : Script
|
||||
{
|
||||
public TestScript(GameObject gameObj) : base(gameObj) {}
|
||||
|
||||
protected override void awake()
|
||||
{
|
||||
Debug.Log("TestScript.Awake()");
|
||||
}
|
||||
protected override void start()
|
||||
{
|
||||
Debug.Log("TestScript.Start()");
|
||||
}
|
||||
protected override void update()
|
||||
{
|
||||
Debug.Log("TestScript.Update()");
|
||||
}
|
||||
protected override void onDestroy()
|
||||
{
|
||||
Debug.Log("TestScript.OnDestroy()");
|
||||
}
|
||||
}
|
|
@ -7,7 +7,7 @@ workspace "SHADE"
|
|||
configurations
|
||||
{
|
||||
"Debug",
|
||||
"Release",
|
||||
"Release"
|
||||
}
|
||||
|
||||
flags
|
||||
|
|
Loading…
Reference in New Issue