Hi,
I'm trying to create an OpenGL window without loosing control to the
glutMainLoop.
Thus I added the following definition from glut to OpenGL:
: (de glutMainLoopEvent () (native `*GlutLib glutMainLoopEvent) )
I set up some kind of main loop:
: (mouseFunc '((Btn State X Y) (setq _run
Hi Oskar,
Thus I added the following definition from glut to OpenGL:
: (de glutMainLoopEvent () (native `*GlutLib glutMainLoopEvent) )
I set up some kind of main loop:
: (mouseFunc '((Btn State X Y) (setq _run NIL))) # Exit upon mouse click
: (de go () (setq _run T)(while _run
A couple of options:
- Use coroutines and yield control to the main thread in the glutIdleFunc.
- Use a library that doesn't take control of the main loop. I can think of mine
( http://code.google.com/p/libaw/ ) and GLFW ( http://www.glfw.org ).
On May 28, 2013, at 10:57 AM, Oskar Wieland