还是一堆bug的状态
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
#pragma once
|
||||
#include "../architecture/Plot_Render_Context.h"
|
||||
#include "../architecture/Renderable.h"
|
||||
#include "../base/Color.h"
|
||||
#include "../base/Geometry.h"
|
||||
#include "../event/Event.h"
|
||||
#include "Present_Frame.h"
|
||||
#include "Presentation_Sink.h"
|
||||
#include "Refresh_Strategy.h"
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace renderive {
|
||||
|
||||
class Plot_Core_Private;
|
||||
|
||||
class Plot_Core {
|
||||
public:
|
||||
explicit Plot_Core(std::unique_ptr<Refresh_Strategy> strategy);
|
||||
~Plot_Core();
|
||||
|
||||
void init();
|
||||
|
||||
[[nodiscard]] std::shared_ptr<Plot_Render_Context> render_context() const;
|
||||
[[nodiscard]] std::shared_ptr<Renderable> root_renderable() const;
|
||||
[[nodiscard]] std::shared_ptr<Renderable> create_renderable_node(
|
||||
const std::shared_ptr<Renderable>& parent, std::string object_name = {});
|
||||
|
||||
void remove_renderable(const std::shared_ptr<Renderable>& renderable);
|
||||
|
||||
void set_background_color(Color color);
|
||||
[[nodiscard]] Color background_color() const;
|
||||
|
||||
void set_viewport_size(Size size);
|
||||
[[nodiscard]] Size viewport_size() const;
|
||||
|
||||
void dispatch_event(const Event& event);
|
||||
void mark_render_state_dirty();
|
||||
void request_manual_refresh();
|
||||
|
||||
void start_render();
|
||||
void pause_render();
|
||||
[[nodiscard]] bool is_rendering() const;
|
||||
|
||||
void set_presentation_sink(std::weak_ptr<Presentation_Sink> sink);
|
||||
|
||||
Present_Frame begin_present();
|
||||
void end_present(Present_Frame&& frame, std::uint64_t paint_begin_ns, std::uint64_t paint_end_ns);
|
||||
|
||||
private:
|
||||
std::unique_ptr<Plot_Core_Private> d;
|
||||
};
|
||||
|
||||
} // namespace renderive
|
||||
Reference in New Issue
Block a user