X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fvertexsetup.cpp;h=19edfb39e4a6da0b2ddfe6a0d5566d8d27c56254;hb=746358b723bdb1ed71584d6fd28f783feb434aef;hp=7cfc1b6d99499c34ba3831f63495cc109921dba5;hpb=fd18332856ddd03f79a54dd034d53cb0a384335d;p=libs%2Fgl.git diff --git a/source/vertexsetup.cpp b/source/vertexsetup.cpp index 7cfc1b6d..19edfb39 100644 --- a/source/vertexsetup.cpp +++ b/source/vertexsetup.cpp @@ -126,7 +126,8 @@ void VertexSetup::update_vertex_array(const VertexArray &array, unsigned binding glVertexAttribPointer(t, 4, GL_UNSIGNED_BYTE, true, stride, reinterpret_cast(offset)); else glVertexAttribPointer(t, sz, GL_FLOAT, false, stride, reinterpret_cast(offset)); - glVertexAttribDivisor(t, divisor); + if(ARB_instanced_arrays) + glVertexAttribDivisor(t, divisor); glEnableVertexAttribArray(t); } offset += sz*sizeof(float);