IPostRenderer.h 698 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. #ifndef CRYINCLUDE_EDITOR_IPOSTRENDERER_H
  9. #define CRYINCLUDE_EDITOR_IPOSTRENDERER_H
  10. #pragma once
  11. class IPostRenderer
  12. {
  13. public:
  14. IPostRenderer()
  15. : m_refCount(0){}
  16. virtual void OnPostRender() const = 0;
  17. void AddRef() { m_refCount++; }
  18. void Release()
  19. {
  20. if (--m_refCount <= 0)
  21. {
  22. delete this;
  23. }
  24. }
  25. protected:
  26. virtual ~IPostRenderer(){}
  27. int m_refCount;
  28. };
  29. #endif // CRYINCLUDE_EDITOR_IPOSTRENDERER_H