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.
> 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
>
> bri...@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
https://github.com/bergey/haskell-OpenGL-examples/tree/master/wikibook
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.
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
[...] 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.