
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

Andrey Mirtchovski wrote:
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...
Yea, that's an known issue (bug in fact).
copying the entire GLUT/Graphics directory by hand into .../lib/ghc/imports/HOpenGL/ fixes this.
Yes, but you only need the *.hi files
too bad FBSD doesn't have decent OpenGL hardware acceleration...
I don't know what you call decent, but my test were always faster on FreeBSD than on Windows. Didn't compare to Linux yet. Bye Jan

On Mon, 24 Mar 2003, Jan Rochel wrote:
I don't know what you call decent, but my test were always faster on FreeBSD than on Windows. Didn't compare to Linux yet.
I meant that the nvidia opengl accelerated drivers on freebsd are not fully operational yet -- they do not work with 5.0 (last I heard) and I experienced crashes with them under 4.7... There's also a noticeable slowdown when running in full screen mode (at least more noticeable than in Linux)... FreeBSD without hardware acceleration (i.e. non-nvidia graphics) is fine speed-wise when running simple opengl. In fact the little code I sent with my original email was developed mostly on my FBSD laptop. Now, are there any more sample opengl programs people have written, besides the redbook examples and the tutorials (windows-only and last updated in 2001) in Brazil? I want to learn how to manage large datasets in Haskell elegantly :) andrey
participants (2)
-
andrey mirtchovski
-
Jan Rochel