[HOpenGL] HOpenGL-1.03 on WinDoze, step by step...

Sven Panne Sven.Panne@informatik.uni-muenchen.de
Sat, 18 Jan 2003 19:31:14 +0100


Some people seem to have quite some trouble with HOpenGL 1.03 on
WinDoze, so here's a step-by-step recipe:

* First of all, use GHC 5.04.2. Older versions might work, but this
   one contains a lot of bug fixes.

* Alas, the OpenGL/GLUT headers were accidentally left out from the
   WinDoze installer for GHC 5.04.2, so add the missing headers by
   simply unzipping
      http://haskell.org/HOpenGL/releases/OpenGL-includes.zip
   into your GHC installation directory.

* The headers on WinDoze are sometimes cheating about the actual
   OpenGL version. This can be fixed by applying the first patch
   attached below

* If you want to build HOpenGL with MinGW/MSYS:

   * HOpenGL's build system didn't take MinGW/MSYS into account, but
     this can easily be fixed by applying the second patch attached
     below.

   * MinGW/MSYS comes without a GLUT header, so unzip glut.h from
        http://haskell.org/HOpenGL/releases/OpenGL-includes.zip
     into MinGW\include\GL\.

   * MinGW/MSYS comes without a GLUT DLL, so copy
        http://haskell.org/HOpenGL/releases/glut32.dll
     into MinGW\bin\. The DLL is taken from Cygwin, BTW.

* If you want to build HOpenGL with Cygwin:

   * Apart from the default packages, you need Graphics/opengl,
     Devel/gcc, and Devel/make.

   * Building with Cygwin's XFree86 packages is currently untested,
     but you don't need them for HOpenGL anyway.

* You don't have to do anything special to get HW acceleration, the
   OpenGL DLL takes care of that automatically by using your video
   card's DLL(s) provided by the card's vendor.

Hope that helps,
    S.


----------------------------------------------------------------------
--- HOpenGL-1.03.orig/configure	Mon Jul 29 17:33:03 2002
+++ HOpenGL-1.03/configure	Sat Jan 18 16:32:35 2003
@@ -4130,7 +4130,10 @@
    ac_status=$?
    echo "$as_me:4131: \$? = $ac_status" >&5
    (exit $ac_status); }; }; then
-  hopengl_cv_gl_version=1.2
+  case `uname | tr a-z A-Z` in
+    CYGWIN*|MINGW*) hopengl_cv_gl_version=1.1 ;;
+    *) hopengl_cv_gl_version=1.2 ;;
+  esac
  else
    echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
----------------------------------------------------------------------
--- HOpenGL-1.03.orig/lib/find-ghc-libdir	Sun Jul 21 12:19:15 2002
+++ HOpenGL-1.03/lib/find-ghc-libdir	Sat Jan 18 16:28:43 2003
@@ -52,7 +52,7 @@

  if  test "$IS_CYGWIN" = "no" ; then
     case `uname | tr a-z A-Z` in
-     CYGWIN*) IS_CYGWIN=yes ;;
+     CYGWIN*|MINGW*) IS_CYGWIN=yes ;;
       *) ;;
     esac
  fi

----------------------------------------------------------------------