MayaFlux 1.0.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#ifdef MAYAFLUX_PLATFORM_MACOS
99 config.triangulate = true;
100#endif
101
102 if (config.triangulate) {
103 config.geometry_shader.clear();
104 } else {
105 config.geometry_shader = "line.geom.spv";
106 }
107 break;
108
112 config.vertex_shader = "triangle.vert.spv";
113 config.fragment_shader = "triangle.frag.spv";
114 break;
115
116 default:
117 config.vertex_shader = "point.vert.spv";
118 config.fragment_shader = "point.frag.spv";
119 }
120
121 config.topology = topology;
122 add_geometry(name, node, topology, config);
123}
PrimitiveTopology topology
std::string name
Definition VKDevice.cpp:123
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, name, MayaFlux::Portal::Graphics::POINT_LIST, MayaFlux::Portal::Graphics::RenderConfig::target_window, topology, MayaFlux::Portal::Graphics::RenderConfig::topology, MayaFlux::Portal::Graphics::TRIANGLE_FAN, MayaFlux::Portal::Graphics::TRIANGLE_LIST, MayaFlux::Portal::Graphics::TRIANGLE_STRIP, MayaFlux::Portal::Graphics::RenderConfig::triangulate, 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: