]> git.tdb.fi Git - libs/gl.git/blobdiff - source/programdata.cpp
Use ARB_direct_state_access to avoid some bind calls
[libs/gl.git] / source / programdata.cpp
index 615da767fedefca62eebd06b68fce816aa166ad2..01927063377b693b72c9ede4cabdb050ecd91067 100644 (file)
@@ -1,3 +1,4 @@
+#include <msp/gl/extensions/arb_direct_state_access.h>
 #include "buffer.h"
 #include "color.h"
 #include "error.h"
 #include "buffer.h"
 #include "color.h"
 #include "error.h"
@@ -375,7 +376,7 @@ void ProgramData::apply() const
 
                /* If any blocks stored in the buffer were updated, bind the buffer here
                to avoid state thrashing. */
 
                /* 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();
        }
 
                        buffer->bind();
        }