#include <stdexcept>
+#include <msp/core/raii.h>
+#include <msp/gl/extensions/arb_direct_state_access.h>
#include "bindable.h"
#include "buffer.h"
#include "bufferable.h"
}
}
+ dirty = true;
update_offset();
}
void Bufferable::update_buffer() const
{
- BindRestore bind(buffer, buffer->get_type());
+ Conditional<BindRestore> _bind(!ARB_direct_state_access, buffer, buffer->get_type());
+
if(resize_buffer())
{
/* Resizing the buffer invalidates its contents. Non-dirty data may