GraphicsProfilerSystemComponent.cpp 1.2 KB

1234567891011121314151617181920212223242526272829303132
  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 <Atom/RHI.Profiler/GraphicsProfilerBus.h>
  9. #include <RHI.Profiler/GraphicsProfilerSystemComponent.h>
  10. #include <AzCore/Serialization/SerializeContext.h>
  11. #include <AzCore/RTTI/BehaviorContext.h>
  12. namespace AZ::RHI
  13. {
  14. void GraphicsProfilerSystemComponent::Reflect(AZ::ReflectContext* context)
  15. {
  16. if (SerializeContext* serializeContext = azrtti_cast<SerializeContext*>(context))
  17. {
  18. serializeContext->Class<GraphicsProfilerSystemComponent, AZ::Component>()->Version(0);
  19. }
  20. if (BehaviorContext* behaviorContext = azrtti_cast<BehaviorContext*>(context))
  21. {
  22. behaviorContext->EBus<GraphicsProfilerBus>("GraphicsProfilerBus")
  23. ->Event("StartCapture", &GraphicsProfilerBus::Events::StartCapture)
  24. ->Event("EndCapture", &GraphicsProfilerBus::Events::EndCapture)
  25. ->Event("TriggerCapture", &GraphicsProfilerBus::Events::TriggerCapture);
  26. }
  27. }
  28. }