[Haskell-cafe] GLUT, FLGW, FLGW-b

Jason Dagit dagitj at gmail.com
Thu Dec 12 22:49:33 UTC 2013

I started using it after making the following comparison several years ago:

Maybe that analysis is useful to you as well? Just so you know, it's
probably out of date by now, so you might want to double check some of my
claims. For example, the C library for GLFW doesn't use atexit() anymore
(which is a good thing).

Getting back to your question: As I recall, it's better maintained, lighter
weight, and it has better dependencies. With GLFW-b you can use either
OpenGL or OpenGLRaw, whereas GLFW depends directly on OpenGL. The main
drawback, for me, is that GLFW-b doesn't support fonts.

My proposed solution to that was to make a binding to the freetype2 library
(you can find my binding on hackage/github). I never really finished that
project. The binding should work but it's very low level. A few people have
sent me example code they wrote to use it with OpenGL. It's really
something I should finish :) The other cool thing about using freetype for
fonts is that you can easily make it part of a rendering system that
doesn't use any OS rendering libraries (eg., add font support to a


On Thu, Dec 12, 2013 at 1:45 PM, Vlad Lopatin <madjestic13 at gmail.com> wrote:

> Thanks, Jason
> What makes you prefer GLFW-b instead GLFW?
> On 12 December 2013 19:15, Jason Dagit <dagitj at gmail.com> wrote:
>> On Thu, Dec 12, 2013 at 3:05 AM, Sven Panne <svenpanne at gmail.com> wrote:
>>> 2013/12/12 Vlad Lopatin <madjestic13 at gmail.com>:
>>> > I keep reading (wiki) that GLUT is a legacy package and some libraries
>>> (e.g.
>>> > GLFW) are meant to replace it.  I also see that some of the GLUT
>>> > functionality is based on fixed pipeline.  What is the current status
>>> of
>>> > Haskell GLUT?  Is it 'to stay' or something that is going to be
>>> deprecated
>>> > at some point?  Should one try replacing it with GLFW(-b) in a
>>> project, if
>>> > fixed pipeline is not expected to be used?
>>> I think this really depends on your needs: GLUT was designed as a
>>> simple cross-platform API for OpenGL demos and tutorials, perhaps even
>>> some programs of medium complexity.
>> I prefer GLFW-b for cross platform programs for the simple reason that on
>> windows GLUT requires you to install a DLL and make sure it's in the path.
>> I prefer GLFW-b more generally because it's more modern, fully open
>> source, and under active development. The license for GLUT is open in
>> practice but it's not a clean open source license. I guess most people use
>> freeglut instead.
>> Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20131212/2968963d/attachment.html>

More information about the Haskell-Cafe mailing list