]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/vertexsetup.cpp
Use a scratch binding to modify textures and buffers
[libs/gl.git] / source / core / vertexsetup.cpp
index 81d2261e6aa78b55b3240e231ea72b25232bea60..7a24da7350b5f332a1e2aaaaa5c80a29fc7646e8 100644 (file)
@@ -148,7 +148,10 @@ void VertexSetup::update() const
 void VertexSetup::update_vertex_array(const VertexArray &array, unsigned binding, unsigned divisor, bool direct) const
 {
        if(!direct)
+       {
+               Buffer::unbind_scratch();
                glBindBuffer(GL_ARRAY_BUFFER, array.get_buffer()->get_id());
+       }
 
        const VertexFormat &fmt = array.get_format();
        unsigned stride = fmt.stride();