[Fieldtrip] Re: [HOpenGL] noticing freeglut vs not

Conal Elliott conal at conal.net
Thu Nov 20 18:10:10 EST 2008

Thanks for the pointers.

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.

  - Conal

On Thu, Nov 20, 2008 at 5:33 AM, Sven Panne <sven.panne at aedion.de> wrote:

> On Thursday 13 November 2008 03:24:29 Conal Elliott wrote:
> > I'm looking for a way to use MainLoopReturns when freeglut is present and
> > not when it isn't.  I could use some help.  I figure that the
> > implementation has some way to generate that error message, and maybe we
> > could similarly just do a standard ungraceful exit if freeglut is
> missing.
> >
> > The great thing about MainLoopReturns is that it plays nicely with ghci.
> > Closing a window returns to ghci for more fun.
> >
> > Some more info at http://trac.haskell.org/FieldTrip/ticket/8 .
> >
> > Any ideas?
> Currently the GLUT binding uses dynamic lookup to get freeglut-only API
> entries (see /GLUT/Graphics/UI/GLUT/Extensions.hs, cbits/HsGLUT.c,
> include/HsGLUTExt.h) and uses throwIfNull to test for non-existent API
> entries. Therefore, e.g. actionOnWindowClose should throw an exception when
> "classic" GLUT is used. I am not sure if I understand your request: Do you
> want a new API entry for the GLUT binding or a different behavior of the
> current entries?
> Cheers,
>    S.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/fieldtrip/attachments/20081120/6ac529ae/attachment-0001.htm

More information about the FieldTrip mailing list