parameters: (self, mesh)
docstring: Creates 3 buffer objets for each mesh, 
          to store the vertices, the normals, and the faces
          indices.
docstring_summary: Creates 3 buffer objets for each mesh, 
          to store the vertices, the normals, and the faces
          indices.
docstring_tokens: Creates 3 buffer objets for each mesh to store the vertices the normals and the faces indices .
function: def prepare_gl_buffers(self, mesh):
          """ Creates 3 buffer objets for each mesh, 
          to store the vertices, the normals, and the faces
          indices.
          """
  
          mesh.gl = {}
  
          # Fill the buffer for vertex positions
          mesh.gl["vertices"] = glGenBuffers(1)
          glBindBuffer(GL_ARRAY_BUFFER, mesh.gl["vertices"])
          glBufferData(GL_ARRAY_BUFFER, 
                      mesh.vertices,
                      GL_STATIC_DRAW)
  
          # Fill the buffer for normals
          mesh.gl["normals"] = glGenBuffers(1)
          glBindBuffer(GL_ARRAY_BUFFER, mesh.gl["normals"])
          glBufferData(GL_ARRAY_BUFFER, 
                      mesh.normals,
                      GL_STATIC_DRAW)
  
  
          # Fill the buffer for vertex positions
          mesh.gl["triangles"] = glGenBuffers(1)
          glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mesh.gl["triangles"])
          glBufferData(GL_ELEMENT_ARRAY_BUFFER, 
                      mesh.faces,
                      GL_STATIC_DRAW)
  
          # Unbind buffers
          glBindBuffer(GL_ARRAY_BUFFER,0)
          glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,0)
function_tokens: def prepare_gl_buffers ( self , mesh ) : mesh . gl = { } # Fill the buffer for vertex positions mesh . gl [ "vertices" ] = glGenBuffers ( 1 ) glBindBuffer ( GL_ARRAY_BUFFER , mesh . gl [ "vertices" ] ) glBufferData ( GL_ARRAY_BUFFER , mesh . vertices , GL_STATIC_DRAW ) # Fill the buffer for normals mesh . gl [ "normals" ] = glGenBuffers ( 1 ) glBindBuffer ( GL_ARRAY_BUFFER , mesh . gl [ "normals" ] ) glBufferData ( GL_ARRAY_BUFFER , mesh . normals , GL_STATIC_DRAW ) # Fill the buffer for vertex positions mesh . gl [ "triangles" ] = glGenBuffers ( 1 ) glBindBuffer ( GL_ELEMENT_ARRAY_BUFFER , mesh . gl [ "triangles" ] ) glBufferData ( GL_ELEMENT_ARRAY_BUFFER , mesh . faces , GL_STATIC_DRAW ) # Unbind buffers glBindBuffer ( GL_ARRAY_BUFFER , 0 ) glBindBuffer ( GL_ELEMENT_ARRAY_BUFFER , 0 )