diff pytouhou/ui/opengl/gamerenderer.pyx @ 553:8f51e34d911c

Refactor graphics backend selection, to make them fallbackable and optional.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Thu, 29 May 2014 12:31:55 +0200
parents 53fa73932e9a
children c759b97f4f81
line wrap: on
line diff
--- a/pytouhou/ui/opengl/gamerenderer.pyx
+++ b/pytouhou/ui/opengl/gamerenderer.pyx
@@ -27,6 +27,7 @@ from pytouhou.utils.maths cimport perspe
 from pytouhou.game.text cimport NativeText, GlyphCollection
 from .shaders.eosd import GameShader, BackgroundShader, PassthroughShader
 from .renderer cimport Texture
+from .backend cimport is_legacy
 
 from collections import namedtuple
 Rect = namedtuple('Rect', 'x y w h')
@@ -34,8 +35,8 @@ Color = namedtuple('Color', 'r g b a')
 
 
 cdef class GameRenderer(Renderer):
-    def __init__(self, resource_loader, window):
-        self.use_fixed_pipeline = window.use_fixed_pipeline #XXX
+    def __init__(self, resource_loader, _):
+        self.use_fixed_pipeline = is_legacy #XXX
 
         Renderer.__init__(self, resource_loader)