MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ make_row_buffer()

RowBuffer MayaFlux::Portal::Forma::Inspector::make_row_buffer ( const std::shared_ptr< Core::Window > &  window,
std::string_view  text,
glm::uvec2  pixel_dims 
) const
private

Definition at line 13 of file Inspector.cpp.

17{
18 Portal::Text::PressParams params {
19 .color = { 1.F, 1.F, 1.F, 1.F },
20 .budget_h = pixel_dims.y,
21 };
22 auto text_image = Portal::Text::press(text, pixel_dims, params);
23
24 const size_t cap = static_cast<const size_t>(12) * Kakshya::VertexLayout::for_meshes().stride_bytes;
25 auto buf = std::make_shared<Buffers::FormaBuffer>(
28 buf->setup_rendering({
29 .target_window = window,
30 .additional_textures = { { "text", text_image } },
31 });
32
33 return { .buf = std::move(buf), .text_image = std::move(text_image) };
34}
void add_buffer(const std::shared_ptr< Buffer > &buffer, ProcessingToken token, uint32_t channel=0)
Adds a buffer to a token and channel.
Buffers::BufferManager & m_bm
@ GRAPHICS_BACKEND
Standard graphics processing backend configuration.
std::shared_ptr< Buffers::TextBuffer > press(std::string_view text, const PressParams &params)
Composite a UTF-8 string into a new TextBuffer.
Definition InkPress.cpp:237
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)

References MayaFlux::Buffers::BufferManager::add_buffer(), MayaFlux::Portal::Text::PressParams::color, MayaFlux::Kakshya::VertexLayout::for_meshes(), MayaFlux::Buffers::GRAPHICS_BACKEND, m_bm, MayaFlux::Portal::Text::press(), MayaFlux::Kakshya::VertexLayout::stride_bytes, and MayaFlux::Portal::Graphics::TRIANGLE_LIST.

Referenced by buffer(), buffer_manager(), event(), event_manager(), inspect_modulator_tree(), inspect_task(), node(), node_graph_manager(), node_network(), root_audio_buffer(), root_audio_buffer(), root_graphics_buffer(), root_node(), scheduler(), and tasks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: