MeshletsModuleInterface.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. #include <AzCore/Memory/SystemAllocator.h>
  9. #include <AzCore/Module/Module.h>
  10. #include <MeshletsSystemComponent.h>
  11. namespace AZ
  12. {
  13. namespace Meshlets
  14. {
  15. class MeshletsModuleInterface
  16. : public AZ::Module
  17. {
  18. public:
  19. AZ_RTTI(MeshletsModuleInterface, "{78d5f887-59e1-4ffd-b3d5-b1b2b3e94039}", AZ::Module);
  20. AZ_CLASS_ALLOCATOR(MeshletsModuleInterface, AZ::SystemAllocator);
  21. MeshletsModuleInterface()
  22. {
  23. // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
  24. // Add ALL components descriptors associated with this gem to m_descriptors.
  25. // This will associate the AzTypeInfo information for the components with the the SerializeContext, BehaviorContext and EditContext.
  26. // This happens through the [MyComponent]::Reflect() function.
  27. m_descriptors.insert(m_descriptors.end(), {
  28. MeshletsSystemComponent::CreateDescriptor(),
  29. });
  30. }
  31. /**
  32. * Add required SystemComponents to the SystemEntity.
  33. */
  34. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  35. {
  36. return AZ::ComponentTypeList{
  37. azrtti_typeid<MeshletsSystemComponent>(),
  38. };
  39. }
  40. };
  41. } // namespace Meshlets
  42. } // namespace AZ