Skip to content
Browse files

Beam guide

Signed-off-by: Paul Brook <paul@codesourcery.com>
  • Loading branch information...
1 parent 85aad58 commit 98bcfbdaa7550420d4b2d8834a10032002e9b107 Paul Brook committed
Showing with 8 additions and 1 deletion.
  1. +8 −1 hackix.py
View
9 hackix.py
@@ -137,6 +137,7 @@ def update_faces(self, faces):
def draw(self, transform, stix_pos):
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT)
glLoadIdentity()
+ glPushMatrix()
glTranslatef(0.0, 0.0, -5.0)
glMultMatrixf(transform)
glVertexPointerf(self.vertexbuffer)
@@ -154,6 +155,13 @@ def draw(self, transform, stix_pos):
glDrawElementsui(GL_TRIANGLES, [1,5,3]);
glDrawElementsui(GL_TRIANGLES, [0,2,4]);
+ glPopMatrix()
+ lazer_vertex = [(0, 100, -1), (0, -10, -1), (0.01, 10, -10), (0.01, -10, -10)]
+ lazer_color=[(1.0, 0.3, 0.3)]*4
+ glVertexPointerf(lazer_vertex)
+ glColorPointerf(lazer_color)
+ glDrawArrays(GL_TRIANGLE_STRIP, 0, 4)
+
def create_cube():
points=[]
for x in (1.0, -1.0):
@@ -568,5 +576,4 @@ def main():
frames = frames+1
-
if __name__ == '__main__': main()

0 comments on commit 98bcfbd

Please sign in to comment.
Something went wrong with that request. Please try again.