geometry no longer can be freed if object is hittable

This commit is contained in:
ohyzha
2024-11-04 18:24:23 +02:00
parent 4c67b94bc6
commit 645fac1964

View File

@@ -30,8 +30,10 @@ namespace OpenVulkano
Vertex* vertices = nullptr;
void* indices = nullptr;
VertexIndexType indexType = VertexIndexType::UINT16;
bool ownsMemory = true, freeAfterUpload = true;
// handle freeAfterUpload better. we can't free this memory if object is hittable
bool ownsMemory = true, freeAfterUpload = false;
Math::AABB aabb;
std::string name;
public:
Geometry() = default;
Geometry(const Geometry& other);