#NEWLINE# def draw( self , face = GL_FRONT_AND_BACK ) : #NEWLINE# #INDENT# if self . texture : #NEWLINE# #INDENT# self . texture . draw ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# glDisable ( GL_TEXTURE_2D ) #NEWLINE# #UNINDENT# glMaterialfv ( face , GL_DIFFUSE , self . gl_light ( self . diffuse ) ) #NEWLINE# glMaterialfv ( face , GL_AMBIENT , self . gl_light ( self . ambient ) ) #NEWLINE# glMaterialfv ( face , GL_SPECULAR , self . gl_light ( self . specular ) ) #NEWLINE# glMaterialfv ( face , GL_EMISSION , self . gl_light ( self . emissive ) ) #NEWLINE# glMaterialf ( face , GL_SHININESS , self . shininess ) #NEWLINE# if ( self . gl_floats is None ) : #NEWLINE# #INDENT# self . gl_floats = ( GLfloat * len ( self . vertices ) ) ( * self . vertices ) #NEWLINE# self . triangle_count = ( len ( self . vertices ) / 8 ) #NEWLINE# #UNINDENT# glInterleavedArrays ( GL_T2F_N3F_V3F , 0 , self . gl_floats ) #NEWLINE# glDrawArrays ( GL_TRIANGLES , 0 , int ( self . triangle_count ) )