
Hi, I've been compiling this project https://github.com/mlesniak/game.git It uses Hipmunk (2D collision detection/physics framework) and OpenGL. Now the problem is that Hipmunk uses Data.StateVar, and OpenGL/GLUT use Graphics.Rendering.OpenGL.GL.StateVar Both have pretty much the same code and functionality, but using both together gives problems with conflicting types. My current solution was to locally fork Hipmunk and make it use Graphics.Rendering.OpenGL.GL.StateVar (because the other way round - making OpenGL use Data.StateVar, is a cascading nightmare, lots of libs to patch), and this works. My question: is this the only possible solution? Is there some way that doesn't involve patching one library or the other? The other thing I had to locally patch is to force cabal to use freeglut instead of the local Mac OS X GLUT. I did this by again, locally forking GLUT (long live cabal sandbox add-source!) and adding extra-lib-dirs: /usr/local/Cellar/freeglut/2.8.1/lib which is the local homebrew freeglut dir. Is there a better, more reproducible way to do this? Thank you, Elise

On Thu, May 29, 2014 at 11:31 AM, Elise Huard
It uses Hipmunk (2D collision detection/physics framework) and OpenGL. Now the problem is that Hipmunk uses Data.StateVar, and OpenGL/GLUT use Graphics.Rendering.OpenGL.GL.StateVar Both have pretty much the same code and functionality, but using both together gives problems with conflicting types.
I thought Data.StateVar was the old OpenGL StateVar unbundled? That is, current versions of OpenGL should be using Data.StateVar. Unfortunately, the Haskell Platform ships an older version of OpenGL; you may need to use a sandbox to install a current OpenGL. (Or wait a bit; the next Platform update is in testing.) -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
participants (2)
-
Brandon Allbery
-
Elise Huard