X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fbuffer.cpp;h=2b18d7d7d7d3bf0a47611207850aec5aabc4cc9d;hp=38a690287b96d3bcc506b81bc184700fa9b35521;hb=ff85f90d33023d908c534b0bf5d9a65e9fc2cce2;hpb=e19309340e90ee881e9cb2f8b7c33a5b89681aa6 diff --git a/source/buffer.cpp b/source/buffer.cpp index 38a69028..2b18d7d7 100644 --- a/source/buffer.cpp +++ b/source/buffer.cpp @@ -46,6 +46,7 @@ void Buffer::require_buffer_type(BufferType type) void Buffer::set_usage(BufferUsage u) { + // TODO OpenGL ES 2.0 doesn't support read or copy usages usage = u; } @@ -109,13 +110,16 @@ void *Buffer::map(BufferAccess access) bool Buffer::unmap() { + // TODO check if it's mapped if(ARB_direct_state_access) return glUnmapNamedBuffer(id); - else + else if(OES_mapbuffer) { BindRestore _bind(this, type); return glUnmapBuffer(type); } + else + return true; } void Buffer::bind_to(BufferType t) const