From 8ba64510a332b5d8201460438790a8f65b640d99 Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 11 Oct 2007 17:51:20 +0000 Subject: [PATCH] flush _sort_seq more aggressively now --- panda/src/pgraph/textureAttrib.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/panda/src/pgraph/textureAttrib.cxx b/panda/src/pgraph/textureAttrib.cxx index 5628f1c8ec..0504c2eef0 100644 --- a/panda/src/pgraph/textureAttrib.cxx +++ b/panda/src/pgraph/textureAttrib.cxx @@ -139,7 +139,6 @@ add_on_stage(TextureStage *stage, Texture *tex) const { // wasn't present before--then add the stage to the linear list // also. attrib->_on_stages.push_back(stage); - attrib->_sort_seq = UpdateSeq::old(); // Also ensure it is removed from the off_stages list. attrib->_off_stages.erase(stage); @@ -149,6 +148,10 @@ add_on_stage(TextureStage *stage, Texture *tex) const { // definition for that stage. Replace it. (*insert_result.first).second = tex; } + + // In either case, we now need to re-sort the attrib list. + attrib->_sort_seq = UpdateSeq::old(); + return return_new(attrib); } @@ -171,6 +174,7 @@ remove_on_stage(TextureStage *stage) const { PT(TextureStage)(stage)); if (si != attrib->_on_stages.end()) { attrib->_on_stages.erase(si); + attrib->_sort_seq = UpdateSeq::old(); } } @@ -199,6 +203,7 @@ add_off_stage(TextureStage *stage) const { PT(TextureStage)(stage)); if (si != attrib->_on_stages.end()) { attrib->_on_stages.erase(si); + attrib->_sort_seq = UpdateSeq::old(); } } }