Commits

rndblnch  committed 74c4714

compatibility with PyOpenGL 3.0.2 final

  • Participants
  • Parent commits 9e8394e

Comments (0)

Files changed (5)

File 05-shader.py

 uniforms = [b"lighting", b"texturing", b"texture_3d"]
 
 def init_program():
-	vert_shader = create_shader(GL_VERTEX_SHADER, b"""
+	vert_shader = create_shader(GL_VERTEX_SHADER, """
 		uniform bool lighting;
 		
 		void main() {
 		}
 	""")
 	
-	frag_shader = create_shader(GL_FRAGMENT_SHADER, b"""
+	frag_shader = create_shader(GL_FRAGMENT_SHADER, """
 		const float alpha_threshold = .55;
 		
 		uniform bool texturing;

File 06-perpixel.py

 uniforms = [b"lighting", b"texturing", b"texture_3d"]
 
 def init_program():
-	vert_shader = create_shader(GL_VERTEX_SHADER, b"""
+	vert_shader = create_shader(GL_VERTEX_SHADER, """
 		uniform bool lighting;
 		
 		varying vec3 N, L, S;
 		}
 	""")
 	
-	frag_shader = create_shader(GL_FRAGMENT_SHADER, b"""
+	frag_shader = create_shader(GL_FRAGMENT_SHADER, """
 		const float alpha_threshold = .55;
 		
 		uniform bool texturing;

File 07-attrib.py

 uniforms = [b"lighting", b"texturing", b"texture_3d"]
 
 def init_program():
-	vert_shader = create_shader(GL_VERTEX_SHADER, b"""
+	vert_shader = create_shader(GL_VERTEX_SHADER, """
 		uniform bool lighting;
 		
 		attribute vec3 vertex;
 		}
 	""")
 	
-	frag_shader = create_shader(GL_FRAGMENT_SHADER, b"""
+	frag_shader = create_shader(GL_FRAGMENT_SHADER, """
 		const float alpha_threshold = .55;
 		
 		uniform bool texturing;
 uniforms = [b"lighting", b"texturing", b"texture_3d"]
 
 def init_program():
-	vert_shader = create_shader(GL_VERTEX_SHADER, b"""
+	vert_shader = create_shader(GL_VERTEX_SHADER, """
 		uniform bool lighting;
 		
 		attribute vec3 vertex;
 		}
 	""")
 	
-	frag_shader = create_shader(GL_FRAGMENT_SHADER, b"""
+	frag_shader = create_shader(GL_FRAGMENT_SHADER, """
 		const float alpha_threshold = .55;
 		
 		uniform bool texturing;
             b"texturing", b"texture_3d"]
 
 def init_program():
-	vert_shader = create_shader(GL_VERTEX_SHADER, b"""
+	vert_shader = create_shader(GL_VERTEX_SHADER, """
 		uniform mat4 modelview_matrix;
 		uniform mat4 projection_matrix;
 		uniform mat4 texture_matrix;
 		}
 	""")
 	
-	frag_shader = create_shader(GL_FRAGMENT_SHADER, b"""
+	frag_shader = create_shader(GL_FRAGMENT_SHADER, """
 		const vec4 acs = vec4(.2, .2, .2, 1.); // ambient color of scene
 		const vec4 di0 = vec4(1., 1., 1., 1.); // diffuse intensity of light 0
 		const vec4 white = vec4(1., 1., 1., 1.);