16 constexpr size_t k_text_label_capacity =
static_cast<size_t>(6) *
sizeof(
Kakshya::MeshVertex);
17 constexpr size_t k_rect_capacity =
static_cast<size_t>(4) *
sizeof(
Kakshya::Vertex);
28 std::shared_ptr<Nodes::NodeGraphManager> node_graph_manager,
29 std::shared_ptr<Buffers::BufferManager> buffer_manager,
30 std::shared_ptr<Vruta::TaskScheduler> scheduler,
31 std::shared_ptr<Vruta::EventManager> event_manager,
32 std::shared_ptr<Core::WindowManager> window_manager)
36 "Portal::Forma already initialized");
53 "Portal::Forma initialized");
74 "Portal::Forma shutdown");
81 std::source_location::current(),
82 "Portal::Forma not initialized - cannot get bridge");
91 std::source_location::current(),
92 "Portal::Forma not initialized - cannot get inspector");
109 std::shared_ptr<Core::Window> window,
112 const std::string& texture_binding,
113 std::vector<std::pair<std::string, std::shared_ptr<Core::VKImage>>> additional_textures)
115 auto buf = std::make_shared<Buffers::FormaBuffer>(capacity, topology);
118 if (!additional_textures.empty()) {
119 buf->setup_rendering({
120 .target_window = std::move(window),
121 .additional_textures = std::move(additional_textures),
123 }
else if (!texture_binding.empty()) {
124 buf->setup_rendering({
125 .target_window = std::move(window),
126 .default_texture_binding = texture_binding,
129 buf->setup_rendering({ .target_window = std::move(window) });
135std::pair<std::shared_ptr<Layer>, std::shared_ptr<Context>>
138 auto layer = std::make_shared<Layer>();
143 return { std::move(layer), std::move(ctx) };
149 return { std::move(window), std::move(layer), std::move(ctx) };
157 const auto& win = surface.
window();
159 for (
const auto& label : spec.
labels) {
162 k_text_label_capacity,
165 { {
"text",
nullptr } });
173 k_text_label_capacity,
176 { {
"text",
nullptr } });
184 for (
const auto& swatch : layout.swatches) {
192 for (
const auto& label : layout.labels) {
195 k_text_label_capacity,
198 { {
"text",
nullptr } });
#define MF_INFO(comp, ctx,...)
#define MF_WARN(comp, ctx,...)
@ 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.
Vertex type for indexed triangle mesh primitives (TRIANGLE_LIST topology)
Type-neutral vertex carrying the universal 60-byte attribute layout.