deepfire / reflex-glfw

A GLFW-b adapter for the Haskell Reflex FRP implementation.
BSD 3-Clause "New" or "Revised" License
10 stars 2 forks source link
adapter demo-app frp glfw haskell opengl reflex reflex-frp

*** 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