32 QSSGMesh::RuntimeMeshData::Attribute::Semantic semantic = QSSGMesh::RuntimeMeshData::Attribute::PositionSemantic;
34 QSSGMesh::Mesh::ComponentType componentType = QSSGMesh::Mesh::ComponentType::Float32;
36 struct TargetAttribute {
42 explicit QSSGRenderGeometry();
43 virtual ~QSSGRenderGeometry();
45 const QByteArray &vertexBuffer()
const;
46 QByteArray &vertexBuffer();
47 const QByteArray &indexBuffer()
const;
48 QByteArray &indexBuffer();
49 int attributeCount()
const;
50 Attribute attribute(
int idx)
const;
51 QSSGMesh::Mesh::DrawMode primitiveType()
const;
52 QVector3D boundsMin()
const;
53 QVector3D boundsMax()
const;
55 int targetStride()
const;
57 void setVertexData(
const QByteArray &data);
58 void setIndexData(
const QByteArray &data);
59 void setStride(
int stride);
60 void setBounds(
const QVector3D &min,
const QVector3D &max);
61 void setPrimitiveType(QSSGMesh::Mesh::DrawMode type);
63 void addAttribute(QSSGMesh::RuntimeMeshData::Attribute::Semantic semantic,
65 QSSGMesh::Mesh::ComponentType componentType);
66 void addAttribute(
const Attribute &att);
67 void addSubset(quint32 offset, quint32 count,
const QVector3D &boundsMin,
const QVector3D &boundsMax,
const QString &name = {});
70 void clearAttributes();
72 uint32_t generationId()
const;
73 const QSSGMesh::RuntimeMeshData &meshData()
const;
75 QString debugObjectName;
77 void clearVertexAndIndex();
79 void setTargetData(
const QByteArray &data);
80 void addTargetAttribute(quint32 targetId,
81 QSSGMesh::RuntimeMeshData::Attribute::Semantic semantic,
84 void addTargetAttribute(
const TargetAttribute &att);
87 Q_DISABLE_COPY(QSSGRenderGeometry)
91 uint32_t m_generationId = 1;
92 QSSGMesh::RuntimeMeshData m_meshData;