From brad.beveridge at gmail.com Tue Apr 11 17:28:17 2006 From: brad.beveridge at gmail.com (Brad Beveridge) Date: Tue, 11 Apr 2006 10:28:17 -0700 Subject: [cl-opengl-devel] A few questions about cl-opengl Message-ID: Hi all, I've just been taking a quick peek at the OGL bindings that have been generated for this project. The bindings look nice. 1) Are the bindings all hand generated, or is there some simple automation helping out? 2) Does this project aim to generate raw bindings, and then a Lispy layer on top? 3) I noticed the OpenGL2 logo - is that the target version? 4) Is there a design in place to handle OGL extensions? >From the quick peek that I took glDrawArrays is not yet supported. I'm guessing that this will require a bit of framework, because of the need to feed glDrawArrays (and other array based functions) data that won't move with GC. Are there any thoughts on how this will work? I would guess that using C's malloc might be an idea, but then there is potential for leaks unless you proxy the array with a Lisp object that can free the malloc'ed array when collected. I did notice something that looked like it copied a Lisp array into a foriegn array, but IMHO this will be too slow in the long term. I'm toying with the idea of writing some OGL stuff in Lisp, and it looks to me that since array operations are so common in OpenGL, that they ought to be well supported by the binding. Am I making sense here, or are there aspects of this I am not understanding? It is quite possible, I'm relatively new to Lisp :) Cheers Brad From luismbo at gmail.com Tue Apr 11 20:30:30 2006 From: luismbo at gmail.com (=?ISO-8859-1?Q?Lu=EDs_Oliveira?=) Date: Tue, 11 Apr 2006 21:30:30 +0100 Subject: [cl-opengl-devel] A few questions about cl-opengl In-Reply-To: References: Message-ID: On 2006-apr-11, at 18:28, Brad Beveridge wrote: > 1) Are the bindings all hand generated, or is there some simple > automation helping out? All written by hand. :-) > 2) Does this project aim to generate raw bindings, and then a Lispy > layer on top? We're making it lispy as we go. > 3) I noticed the OpenGL2 logo - is that the target version? Yes. > 4) Is there a design in place to handle OGL extensions? No that I know of. Oliver might have some ideas. It'll probably be something based on cffi:foreign-symbol-pointer. > I did notice something that looked like it copied a Lisp array into a > foriegn array, but IMHO this will be too slow in the long term. CFFI needs some work on shareable vector interface. It's just waiting for someone who really needs that. :-) > I'm toying with the idea of writing some OGL stuff in Lisp, and it > looks to me that since array operations are so common in OpenGL, that > they ought to be well supported by the binding. Am I making sense > here, or are there aspects of this I am not understanding? It is > quite possible, I'm relatively new to Lisp :) Go for it. cl-opengl will certainly continue to improve. -- Lu?s Oliveira http://student.dei.uc.pt/~lmoliv/ Equipa Portuguesa do Translation Project http://www.iro.umontreal.ca/translation/registry.cgi?team=pt From luismbo at gmail.com Tue Apr 11 20:33:09 2006 From: luismbo at gmail.com (=?ISO-8859-1?Q?Lu=EDs_Oliveira?=) Date: Tue, 11 Apr 2006 21:33:09 +0100 Subject: [cl-opengl-devel] Webpage update Message-ID: Hello, Brad's e-mail reminds me that I forgot to say something about the webpage. So here it is (mostly for Oliver): I added some simple information to the webpage. -- Lu?s Oliveira http://student.dei.uc.pt/~lmoliv/ Equipa Portuguesa do Translation Project http://www.iro.umontreal.ca/translation/registry.cgi?team=pt From jamesjb at jamesjb.com Wed Apr 12 02:06:43 2006 From: jamesjb at jamesjb.com (James Bielman) Date: Tue, 11 Apr 2006 19:06:43 -0700 Subject: [cl-opengl-devel] GL Evaluator Patches Message-ID: <87vetf8s3w.fsf@jamesjb.com> Hi, Here are a pair of patches that add the appropriate enums for GL-ENABLE to work with evaluators, and to convert the contents of the Lisp arrays passed to MAP-1 and MAP-2 to floats. Thanks, James -------------- next part -------------- A non-text attachment was scrubbed... Name: enable-evaluator.patch Type: text/x-patch Size: 6226 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: map-float.patch Type: text/x-patch Size: 6036 bytes Desc: not available URL: From luismbo at gmail.com Wed Apr 12 12:54:18 2006 From: luismbo at gmail.com (=?ISO-8859-1?Q?Lu=EDs_Oliveira?=) Date: Wed, 12 Apr 2006 13:54:18 +0100 Subject: [cl-opengl-devel] GL Evaluator Patches In-Reply-To: <87vetf8s3w.fsf@jamesjb.com> References: <87vetf8s3w.fsf@jamesjb.com> Message-ID: <758A075A-0010-4082-A4FC-AA8227E2AFCB@gmail.com> On 2006-apr-12, at 03:06, James Bielman wrote: > > Pushed. -- Lu?s Oliveira http://student.dei.uc.pt/~lmoliv/ Equipa Portuguesa do Translation Project http://www.iro.umontreal.ca/translation/registry.cgi?team=pt From rtvd at mail.ru Thu Apr 13 18:27:22 2006 From: rtvd at mail.ru (Denis Rtveliashvili) Date: Thu, 13 Apr 2006 22:27:22 +0400 Subject: [cl-opengl-devel] How to build cl-opengl ? Message-ID: I'm sorry for such question, but I can't find out how to build the cl-opengl. Previously I've built cl-sdl and it was fun, but the project seem to be abandoned and I want to switch to cl-opengl. Unfortunately, I do not see any instructions on building the cl-opengl. :( I tried to build it in the following way: 1. Installed rt and cffi. I use Gentoo, so I emerged them. 2. Then I built them by running SBCL and running commands like (asdf:oos 'asdf:load-op 'cffi) in /usr/share/common-lisp/systems Everything was built without problems. 3. Then I downloaded the cl-opengl sources from the darcs repository at http://common-lisp.net/project/cl-opengl/darcs/cl-opengl/ 4. I noticed that the Makefile has only "clean" target which was strange. 5. Then I tried to build the cl-opengl by running (asdf:oos 'asdf:load-op 'cl-opengl) Everything went fine. 6. But when I tried to compile the rest (examples, etc.) I experienced a strange problem. Running (asdf:oos 'asdf:load-op 'cl-glut-examples) lead to the following error: ---- debugger invoked on a LOAD-FOREIGN-LIBRARY-ERROR: Unable to load any of the alternatives: ("libglut.so" "libglut.so.3") Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. restarts (invokable by number or by possibly-abbreviated name): 0: [RETRY ] Try loading the foreign library again. 1: [USE-VALUE] Use another library instead. 2: [RETRY ] Retry performing # on #. 3: [ACCEPT ] Continue, treating # on # as having been successful. 4: [ABORT ] Exit debugger, returning to top level. (CFFI::HANDLE-LOAD-FOREIGN-LIBRARY-ERROR (:OR "libglut.so" "libglut.so.3") "Unable to load any of the alternatives:~% ~S" ("libglut.so" "libglut.so.3")) ---- I do not understand, how could it be. My system does contain libglut.so and libglut.so.3 in /usr/lib. And different opengl examples compile with it. Of course, It can be a problem with CFFI, but the CFFI was built without any errors (including CFFI tests). Please, let me know if you have any information on how to fix this problem. I feel that my current LISP experience is not strong enough to fix the problem alone. Thank you beforehand, rtvd From luismbo at gmail.com Fri Apr 14 01:12:47 2006 From: luismbo at gmail.com (=?utf-8?Q?Lu=C3=ADs?= Oliveira) Date: Fri, 14 Apr 2006 02:12:47 +0100 Subject: [cl-opengl-devel] Re: How to build cl-opengl ? References: Message-ID: Denis Rtveliashvili writes: > 4. I noticed that the Makefile has only "clean" target which was > strange. Heh, yeah. Perhaps making it a "clean.sh" script would make more sense. > (asdf:oos 'asdf:load-op 'cl-opengl) > > Everything went fine. So, you've built and loaded cl-opengl! :-) It's cl-glut that's causing problems. > I do not understand, how could it be. My system does contain > libglut.so and libglut.so.3 in /usr/lib. And different opengl examples > compile with it. Of course, It can be a problem with CFFI, but the > CFFI was built without any errors (including CFFI tests). IIRC, this is a silly CFFI bug. I'm guessing you're using 0.9.0? If so, please get the latest version from the darcs repository. HTH -- Lu?s Oliveira luismbo (@) gmail (.) com Equipa Portuguesa do Translation Project http://www.iro.umontreal.ca/translation/registry.cgi?team=pt From rtvd at mail.ru Thu Apr 13 20:29:05 2006 From: rtvd at mail.ru (Denis Rtveliashvili) Date: Fri, 14 Apr 2006 00:29:05 +0400 Subject: [cl-opengl-devel] Building cl-opengl require some changes in code. Message-ID: I've managed to build the cl-opengl somehow, but it required some changes in code. I am new to LISP and cl-opengl and I do not know what would be the best. Probably it is worth to change the cl-opengl a little? So I would like to share my findings with you hoping that you'll find them useful. 1. It was necessary to declare the usage of GL and GLU before GLUT. Otherwise nothing compiled. I added the following lines to glu/library.lisp on my Linux box: (define-foreign-library gl ((:not :darwin) (:default "libGL"))) (use-foreign-library gl) and the following lines to glut/library.lisp: (define-foreign-library gl (:unix (:or "libGL.so"))) (define-foreign-library glu (:unix (:or "libGLU.so"))) (use-foreign-library gl) (use-foreign-library glu) 2. The gluCheckExtension definition did not compile. I had to change the line (defcfun ("gluCheckExtension" check-extension) (:boolean gl:boolean) to (defcfun ("gluCheckExtension" check-extension) boolean in the glu/glu.lisp file. 3. Running the GLUT demos showed that "gears" froze when I pressed ESC. Further investigation have shown that at least two methods which do not exist in standard GLUT are being used in the demo and the glut bindings. They are: glutMainLoopEvent glutLeaveMainLoop According to http://freeglut.sourceforge.net/docs/api.php, they are a part of FreeGLUT and the original GLUT does not contain them. Good luck! rtvd From luismbo at gmail.com Fri Apr 14 02:33:23 2006 From: luismbo at gmail.com (=?utf-8?Q?Lu=C3=ADs?= Oliveira) Date: Fri, 14 Apr 2006 03:33:23 +0100 Subject: [cl-opengl-devel] Re: Building cl-opengl require some changes in code. References: Message-ID: Denis Rtveliashvili writes: > I've managed to build the cl-opengl somehow, but it required some > changes in code. Please try with a more recent CFFI. No changes should be needed to cl-glut. > 2. The gluCheckExtension definition did not compile. I had to change > the line Hmm.. definitely an old CFFI. Please update. > 3. Running the GLUT demos showed that "gears" froze when I pressed > ESC. Further investigation have shown that at least two methods which > do not exist in standard GLUT are being used in the demo and the glut > bindings. They are: > > glutMainLoopEvent > glutLeaveMainLoop > > According to http://freeglut.sourceforge.net/docs/api.php, they are a > part of FreeGLUT and the original GLUT does not contain them. Traditional GLUT is not quite supported because it's pretty much impossible to do Lisp-style development without glutLeaveMainLoop(). Please use Freeglut. HTH -- Lu?s Oliveira luismbo (@) gmail (.) com Equipa Portuguesa do Translation Project http://www.iro.umontreal.ca/translation/registry.cgi?team=pt From kentilton at gmail.com Sat Apr 29 13:22:13 2006 From: kentilton at gmail.com (Ken Tilton) Date: Sat, 29 Apr 2006 09:22:13 -0400 Subject: [cl-opengl-devel] I hate windows, too, but.... Message-ID: ... how the hell do I get to these great bindings?!!! :) Howzabout a tarball, folks? Or did I just miss that link. tarball would work because all my win32 "zip" utilities read TAR and GZ, but I have not yet found a win32 utility that speaks Darcs. Hmmm. I will fire up my Mac and see if I have any luck over there. thx, ken -------------- next part -------------- An HTML attachment was scrubbed... URL: From fb at frank-buss.de Sat Apr 29 16:23:39 2006 From: fb at frank-buss.de (Frank Buss) Date: Sat, 29 Apr 2006 18:23:39 +0200 Subject: [cl-opengl-devel] Re: I hate windows, too, but.... References: Message-ID: Ken Tilton wrote: > ... how the hell do I get to these great bindings?!!! > > :) > > Howzabout a tarball, folks? Or did I just miss that link. tarball would work > because all my win32 "zip" utilities read TAR and GZ, but I have not yet > found a win32 utility that speaks Darcs. I had no problems with the precompiled Windows binary at http://darcs.net/ But I have packed it: http://www.frank-buss.de/tmp/cl-opengl.zip This is about a week old, but with renamed #\Esc to make it work for the current CLISP-2.38 Windows version and with the freeglut DLL included in the bin directory. Tested with LispBox and LispWorks. -- Frank Buss, fb at frank-buss.de http://www.frank-buss.de, http://www.it4-systems.de From kentilton at gmail.com Sat Apr 29 16:41:49 2006 From: kentilton at gmail.com (Ken Tilton) Date: Sat, 29 Apr 2006 12:41:49 -0400 Subject: [cl-opengl-devel] I hate windows, too, but.... In-Reply-To: References: Message-ID: On 4/29/06, Brad Beveridge wrote: > > Darcs binaries for windows ... > > http://darcs.net/DarcsWiki/CategoryBinaries#head-c7910dd98302946c671cf63cb62712589b392074 > Is that what you're after? Brilliant, thx. Can't believe I could not Google up even the main darcs site. But now I find myself wondering, if I /do/ run darcs from the command line, I wonder what command I would enter? Most open source sites help lamers like me by suggesting the precise CVS command to enter. Or just offer a tarball of the last stable release. Meanwhile, a comrade in arms kindly put me out of my misery and sent me a tarball and I am happily running the examples. /Very/ nice bindings! Congrats to all. Thx again, brad. kt -------------- next part -------------- An HTML attachment was scrubbed... URL: From fb at frank-buss.de Sat Apr 29 17:37:36 2006 From: fb at frank-buss.de (Frank Buss) Date: Sat, 29 Apr 2006 19:37:36 +0200 Subject: [cl-opengl-devel] Re: I hate windows, too, but.... References: Message-ID: <1jul0js9onpk5.x394fsqcpni.dlg@40tude.net> Ken Tilton wrote: > But now I find myself wondering, if I /do/ run darcs from the command line, > I wonder what command I would enter? RTFM? :-) darcs get http://www.common-lisp.net/project/cl-opengl/darcs/cl-opengl/ -- Frank Buss, fb at frank-buss.de http://www.frank-buss.de, http://www.it4-systems.de