Re: Problem with Glut
Balazs Komuves <[email protected]> Mon, 7 May 2012 09:46:42 +0200
| Newsgroups | gmane.comp.lang.haskell.hopengl |
|---|---|
| Message-ID | <CAHZd2pmSww=xZSbqKpYOx0ZN_GO-KqgixGbLigX19wx8x56nYg@mail.gmail.com> |
--===============4442163904530376878== Content-Type: multipart/alternative; boundary=047d7b10ca1d9c085004bf6d78bf --047d7b10ca1d9c085004bf6d78bf Content-Type: text/plain; charset=UTF-8 Hello, Compiling the Haskell OpenGL/GLUT bindings on Windows is unfortunately very complicated, because they use some Unix tools. It is recommended to use the Haskell Platform instead, which as you noticed, has them included. If for some reasons you need to compile them manually, the primary trick is to install a (recent version!) of MinGW/MSys, which provides the necessary unixy tools. I have more experience with GLUT than with GLFW, so I can add that GLUT works pretty robustly too (I use Windows and OSX), even though it clearly shows the age. The only big problem I remember is with the middle mouse buttons; and there is some inconvenience with the initialization, and lack of vsync support (which has to be hacked in). However, it provides a display callback, which as far as I remember, GLFW does not (it only has a big loop). As Jason said, to use GLUT, you need to put glut32.dll at a place where Windows finds it (either at the same directory your executable is - recommended if you distribute your app -, or some Windows system directory). Also, with GHCi there are some issues, so first try the compiled version. I'm not up-to-date regarding how to solve these issues. OpenGL/GLUT is much simpler than wxHaskell. I had very bad experiences with wxHaskell (though I believe they were primarily caused by wx itself), but that was some time ago, so it is possible that it is better now. Hope this helps, Balazs On Sun, May 6, 2012 at 10:34 PM, ai00rea <[email protected]> wrote: > I have to make a project for university. I want to make a little game like > Pong. For this I decided to use Glut. I followed this tutorial but I didn't > succeed: > http://netsuperbrain.com/blog/posts/freeglut-windows-hopengl-hglut/ > > I am using Windows 7. Now I removed all things I installed from my computer > about haskell & openGL & GLUT. > And I installed Haskell Platform. I found out that openGL and GLUT are > included in this platform. OK but there is one problem: > > > GHCi, version 7.0.4: http://www.haskell.org/ghc/ :? for help > Loading package ghc-prim ... linking ... done. > Loading package integer-gmp ... linking ... done. > Loading package base ... linking ... done. > Loading package ffi-1.0 ... linking ... done. > [1 of 1] Compiling Main ( > C:\Users\fuRy\Desktop\openGL\teapots.hs, i > nterpreted ) > Ok, modules loaded: Main. > *Main> main > Loading package OpenGL-2.2.3.0 ... linking ... done. > Loading package array-0.3.0.2 ... linking ... done. > Loading package containers-0.4.0.0 ... linking ... done. > Loading package GLUT-2.1.2.1 ... <interactive>: glut32: The specified > module > cou > ld not be found. > can't load .so/.DLL for: glut32 (addDLL: could not load DLL) > > > Please help me. I tried 2 days to install this. Before that I tried to > instal WXHaskell too, and i failed. Or recomand me an library that you use > and there are some examples of code to figure out how to use it and is good > for my purpose: Pong. > > -- > View this message in context: > http://haskell.1045720.n5.nabble.com/Problem-with-Glut-tp5689667.html > Sent from the Haskell - HOpenGL mailing list archive at Nabble.com. > > _______________________________________________ > HOpenGL mailing list > [email protected] > http://www.haskell.org/mailman/listinfo/hopengl > --047d7b10ca1d9c085004bf6d78bf Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <br>Hello,<br><br>Compiling the Haskell OpenGL/GLUT bindings on Windows is = unfortunately very complicated,<br>because they use some Unix tools. It is = recommended to use the Haskell Platform instead,<br>which as you noticed, h= as them included. If for some reasons you need to compile them manually,<br= > the primary trick is to install a (recent version!) of MinGW/MSys, which pr= ovides the necessary<br>unixy tools.<br><br>I have more experience with GLU= T than with GLFW, so I can add that GLUT works pretty<br>robustly too (I us= e Windows and OSX), even though it clearly shows the age. The only big <br> problem I remember is with the middle mouse buttons; and there is some inco= nvenience <br>with the initialization, and lack of vsync support (which has= to be hacked in). However,<br>it provides a display callback, which as far= as I remember, GLFW does not (it only has<br> a big loop).<br><br>As Jason said, to use GLUT, you need to put glut32.dll = at a place where Windows finds it<br>(either at the same directory your exe= cutable is - recommended if you distribute your app -,<br>or some Windows s= ystem directory).<br> <br>Also, with GHCi there are some issues, so first try the compiled versio= n. I'm not up-to-date<br>regarding how to solve these issues.<br><br>Op= enGL/GLUT is much simpler than wxHaskell. I had very bad experiences with w= xHaskell<br> (though I believe they were primarily caused by wx itself), but that was so= me time ago, so it<br>is possible that it is better now.<br><br>Hope this h= elps,<br>Balazs<br><br><br><div class=3D"gmail_quote">On Sun, May 6, 2012 a= t 10:34 PM, ai00rea <span dir=3D"ltr"><<a href=3D"mailto:black_fury91@ya= hoo.com" target=3D"_blank">[email protected]</a>></span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex">I have to make a project for university. I w= ant to make a little game like<br> Pong. For this I decided to use Glut. I followed this tutorial but I didn&#= 39;t<br> succeed: <a href=3D"http://netsuperbrain.com/blog/posts/freeglut-windows-ho= pengl-hglut/" target=3D"_blank">http://netsuperbrain.com/blog/posts/freeglu= t-windows-hopengl-hglut/</a><br> <br> I am using Windows 7. Now I removed all things I installed from my computer= <br> about haskell & openGL & GLUT.<br> And I installed Haskell Platform. I found out that openGL and GLUT are<br> included in this platform. OK but there is one problem:<br> <br> <br> GHCi, version 7.0.4: <a href=3D"http://www.haskell.org/ghc/" target=3D"_bla= nk">http://www.haskell.org/ghc/</a> =C2=A0:? for help<br> Loading package ghc-prim ... linking ... done.<br> Loading package integer-gmp ... linking ... done.<br> Loading package base ... linking ... done.<br> Loading package ffi-1.0 ... linking ... done.<br> [1 of 1] Compiling Main =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (<br> C:\Users\fuRy\Desktop\openGL\teapots.hs, i<br> nterpreted )<br> Ok, modules loaded: Main.<br> *Main> main<br> Loading package OpenGL-2.2.3.0 ... linking ... done.<br> Loading package array-0.3.0.2 ... linking ... done.<br> Loading package containers-0.4.0.0 ... linking ... done.<br> Loading package GLUT-2.1.2.1 ... <interactive>: glut32: The specified= module<br> cou<br> ld not be found.<br> can't load .so/.DLL for: glut32 (addDLL: could not load DLL)<br> <br> <br> Please help me. I tried 2 days to install this. Before that I tried to<br> instal WXHaskell too, and i failed. Or recomand me an library that you use<= br> and there are some examples of code to figure out how to use it and is good= <br> for my purpose: Pong.<br> <br> --<br> View this message in context: <a href=3D"http://haskell.1045720.n5.nabble.c= om/Problem-with-Glut-tp5689667.html" target=3D"_blank">http://haskell.10457= 20.n5.nabble.com/Problem-with-Glut-tp5689667.html</a><br> Sent from the Haskell - HOpenGL mailing list archive at Nabble.com.<br> <br> _______________________________________________<br> HOpenGL mailing list<br> <a href=3D"mailto:[email protected]">[email protected]</a><br> <a href=3D"http://www.haskell.org/mailman/listinfo/hopengl" target=3D"_blan= k">http://www.haskell.org/mailman/listinfo/hopengl</a><br> </blockquote></div><br> --047d7b10ca1d9c085004bf6d78bf-- --===============4442163904530376878== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ HOpenGL mailing list [email protected] http://www.haskell.org/mailman/listinfo/hopengl --===============4442163904530376878==--