(program_name, shader_name, shader)
return True
Print OpenGL compilation errors, if any, for a given shader.
    
    program_name and shader_name are arbitrary human readable strings.
    shader is an int (an OpenGL shader name)
Print OpenGL compilation errors, if any, for a given shader.
    
    program_name and shader_name are arbitrary human readable strings.
    shader is an int (an OpenGL shader name)
Print OpenGL compilation errors if any for a given shader . program_name and shader_name are arbitrary human readable strings . shader is an int ( an OpenGL shader name )
def gl_compile_error(program_name, shader_name, shader):
    """
    Print OpenGL compilation errors, if any, for a given shader.
    
    program_name and shader_name are arbitrary human readable strings.
    shader is an int (an OpenGL shader name)
    """
    buf = bgl.Buffer(bgl.GL_INT,1)
    bgl.glGetShaderiv(shader,bgl.GL_COMPILE_STATUS,buf)
    if buf[0] == bgl.GL_TRUE:
        return False
    err = buf[0]
    charbuf = bgl.Buffer(bgl.GL_BYTE,4000)
    lenbuf = bgl.Buffer(bgl.GL_INT,1)
    bgl.glGetShaderInfoLog(shader,4000,lenbuf,charbuf)
    print('GL Error: %d (%s:%s)\n%s'%(err, program_name, shader_name, "".join(map( chr, charbuf[:lenbuf[0]]))))
    return True
def gl_compile_error ( program_name , shader_name , shader ) : buf = bgl . Buffer ( bgl . GL_INT , 1 ) bgl . glGetShaderiv ( shader , bgl . GL_COMPILE_STATUS , buf ) if buf [ 0 ] == bgl . GL_TRUE : return False err = buf [ 0 ] charbuf = bgl . Buffer ( bgl . GL_BYTE , 4000 ) lenbuf = bgl . Buffer ( bgl . GL_INT , 1 ) bgl . glGetShaderInfoLog ( shader , 4000 , lenbuf , charbuf ) print ( 'GL Error: %d (%s:%s)\n%s' % ( err , program_name , shader_name , "" . join ( map ( chr , charbuf [ : lenbuf [ 0 ] ] ) ) ) ) return True