Skip to content

Commit

Permalink
Cleaning up .0
Browse files Browse the repository at this point in the history
  • Loading branch information
tjbladez committed Oct 18, 2010
1 parent 88a5507 commit ef6569c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
8 changes: 4 additions & 4 deletions using_nehe_lessons/lesson02.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ def draw
glLoadIdentity

# Think 3-d coordinate system (x,y,z). +- on each movies on that axis
glTranslatef(-2, 0.0, -10.0) # Moving function from the current point by x,y,z change
glTranslatef(-2, 0, -10) # Moving function from the current point by x,y,z change

glBegin(GL_TRIANGLES) #Begin drawing a figure.
glVertex3f( 0.0, 1.0, 0.0) #place a point at (x,y,z) location from the current point
glVertex3f( 1.0, -1.0, 0.0)
glVertex3f(-1.0, -1.0, 0.0)
glVertex3f( 0, 1, 0) #place a point at (x,y,z) location from the current point
glVertex3f( 1, -1, 0)
glVertex3f(-1, -1, 0)
glEnd
end
end
Expand Down
14 changes: 7 additions & 7 deletions using_nehe_lessons/lesson03.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ def draw
glMatrixMode(GL_MODELVIEW) # see 02
glLoadIdentity # see 02

glTranslatef(-2, 0.0, -10.0) # see 02
glTranslatef(-2, 0, -10) # see 02

glBegin(GL_TRIANGLES) # see 02
glColor3f(1.0, 0.0, 0.0) # sets color to be used using RBG
glVertex3f( 0.0,1.0, 0.0)
glColor3f(0.0, 1.0, 0.0)
glVertex3f( 1.0, -1.0, 0.0)
glColor3f(0.0, 0.0, 1.0)
glVertex3f(-1.0, -1.0, 0.0)
glColor3f(1, 0, 0) # sets color to be used using RBG
glVertex3f( 0,1, 0)
glColor3f(0, 1, 0)
glVertex3f( 1, -1, 0)
glColor3f(0, 0, 1)
glVertex3f(-1, -1, 0)
glEnd
end
end
Expand Down
16 changes: 8 additions & 8 deletions using_nehe_lessons/lesson04.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ def draw
glMatrixMode(GL_MODELVIEW) # see 02
glLoadIdentity # see 02

glTranslatef(-2, 0.0, -10.0) # see 02
glTranslatef(-2, 0, -10) # see 02

glRotatef(@rotation_angle, 0.0, 1.0, 0.0) # rotate object around vector set by traveling to x,y,z from current unit, angle is in degrees
glRotatef(@rotation_angle, 0, 1, 0) # rotate object around vector set by traveling to x,y,z from current unit, angle is in degrees

glBegin(GL_TRIANGLES) # see 02
glColor3f(1.0, 0.0, 0.0) # see 03
glVertex3f( 0.0,1.0, 0.0)
glColor3f(0.0, 1.0, 0.0)
glVertex3f( 1.0, -1.0, 0.0)
glColor3f(0.0, 0.0, 1.0)
glVertex3f(-1.0, -1.0, 0.0)
glColor3f(1, 0, 0) # see 03
glVertex3f( 0,1, 0)
glColor3f(0, 1, 0)
glVertex3f( 1, -1, 0)
glColor3f(0, 0, 1)
glVertex3f(-1, -1, 0)
glEnd
end
end
Expand Down

0 comments on commit ef6569c

Please sign in to comment.