views:

80

answers:

1

Hello.

Whenever I close OpenGL window it makes ghci console from which the app was started to immediately disappear. Is there a way to prevent this behaviour? A sample app.

Thanks.

+2  A: 

before calling mainLoop, you can change the actionOnWindowClose mode :

actionOnWindowClose $= MainLoopReturns

mainLoop

Don't know if it works for non-Linux users.

sauf
@saul: It fails to run properly with message `*** Exception: user error (unknown GLUT call glutSetOption, check for freeglut)` in Windows though. People described the problem in [comments here](http://netsuperbrain.com/blog/posts/freeglut-windows-hopengl-hglut). Thanks for pointing to a solution anyway, and there are backticks for code. ;)
Yasir Arsanukaev