aboutsummaryrefslogtreecommitdiff
path: root/NvCloth/samples/SampleBase/renderer/ClothRenderMesh.h
diff options
context:
space:
mode:
Diffstat (limited to 'NvCloth/samples/SampleBase/renderer/ClothRenderMesh.h')
-rw-r--r--NvCloth/samples/SampleBase/renderer/ClothRenderMesh.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/NvCloth/samples/SampleBase/renderer/ClothRenderMesh.h b/NvCloth/samples/SampleBase/renderer/ClothRenderMesh.h
index 1af0027..ec33e9d 100644
--- a/NvCloth/samples/SampleBase/renderer/ClothRenderMesh.h
+++ b/NvCloth/samples/SampleBase/renderer/ClothRenderMesh.h
@@ -28,7 +28,7 @@ struct Vertex
};
/**
-Simple �loth render mesh
+Simple cloth render mesh
*/
class ClothRenderMesh : public IRenderMesh
{
@@ -41,7 +41,14 @@ public:
void update(const PxVec3* positions, uint32_t numVertices);
const std::vector<D3D11_INPUT_ELEMENT_DESC>& getInputElementDesc() const { return mInputDesc; }
- void render(ID3D11DeviceContext& context) const;
+ void render(ID3D11DeviceContext& context, int submesh) const;
+
+ void setSubmeshOffsets(std::vector<uint32_t>const & offsets)
+ {
+ mSubmeshOffsets = offsets;
+ m_submeshCount = (int)offsets.size();
+ mSubmeshOffsets.push_back((uint32_t)mIndices.size());
+ }
protected:
ClothRenderMesh();
@@ -56,6 +63,7 @@ private:
std::vector<Vertex> mVertices;
std::vector<uint16_t> mIndices;
+ std::vector<uint32_t> mSubmeshOffsets;
uint32_t mNumFaces;
uint32_t mNumVertices;