I don't think I am the first one to think about this ... but would it be possible to write a STL allocator that manages VRAM/Buffer Objects(BO) in OpenGL?
As a result of this Question I currently use vectors to write to and read from BOs.
Additionally i use some templating to map BOs as almost anything i like. Like this:
TypedBufferObject<someKindOfStruct> tbo = getTBO();
someKindOfStruct* mapPtr = tbo.map(GL_READ_WRITE);
This works quite well ... but isn't really safe when it comes to the number of elements that map contains.
Has someone implemented a BO-based allocator for STL? And (if not) would it actually be possible?