SwapchainExampleComponent.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. AZ_COMPONENT(SwapchainExampleComponent, "{F8A990AD-63C0-43D8-AE9B-FB9D84CB58E2}", AZ::Component);
  19. static void Reflect(AZ::ReflectContext* context);
  20. SwapchainExampleComponent();
  21. ~SwapchainExampleComponent() override = default;
  22. protected:
  23. AZ_DISABLE_COPY(SwapchainExampleComponent);
  24. // Component
  25. virtual void Activate() override;
  26. virtual void Deactivate() override;
  27. // TickBus::Handler
  28. void OnTick(float deltaTime, AZ::ScriptTimePoint time) override;
  29. uint32_t m_timeInSeconds = 0;
  30. };
  31. } // namespace AtomSampleViewer