'DEPRECATED since IPython 5.0
Enable event loop integration with GLUT.
Parameters
app : ignored
Ignored, it\'s only a placeholder to keep the call signature of all
gui activation methods consistent, which simplifies the logic of
supporting magics.
Notes
This methods sets the PyOS_InputHook for GLUT, which allows the GLUT to
integrate with terminal based applications like IPython. Due to GLUT
limitations, it is currently not possible to start the event loop
without first creating a window. You should thus not create another
window but use instead the created one. See \'gui-glut.py\' in the
docs/examples/lib directory.
The default screen mode is set to:
glut.GLUT_DOUBLE | glut.GLUT_RGBA | glut.GLUT_DEPTH'

def enable(self, app=None):

    warn('This    function    is    deprecated    since    IPython    5.0    and    will    be    removed    in    future    versions.', DeprecationWarning, stacklevel=2)
    import OpenGL.GLUT as glut
    from IPython.lib.inputhookglut import glut_display_mode, glut_close, glut_display, glut_idle, inputhook_glut
    if (GUI_GLUT not in self.manager.apps):
        glut.glutInit(sys.argv)
        glut.glutInitDisplayMode(glut_display_mode)
        if bool(glut.glutSetOption):
            glut.glutSetOption(glut.GLUT_ACTION_ON_WINDOW_CLOSE, glut.GLUT_ACTION_GLUTMAINLOOP_RETURNS)
        glut.glutCreateWindow(sys.argv[0])
        glut.glutReshapeWindow(1, 1)
        glut.glutHideWindow()
        glut.glutWMCloseFunc(glut_close)
        glut.glutDisplayFunc(glut_display)
        glut.glutIdleFunc(glut_idle)
    else:
        glut.glutWMCloseFunc(glut_close)
        glut.glutDisplayFunc(glut_display)
        glut.glutIdleFunc(glut_idle)
    self.manager.set_inputhook(inputhook_glut)
