diff --git a/src/Magnum/GL/Mesh.cpp b/src/Magnum/GL/Mesh.cpp index ada0c3e2a..ea674111a 100644 --- a/src/Magnum/GL/Mesh.cpp +++ b/src/Magnum/GL/Mesh.cpp @@ -344,7 +344,7 @@ Mesh::Mesh(Mesh&& other) noexcept: _id(other._id), _primitive(other._primitive), #ifndef MAGNUM_TARGET_GLES2 _indexStart(other._indexStart), _indexEnd(other._indexEnd), #endif - _indexBufferOffset(other._indexBufferOffset), _indexOffset(other._indexOffset), _indexType(other._indexType), _indexBuffer{Utility::move(other._indexBuffer)} + _indexType(other._indexType), _indexBufferOffset(other._indexBufferOffset), _indexOffset(other._indexOffset), _indexBuffer{Utility::move(other._indexBuffer)} { if(_constructed || other._constructed) Context::current().state().mesh.moveConstructImplementation(*this, Utility::move(other)); @@ -368,8 +368,8 @@ Mesh& Mesh::operator=(Mesh&& other) noexcept { swap(_indexEnd, other._indexEnd); #endif swap(_indexBufferOffset, other._indexBufferOffset); - swap(_indexOffset, other._indexOffset); swap(_indexType, other._indexType); + swap(_indexOffset, other._indexOffset); swap(_indexBuffer, other._indexBuffer); if(_constructed || other._constructed) diff --git a/src/Magnum/GL/Mesh.h b/src/Magnum/GL/Mesh.h index 43d897a16..0dc2a884a 100644 --- a/src/Magnum/GL/Mesh.h +++ b/src/Magnum/GL/Mesh.h @@ -1432,8 +1432,9 @@ class MAGNUM_GL_EXPORT Mesh: public AbstractObject { UnsignedInt _baseInstance{}; UnsignedInt _indexStart{}, _indexEnd{}; #endif - GLintptr _indexBufferOffset{}, _indexOffset{}; MeshIndexType _indexType{}; + /* 4 bytes free on ES2 */ + GLintptr _indexBufferOffset{}, _indexOffset{}; Buffer _indexBuffer{NoCreate}; /* Storage for either std::vector (in case of no VAOs)