code: def compileGLShader(self, pchShaderName, pchVertexShader, pchFragmentShader):
          
          unProgramID = glCreateProgram()
          nSceneVertexShader = glCreateShader(GL_VERTEX_SHADER)
          glShaderSource( nSceneVertexShader, pchVertexShader)
          glCompileShader( nSceneVertexShader )
          vShaderCompiled = glGetShaderiv( nSceneVertexShader, GL_COMPILE_STATUS)
          if not vShaderCompiled:
              dprintf("%s - Unable to compile vertex shader %d!\n" % (pchShaderName, nSceneVertexShader) )
              glDeleteProgram( unProgramID )
              glDeleteShader( nSceneVertexShader )
              return 0
          glAttachShader( unProgramID, nSceneVertexShader)
          glDeleteShader( nSceneVertexShader ) # the program hangs onto this once it's attached
          nSceneFragmentShader = glCreateShader(GL_FRAGMENT_SHADER)
          glShaderSource( nSceneFragmentShader, pchFragmentShader)
          glCompileShader( nSceneFragmentShader )
          fShaderCompiled = glGetShaderiv( nSceneFragmentShader, GL_COMPILE_STATUS)
          if not fShaderCompiled:
              dprintf("%s - Unable to compile fragment shader %d!\n" % ( pchShaderName, nSceneFragmentShader) )
              glDeleteProgram( unProgramID )
              glDeleteShader( nSceneFragmentShader )
              return 0
          glAttachShader( unProgramID, nSceneFragmentShader )
          glDeleteShader( nSceneFragmentShader ) # the program hangs onto this once it's attached
          glLinkProgram( unProgramID )
          programSuccess = glGetProgramiv( unProgramID, GL_LINK_STATUS)
          if not programSuccess:
              dprintf("%s - Error linking program %d!\n" % (pchShaderName, unProgramID) )
              glDeleteProgram( unProgramID )
              return 0
          glUseProgram( unProgramID )
          glUseProgram( 0 )
          return unProgramID
docs: Purpose: Compiles a GL shader program and returns the handle. Returns 0 if
             the shader couldn't be compiled for some reason.