34 QSSGMesh::RuntimeMeshData::Attribute::Semantic semantic = QSSGMesh::RuntimeMeshData::Attribute::PositionSemantic;
36 QSSGMesh::Mesh::ComponentType componentType = QSSGMesh::Mesh::ComponentType::Float32;
38 struct TargetAttribute {
44 explicit QSSGRenderGeometry();
45 virtual ~QSSGRenderGeometry();
47 const QByteArray &vertexBuffer()
const;
48 QByteArray &vertexBuffer();
49 const QByteArray &indexBuffer()
const;
50 QByteArray &indexBuffer();
51 int attributeCount()
const;
52 Attribute attribute(
int idx)
const;
53 QSSGMesh::Mesh::DrawMode primitiveType()
const;
54 QVector3D boundsMin()
const;
55 QVector3D boundsMax()
const;
57 int targetStride()
const;
59 void setVertexData(
const QByteArray &data);
60 void setIndexData(
const QByteArray &data);
61 void setStride(
int stride);
62 void setBounds(
const QVector3D &min,
const QVector3D &max);
63 void setPrimitiveType(QSSGMesh::Mesh::DrawMode type);
65 void addAttribute(QSSGMesh::RuntimeMeshData::Attribute::Semantic semantic,
67 QSSGMesh::Mesh::ComponentType componentType);
68 void addAttribute(
const Attribute &att);
69 void addSubset(quint32 offset, quint32 count,
const QVector3D &boundsMin,
const QVector3D &boundsMax,
const QString &name = {});
72 void clearAttributes();
74 uint32_t generationId()
const;
75 const QSSGMesh::RuntimeMeshData &meshData()
const;
77 QString debugObjectName;
79 void clearVertexAndIndex();
81 void setTargetData(
const QByteArray &data);
82 void addTargetAttribute(quint32 targetId,
83 QSSGMesh::RuntimeMeshData::Attribute::Semantic semantic,
86 void addTargetAttribute(
const TargetAttribute &att);
89 Q_DISABLE_COPY(QSSGRenderGeometry)
93 uint32_t m_generationId = 1;
94 QSSGMesh::RuntimeMeshData m_meshData;