Closed GoogleCodeExporter closed 8 years ago
Original comment by useboxnet
on 27 Nov 2013 at 7:27
I like your idea, but not that much the method name.
We're already using `invalidate` for similar behaviour, do you think we could
use that instead of `re_order`?
Original comment by useboxnet
on 28 Nov 2013 at 5:57
Yes, we should; re_order was how I idealized for my situation, but the name
should be consistent with the existing notation.
Original comment by jorgecar...@gmail.com
on 28 Nov 2013 at 6:01
Does this look OK to you?
diff -r f10d6873cdf3 pyglet/graphics/__init__.py
--- a/pyglet/graphics/__init__.py Sat Nov 16 10:44:59 2013 +0000
+++ b/pyglet/graphics/__init__.py Thu Nov 28 18:10:22 2013 +0000
@@ -332,6 +332,16 @@
self._draw_list = []
self._draw_list_dirty = False
+ def invalidate(self):
+ '''Force the batch to update the draw list.
+
+ This method can be used to force the batch to re-compute the draw list
+ when the ordering of groups has changed.
+
+ :since: pyglet 1.2
+ '''
+ self._draw_list_dirty = True
+
def add(self, count, mode, group, *data):
'''Add a vertex list to the batch.
Original comment by useboxnet
on 28 Nov 2013 at 6:11
I think it's great. From my side, is ready for commit.
Original comment by jorgecar...@gmail.com
on 28 Nov 2013 at 6:17
This issue was closed by revision 88a2e9928d5b.
Original comment by useboxnet
on 28 Nov 2013 at 6:20
Thanks a lot for the patch!
Original comment by useboxnet
on 28 Nov 2013 at 6:21
Original issue reported on code.google.com by
jorgecar...@gmail.com
on 26 Nov 2013 at 4:05