AtomSampleViewerToolsSystemComponent.cpp 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 <Tools/AtomSampleViewerToolsSystemComponent.h>
  9. #include <MaterialFunctors/StacksShaderCollectionFunctorSourceData.h>
  10. #include <MaterialFunctors/StacksShaderInputFunctorSourceData.h>
  11. #include <Atom/RPI.Edit/Material/MaterialFunctorSourceDataRegistration.h>
  12. #include <AzCore/Component/Entity.h>
  13. #include <AzCore/Serialization/EditContext.h>
  14. #include <AzCore/Serialization/SerializeContext.h>
  15. namespace AtomSampleViewer
  16. {
  17. namespace Tools
  18. {
  19. void AtomSampleViewerToolsSystemComponent::Reflect(AZ::ReflectContext* context)
  20. {
  21. if (auto* serialize = azrtti_cast<AZ::SerializeContext*>(context))
  22. {
  23. serialize->Class<AtomSampleViewerToolsSystemComponent, AZ::Component>()
  24. ->Version(0)
  25. ;
  26. }
  27. StacksShaderCollectionFunctorSourceData::Reflect(context);
  28. StacksShaderInputFunctorSourceData::Reflect(context);
  29. }
  30. void AtomSampleViewerToolsSystemComponent::Activate()
  31. {
  32. AZ::RPI::MaterialFunctorSourceDataRegistration::Get()->RegisterMaterialFunctor("StacksShaderCollection", azrtti_typeid<StacksShaderCollectionFunctorSourceData>());
  33. AZ::RPI::MaterialFunctorSourceDataRegistration::Get()->RegisterMaterialFunctor("StacksShaderInput", azrtti_typeid<StacksShaderInputFunctorSourceData>());
  34. }
  35. void AtomSampleViewerToolsSystemComponent::Deactivate()
  36. {
  37. }
  38. } // namespace Tools
  39. } // namespace AtomSampleViewer