Example #1
0
def process(dt):

    # Poll for and process events
    glfw.glfwPollEvents()

    for window in __windows__:
        window.activate()

        window.imguiRenderer.process_inputs()

        # Dispatch the main draw event
        window.dispatch_event('on_draw', dt)

        # Dispatch the idle event
        window.dispatch_event('on_idle', dt)

        imgui_draw_data = imgui.get_draw_data()
        if imgui_draw_data is not None:
            window.imguiRenderer.render(imgui_draw_data)

        # Swap buffers
        window.swap()

    for window in __windows_to_remove__:
        window.destroy()
        __windows_to_remove__.remove(window)

    return len(__windows__)
Example #2
0
def process(dt):

    # Poll for and process events
    glfw.glfwPollEvents()

    for window in __windows__:
        # Make window active
        window.activate()

        # Dispatch the main draw event
        window.dispatch_event('on_draw', dt)

        # Dispatch the idle event
        window.dispatch_event('on_idle', dt)

        # Swap buffers
        window.swap()

    for window in __windows_to_remove__:
        window.destroy()
        __windows_to_remove__.remove(window)

    return len(__windows__)
Example #3
0
def process(dt):

    # Poll for and process events
    glfw.glfwPollEvents()

    for window in __windows__:
        # Make window active
        window.activate()

        # Dispatch the main draw event
        window.dispatch_event('on_draw', dt)

        # Dispatch the idle event
        window.dispatch_event('on_idle', dt)

        # Swap buffers
        window.swap()

    for window in __windows_to_remove__:
        window.destroy()
        __windows_to_remove__.remove(window)

    return len(__windows__)