]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/programdata.cpp
Remove the notion of default binding point from Buffer
[libs/gl.git] / source / render / programdata.cpp
index 4133b9acaabb207fbd63d077ca9bc8da7bcca2c4..b21c395cf04c27f1084492294dbd2635993af5df 100644 (file)
@@ -566,7 +566,7 @@ void ProgramData::update_block_uniform_indices(SharedBlock &block, const Program
                {
                        if(!buffer)
                        {
-                               buffer = new Buffer(UNIFORM_BUFFER);
+                               buffer = new Buffer();
 
 #ifdef DEBUG
                                if(!debug_name.empty())
@@ -657,11 +657,6 @@ void ProgramData::apply() const
 
                prog_begin->masks.dirty = 0;
 
-               /* If any blocks stored in the buffer were updated, bind the buffer here
-               to avoid state thrashing. */
-               if(buffered_blocks_updated && !ARB_direct_state_access)
-                       buffer->bind();
-
                if(last_buffer_block!=old_last_block)
                {
                        unsigned required_size = last_buffer_block->get_required_buffer_size();
@@ -670,7 +665,7 @@ void ProgramData::apply() const
                                if(buffer->get_size()>0)
                                {
                                        delete buffer;
-                                       buffer = new Buffer(UNIFORM_BUFFER);
+                                       buffer = new Buffer();
                                        last_buffer_block->change_buffer(buffer);
 
 #ifdef DEBUG