Mercurial > touhou
diff pytouhou/ui/opengl/gamerenderer.pyx @ 519:b18f0bd30ad0
Optimise background rendering.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 07 Dec 2013 22:16:38 +0100 |
parents | dec43940f092 |
children | 6e3b3d5d4691 |
line wrap: on
line diff
--- a/pytouhou/ui/opengl/gamerenderer.pyx +++ b/pytouhou/ui/opengl/gamerenderer.pyx @@ -57,6 +57,7 @@ cdef class GameRenderer(Renderer): def load_background(self, background): + self.background = background if background is not None: self.background_renderer = BackgroundRenderer(self.use_fixed_pipeline) self.background_renderer.load(background, self) @@ -114,7 +115,7 @@ cdef class GameRenderer(Renderer): self.render_elements([game.spellcard_effect]) elif self.background_renderer is not None: - back = self.background_renderer.background + back = self.background x, y, z = back.position_interpolator.values dx, dy, dz = back.position2_interpolator.values fog_b, fog_g, fog_r, fog_start, fog_end = back.fog_interpolator.values