title: Pygame + OpenGL - how to draw text after glBegin()?
body: <p>I found somewhere on StackOverflow this cross-platform way to draw text:</p>
  
  <pre><code>def drawText(x, y, text):                                                
      position = (x, y, 0)                                                       
      font = pygame.font.Font(None, 64)                                          
      textSurface = font.render(text, True, (255,255,255,255),                   
                                (0,0,0,255))                                     
      textData = pygame.image.tostring(textSurface, "RGBA", True)                
      GL.glRasterPos3d(*position)                                                
      GL.glDrawPixels(textSurface.get_width(), textSurface.get_height(),         
                      GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, textData)                 
  </code></pre>
  
  <p>The problem is that I cannot call <code>drawText</code> after I called <code>glBegin(GL_QUADS)</code>. How can I create a rectangle and texture it with the text's contents, then display it so that this <code>drawText</code> could be called even after <code>glBegin</code>?</p>