Mercurial > touhou
diff pytouhou/ui/gamerenderer.pyx @ 254:6bd565019f9a
Preload textures to avoid slowdowns during gameplay
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Sun, 22 Jan 2012 18:03:47 +0100 |
parents | 1d3c8c7473a2 |
children | 80e73b8245a4 |
line wrap: on
line diff
--- a/pytouhou/ui/gamerenderer.pyx +++ b/pytouhou/ui/gamerenderer.pyx @@ -33,6 +33,10 @@ cdef class GameRenderer(Renderer): self.game = game self.background = background + if game: + # Preload textures + self.texture_manager.preload(game.resource_loader.instanced_anms.values()) + def render(self): glClear(GL_DEPTH_BUFFER_BIT)