From 6d0c86fc3211418ab4292d73f738e55043139b49 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 24 Nov 2012 21:42:19 +0200 Subject: [PATCH] Re-apply vertex array if it has been modified --- source/vertexarray.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/vertexarray.cpp b/source/vertexarray.cpp index 9d8e4477..527052e9 100644 --- a/source/vertexarray.cpp +++ b/source/vertexarray.cpp @@ -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) -- 2.43.0