Re: hopengl links

Sven Panne <[email protected]>
Newsgroups gmane.comp.lang.haskell.hopengl
Message-ID <[email protected]>
On Thursday 22 February 2007 13:02, Jamin A. Ohmoto-Frederick wrote:
> Regarding Chris' post -
>
> I ran into a lot of problems too since there are old
> versions of HOpenGL and corresponding examples
> floating around out there with differing advice, such
> as at http://www.haskell.org/HOpenGL/.  I'm not sure
> why it hasn't been updated since it's off of the main
> haskell.org.

I admit being guilty here of not upating that site for a very long time. My 
amount of time I can work on HOpenGL varies quite a bit depending on my Real 
Life (tm) ;-), I think it might be a good idea to move the stuff to the 
Haskell Wiki, so it is easier to keep things up-to-date, integrate more 
examples/tutorials/etc.  I'll think about that...

> There are some sites that include a lot of Red Book
> examples that should just compile and work with the
> method I gave (such as ghc --make Planet.hs).  Anyone
> know a reason why some tutorials use the -package GLUT
> option?

The OpenGL/GLUT packages are exposed by default, so there is no need to 
specify them explicitly, unless you are manually compiling and linking. This 
is explained in detail at:

http://www.haskell.org/ghc/docs/latest/html/users_guide/packages.html#using-packages

So the easiest way to use all OpenGL/GLUT stuff is importing Graphics.UI.GLUT 
and using "ghc --make". A single import, no special options...

> Try some of these links:
>
> This should have the newer examples (can anyone tell
> me if there are any better sites than this?)
> http://cvs.haskell.org/cgi-bin/cvsweb.cgi/~checkout~/fptools/libraries/GLUT
>/examples/RedBook/ [...]

The OpenGL/GLUT packages are now under darcs control instead of CVS, so the 
latest and greatest examples are available at:

   http://darcs.haskell.org/packages/GLUT/examples/

If you use Hugs, it may already ship with all the examples, e.g. at:

   /usr/lib/hugs/demos/GLUT

Cheers,
   S.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.