Ejemplo n.º 1
0
def enable_states(*state):
    for idx in state:
        glEnable(idx)

    yield

    for idx in state:
        glDisable(idx)
Ejemplo n.º 2
0
def enable_states(*state):
    for idx in state:
        glEnable(idx)

    yield

    for idx in state:
        glDisable(idx)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)