3
0

AzslShaderBuilderModule.cpp 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 <AzslShaderBuilderSystemComponent.h>
  11. namespace AZ
  12. {
  13. namespace ShaderBuilder
  14. {
  15. class AzslShaderBuilderModule
  16. : public AZ::Module
  17. {
  18. public:
  19. AZ_RTTI(AzslShaderBuilderModule, "{43370465-DBF1-44BB-968D-97C0B42F5EA0}", AZ::Module);
  20. AZ_CLASS_ALLOCATOR(AzslShaderBuilderModule, AZ::SystemAllocator);
  21. AzslShaderBuilderModule()
  22. {
  23. // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
  24. m_descriptors.insert(m_descriptors.end(), {
  25. AzslShaderBuilderSystemComponent::CreateDescriptor(),
  26. });
  27. }
  28. /**
  29. * Add required SystemComponents to the SystemEntity.
  30. */
  31. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  32. {
  33. return AZ::ComponentTypeList{
  34. azrtti_typeid<AzslShaderBuilderSystemComponent>(),
  35. };
  36. }
  37. };
  38. } // namespace ShaderBuilder
  39. } // namespace AZ
  40. #if defined(O3DE_GEM_NAME)
  41. AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME, _Builders), AZ::ShaderBuilder::AzslShaderBuilderModule)
  42. #else
  43. AZ_DECLARE_MODULE_CLASS(Gem_AtomShader_Builders, AZ::ShaderBuilder::AzslShaderBuilderModule)
  44. #endif