36 ossia::mesh_list geom;
38 using pip = QRhiGraphicsPipeline;
39 pip::Topology topology = pip::Topology::TriangleStrip;
40 pip::CullMode cullMode = pip::CullMode::None;
41 pip::FrontFace frontFace = pip::FrontFace::CW;
43 ossia::small_vector<QRhiVertexInputBinding, 2> vertexBindings;
44 ossia::small_vector<QRhiVertexInputAttribute, 2> vertexAttributes;
45 ossia::small_vector<ossia::attribute_semantic, 2> attributeSemantics;
47 ossia::small_vector<QRhiBuffer*, 2> buffers;
52 const ossia::mesh_list& g,
const ossia::geometry_filter_list_ptr& f);
54 const ossia::mesh_list& meshList()
const noexcept {
return geom; }
57 QRhiBuffer* init_vbo(
const ossia::geometry::cpu_buffer& buf, QRhi& rhi)
const noexcept;
60 QRhiBuffer* init_vbo(
const ossia::geometry::gpu_buffer& buf, QRhi& rhi)
const noexcept;
63 init_index(
const ossia::geometry::cpu_buffer& buf, QRhi& rhi)
const noexcept;
67 init_index(
const ossia::geometry::gpu_buffer& buf, QRhi& rhi)
const noexcept;
69 [[nodiscard]]
MeshBuffers init(QRhi& rhi)
const noexcept override;
72 int buffer_index,
const ossia::geometry::cpu_buffer& vtx_buf,
MeshBuffers& meshbuf,
73 QRhi& rhi, QRhiResourceUpdateBatch& rb)
const noexcept;
76 int buffer_index,
const ossia::geometry::gpu_buffer& vtx_buf,
MeshBuffers& meshbuf,
77 QRhi& rhi, QRhiResourceUpdateBatch& rb)
const noexcept;
80 int buffer_index,
const ossia::geometry::cpu_buffer& idx_buf,
MeshBuffers& meshbuf,
81 QRhi& rhi, QRhiResourceUpdateBatch& rb)
const noexcept;
84 int buffer_index,
const ossia::geometry::gpu_buffer& idx_buf,
MeshBuffers& meshbuf,
85 QRhi& rhi, QRhiResourceUpdateBatch& rb)
const noexcept;
86 void update(QRhi& rhi,
MeshBuffers& output_meshbuf, QRhiResourceUpdateBatch& rb)
87 const noexcept override;
88 Flags flags()
const noexcept override;
92 void preparePipeline(QRhiGraphicsPipeline& pip)
const noexcept override;
93 [[nodiscard]]
bool hasGeometry()
const noexcept override;
95 void reload(
const ossia::mesh_list& ml,
const ossia::geometry_filter_list_ptr& f);
97 void draw(
const MeshBuffers& bufs, QRhiCommandBuffer& cb)
const noexcept override;
104 void drawWithFallbackBindings(
127 std::size_t mesh_index, std::size_t buffer_offset,
150 if(!geom.meshes.empty())
151 return &geom.meshes[0];