Open
Description
Currently you need to call something like:
auto mappedPosIter = mVboMesh->mapAttrib3f( geom::Attrib::POSITION );
// ... modify mapped data buffer
mappedPosIter.unmap();
But it is easy to forget to call the unmap()
, and also inconvenient. It would be nice to have something like:
auto mappedPosIter = mVboMesh->scopedMapAttrib3f( geom::Attrib::POSITION );
That automatically unmapped when it went out of scope. Or perhaps a ScopedVboMeshMap, etc. Complications come up around dealing with the different data types, vec2, vec3, etc...