TextureAtlasModule.cpp 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 "TextureAtlasSystemComponent.h"
  10. #ifdef TEXTUREATLAS_EDITOR
  11. #include "Editor/AtlasBuilderComponent.h"
  12. #endif
  13. #include <IGem.h>
  14. namespace TextureAtlasNamespace
  15. {
  16. class TextureAtlasModule
  17. : public CryHooksModule
  18. {
  19. public:
  20. AZ_RTTI(TextureAtlasModule, "{D3997F41-8117-4E0F-9BFE-937C4AE7E71F}", CryHooksModule);
  21. AZ_CLASS_ALLOCATOR(TextureAtlasModule, AZ::SystemAllocator);
  22. TextureAtlasModule()
  23. : CryHooksModule()
  24. {
  25. // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
  26. m_descriptors.insert(m_descriptors.end(), {
  27. TextureAtlasSystemComponent::CreateDescriptor(),
  28. #ifdef TEXTUREATLAS_EDITOR
  29. TextureAtlasBuilder::AtlasBuilderComponent::CreateDescriptor(), //builder component for texture atlas
  30. #endif
  31. });
  32. }
  33. /**
  34. * Add required SystemComponents to the SystemEntity.
  35. */
  36. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  37. {
  38. return AZ::ComponentTypeList{
  39. azrtti_typeid<TextureAtlasSystemComponent>(),
  40. };
  41. }
  42. };
  43. }
  44. // DO NOT MODIFY THIS LINE UNLESS YOU RENAME THE GEM
  45. // The first parameter should be GemName_GemIdLower
  46. // The second should be the fully qualified name of the class above
  47. AZ_DECLARE_MODULE_CLASS(Gem_TextureAtlas, TextureAtlasNamespace::TextureAtlasModule)