Hi everyone,
it occurred to me that it would be a good idea to manage a range of mapped memory (from glMapBuffer) with a std::vector.
// map data to ptr
T* dataPtr = (T*)glMapBuffer(this->target, access);
[... debug code ...]
// try to construct a std::vector from dataPtr
T* dataPtrLast = dataPtr + size;
mappedVector = new std::vector<T>(dataPtr, dataPtrLast);
the problem is that the memory range won't be used directly but it is copied into the vector.
My question would be: is it possible to make the vector just 'use' the mapped memory range. (and ideally throw exceptions on resize/reserve) Or is there any other standard container that would accomplish this?
Kind Regards, Florian