Module.cpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * 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. #include <AzCore/Module/Module.h>
  9. #include <RHI.Profiler/RenderDoc/RenderDocSystemComponent.h>
  10. namespace AZ::RHI
  11. {
  12. //! This module is in charge of loading the RenderDoc system component
  13. class RenderDocModule
  14. : public AZ::Module
  15. {
  16. public:
  17. AZ_RTTI(RenderDocModule, "{E977EF87-E738-4E15-9D01-C7663867E959}", Module);
  18. RenderDocModule()
  19. {
  20. m_descriptors.insert(m_descriptors.end(), {
  21. RenderDocSystemComponent::CreateDescriptor()
  22. });
  23. }
  24. ~RenderDocModule() override = default;
  25. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  26. {
  27. return AZ::ComponentTypeList
  28. {
  29. azrtti_typeid<RenderDocSystemComponent>(),
  30. };
  31. }
  32. };
  33. }
  34. #if defined(O3DE_GEM_NAME)
  35. AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME), AZ::RHI::RenderDocModule)
  36. #else
  37. AZ_DECLARE_MODULE_CLASS(Gem_Atom_RHI_Profiler_RenderDoc, AZ::RHI::RenderDocModule)
  38. #endif