diff pytouhou/ui/opengl/backend.pyx @ 590:e15672733c93

Switch to Python 3.x instead of 2.7.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 30 Sep 2014 17:14:24 +0200
parents 0768122da817
children 19d930f9e3f0
line wrap: on
line diff
--- a/pytouhou/ui/opengl/backend.pyx
+++ b/pytouhou/ui/opengl/backend.pyx
@@ -66,13 +66,13 @@ def discover_features():
         except KeyError:
             assert version >= 33
             glsl_version = version * 10
-        shader_header = '#version %d\n\n' % glsl_version
+        shader_header = ('#version %d\n\n' % glsl_version).encode()
     else:
         # The attribute keyword isn’t supported past GLSL ES 3.0.
         if version >= 30:
             version = 20
         glsl_version = {20: '100', 30: '300 es'}[version]
-        shader_header = '#version %s\n\nprecision highp float;\n\n' % glsl_version
+        shader_header = ('#version %s\n\nprecision highp float;\n\n' % glsl_version).encode()
 
 
 def create_window(title, x, y, width, height, swap_interval):