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

◆ create_batch()

std::shared_ptr< Buffers::FormaBuffer > MayaFlux::Portal::Forma::internal::Atelier::create_batch ( const Surface & surface,
int64_t priority = 0 )
nodiscard

A new buffer for shared Forma content, not registered with any Layer.

Plain geometry, text and plot series draw as slices of it. Its fragment shader reads a negative vertex weight as glyph coverage and every other weight as nothing, so line widths and point sizes in the weight slot are safe. The "text" slot is bound at creation to the default glyph atlas image, or to an empty one-pixel image when there is no default atlas yet, because a draw is skipped while a binding the shader uses has nothing to write. TextSlice binds the real image on first use.

Callers that need their own shader or textures build a buffer with create_buffer instead.

Parameters
surfaceSurface whose window the buffer draws to.
priorityDraw priority of the buffer; higher draws later.

Definition at line 171 of file Atelier.cpp.

172{
173 Graphics::RenderConfig render = surface.render_config();
174 render.fragment_shader = "forma_plot.frag.spv";
175 render.additional_textures.push_back({ .name = "text", .image = text_image() });
176 render.draw_priority = priority;
177 return create_buffer(std::move(render));
178}
std::shared_ptr< Core::VKImage > text_image()
Definition Atelier.cpp:153
std::shared_ptr< Buffers::FormaBuffer > create_buffer(Graphics::RenderConfig render)
The single buffer construction path.
Definition Atelier.cpp:121

References MayaFlux::Portal::Graphics::RenderConfig::additional_textures, create_buffer(), MayaFlux::Portal::Graphics::RenderConfig::draw_priority, MayaFlux::Portal::Graphics::RenderConfig::fragment_shader, MayaFlux::Portal::Forma::Surface::render_config(), and text_image().

Referenced by create_scroll_batch(), and surface_batch().

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