From 1a14e5241b1fa12325aa45e4f4f6ce4f222dee9d Mon Sep 17 00:00:00 2001 From: Kah Wei Date: Sat, 1 Oct 2022 23:14:42 +0800 Subject: [PATCH] Added names for SHGraphicsSystem Routines --- .../MiddleEnd/Interface/SHGraphicsSystem.cpp | 29 +++++++++++++++++++ .../MiddleEnd/Interface/SHGraphicsSystem.h | 4 +++ 2 files changed, 33 insertions(+) diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp index e4207c20..8e3c599b 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp @@ -518,21 +518,50 @@ namespace SHADE { window = wind; } + + /*-----------------------------------------------------------------------------------*/ + /* System Routine Functions - BeginRoutine */ + /*-----------------------------------------------------------------------------------*/ + SHGraphicsSystem::BeginRoutine::BeginRoutine() + : SHSystemRoutine("Graphics System Frame Set Up", false) + {} void SHGraphicsSystem::BeginRoutine::Execute(double) noexcept { reinterpret_cast(system)->BeginRender(); } + + /*-----------------------------------------------------------------------------------*/ + /* System Routine Functions - RenderRoutine */ + /*-----------------------------------------------------------------------------------*/ + SHGraphicsSystem::RenderRoutine::RenderRoutine() + : SHSystemRoutine("Graphics System Render", false) + {} void SHGraphicsSystem::RenderRoutine::Execute(double dt) noexcept { reinterpret_cast(system)->Run(dt); } + /*-----------------------------------------------------------------------------------*/ + /* System Routine Functions - EndRoutine */ + /*-----------------------------------------------------------------------------------*/ + SHGraphicsSystem::EndRoutine::EndRoutine() + : SHSystemRoutine("Graphics System Frame Clean Up", false) + {} + void SHGraphicsSystem::EndRoutine::Execute(double) noexcept { reinterpret_cast(system)->EndRender(); } + + /*-----------------------------------------------------------------------------------*/ + /* System Routine Functions - BatcherDispatcherRoutine */ + /*-----------------------------------------------------------------------------------*/ + SHGraphicsSystem::BatcherDispatcherRoutine::BatcherDispatcherRoutine() + : SHSystemRoutine("Graphics System Batcher Dispatcher", false) + {} + void SHGraphicsSystem::BatcherDispatcherRoutine::Execute(double) noexcept { auto& renderables = SHComponentManager::GetDense(); diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.h b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.h index 10df44a5..3a392ac5 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.h +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.h @@ -69,21 +69,25 @@ namespace SHADE class SH_API BeginRoutine final : public SHSystemRoutine { public: + BeginRoutine(); virtual void Execute(double dt) noexcept override final; }; class SH_API RenderRoutine final : public SHSystemRoutine { public: + RenderRoutine(); virtual void Execute(double dt) noexcept override final; }; class SH_API EndRoutine final : public SHSystemRoutine { public: + EndRoutine(); virtual void Execute(double dt) noexcept override final; }; class SH_API BatcherDispatcherRoutine final : public SHSystemRoutine { public: + BatcherDispatcherRoutine(); virtual void Execute(double dt) noexcept override final; };