]> git.tdb.fi Git - libs/gl.git/commitdiff
Don't assume vertex arrays start from the beginning of the buffer
authorMikko Rasa <tdb@tdb.fi>
Wed, 17 Nov 2021 13:47:32 +0000 (15:47 +0200)
committerMikko Rasa <tdb@tdb.fi>
Wed, 17 Nov 2021 13:48:20 +0000 (15:48 +0200)
source/backends/opengl/vertexsetup_backend.cpp

index d45481f996b5eba732c1a1512c7e8d1a3619c077..f3243107b9591186b649a298fe9f7234c7b46355 100644 (file)
@@ -83,7 +83,7 @@ void OpenGLVertexSetup::update_vertex_array(const VertexArray &array, unsigned b
                glVertexArrayBindingDivisor(id, binding, divisor);
        }
 
-       unsigned offset = 0;
+       unsigned offset = array.get_offset();
        for(VertexAttribute a: fmt)
        {
                unsigned sem = get_attribute_semantic(a);