SwapchainExampleComponent.h 1.2 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. #pragma once
  9. #include <RHI/BasicRHIComponent.h>
  10. #include <AzCore/Component/TickBus.h>
  11. namespace AtomSampleViewer
  12. {
  13. class SwapchainExampleComponent final
  14. : public BasicRHIComponent
  15. , public AZ::TickBus::Handler
  16. {
  17. public:
  18. static constexpr const char* ContentWarning = CommonPhotosensitiveWarning;
  19. static constexpr const char* ContentWarningTitle = CommonPhotosensitiveWarningTitle;
  20. AZ_COMPONENT(SwapchainExampleComponent, "{F8A990AD-63C0-43D8-AE9B-FB9D84CB58E2}", AZ::Component);
  21. static void Reflect(AZ::ReflectContext* context);
  22. SwapchainExampleComponent();
  23. ~SwapchainExampleComponent() override = default;
  24. protected:
  25. AZ_DISABLE_COPY(SwapchainExampleComponent);
  26. // Component
  27. virtual void Activate() override;
  28. virtual void Deactivate() override;
  29. // TickBus::Handler
  30. void OnTick(float deltaTime, AZ::ScriptTimePoint time) override;
  31. uint32_t m_timeInSeconds = 0;
  32. };
  33. } // namespace AtomSampleViewer