original_docstring:  Initialize lighting and rendering parameters. 
docstring: Initialize lighting and rendering parameters.
docstring_tokens: Initialize lighting and rendering parameters .
code: def init_view(self):
          """ Initialize lighting and rendering parameters. """
          ambient = [0.3, 0.3, 0.3, 0.0]
          glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambient);
          glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_FALSE);
          glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, ambient);
          glEnable(GL_COLOR_MATERIAL);
  
          light_ambient =  [0.3, 0.3, 0.3, 0.0]
          light_diffuse =  [0.5, 0.5, 0.5, 1.0]
          light_specular =  [1.0, 1.0, 1.0, 1.0]
          light_position =  [0.0, 0.0, 1.0, 0.0]
  
          glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient)
          glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse)
          glLightfv(GL_LIGHT0, GL_POSITION, light_position)
          glEnable(GL_LIGHT0)
  
          glEnable (GL_NORMALIZE);
          glEnable (GL_LIGHTING);
          glShadeModel(GL_SMOOTH);
  
          glDepthFunc (GL_LESS);
          glEnable (GL_DEPTH_TEST);
  
          glEnable(GL_CULL_FACE);
  
          glEnable (GL_BLEND);
          glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  
          glMatrixMode (GL_MODELVIEW);
  
          self.xform.set(self.initial_xform)
code_tokens: def init_view ( self ) : ambient = [ 0.3 , 0.3 , 0.3 , 0.0 ] glLightModelfv ( GL_LIGHT_MODEL_AMBIENT , ambient ) ; glLightModeli ( GL_LIGHT_MODEL_LOCAL_VIEWER , GL_FALSE ) ; glMaterialfv ( GL_FRONT_AND_BACK , GL_AMBIENT_AND_DIFFUSE , ambient ) ; glEnable ( GL_COLOR_MATERIAL ) ; light_ambient = [ 0.3 , 0.3 , 0.3 , 0.0 ] light_diffuse = [ 0.5 , 0.5 , 0.5 , 1.0 ] light_specular = [ 1.0 , 1.0 , 1.0 , 1.0 ] light_position = [ 0.0 , 0.0 , 1.0 , 0.0 ] glLightfv ( GL_LIGHT0 , GL_AMBIENT , light_ambient ) glLightfv ( GL_LIGHT0 , GL_DIFFUSE , light_diffuse ) glLightfv ( GL_LIGHT0 , GL_POSITION , light_position ) glEnable ( GL_LIGHT0 ) glEnable ( GL_NORMALIZE ) ; glEnable ( GL_LIGHTING ) ; glShadeModel ( GL_SMOOTH ) ; glDepthFunc ( GL_LESS ) ; glEnable ( GL_DEPTH_TEST ) ; glEnable ( GL_CULL_FACE ) ; glEnable ( GL_BLEND ) ; glBlendFunc ( GL_SRC_ALPHA , GL_ONE_MINUS_SRC_ALPHA ) ; glMatrixMode ( GL_MODELVIEW ) ; self . xform . set ( self . initial_xform )
short_docstring: Initialize lighting and rendering parameters.
short_docstring_tokens: Initialize lighting and rendering parameters .
comment: """ Initialize lighting and rendering parameters. """