From 5003bcfeb0832ec2d0f74f4149bc97888a70a900 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 19 Dec 2021 13:26:00 +0200 Subject: [PATCH] InstanceArray doesn't need to refresh the vertex arrays That's done in Renderer since 9b3bce7. --- source/core/bufferable.h | 10 ++++++---- source/render/instancearray.cpp | 2 -- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/core/bufferable.h b/source/core/bufferable.h index f11d51fa..25d29fd8 100644 --- a/source/core/bufferable.h +++ b/source/core/bufferable.h @@ -41,7 +41,7 @@ private: Bufferable *next_in_buffer = 0; Bufferable *prev_in_buffer = 0; mutable bool location_dirty = false; - mutable bool dirty = false; + mutable uint8_t dirty = 0; protected: Bufferable() = default; @@ -63,11 +63,11 @@ public: std::size_t get_required_buffer_size(bool = false) const; /** Uploads new data into the buffer if necessary. */ - void refresh() const { if(dirty) upload_data(0); } + void refresh(unsigned f) const { if(dirty&(1<get_vertices().refresh(); if(instance_buffer->get_size()==0) instance_buffer->storage(instance_data.get_required_buffer_size(), STREAMING); - instance_data.refresh(); Renderer::Push push(renderer); method->apply(renderer); -- 2.45.2