]> git.tdb.fi Git - libs/gl.git/blobdiff - source/buffer.cpp
Make extensions compatible with OpenGL ES
[libs/gl.git] / source / buffer.cpp
index 100e4b2ea40a08b4858b41abf043f7b4d84c11eb..38a690287b96d3bcc506b81bc184700fa9b35521 100644 (file)
@@ -98,11 +98,13 @@ void *Buffer::map(BufferAccess access)
        }
        else if(ARB_direct_state_access)
                return glMapNamedBuffer(id, access);
        }
        else if(ARB_direct_state_access)
                return glMapNamedBuffer(id, access);
-       else
+       else if(OES_mapbuffer)
        {
                BindRestore _bind(this, type);
                return glMapBuffer(type, access);
        }
        {
                BindRestore _bind(this, type);
                return glMapBuffer(type, access);
        }
+       else
+               throw invalid_operation("Buffer::map");
 }
 
 bool Buffer::unmap()
 }
 
 bool Buffer::unmap()