Scene changes and bug fixes #440
|
@ -147,7 +147,7 @@ namespace SHADE
|
||||||
//SHAssetManager::CompileAsset("../../Assets/Shaders/Anim_VS.glsl", false);
|
//SHAssetManager::CompileAsset("../../Assets/Shaders/Anim_VS.glsl", false);
|
||||||
//SHAssetManager::CompileAsset("../../Assets/Shaders/Particle_VS.glsl", false);
|
//SHAssetManager::CompileAsset("../../Assets/Shaders/Particle_VS.glsl", false);
|
||||||
//SHAssetManager::CompileAsset("../../Assets/Shaders/Particle_FS.glsl", false);
|
//SHAssetManager::CompileAsset("../../Assets/Shaders/Particle_FS.glsl", false);
|
||||||
SHAssetManager::CompileAsset("../../Assets/Shaders/ParticleEmit_CS.glsl", false);
|
//SHAssetManager::CompileAsset("../../Assets/Shaders/ParticleEmit_CS.glsl", false);
|
||||||
//SHAssetManager::CompileAsset("../../Assets/Shaders/ParticleUpdate_CS.glsl", false);
|
//SHAssetManager::CompileAsset("../../Assets/Shaders/ParticleUpdate_CS.glsl", false);
|
||||||
|
|
||||||
// Load Built In Shaders
|
// Load Built In Shaders
|
||||||
|
@ -574,6 +574,13 @@ namespace SHADE
|
||||||
ReceiverPtr compileAssetReceivePtr = std::dynamic_pointer_cast<SHEventReceiver>(compileAssetReceiever);
|
ReceiverPtr compileAssetReceivePtr = std::dynamic_pointer_cast<SHEventReceiver>(compileAssetReceiever);
|
||||||
SHEventManager::SubscribeTo(SH_ASSET_COMPILE_EVENT, compileAssetReceivePtr);
|
SHEventManager::SubscribeTo(SH_ASSET_COMPILE_EVENT, compileAssetReceivePtr);
|
||||||
|
|
||||||
|
std::shared_ptr<SHEventReceiverSpec<SHGraphicsSystem>> sceneExitPreEvent
|
||||||
|
{
|
||||||
|
std::make_shared<SHEventReceiverSpec<SHGraphicsSystem>>(this, &SHGraphicsSystem::ReceivePreSceneExitEvent)
|
||||||
|
};
|
||||||
|
ReceiverPtr sceneExitPreEventPtr = std::dynamic_pointer_cast<SHEventReceiver>(sceneExitPreEvent);
|
||||||
|
SHEventManager::SubscribeTo(SH_SCENE_EXIT_PRE, sceneExitPreEventPtr);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SHGraphicsSystem::InitGenericDataAndTexturesDescSet(void) noexcept
|
void SHGraphicsSystem::InitGenericDataAndTexturesDescSet(void) noexcept
|
||||||
|
@ -984,6 +991,14 @@ namespace SHADE
|
||||||
return eventPtr->handle;
|
return eventPtr->handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SHEventHandle SHGraphicsSystem::ReceivePreSceneExitEvent(SHEventPtr eventPtr) noexcept
|
||||||
|
{
|
||||||
|
device->WaitIdle();
|
||||||
|
|
||||||
|
return eventPtr->handle;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
SHEventHandle SHGraphicsSystem::ReceiveLightDeleteEvent(SHEventPtr eventPtr) noexcept
|
SHEventHandle SHGraphicsSystem::ReceiveLightDeleteEvent(SHEventPtr eventPtr) noexcept
|
||||||
{
|
{
|
||||||
// we need to wait for the device to finish using the graph first
|
// we need to wait for the device to finish using the graph first
|
||||||
|
|
|
@ -183,6 +183,7 @@ namespace SHADE
|
||||||
/* Light functions */
|
/* Light functions */
|
||||||
/*-----------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------*/
|
||||||
SHEventHandle ReceiveLightEnableShadowEvent (SHEventPtr eventPtr) noexcept;
|
SHEventHandle ReceiveLightEnableShadowEvent (SHEventPtr eventPtr) noexcept;
|
||||||
|
SHEventHandle ReceivePreSceneExitEvent (SHEventPtr eventPtr) noexcept;
|
||||||
SHEventHandle ReceiveLightDeleteEvent (SHEventPtr eventPtr) noexcept;
|
SHEventHandle ReceiveLightDeleteEvent (SHEventPtr eventPtr) noexcept;
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------*/
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#include "SHpch.h"
|
#include "SHpch.h"
|
||||||
#include "SHParticleEmitterComponent.h"
|
#include "SHParticleEmitterComponent.h"
|
||||||
|
#include "Graphics/Buffers/SHVkBuffer.h"
|
||||||
|
#include "Graphics/Descriptors/SHVkDescriptorSetGroup.h"
|
||||||
|
|
||||||
namespace SHADE
|
namespace SHADE
|
||||||
{
|
{
|
||||||
|
@ -12,7 +14,12 @@ namespace SHADE
|
||||||
|
|
||||||
void SHParticleEmitterComponent::OnDestroy(void)
|
void SHParticleEmitterComponent::OnDestroy(void)
|
||||||
{
|
{
|
||||||
|
emitterData.Free();
|
||||||
|
particleData.Free();
|
||||||
|
freelistData.Free();
|
||||||
|
indicesData.Free();
|
||||||
|
drawCallData.Free();
|
||||||
|
particleDescriptorSet.Free();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SHParticleEmitterComponent::Emit(void) noexcept
|
void SHParticleEmitterComponent::Emit(void) noexcept
|
||||||
|
|
Loading…
Reference in New Issue