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; Vertex* vertices = nullptr;
void* indices = nullptr; void* indices = nullptr;
VertexIndexType indexType = VertexIndexType::UINT16; 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; Math::AABB aabb;
std::string name;
public: public:
Geometry() = default; Geometry() = default;
Geometry(const Geometry& other); Geometry(const Geometry& other);