[HOpenGL] installation question

andrey mirtchovski mirtchov@cpsc.ucalgary.ca
Sun, 23 Mar 2003 12:11:54 -0700 (MST)


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

---1618459641-595621942-1048446714=:1042
Content-Type: TEXT/PLAIN; charset=US-ASCII

Hello, 

first post here, so forgive me if i'm breaking any rules...

i'd like to report the following issue with HOpenGL:

during the 'make install' step GLUT/Graphics never gets put in the
corresponding .../lib/ghc/imports directory. the examples too never get
installed anywhere on the system. as an effect that prohibits compilation of
HOpenGL programs which use glut. i mean, -package HOpenGL still works, but
"import Graphics.UI.GLUT" fails...


copying the entire GLUT/Graphics directory by hand into
.../lib/ghc/imports/HOpenGL/ fixes this.

note that the freebsd port of HOpenGL installs the glut stuff correctly, and
even puts all the examples in /usr/local/examples/HOpenGL/.. too bad FBSD
doesn't have decent OpenGL hardware acceleration...

here's my first HOpenGL program (and first Haskell program too, so you can 
smack me over the head if the code is not too good), a visualization of a 
Klein Bottle..

compile with:

ghc -package HOpenGL -package lang -fglasgow-exts	\
-I/usr/X11R6/include  -lHOpenGL -lglut -lGLU -lGL -lSM -lICE \
-L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lm Klein.hs -o Klein

interesting fact: the Haskell implementation runs at a slightly higher frame
rate than the corresponding C implementation... i think i know why..


cheers, andrey

---1618459641-595621942-1048446714=:1042
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="Klein.hs"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.44.0303231211540.1042@fbsd.cpsc.ucalgary.ca>
Content-Description: 
Content-Disposition: attachment; filename="Klein.hs"

ey0gDQoJQSB2aXN1YWxpemF0aW9uIG9mIGEgS2xlaW4gYm90dGxlDQoNCglB
bmRyZXkgTWlydGNob3Zza2kgW21pcnRjaG92QGNwc2MudWNhbGdhcnkuY2Fd
DQoNCi19DQppbXBvcnQgU3lzdGVtLkV4a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