MayaFlux 0.2.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#ifndef MAYAFLUX_PLATFORM_MACOS
97 config.vertex_shader = "line.vert.spv";
98 config.fragment_shader = "line.frag.spv";
99 config.geometry_shader = "line.geom.spv";
100#else
101 config.vertex_shader = "line_fallback.vert.spv";
102 config.fragment_shader = "line_fallback.frag.spv";
103#endif
104 break;
105
109 config.vertex_shader = "triangle.vert.spv";
110 config.fragment_shader = "triangle.frag.spv";
111 break;
112
113 default:
114 config.vertex_shader = "point.vert.spv";
115 config.fragment_shader = "point.frag.spv";
116 }
117
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:54
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::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: