13 ossia::mesh_list geom;
15 using pip = QRhiGraphicsPipeline;
16 pip::Topology topology = pip::Topology::TriangleStrip;
17 pip::CullMode cullMode = pip::CullMode::None;
18 pip::FrontFace frontFace = pip::FrontFace::CW;
20 ossia::small_vector<QRhiVertexInputBinding, 2> vertexBindings;
21 ossia::small_vector<QRhiVertexInputAttribute, 2> vertexAttributes;
22 ossia::small_vector<ossia::attribute_semantic, 2> attributeSemantics;
24 ossia::small_vector<QRhiBuffer*, 2> buffers;
29 const ossia::mesh_list& g,
const ossia::geometry_filter_list_ptr& f);
31 const ossia::mesh_list& meshList()
const noexcept {
return geom; }
34 QRhiBuffer* init_vbo(
const ossia::geometry::cpu_buffer& buf, QRhi& rhi)
const noexcept;
37 QRhiBuffer* init_vbo(
const ossia::geometry::gpu_buffer& buf, QRhi& rhi)
const noexcept;
40 init_index(
const ossia::geometry::cpu_buffer& buf, QRhi& rhi)
const noexcept;
44 init_index(
const ossia::geometry::gpu_buffer& buf, QRhi& rhi)
const noexcept;
46 [[nodiscard]]
MeshBuffers init(QRhi& rhi)
const noexcept override;
49 int buffer_index,
const ossia::geometry::cpu_buffer& vtx_buf,
MeshBuffers& meshbuf,
50 QRhiResourceUpdateBatch& rb)
const noexcept;
53 int buffer_index,
const ossia::geometry::gpu_buffer& vtx_buf,
MeshBuffers& meshbuf,
54 QRhiResourceUpdateBatch& rb)
const noexcept;
57 int buffer_index,
const ossia::geometry::cpu_buffer& idx_buf,
MeshBuffers& meshbuf,
58 QRhiResourceUpdateBatch& rb)
const noexcept;
61 int buffer_index,
const ossia::geometry::gpu_buffer& idx_buf,
MeshBuffers& meshbuf,
62 QRhiResourceUpdateBatch& rb)
const noexcept;
63 void update(QRhi& rhi,
MeshBuffers& output_meshbuf, QRhiResourceUpdateBatch& rb)
64 const noexcept override;
65 Flags flags()
const noexcept override;
69 void preparePipeline(QRhiGraphicsPipeline& pip)
const noexcept override;
71 void reload(
const ossia::mesh_list& ml,
const ossia::geometry_filter_list_ptr& f);
73 void draw(
const MeshBuffers& bufs, QRhiCommandBuffer& cb)
const noexcept override;
79 if(!geom.meshes.empty())
80 return &geom.meshes[0];