Пример #1
0
def enable_states(*state):
    for idx in state:
        glEnable(idx)

    yield

    for idx in state:
        glDisable(idx)
Пример #2
0
def enable_states(*state):
    for idx in state:
        glEnable(idx)

    yield

    for idx in state:
        glDisable(idx)
Пример #3
0
def clear_viewport(background_color=(0.0, 0.0, 0.0, 1.0)):
    glClearColor(*background_color)
    glEnable(GL_DEPTH_TEST)
    glClearDepth(1.0)
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
Пример #4
0
def clear_viewport(background_color=(0.0, 0.0, 0.0, 1.0)):
    glClearColor(*background_color)
    glEnable(GL_DEPTH_TEST)
    glClearDepth(1.0)
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
Пример #5
0
def clear_viewport():
    glClearColor(0.0, 0.0, 0.0, 1.0)
    glEnable(GL_DEPTH_TEST)
    glClearDepth(1.0)
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)