This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Guile/GL/GLUT and POSIX threads trick (any hope?).



> > I would guess that only one thread can be allowed to be in GLUT at a
> > time, right?  Why don't you create a glut_mutex which a thread must
> > hold while it makes GLUT calls?  Leave the rest of Guile
> > multi-threaded.
> 
> Well, it's worse than that.  GLUT has a glutMainLoop that must be
> called before glut starts doing anything, and it never returns.  So I
> can't see any safe way, with or without posix threads, to have a REPL
> in the terminal window, and have GLUT call guile functions from its
> callbacks...

You could call scm_boot_guile, and then have your inner_main function
call the glut main loop.  Either write your own repl suitable for
invocation from glut callbacks, or make a separate Guile thread and
have that call the repl.  In the latter case, you'll need a glut lock.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]