Pre-release NOTE
=reflex-glfw= awaits to be released on Hackage:
reflex-glfw [[https://travis-ci.org/deepfire/reflex-glfw/][https://api.travis-ci.org/deepfire/reflex-glfw.svg?branch=master]] *** What
=reflex-glfw= is an adapter between [[https://github.com/reflex-frp/reflex][Reflex]], a [[http://www.haskell.org/][Haskell]] FRP framework and [[https://github.com/bsl/GLFW-b][GLFW-b]], a set of [[http://www.glfw.org/][GLFW]] bindings.
*** Where
The home of =reflex-glfw= is at its Github page:
https://github.com/deepfire/reflex-glfw
*** Reflex 0.5
/reflex-glfw/ depends on a pre-release version of =reflex=, which means having
to jump through extra hoops to use /reflex-glfw/.
***** Installing via Nix By far the easiest and most reliable way to do this is to employ the /Nix/ package manager, which, unless you already have it, has to be installed first, of course:
- https://nixos.org/nix/
*** Building the demo
Once you have /Nix/ installed, building the demo is as easy as:
#+BEGIN_SRC sh
# First, enter the fixed environment (NOTE: this can take a while):
nix-shell --no-build-output
# ..then, inside the shell:
cabal build
dist/build/reflex-glfw-demo/reflex-glfw-demo
#+END_SRC
*** libGL error: unable to load driver: XXX_dri.so
In case you happen upon https://github.com/deepfire/reflex-glfw/issues/4, at
least for nVidia GPUs there's a semi-automated solution based on
https://github.com/deepfire/nix-install-vendor-gl:
#+BEGIN_SRC shell
git clone https://github.com/deepfire/nix-install-vendor-gl
. ./nix-install-vendor-gl/nix-install-vendor-gl.sh
#+END_SRC
Screenshot
[[./screenshot.png]]