XRModule.cpp 1.3 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/Memory/SystemAllocator.h>
  9. #include <AzCore/Module/Module.h>
  10. #include <XR/XRSystemComponent.h>
  11. #include <XR/XRPassRegisterSystemComponent.h>
  12. namespace XR
  13. {
  14. class Module : public AZ::Module
  15. {
  16. public:
  17. AZ_RTTI(Module, "{71A99524-7D31-42D3-955E-3F4774F310AC}", AZ::Module);
  18. AZ_CLASS_ALLOCATOR(Module, AZ::SystemAllocator);
  19. Module()
  20. : AZ::Module()
  21. {
  22. m_descriptors.insert(
  23. m_descriptors.end(),
  24. {
  25. SystemComponent::CreateDescriptor(),
  26. PassRegisterSystemComponent::CreateDescriptor()
  27. });
  28. }
  29. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  30. {
  31. return { azrtti_typeid<XR::SystemComponent>(), azrtti_typeid<XR::PassRegisterSystemComponent>() };
  32. }
  33. };
  34. }
  35. // DO NOT MODIFY THIS LINE UNLESS YOU RENAME THE GEM
  36. // The first parameter should be GemName_GemIdLower
  37. // The second should be the fully qualified name of the class above
  38. AZ_DECLARE_MODULE_CLASS(Gem_XR, XR::Module)