22 std::shared_ptr<Core::Window> g_inspect_nodes_window;
23 std::shared_ptr<Core::Window> g_inspect_buffers_window;
24 std::shared_ptr<Core::Window> g_inspect_scheduler_window;
25 std::shared_ptr<Core::Window> g_inspect_events_window;
27 constexpr uint32_t k_inspect_w = 480;
28 constexpr uint32_t k_inspect_h = 900;
37 std::shared_ptr<Nodes::NodeGraphManager> node_graph_manager,
38 std::shared_ptr<Buffers::BufferManager> buffer_manager,
39 std::shared_ptr<Vruta::TaskScheduler> scheduler,
40 std::shared_ptr<Vruta::EventManager> event_manager,
41 std::shared_ptr<Core::WindowManager> window_manager)
44 std::move(node_graph_manager), std::move(buffer_manager),
45 std::move(scheduler), std::move(event_manager), std::move(window_manager));
52 g_inspect_nodes_window.reset();
53 g_inspect_buffers_window.reset();
54 g_inspect_scheduler_window.reset();
55 g_inspect_events_window.reset();
68std::pair<std::shared_ptr<Layer>, std::shared_ptr<Context>>
84 std::shared_ptr<Core::Window> window,
86 const std::string& texture_binding)
93 std::shared_ptr<Core::Window> window,
95 std::vector<std::pair<std::string, std::shared_ptr<Core::VKImage>>> additional_textures)
99 std::move(additional_textures));
106std::pair<Mapped<std::shared_ptr<Kakshya::PlotContainer>>, Surface>
111 std::shared_ptr<Kakshya::PlotContainer> container,
114 const uint64_t
N = container->series_count() > 0
115 ? container->series_size(0)
123 auto surface = atelier.
create_surface(window, window->get_create_info().title);
127 surface.layer(), window,
133 const auto bg_id = bg.element.id;
135 auto mapped =
Plot::place(surface, std::move(buf), spec, std::move(container));
136 surface.layer().relate(mapped.element.id, bg_id);
137 surface.layer().send_to_back(bg_id);
141 return { std::move(mapped), std::move(surface) };
145 auto mapped =
Plot::place(surface, std::move(buf), spec, std::move(container));
149 return { std::move(mapped), std::move(surface) };
158 if (g_inspect_nodes_window) {
159 g_inspect_nodes_window->show();
168 auto surface = atelier.
create_surface(g_inspect_nodes_window,
"NodeGraphManager");
171 atelier.
bridge().
spawn_sync(result.group.header.header_id, [&result] { result.tap_all(); });
176 if (g_inspect_buffers_window) {
177 g_inspect_buffers_window->show();
186 auto surface = atelier.
create_surface(g_inspect_buffers_window,
"BufferManager");
189 atelier.
bridge().
spawn_sync(result.group.header.header_id, [&result] { result.tap_all(); });
194 if (g_inspect_scheduler_window) {
195 g_inspect_scheduler_window->show();
204 auto surface = atelier.
create_surface(g_inspect_scheduler_window,
"TaskScheduler");
207 atelier.
bridge().
spawn_sync(result.group.header.header_id, [&result] { result.tap_all(); });
212 if (g_inspect_events_window) {
213 g_inspect_events_window->show();
222 auto surface = atelier.
create_surface(g_inspect_events_window,
"EventManager");
225 atelier.
bridge().
spawn_sync(result.group.header.header_id, [&result] { result.tap_all(); });
228void inspect(
const std::shared_ptr<Nodes::Node>& node)
238 auto result = std::make_shared<InspectResult>(atelier.
inspector().
node(node, surface, cursor));
239 atelier.
bridge().
spawn_sync(result->group.header.header_id, [result] { result->tap_all(); });
242void inspect(
const std::shared_ptr<Buffers::Buffer>& buf)
252 auto result = std::make_shared<InspectResult>(atelier.
inspector().
buffer(buf, surface, cursor));
253 atelier.
bridge().
spawn_sync(result->group.header.header_id, [result] { result->tap_all(); });
256void inspect(
const std::shared_ptr<Nodes::Network::NodeNetwork>& net)
265 auto result = std::make_shared<InspectResult>(atelier.
inspector().
node_network(net, surface, cursor));
266 atelier.
bridge().
spawn_sync(result->group.header.header_id, [result] { result->tap_all(); });
269void inspect(
const std::shared_ptr<Vruta::Event>& ev, std::string_view
name)
272 const std::string title =
name.empty() ?
"Event" :
"Event: " + std::string(
name);
279 auto result = std::make_shared<InspectResult>(atelier.
inspector().
event(ev,
name, surface, cursor));
280 atelier.
bridge().
spawn_sync(result->group.header.header_id, [result] { result->tap_all(); });
#define N(method_name, full_type_name)
PrimitiveTopology
Vertex assembly primitive topology.
std::string short_dynamic_type_name(const T &obj) noexcept
Returns the unqualified dynamic type name of obj.
std::string title
Window title/identifier.
Configuration for creating a single window instance.
uint32_t stride_bytes
Total bytes per vertex (stride in Vulkan terms) e.g., 3 floats (position) + 3 floats (normal) = 24 by...
static VertexLayout for_meshes(uint32_t stride=60)
Factory: layout for MeshVertex (position, color, weight, uv, normal, tangent)