X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fbuffer.cpp;fp=source%2Fbuffer.cpp;h=9edcf07d6e52ab52e2b9b5f277a0f57b389fcec3;hb=92351f63c5061d2b0b96201390649662c2833388;hp=9fa03c1242024184585618ff841b71d802fc1a46;hpb=b760fa04a65deaceb4c793ba24ca4f4e01bdbc82;p=libs%2Fgl.git diff --git a/source/buffer.cpp b/source/buffer.cpp index 9fa03c12..9edcf07d 100644 --- a/source/buffer.cpp +++ b/source/buffer.cpp @@ -61,6 +61,18 @@ BufferRange *Buffer::create_range(unsigned s, unsigned o) return new BufferRange(*this, s, o); } +void *Buffer::map(BufferAccess access) +{ + BindRestore _bind(this, type); + return glMapBuffer(type, access); +} + +bool Buffer::unmap() +{ + BindRestore _bind(this, type); + return glUnmapBuffer(type); +} + void Buffer::bind_to(BufferType t) const { if(t!=type)