MeshletsSystemComponent.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * Modifications Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include <AzCore/Component/Component.h>
  10. #include <AzCore/Component/TickBus.h>
  11. #include <Atom/RPI.Public/Pass/PassSystemInterface.h>
  12. #include <Meshlets/MeshletsBus.h>
  13. namespace AZ
  14. {
  15. namespace Meshlets
  16. {
  17. class MeshletsSystemComponent
  18. : public AZ::Component
  19. , protected MeshletsRequestBus::Handler
  20. , public AZ::TickBus::Handler
  21. {
  22. public:
  23. AZ_COMPONENT(MeshletsSystemComponent, "{0a55656c-08ac-440d-a55c-f7e3c1b91712}");
  24. static void Reflect(AZ::ReflectContext* context);
  25. static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
  26. static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
  27. static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
  28. static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent);
  29. MeshletsSystemComponent();
  30. ~MeshletsSystemComponent();
  31. protected:
  32. ////////////////////////////////////////////////////////////////////////
  33. // MeshletsRequestBus interface implementation
  34. ////////////////////////////////////////////////////////////////////////
  35. ////////////////////////////////////////////////////////////////////////
  36. // AZ::Component interface implementation
  37. void Init() override;
  38. void Activate() override;
  39. void Deactivate() override;
  40. ////////////////////////////////////////////////////////////////////////
  41. ////////////////////////////////////////////////////////////////////////
  42. // AZTickBus interface implementation
  43. void OnTick(float deltaTime, AZ::ScriptTimePoint time) override;
  44. ////////////////////////////////////////////////////////////////////////
  45. //! Loads the pass templates mapping file
  46. void LoadPassTemplateMappings();
  47. //! Used for loading the pass templates of the hair gem.
  48. AZ::RPI::PassSystemInterface::OnReadyLoadTemplatesEvent::Handler m_loadTemplatesHandler;
  49. };
  50. } // namespace Meshlets
  51. } // namespace AZ