+#include <msp/gl/extensions/arb_direct_state_access.h>
#include "buffer.h"
#include "color.h"
#include "error.h"
void ProgramData::uniform(const string &name, Uniform *uni)
{
if(name[name.size()-1]==']')
+ {
+ delete uni;
throw invalid_argument("ProgramData::uniform");
+ }
SlotMap::iterator i = uniform_slots.find(name);
if(i!=uniform_slots.end())
/* If any blocks stored in the buffer were updated, bind the buffer here
to avoid state thrashing. */
- if(buffered_blocks_updated)
+ if(buffered_blocks_updated && !ARB_direct_state_access)
buffer->bind();
}