3 #include <State/ValueConversion.hpp>
5 #include <Process/ExecutionContext.hpp>
7 #include <Gfx/GfxContext.hpp>
8 #include <Gfx/GfxDevice.hpp>
9 #include <Gfx/GfxExecContext.hpp>
11 #include <ossia/dataflow/graph_edge.hpp>
12 #include <ossia/dataflow/graph_node.hpp>
13 #include <ossia/dataflow/port.hpp>
15 #include <score_plugin_gfx_export.h>
20 template <
typename Vector>
22 index_of(Vector&& v,
const typename std::remove_reference_t<Vector>::value_type& t)
24 if(
auto it = ossia::find(v, t); it != v.end())
26 return std::distance(v.begin(), it);
34 ossia::value_port* port{};
38 using exec_controls = std::vector<std::shared_ptr<exec_control>>;
44 exec_controls controls;
45 exec_controls control_outs;
49 : exec_context{&e_ctx}
53 const std::shared_ptr<control>& add_control()
55 auto port =
new ossia::value_inlet;
56 m_inlets.push_back(port);
58 controls.push_back(std::make_shared<control>());
59 auto& c = controls.back();
66 const std::shared_ptr<control>& add_control_out()
68 auto port =
new ossia::value_outlet;
69 m_outlets.push_back(port);
71 control_outs.push_back(std::make_shared<control>());
72 auto& c = control_outs.back();
81 auto port =
new ossia::value_inlet;
82 m_inlets.push_back(port);
88 auto port =
new ossia::texture_inlet;
89 m_inlets.push_back(port);
92 void add_texture_out()
94 auto port =
new ossia::texture_outlet;
95 m_outlets.push_back(port);
100 auto inletport =
new ossia::audio_inlet;
101 m_inlets.push_back(inletport);
107 std::atomic_int32_t script_index{0};
108 ossia::time_value m_last_flicks{};
109 void run(
const ossia::token_request& tk, ossia::exec_state_facade) noexcept
override;
111 void link_cable_to_inlet(ossia::inlet* inlet,
int inlet_i);
112 using ossia::graph_node::m_inlets;
113 using ossia::graph_node::m_outlets;
120 const int32_t script_index{};
121 std::weak_ptr<gfx_exec_node> weak_node;
122 void operator()(
const ossia::value& val);
Definition: GfxExecContext.hpp:16
Definition: GfxExecNode.hpp:40
Binds the rendering pipeline to ossia processes.
Definition: CameraDevice.cpp:28
Definition: ExecutionContext.hpp:76
Definition: GfxExecNode.hpp:117
Definition: GfxExecNode.hpp:32