Thanks for the pointers.<br><br>I'm looking for some way to program my library so that a graceful exit is made where possible and still runs, though exits less gracefully with non-free glut. I'd be happy with either a new API entry for that case or a change to the meaning of MainLoopReturns.<br>
<br> - Conal<br><br><div class="gmail_quote">On Thu, Nov 20, 2008 at 5:33 AM, Sven Panne <span dir="ltr"><<a href="mailto:sven.panne@aedion.de">sven.panne@aedion.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">On Thursday 13 November 2008 03:24:29 Conal Elliott wrote:<br>
> I'm looking for a way to use MainLoopReturns when freeglut is present and<br>
> not when it isn't. I could use some help. I figure that the<br>
> implementation has some way to generate that error message, and maybe we<br>
> could similarly just do a standard ungraceful exit if freeglut is missing.<br>
><br>
> The great thing about MainLoopReturns is that it plays nicely with ghci.<br>
> Closing a window returns to ghci for more fun.<br>
><br>
> Some more info at <a href="http://trac.haskell.org/FieldTrip/ticket/8" target="_blank">http://trac.haskell.org/FieldTrip/ticket/8</a> .<br>
><br>
> Any ideas?<br>
<br>
</div></div>Currently the GLUT binding uses dynamic lookup to get freeglut-only API<br>
entries (see /GLUT/Graphics/UI/GLUT/Extensions.hs, cbits/HsGLUT.c,<br>
include/HsGLUTExt.h) and uses throwIfNull to test for non-existent API<br>
entries. Therefore, e.g. actionOnWindowClose should throw an exception when<br>
"classic" GLUT is used. I am not sure if I understand your request: Do you<br>
want a new API entry for the GLUT binding or a different behavior of the<br>
current entries?<br>
<br>
Cheers,<br>
<font color="#888888"> S.<br>
<br>
</font></blockquote></div><br>