Files
Renderive/Core/plot/Present_Frame.h
T
2026-08-01 20:09:45 +08:00

29 lines
673 B
C++

#pragma once
#include "Plot_Frame_Pipeline.h"
#include "../render/Image_View.h"
#include <cstdint>
#include <memory>
namespace renderive {
class Present_Frame {
public:
Present_Frame();
Present_Frame(Present_Frame&&) noexcept;
Present_Frame& operator=(Present_Frame&&) noexcept;
~Present_Frame();
[[nodiscard]] explicit operator bool() const;
[[nodiscard]] bool new_frame() const;
[[nodiscard]] bool request_was_pending() const;
[[nodiscard]] Image_View image() const;
private:
friend class Plot_Core;
std::unique_ptr<Plot_Frame_Lease> lease_;
bool is_new_frame{};
bool update_was_pending{};
};
} // namespace renderive