From: Mikko Rasa Date: Wed, 17 Nov 2021 13:47:32 +0000 (+0200) Subject: Don't assume vertex arrays start from the beginning of the buffer X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=e530cd8edb12a8be87c59dbfa1e7e15c8198f3a3;p=libs%2Fgl.git Don't assume vertex arrays start from the beginning of the buffer --- diff --git a/source/backends/opengl/vertexsetup_backend.cpp b/source/backends/opengl/vertexsetup_backend.cpp index d45481f9..f3243107 100644 --- a/source/backends/opengl/vertexsetup_backend.cpp +++ b/source/backends/opengl/vertexsetup_backend.cpp @@ -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);