X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fvertexarray.cpp;h=5065f305c3575920411b6d8ebfc707f61b6aabb3;hb=8bbb661c53f52d0e6f9c89aeffc626f66573f52d;hp=9d8e4477b0ab5a4e3008c72b4f048de2b9d213f7;hpb=2e9f905d2a2b0abdb7902aa3d3416a97666c489a;p=libs%2Fgl.git diff --git a/source/vertexarray.cpp b/source/vertexarray.cpp index 9d8e4477..5065f305 100644 --- a/source/vertexarray.cpp +++ b/source/vertexarray.cpp @@ -1,5 +1,5 @@ -#include "arb_multitexture.h" -#include "arb_vertex_shader.h" +#include +#include #include "buffer.h" #include "error.h" #include "gl.h" @@ -133,7 +133,11 @@ void VertexArray::apply() const throw invalid_operation("VertexArray::apply"); const VertexArray *old = current(); - if(!set_current(this)) + /* If the array has been modified, apply it even if it was the last one to + be applied. This is necessary to get the data updated to vertex buffer, and + to resync things after a format change. Radeon drivers also have some + problems with modifying vertex arrays without re-setting the pointers. */ + if(!set_current(this) && !dirty) return; if(vbuf)