diff --git a/main.py b/main.py index 31c3495..d76acef 100644 --- a/main.py +++ b/main.py @@ -146,7 +146,9 @@ def main(): for y_pos in range(-10, 10): z = random.random() * 2 - 1 struct.addShape(program_id, Cuboid().translate(translate(x_pos, y_pos, z)).setColor( - random.randint(0, 100) / 100.0, random.randint(0, 100) / 100.0, random.randint(0, 100) / 100.0)) + random.randint(0, 100) / 100.0, random.randint(0, 100) / 100.0, random.randint(0, 100) / 100.0).setSize( + random.randint(0, 100) / 100.0, random.randint(0, 100) / 100.0, random.randint(0, 100) / 100.0 + )) struct.buildvertexArrays() @@ -156,7 +158,7 @@ def main(): cstruct = CompoundStructure() cstruct.addStructure(struct) - program3_id = l.getDepthProgram(vertex_shader_id, Cube.GeometryShaderId) + program3_id = l.getDepthProgram(vertex_shader_id, Cuboid.GeometryShaderId) program2_id = glCreateProgram() glAttachShader(program2_id, passthrough_vertex_shader_id) @@ -387,7 +389,7 @@ def display(): glFlush() l.finishDepthMapping() - glClearColor(1, 0, 0, 0) + glClearColor(0, 0, 0, 0) glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) glUseProgram(program_id)