30 std::shared_ptr<Nodes::NodeGraphManager> node_graph_manager,
31 std::shared_ptr<Buffers::BufferManager> buffer_manager,
32 std::shared_ptr<Vruta::TaskScheduler> scheduler,
33 std::shared_ptr<Vruta::EventManager> event_manager,
34 std::shared_ptr<Core::WindowManager> window_manager)
38 "Portal::Forma already initialized");
55 "Portal::Forma initialized");
77 "Portal::Forma shutdown");
84 std::source_location::current(),
85 "Portal::Forma not initialized - cannot get bridge");
94 std::source_location::current(),
95 "Portal::Forma not initialized - cannot get inspector");
108 std::source_location::current(),
109 "Portal::Forma not initialized - cannot create window");
121 std::source_location::current(),
122 "Portal::Forma not initialized - cannot create buffer");
127 std::source_location::current(),
128 "Portal::Forma create_buffer requires a target window");
138 buf->setup_rendering(render);
140 if (
auto processor = buf->get_render_processor()) {
144 processor->set_mill_spec(spec);
149std::pair<std::shared_ptr<Layer>, std::shared_ptr<Context>>
152 auto layer = std::make_shared<Layer>();
157 return { std::move(layer), std::move(ctx) };
164 }
else if (config.
layer && !config.
ctx) {
167 }
else if (!config.
layer) {
169 config.
layer = std::move(layer);
170 config.
ctx = std::move(ctx);
172 return Surface(std::move(config));
179 .name = std::move(
name),
187 const std::shared_ptr<Buffers::FormaBuffer>& batch)
191 std::shared_ptr<Buffers::FormaBuffer> owned_batch;
193 if (!batch && !owned_batch) {
201 const auto& target_batch = batch ? batch : owned_batch;
205 const auto legend = spec.
legend
209 for (
const auto& swatch : legend->swatches) {
228 for (
const auto&
label : legend->labels) {
#define MF_INFO(comp, ctx,...)
#define MF_WARN(comp, ctx,...)
std::weak_ptr< Core::Window > window
PrimitiveTopology topology
@ GRAPHICS_BACKEND
Standard graphics processing backend configuration.
@ API
API calls from external code.
@ Portal
High-level user-facing API layer.
PrimitiveTopology
Vertex assembly primitive topology.
std::shared_ptr< T > store(std::shared_ptr< T > obj)
Transfer ownership of an existing object to the persistent store for process lifetime.
Configuration for creating a single window instance.
@ WorldPlane
Held in the XY plane, viewpoint ignored.
float width_scale
World units of total ribbon width per unit of a vertex's scalar.
How a PrimitiveMill shapes spans.
std::shared_ptr< Core::Window > target_window
std::vector< std::pair< std::string, std::shared_ptr< Core::VKImage > > > additional_textures
bool triangulate
Reduce supplied spans to triangles before drawing them.
PrimitiveTopology topology
std::string fragment_shader
Unified rendering configuration for graphics buffers.