From pepeg at lcc.uma.es Fri Dec 1 06:50:41 2006 From: pepeg at lcc.uma.es (Pepe Gallardo) Date: Fri Dec 1 06:48:59 2006 Subject: [HOpenGL] freeGlut and HopenGL on Windows Message-ID: <006601c7153e$ed7c2400$746cd696@pepeg> Does HopenGL support freeGlut? I would like to use some functions like "mainLoopEvent". If so, how should I install it?. I have tried renaming frreglut.dll to glut32.dll but it does'nt work. I am working with GHC 6.6 on Windowx XP. Any help would be appreciated. Thanks Pepe -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/hopengl/attachments/20061201/a7411c41/attachment.htm From sven.panne at aedion.de Fri Dec 1 07:35:22 2006 From: sven.panne at aedion.de (Sven Panne) Date: Fri Dec 1 07:33:34 2006 Subject: [HOpenGL] freeGlut and HopenGL on Windows In-Reply-To: <006601c7153e$ed7c2400$746cd696@pepeg> References: <006601c7153e$ed7c2400$746cd696@pepeg> Message-ID: <200612011335.22815.sven.panne@aedion.de> Am Freitag, 1. Dezember 2006 12:50 schrieb Pepe Gallardo: > Does HopenGL support freeGlut? I would like to use some functions like > "mainLoopEvent". If so, how should I install it?. I have tried renaming > frreglut.dll to glut32.dll but it does'nt work. I am working with GHC 6.6 > on Windowx XP. Any help would be appreciated. Yes, the GLUT package supports all freeglut extensions to GLUT, and openSUSE (the platform I'm developing on) ships freeglut as "the" GLUT for some time now, so I'm quite confident that it works on *nices. I haven't tried it under Windows yet, but I can't think of a fundamental reason why it shouldn't work there, too. What did you do exactly and what happened? Cheers, S. From pepeg at lcc.uma.es Mon Dec 4 04:41:50 2006 From: pepeg at lcc.uma.es (Pepe Gallardo) Date: Mon Dec 4 04:40:03 2006 Subject: [HOpenGL] freeGlut and HopenGL on Windows References: <006601c7153e$ed7c2400$746cd696@pepeg> <200612011335.22815.sven.panne@aedion.de> <00a101c71546$da19dad0$746cd696@pepeg> <200612011357.36642.sven.panne@aedion.de> Message-ID: <003001c71788$6e2925d0$746cd696@pepeg> ----- Original Message ----- From: "Sven Panne" To: "Pepe Gallardo" Sent: Friday, December 01, 2006 1:57 PM Subject: Re: [HOpenGL] freeGlut and HopenGL on Windows > Am Freitag, 1. Dezember 2006 13:47 schrieb Pepe Gallardo: >> As I said before, I renamed freeglut.dll to glut32.dll, but when I run my >> program I get "Exception: user error (unknown GLUT call >> glutMainLoopEvent, >> check for freeglut ... >> I really need to use mainLoopEvent. > > Hmmm, are you really sure that the program is picking up the right > glut32.dll? > I don't know the exact search order on Windows (first the app dir, then > under > %WINDOWS%\system32?), but having a "normal" GLUT lying around could be an > explanation... > I am sure that I am loading the right dll (it is in my workind directory, and I have changed the mainLoop C function to print a message on the console, and it does). I was a bit confussed as function "glutVersion" was reporting "GLUT 3.7", but that is because it is just guessing and getProcAddressInternal is not working. To confirm this, I got a copy of Extension.hs and loaded it: ghci -package GLUT -fffi Extensions.hs then I get: *Graphics.UI.GLUT.Extensions> getProcAddressInternal "glutSetOption" 0x00000000 *Graphics.UI.GLUT.Extensions> getProcAddressInternal "glutSetWindowStayOnTop" 0x00000000 By the way, I get the same behaviour when using the original glut32.dll. Any help? > Cheers, > S. > > From almeidaraf at gmail.com Fri Dec 8 22:25:01 2006 From: almeidaraf at gmail.com (Rafael Almeida) Date: Fri Dec 8 22:22:52 2006 Subject: [HOpenGL] Windows with no reshaping Message-ID: <6de6b1650612081925o39446d52x8b055538fd2d67ac@mail.gmail.com> Hello, I was trying to get help on opengl, but I haven't had much luck. I was told to try this mailing list, so here I am. I want to make it so a opengl window can't be resized. I know there are no opengl functions for that, at least none that I know of. Anyhow, I'm hoping there's some kind of work around that. I'm sure the reason behind that is portability, but I don't need it to work somewhere else other than on the X system. So a way to get the window with xlib and change that property would be just fine. I couldn't find much documentation on Hopengl over the net and the last release seems to be from 3 years ago. I wonder what happened. Was the project discontinued? []'s Rafael From sven.panne at aedion.de Sat Dec 9 07:09:29 2006 From: sven.panne at aedion.de (Sven Panne) Date: Sat Dec 9 07:07:15 2006 Subject: [HOpenGL] Windows with no reshaping In-Reply-To: <6de6b1650612081925o39446d52x8b055538fd2d67ac@mail.gmail.com> References: <6de6b1650612081925o39446d52x8b055538fd2d67ac@mail.gmail.com> Message-ID: <200612091309.29925.sven.panne@aedion.de> Am Samstag, 9. Dezember 2006 04:25 schrieb Rafael Almeida: > [...] I want to make it so a opengl window can't be resized. I know there > are no opengl functions for that, at least none that I know of. > Anyhow, I'm hoping there's some kind of work around that. I'm sure the > reason behind that is portability, but I don't need it to work > somewhere else other than on the X system. So a way to get the window > with xlib and change that property would be just fine. OpenGL has nothing to do with the window systems (X11, Windows, ...), so the real question is: Can your window system in question handle this and is this functionality exposed through a library? If you are using GLUT, you can't force a window to be a given size, just state your humble wishes and better be prepared for everything. :-) This is due to the portability of GLUT and is a good design, because under e.g. X11, the window manager gets request from clients regarding size, position, etc. and decides how to honor/modify them. So *no* library for X11 can guarantee that a window won't change its size. And with GLUT, you can't even give a hint that you want this... If you are using e.g. Gtk2Hs (http://haskell.org/gtk2hs/) or wxHaskell (http://wxhaskell.sourceforge.net/) you can probably at least give a hint that it is preferable to *not* resize the window. > I couldn't find much documentation on Hopengl over the net and the > last release seems to be from 3 years ago. I wonder what happened. Was > the project discontinued? Not at all, the OpenGL and GLUT packages are very alive, just the web pages are quite outdated. If you are using a recent GHC or Hugs, you probably have those packages already on your box. Documentation should come with your Haskell distribution and is available online at: http://haskell.org/ghc/docs/latest/html/libraries/ and especially interesting for your purposes are the documents starting at: http://haskell.org/ghc/docs/latest/html/libraries/OpenGL/Graphics-Rendering-OpenGL.html http://haskell.org/ghc/docs/latest/html/libraries/GLUT/Graphics-UI-GLUT.html Depending on your Haskell distribution you already have a lot of OpenGL examples on your box, otherwise have a look at: http:://darcs.haskell.org/packages/GLUT/examples/ The bleeding-edge versions on darcs.haskell.org have almost full OpenGL 2.1 support, including shaders, and I hope to complete it soon. Cheers, S.