Loading...
Searching...
No Matches
GeometryTopology.hpp
1#pragma once
2#include <ossia/dataflow/geometry_port.hpp>
3
4#include <score_plugin_gfx_export.h>
5
6#include <cstdint>
7#include <span>
8#include <vector>
9
10namespace score::gfx
11{
12// The triangle list a fan over `order` draws: {order[0], order[i - 1], order[i]}
13// for every i >= 2, the fan's own winding.
14SCORE_PLUGIN_GFX_EXPORT
15std::vector<uint32_t> triangleFanToList(std::span<const uint32_t> order);
16
17// Rewrites a triangle_fan geometry as an indexed triangle list on the CPU. The
18// vertex buffers are kept as they are, CPU or GPU; a CPU uint32 index buffer is
19// appended. Returns false and leaves `g` untouched when it is not a fan, or a
20// fan whose order is not visible on the CPU: a GPU index buffer, an indirect
21// draw, or per-command draws.
22SCORE_PLUGIN_GFX_EXPORT
23bool lowerTriangleFan(ossia::geometry& g);
24}
Graphics rendering pipeline for ossia score.
Definition Filter/PreviewWidget.hpp:11