Fix mapping gfx::buffer

This commit is contained in:
Nikita Lisitsa 2023-07-22 00:49:28 +03:00
parent 0836cf00a6
commit de5c0a3371

View file

@ -160,7 +160,7 @@ namespace psemek::gfx
return std::static_pointer_cast<T[]>(p);
bind();
std::shared_ptr<T[]> p(reinterpret_cast<T *>(gl::MapBufferRange(Target, 0, size_, gl::WRITE_ONLY)), [this](T *){
std::shared_ptr<T[]> p(reinterpret_cast<T *>(gl::MapBufferRange(Target, 0, size_, gl::MAP_WRITE_BIT)), [this](T *){
bind();
gl::UnmapBuffer(Target);
});