예제 #1
0
파일: shader.py 프로젝트: 17night/thbattle
def _get_infolog(oid):
    buffer = create_string_buffer(3000)
    i = GLsizei(0)
    glGetInfoLogARB(
        oid, 3000, byref(i), cast(
            byref(buffer),
            POINTER(c_char)
        )
    )
    return buffer.value
예제 #2
0
파일: shader.py 프로젝트: los-cocos/cocos
def glsl_log(handle):
    if handle == 0:
        return ''
    log_len = c_int(0)

    gl.glGetObjectParameterivARB(handle, gl.GL_OBJECT_INFO_LOG_LENGTH_ARB,
                              byref(log_len))
    if log_len.value == 0:
        return ''

    log = create_string_buffer(log_len.value)  # does log_len include the NUL?

    chars_written = c_int(0)
    gl.glGetInfoLogARB(handle, log_len.value, byref(chars_written), log)

    return log.value
예제 #3
0
def glsl_log(handle):
    if handle == 0:
        return ''
    log_len = c_int(0)

    gl.glGetObjectParameterivARB(handle, gl.GL_OBJECT_INFO_LOG_LENGTH_ARB,
                                 byref(log_len))
    if log_len.value == 0:
        return ''

    log = create_string_buffer(log_len.value)  # does log_len include the NUL?

    chars_written = c_int(0)
    gl.glGetInfoLogARB(handle, log_len.value, byref(chars_written), log)

    return log.value
예제 #4
0
파일: shader.py 프로젝트: zzkklep/thbattle
def _get_infolog(oid):
    buffer = create_string_buffer(3000)
    i = GLsizei(0)
    glGetInfoLogARB(oid, 3000, byref(i), cast(byref(buffer), POINTER(c_char)))
    return buffer.value