SpriteGroup/textexample broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PyGL3Display |
Fix Committed
|
Medium
|
David Griffin |
Bug Description
~habilain_
Traceback (most recent call last):
File "textexample.py", line 143, in <module>
demo.run()
File "~habilain_
examples\
self.init()
File "textexample.py", line 87, in init
self.text = self.font.
File "textexample.py", line 60, in makeString
ret = SpriteGroup(
File "c:\Python27\
in __init__
self.
File "c:\Python27\
in add
self.
File "c:\Python27\
in addSprite
self.
TypeError: 'GL3Slots' object is not iterable
Looks like adding iterator access to GL3Slots fixes this:
pygl3display/ infrastructure. py:
class GL3Slots(object):
self.indices = indices
def __init__(self, slots, indices):
self.slots = tuple(slots)
def release(self):
self.indices. release( self.slots)
def upload(self, data):
self.indices. upload( self.slots, data)
+ def __iter__(self): __iter_ _()
+ return self.slots.