[cl-opengl-devel] OSX glut diff

xristos xristos at suspicious.org
Fri Jun 26 21:25:20 UTC 2009


I fixed the main loop issue with destroy-current-window.
If something else does not work as it should, someone should
post about how freeglut works for these bits. I don't have
linux or x11 here and can't test what freeglut does when
windows are destroyed.

I can't do anything about CCL as the issue is not that simple.
The code that is commented out in interface.lisp simply interrupts
the initial thread and starts the glut event loop there.

This does not work (window comes up but event loop is blocked
and i can't do anything) because, in CCL, the initial thread
does certain housekeeping tasks and one can not simply hijack it.
Someone familiar with how CCL does things might want to look into
this, specifically into what CCL does with their cocoa event loop
and duplicate the functionality.

The same strategy of interrupting the initial thread and starting
the glut event loop there works fine in SBCL but i haven't included
the code as for most scenarios the default behavior of SBCL where
the REPL is on the initial thread (this is not true when slime is
involved of course, one has to do the interrupt trick then)
should suffice.

New patch:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cl-opengl-darwin.diff
Type: application/octet-stream
Size: 11638 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cl-opengl-devel/attachments/20090626/1ef6d22c/attachment.obj>
-------------- next part --------------



On 26 Jun 2009, at 15:55, Lu?s Oliveira wrote:

> On Wed, Jun 24, 2009 at 7:43 PM, xristos<xristos at suspicious.org>  
> wrote:
>> Here is a cleaner version against current cl-opengl
>> without the extra wm-close methods.
>
> Looking good, though it still doesn't seem to exit the main loop.
> Here's how I reproduce that bug:
>
>     * (require :cl-glut-examples)
>     ...
>     * (cl-glut-examples:rb-cube) ; for instance
>    <press Esc to close the window and the function won't return>
>
> Also, this patch doesn't work on at least CCL because of that
> threading issue I mentioned earlier.
>
> -- 
> Lu?s Oliveira
> http://student.dei.uc.pt/~lmoliv/



More information about the cl-opengl-devel mailing list