Fix crash due to missing asset reference inside MeshAccelerationStructure

This commit is contained in:
Wojtek Figat
2025-11-09 23:25:16 +01:00
parent 97ae13759e
commit 62424215c1
2 changed files with 16 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ class FLAXENGINE_API MeshAccelerationStructure
private:
struct Mesh
{
Model* Asset;
BytesContainer IndexBuffer, VertexBuffer;
int32 Indices, Vertices;
bool Use16BitIndexBuffer;
@@ -57,6 +58,8 @@ private:
bool RayCastBVH(int32 node, const Ray& ray, Real& hitDistance, Vector3& hitNormal, Triangle& hitTriangle) const;
public:
~MeshAccelerationStructure();
// Adds the model geometry for the build to the structure.
void Add(Model* model, int32 lodIndex);