From 0e7b103c466db1d312fc0758eb5d8b4c56801202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tur=C3=A1nszki=20J=C3=A1nos?= Date: Sat, 14 May 2022 11:08:12 +0200 Subject: [PATCH] softbody fix #445 --- WickedEngine/wiRenderer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WickedEngine/wiRenderer.cpp b/WickedEngine/wiRenderer.cpp index a4791697f..3141d2a48 100644 --- a/WickedEngine/wiRenderer.cpp +++ b/WickedEngine/wiRenderer.cpp @@ -3595,7 +3595,7 @@ void UpdateRenderData( const SoftBodyPhysicsComponent& softbody = vis.scene->softbodies[i]; const MeshComponent* mesh = vis.scene->meshes.GetComponent(entity); - if (mesh != nullptr) + if (mesh != nullptr && mesh->streamoutBuffer.IsValid()) { GraphicsDevice::GPUAllocation allocation = device->AllocateGPU(mesh->so_pos_nor_wind.size + mesh->so_tan.size, cmd); std::memcpy(allocation.data, softbody.vertex_positions_simulation.data(), mesh->so_pos_nor_wind.size);