comparison pytouhou/ui/gamerunner.py @ 384:690b5faaa0e6

Make rendering of multiple-sprites elements work like single-sprites.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 02 Oct 2012 13:27:05 +0200
parents e0e284fcb288
children e1f5dcd4b83e
comparison
equal deleted inserted replaced
383:0537af9125a7 384:690b5faaa0e6
12 ## GNU General Public License for more details. 12 ## GNU General Public License for more details.
13 ## 13 ##
14 14
15 import pyglet 15 import pyglet
16 import traceback 16 import traceback
17 from itertools import chain
18 17
19 from pyglet.gl import (glMatrixMode, glLoadIdentity, glEnable, glDisable, 18 from pyglet.gl import (glMatrixMode, glLoadIdentity, glEnable, glDisable,
20 glHint, glEnableClientState, glViewport, glScissor, 19 glHint, glEnableClientState, glViewport, glScissor,
21 glLoadMatrixf, 20 glLoadMatrixf,
22 GL_MODELVIEW, GL_PROJECTION, 21 GL_MODELVIEW, GL_PROJECTION,
221 220
222 if self.game.boss: 221 if self.game.boss:
223 self.render_elements(interface.boss_items) 222 self.render_elements(interface.boss_items)
224 223
225 self.render_elements(labels) 224 self.render_elements(labels)
226 self.render_elements(chain(*(label.objects() for label in labels)))
227 for label in labels: 225 for label in labels:
228 label.changed = False 226 label.changed = False
229 227