X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fbufferable.cpp;h=374c4eeb3b83ee5d1617b9249383696a9f7aa15f;hb=6c5c2bcbd4025cba36f48f6f326466351f4f2971;hp=c312a4339a876f8436877842f44e689aa3f32b7a;hpb=be6ffe96ecb4707599fe1a6f620c348760213d46;p=libs%2Fgl.git diff --git a/source/core/bufferable.cpp b/source/core/bufferable.cpp index c312a433..374c4eeb 100644 --- a/source/core/bufferable.cpp +++ b/source/core/bufferable.cpp @@ -8,6 +8,23 @@ using namespace std; namespace Msp { namespace GL { +Bufferable::Bufferable(Bufferable &&other): + buffer(other.buffer), + offset(other.offset), + next_in_buffer(other.next_in_buffer), + prev_in_buffer(other.prev_in_buffer), + location_dirty(other.location_dirty), + dirty(other.dirty) +{ + other.buffer = 0; + other.next_in_buffer = 0; + other.prev_in_buffer = 0; + if(next_in_buffer) + next_in_buffer->prev_in_buffer = this; + if(prev_in_buffer) + prev_in_buffer->next_in_buffer = this; +} + Bufferable::~Bufferable() { unlink_from_buffer();