
I've found HOpenGL and the Debian package libghc6-opengl-dev. The former seems to be very out of date (last release 2003) but I can't find any demos for the latter. Where should I go to get started with OpenGL and Haskell? -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. OCaml for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists/?e

On 5/30/07, Jon Harrop
I've found HOpenGL and the Debian package libghc6-opengl-dev. The former seems to be very out of date (last release 2003) but I can't find any demos for the latter.
Where should I go to get started with OpenGL and Haskell?
For at least GHC you can use the libraries that come with. Check out this blog entry as a nice starting place http://blog.mikael.johanssons.org/archive/2006/09/opengl-programming-in-hask...

Creighton Hogg wrote:
Check out this blog entry as a nice starting place http://blog.mikael.johanssons.org/archive/2006/09/opengl-programming-in-hask...
Thanks for this... (I too would like to start hacking around with OpenGL!)

Jon asked:
Where should I go to get started with OpenGL and Haskell?
Don't use the examples here: http://www.haskell.org/HOpenGL/ They don't work with recent versions of HOpenGL. But do use the examples here: http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/libraries/GLUT/examples/Re... They worked for me. -- Dan

On Saturday 02 June 2007 02:45:48 Dan Piponi wrote:
But do use the examples here: http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/libraries/GLUT/examples/R edBook/ They worked for me.
Great, thanks. May I just ask, does ShadowMap.hs work on your machine? -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. OCaml for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists/?e

On 6/1/07, Jon Harrop
On Saturday 02 June 2007 02:45:48 Dan Piponi wrote:
But do use the examples here: http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/libraries/GLUT/examples/R edBook/ They worked for me.
Great, thanks. May I just ask, does ShadowMap.hs work on your machine?
It compiles fine. Runs imperfectly. The shadow map matrix seems to be off so that shadows aren't quite being cast correctly. (ghc 6.6.1 on MacOSX with a GeForce FX Go5200 if that's relevant.) Additionally the main window lacks a title bar and doesn't receive keyboard events. I've no idea if the problems are with HOpenGL or the example code. -- Dan

On Saturday 02 June 2007 16:01:05 Dan Piponi wrote:
On 6/1/07, Jon Harrop
wrote: Great, thanks. May I just ask, does ShadowMap.hs work on your machine?
It compiles fine. Runs imperfectly. The shadow map matrix seems to be off so that shadows aren't quite being cast correctly. (ghc 6.6.1 on MacOSX with a GeForce FX Go5200 if that's relevant.) Additionally the main window lacks a title bar and doesn't receive keyboard events. I've no idea if the problems are with HOpenGL or the example code.
I had a suspicion that the problem might be my forcing antialiasing on globally using nvidia-settings. This has adversely affected my own code (OCaml, nothing to do with HOpenGL). But I tried turning it back off and the ShadowMap.hs demo still displays only a black screen here. I'm on Linux with a GF7900GX but it shouldn't make any difference. As long as it works on someone else's computer, I'll keep fiddling with it here. Thanks! BTW, the other OpenGL demos I've seen are fantastic - great work! -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. OCaml for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists/?e

Jon Harrop wrote:
Where should I go to get started with OpenGL and Haskell?
Take a look at Gtk2Hs, which has OpenGL bindings. For example, see http://darcs.haskell.org/gtk2hs/demo/opengl/

On Wed, 2007-05-30 at 16:09 -0700, Bryan O'Sullivan wrote:
Jon Harrop wrote:
Where should I go to get started with OpenGL and Haskell?
Take a look at Gtk2Hs, which has OpenGL bindings.
For example, see http://darcs.haskell.org/gtk2hs/demo/opengl/
The Gtk2Hs OpenGL stuff is only a replacement for the GLUT windowing tookkit. The Gtk2Hs OpenGL stuff still has to be used in combination with the standard Graphics.Rendering.OpenGL modules. The Gtk2Hs OpenGL stuff basically consists of a GL widget that you can embed into other Gtk+ windows and then use the standard OpenGL calls to render into the GL widget. Duncan

See the examples/RedBook directory in the source code. It gives you a
good idea how the C-idioms are translated.
For an actual documentation on OpenGL you'll better take a look at
general OpenGL literature and translate them into Haskell. Note that
it's quite complex, though.
On 5/31/07, Jon Harrop
I've found HOpenGL and the Debian package libghc6-opengl-dev. The former seems to be very out of date (last release 2003) but I can't find any demos for the latter.
Where should I go to get started with OpenGL and Haskell?
-- Dr Jon D Harrop, Flying Frog Consultancy Ltd. OCaml for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists/?e _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- "Remember! Everytime you say 'Web 2.0' God kills a startup!" - userfriendly.org, Jul 31, 2006

On 5/30/07, Jon Harrop
I've found HOpenGL and the Debian package libghc6-opengl-dev. The former seems to be very out of date (last release 2003) but I can't find any demos for the latter.
Where should I go to get started with OpenGL and Haskell?
I started converting the (famous?) NeHe tutorials to Haskell. I made it through the 12th tutorial before I moved on to other things. You can find my darcs repository here: http://www.codersbase.com/index.php/Nehe-tuts If you convert any more of the NeHe lessions to haskell, I accept darcs patches. Have fun! Jason
participants (8)
-
Andrew Coppin
-
Bryan O'Sullivan
-
Creighton Hogg
-
Dan Piponi
-
Duncan Coutts
-
Jason Dagit
-
Jon Harrop
-
Thomas Schilling