How to use the glfw.set_window_should_close function in glfw

To help you get started, we’ve selected a few glfw examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sciapp / mogli / tests / test_show.py View on Github external
def alarm_handler(signal_number, stack_frame):
        """
        Close the current GLFW window when called due to a SIGALRM.
        """
        assert signal_number == signal.SIGALRM
        window = glfw.get_current_context()
        assert window is not None
        glfw.set_window_should_close(window, True)
github 3D-Printing-for-Microfluidics / OpenGL-STL-slicer / app.py View on Github external
def processInput(window):
    if glfw.get_key(window, glfw.KEY_ESCAPE) == glfw.PRESS:
        glfw.set_window_should_close(window, GL_TRUE)
github cmbruns / pyopenvr / src / openvr / glframework / glfw_app.py View on Github external
def key_callback(self, window, key, scancode, action, mods):
        "press ESCAPE to quit the application"
        if key == glfw.KEY_ESCAPE and action == glfw.PRESS:
            glfw.set_window_should_close(self.window, True)
github moderngl / moderngl / examples / window / glfw / window.py View on Github external
def close(self):
        glfw.set_window_should_close(self.window, True)
github 3D-Printing-for-Microfluidics / OpenGL-STL-slicer / pyopengl / app_pyopengl.py View on Github external
def processInput(window):
    if glfw.get_key(window, glfw.KEY_ESCAPE) == glfw.PRESS:
        glfw.set_window_should_close(window, GL_TRUE)