up-to-date glfw examples

Hi, I've been looking but the examples are all fairly old and are broken in both imports from glfw and opengl. Just looking for very basic examples that work with the current versions of glfw-b and opengl. Thank you, Brian

briand@aracnet.com writes:
Hi,
I've been looking but the examples are all fairly old and are broken in both imports from glfw and opengl.
Just looking for very basic examples that work with the current versions of glfw-b and opengl.
Thank you,
Brian
They're not entirely minimal, but the vinyl-gl repo [1] includes two example programs that can get you going with both glfw-b and opengl. I added a stack file, so you should be able to clone the repo, then, ``` stack build cd examples stack exec game2d stack exec demo3d ``` Anthony Footnotes: [1] https://github.com/acowley/vinyl-gl

On Fri, 24 Jun 2016 00:27:23 -0400
Anthony Cowley
briand@aracnet.com writes:
Hi,
I've been looking but the examples are all fairly old and are broken in both imports from glfw and opengl.
Just looking for very basic examples that work with the current versions of glfw-b and opengl.
That's very useful. Thanks! I also noticed that the glfw-b package has a gears demo which is very good. The only drawback is that it uses "old style" opengl calls. Brian

The link below has introductory examples using GLFW-b and modern (VBO) OpenGL. They build with the 2-month-ago current versions of libraries, and probably also with the today-current versions. https://github.com/bergey/haskell-OpenGL-examples/tree/master/wikibook bergey On 2016-06-23 at 16:02, briand@aracnet.com wrote:
Hi,
I've been looking but the examples are all fairly old and are broken in both imports from glfw and opengl.
Just looking for very basic examples that work with the current versions of glfw-b and opengl.
Thank you,
Brian _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

On Fri, 24 Jun 2016 10:35:29 -0400
Daniel Bergey
The link below has introductory examples using GLFW-b and modern (VBO) OpenGL. They build with the 2-month-ago current versions of libraries, and probably also with the today-current versions.
https://github.com/bergey/haskell-OpenGL-examples/tree/master/wikibook
Hi Daniel, This looks really good. Couple of issues I had when trying to build on my system cabal: At least the following dependencies are missing: OpenGLRaw >=3 && <3.2, singletons >=1.0 && <2.1 I have OpenGLRaw-3.2.0.0 singletons-2.1 However when I went into the cabal file and replaced "<" with "<=" that didn't seem to make the build happy. Also, since you used "<" specifically I thought there might be a good reason for that. Brian

On 2016-06-24 at 11:52, briand@aracnet.com wrote:
cabal: At least the following dependencies are missing: OpenGLRaw >=3 && <3.2, singletons >=1.0 && <2.1
I have
OpenGLRaw-3.2.0.0 singletons-2.1
I just pushed a commit that allows these two package versions.
However when I went into the cabal file and replaced "<" with "<=" that didn't seem to make the build happy. Also, since you used "<" specifically I thought there might be a good reason for that.
The reason is that the last time I touched this package those versions weren't out, and I made the conservative assumption that changes in these versions might require changes in my package. I figure it's no big deal if someone building my examples needs to use a 2-month-old dependency, but frustrating if what's intended as a tutorial example fails at compile time. cheers, bergey

2016-06-24 21:54 GMT+02:00 Daniel Bergey
[...] I figure it's no big deal if someone building my examples needs to use a 2-month-old dependency, but frustrating if what's intended as a tutorial example fails at compile time.
Well, it depends on the definition of "failed": If the examples build cleanly in a fresh cabal sandbox or equivalently via "stack init && stack build", then I wouldn't consider this a failure. A consequence of the package versioning policy is actually that building a non-trivial project outside of a sandbox will fail with a high probability. This wouldn't be the case in an ideal world where every package author makes no mistakes and foresees the future, but alas, that's not the world we live in... :-D Cheers, S.
participants (4)
-
Anthony Cowley
-
briand@aracnet.com
-
Daniel Bergey
-
Sven Panne