title: How to add vertexes in OpenGL scene when its already loaded?
body: <p>I'm using python to make a Rubik's cube application with OpenGL and pyGame. I can see the cube and I want to press a button and load the colors, but colors are not shown. (I color each little cube alone but I don't think that it matters).</p>
  
  <p>If I call the function that colors the cube in the function which draws the vertexes for the cube (at the start of the program), the colors are perfectly shown, but if i call the color function with the press of a key (using pyGame) while the application is already running they don't.</p>
  
  <p>the function that colors a little cube:</p>
  
  <pre><code>def color_cubie(self):
      surfaces = (
          (0, 1, 2, 3),
          (4, 5, 6, 7),
          (0, 3, 7, 4),
          (1, 2, 6, 5),
          (2, 3, 7, 6),
          (0, 1, 5, 4)
          )
      colors = [
          (1, 0, 0), (1, 0.5, 0),   
          (0, 1, 0), (0, 0, 1),          
          (1, 1, 1), (1, 1, 0)     
          ]
  
      #faces
      glBegin(GL_QUADS)
      index=0
      for surface in surfaces:
          glColor3fv(colors[index])
          for vertex  in surface:
              glVertex3fv(self.verticies[vertex])
          index+=1
      glEnd()
  </code></pre>
  
  <p>the part that I call the function (the if statement is true when i press c key in keyboard). Also cube is a 3x3x3 numpy array which is filled with cubie objects.</p>
  
  <pre><code>if move == "c":
      for row in self.cube[2]:
          for cubie in row:
              cubie.color_cubie()
  </code></pre>
  
  <p>the main/ render function:</p>
  
  <pre><code>
  def render():
      pygame.init()
      display = (WIDTH, HEIGHT)
      screen = pygame.display.set_mode(display, DOUBLEBUF|OPENGL)
      pygame.display.set_caption("Rubiks Cube")
  
      glEnable(GL_DEPTH_TEST)
      glClearColor(1, 1, 1, 1)
      gluPerspective(45, (display[0]/display[1]), 0.1, 50.0)
      glTranslatef(0.0, 0.0, -7)
      glLineWidth(10)
  
      while True:              
          mouse_pos = pygame.mouse.get_rel()
          glRotatef(1, mouse_pos[1], mouse_pos[0], 0)
          glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT)
  
          #create cube object
          new_cube = Cube()
          new_cube.show_cube()
  
          pygame.display.flip()
          pygame.time.wait(10)
  
          for event in pygame.event.get():
              if event.type == pygame.QUIT:
                  pygame.quit()
                  quit()
              if event.type == pygame.KEYDOWN:
                  if event.key == K_c:
                      new_cube.rotate_cube("c")
  
  </code></pre>
  
  <p>As I read i must redraw the screen in order to see the colored cube. But glClear(...) doesn't do that?</p>