REPL and OpenGL

2013-05-28 Thread Oskar Wieland
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 NI

Re: REPL and OpenGL

2013-05-28 Thread Alexander Burger
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 (glut

Re: REPL and OpenGL

2013-05-28 Thread Jorge Acereda MaciĆ”
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 wrot

Re: REPL and OpenGL

2013-06-06 Thread Oskar Wieland
Hi, thanks for the suggestions but I couldn't find a way to get it worrking together. Maybe I didn't made myself clear enough, the link shows what I'm trying to do: Lisp, Opengl and live editting of code: http://www.youtube.com/watch?v=XLkUI89fgRI Is this possible with picoLisp? Regards O

Re: REPL and OpenGL

2013-06-07 Thread Alexander Burger
Hi Oskar, > Maybe I didn't made myself clear enough, the link shows what I'm > trying to do: > > Lisp, Opengl and live editting of code: > http://www.youtube.com/watch?v=XLkUI89fgRI > > Is this possible with picoLisp? Yes ... as I said in my last mail: Can we find out the socket fd where th

Re: REPL and OpenGL

2013-06-07 Thread Alexander Burger
On Fri, Jun 07, 2013 at 03:01:43PM +0200, Alexander Burger wrote: >Can we find out the socket fd where the events arrive on? > >If so, then I would trigger 'glutMainLoopEvent' whenever an event >arrives: > >(task (glutMainLoopEvent)) > > So you must put the call to (glutMainLoop

Re: REPL and OpenGL

2013-06-10 Thread Oskar Wieland
Hi alex, setting a background task was exactly what I was looking for. (task -10 0 (...)) works fine. I tried it with the socket fd also, by reading it from /proc//fd/ and putting it into (task (glutMainLoopEvent)) but got only segmentation faults. Thanks a lot Oskar -- UNSUBSCRIBE: mail