+ glDeleteVertexArrays(1, &va);
+}
+
+Model::Model(Model &&other)
+: vertices(std::move(other.vertices))
+, colors(std::move(other.colors))
+, normals(std::move(other.normals))
+, indices(std::move(other.indices))
+, va(other.va)
+, dirty(other.dirty) {
+ other.va = 0;
+ for (int i = 0; i < ATTRIB_COUNT; ++i) {
+ handle[i] = other.handle[i];
+ other.handle[i] = 0;
+ }
+}
+
+Model &Model::operator =(Model &&other) {
+ std::swap(vertices, other.vertices);
+ std::swap(colors, other.colors);
+ std::swap(normals, other.normals);
+ std::swap(indices, other.indices);
+ std::swap(va, other.va);
+ for (int i = 0; i < ATTRIB_COUNT; ++i) {
+ std::swap(handle[i], other.handle[i]);
+ }
+ dirty = other.dirty;
+ return *this;