X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fbufferable.cpp;h=6b770a8f68f2c447bb18fe608930cba4bf9e6ab7;hb=bb8b03770053cbddda88577e261ec4ee482e6c5c;hp=3178e0adefa38f72e2d8aa22ecbae6769c50cdc7;hpb=c897f76c44c2baaa90c0f85e0bcbee152a99272a;p=libs%2Fgl.git diff --git a/source/bufferable.cpp b/source/bufferable.cpp index 3178e0ad..6b770a8f 100644 --- a/source/bufferable.cpp +++ b/source/bufferable.cpp @@ -124,7 +124,6 @@ void Bufferable::update_buffer() const } upload_data(0); - dirty = false; } void Bufferable::upload_data(char *target) const @@ -136,6 +135,7 @@ void Bufferable::upload_data(char *target) const } else buffer->sub_data(offset, get_data_size(), get_data_pointer()); + dirty = false; } @@ -157,16 +157,10 @@ void Bufferable::AsyncUpdater::upload_data() // Update all bufferables in the same buffer at once for(const Bufferable *b=bufferable.prev_in_buffer; b; b=b->prev_in_buffer) if(b->dirty || buffer_resized) - { b->upload_data(mapped_address+b->offset); - b->dirty = false; - } for(const Bufferable *b=bufferable.next_in_buffer; b; b=b->next_in_buffer) if(b->dirty || buffer_resized) - { b->upload_data(mapped_address+b->offset); - b->dirty = false; - } } } // namespace GL