]> git.tdb.fi Git - libs/gl.git/blobdiff - source/buffer.cpp
Disable mipmaps from various render target textures
[libs/gl.git] / source / buffer.cpp
index 040ae8df1eca040f55798222257121faf2efef49..2b18d7d7d7d3bf0a47611207850aec5aabc4cc9d 100644 (file)
@@ -110,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