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

◆ add_geometry() [2/2]

void MayaFlux::Buffers::CompositeGeometryBuffer::add_geometry ( const std::string &  name,
const std::shared_ptr< Nodes::GpuSync::GeometryWriterNode > &  node,
Portal::Graphics::PrimitiveTopology  topology,
const std::shared_ptr< Core::Window > &  target_window 
)

Add a geometry collection.

Parameters
nameUnique identifier for this geometry
nodeGeometryWriterNode to render
topologyPrimitive topology for this geometry
target_windowWindow to render to (used for shader config)

The node's vertex data will be aggregated with other geometries during upload, but rendered independently with the specified topology.

Definition at line 79 of file CompositeGeometryBuffer.cpp.

84{
85 RenderConfig config;
86 config.target_window = target_window;
87
88 switch (topology) {
90 config.vertex_shader = "point.vert.spv";
91 config.fragment_shader = "point.frag.spv";
92 break;
93
96 config.fragment_shader = "line.frag.spv";
97 config.vertex_shader = "line.vert.spv";
98#ifndef MAYAFLUX_PLATFORM_MACOS
99 config.geometry_shader = "line.geom.spv";
100#else
102#endif
103 break;
104
108 config.vertex_shader = "triangle.vert.spv";
109 config.fragment_shader = "triangle.frag.spv";
110 break;
111
112 default:
113 config.vertex_shader = "point.vert.spv";
114 config.fragment_shader = "point.frag.spv";
115 }
116
117 config.topology = topology;
118 add_geometry(name, node, topology, config);
119}
void add_geometry(const std::string &name, const std::shared_ptr< Nodes::GpuSync::GeometryWriterNode > &node, Portal::Graphics::PrimitiveTopology topology, const std::shared_ptr< Core::Window > &target_window)
Add a geometry collection.
Portal::Graphics::RenderConfig RenderConfig
Definition VKBuffer.hpp:78
std::shared_ptr< Core::Window > target_window

References add_geometry(), MayaFlux::Portal::Graphics::RenderConfig::fragment_shader, MayaFlux::Portal::Graphics::RenderConfig::geometry_shader, MayaFlux::Portal::Graphics::LINE_LIST, MayaFlux::Portal::Graphics::LINE_STRIP, MayaFlux::Portal::Graphics::POINT_LIST, MayaFlux::Portal::Graphics::RenderConfig::target_window, MayaFlux::Portal::Graphics::RenderConfig::topology, MayaFlux::Portal::Graphics::TRIANGLE_FAN, MayaFlux::Portal::Graphics::TRIANGLE_LIST, MayaFlux::Portal::Graphics::TRIANGLE_STRIP, and MayaFlux::Portal::Graphics::RenderConfig::vertex_shader.

Referenced by add_geometry().

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