0

I have a GUI developed with pyside2, i have a button in this GUI, when clicking on it, a pyopengl window appears and showing what is needed. The problem is that when closing this window, the entire GUI closed. I want to continue using the GUI after closing the opengl window. I'm using GLUT to create the window.

my_GUI_mainwindow.py: import pyopengl ... ... ... self.Btn.clicked.connect(self.opengl) def opengl(self): pyopengl(file_m)

my_pyopengl.py:

    glutInit()
    glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH)
    glutInitWindowSize(pyopengl.g_Width, pyopengl.g_Height)
    glutCreateWindow(self.fileName)
    self.init()
    glutReshapeFunc(self.reshape)
    glutDisplayFunc(self.display)
    glutMouseFunc(self.mouse)
    glutMotionFunc(self.motion)
    glutKeyboardFunc(self.keyboard)
    glutMainLoop()
Joelle
  • 33
  • 6

0 Answers0