Skip to content

Commit

Permalink
Beam guide
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Brook <paul@codesourcery.com>
  • Loading branch information
Paul Brook committed Nov 7, 2010
1 parent 85aad58 commit 98bcfbd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion hackix.py
Expand Up @@ -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)
Expand All @@ -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):
Expand Down Expand Up @@ -568,5 +576,4 @@ def main():
frames = frames+1



if __name__ == '__main__': main()

0 comments on commit 98bcfbd

Please sign in to comment.