From sohail at taggedtype.net Sat Feb 2 22:54:13 2008 From: sohail at taggedtype.net (Sohail Somani) Date: Sat, 2 Feb 2008 22:54:13 +0000 (UTC) Subject: [cl-opengl-devel] Translating checker.c Message-ID: Hello, I am trying to translate the checker.c example from the textures chapter: http://www.sgi.com/products/software/opengl/examples/redbook/source/ checker.c Unfortunately, the code http://paste.lisp.org/display/55290 does not work for some reason. Any ideas? Thanks! -- Sohail Somani http://uint32t.blogspot.com From sohail at taggedtype.net Sat Feb 2 23:10:16 2008 From: sohail at taggedtype.net (Sohail Somani) Date: Sat, 2 Feb 2008 23:10:16 +0000 (UTC) Subject: [cl-opengl-devel] Re: Translating checker.c References: Message-ID: On Sat, 02 Feb 2008 22:54:13 +0000, Sohail Somani wrote: > Hello, > > I am trying to translate the checker.c example from the textures > chapter: > > http://www.sgi.com/products/software/opengl/examples/redbook/source/ > checker.c > > Unfortunately, the code http://paste.lisp.org/display/55290 does not > work for some reason. Any ideas? > > Thanks! Specifically, there is no checker board pattern! -- Sohail Somani http://uint32t.blogspot.com From mikael.lax at bredband.net Mon Feb 4 11:21:01 2008 From: mikael.lax at bredband.net (Mikael Lax) Date: Mon, 4 Feb 2008 12:21:01 +0100 Subject: [cl-opengl-devel] Re: Translating checker.c In-Reply-To: References: Message-ID: <20080204122101.c9a4d377.mikael.lax@bredband.net> On Sat, 2 Feb 2008 23:10:16 +0000 (UTC) Sohail Somani wrote: > > Specifically, there is no checker board pattern! > > -- > Sohail Somani > http://uint32t.blogspot.com > Hello, the error is that you do not specify a minification filter for the texture. The default value for the min-filter is :nearest-mipmap-linear which is a mipmapped format but you don't specify any mipmaps so texturing will be disabled. Once the texture is shown you will also see that you're texture coordinates are wrong. They should be like this for both quads: (gl:tex-coord 0 0) (gl:tex-coord 0 1) (gl:tex-coord 1 1) (gl:tex-coord 1 0) Sincerely, Mikael Lax From charliemac+cl-opengl at gmail.com Sat Feb 9 13:14:47 2008 From: charliemac+cl-opengl at gmail.com (Charlie McMackin) Date: Sat, 9 Feb 2008 22:14:47 +0900 Subject: [cl-opengl-devel] GLUT handling for a mouse wheel Message-ID: <6e831e4e0802090514o1ea771b1x21c50b64d18c248f@mail.gmail.com> Having a GLUT window die on me because I accidentally scroll the mouse wheel down finally drove me mad enough to go track the problem down. I'm not sure if this is the correct way to do it, but weighing in at one line sexp it sure feels good. I picked :wheel-down but I guess any keyword can be put in it's place. the change: in glut/callbacks.lisp add (:wheel-down -1) to the mouse-button-state cenum. Charlie Mac -------------- next part -------------- A non-text attachment was scrubbed... Name: mouse-wheel.patch Type: application/octet-stream Size: 14078 bytes Desc: not available URL: From cupe-clopengl at erleuchtet.org Sat Feb 9 22:02:40 2008 From: cupe-clopengl at erleuchtet.org (Johann Korndoerfer) Date: Sat, 09 Feb 2008 23:02:40 +0100 Subject: [cl-opengl-devel] Patch for 2d mipmap generation and more mouse buttons Message-ID: <47AE2300.7080207@erleuchtet.org> Hi the attached patch does two things: 1) it adds glu:build-2d-mipmaps 2) as suggested earlier this month, more mouse-buttons are now recognized (:wheel-up, :wheel-down and :button4 to :button7) i'd be happy to see it applied cupe -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: mipmaps.patch URL: From charliemac+cl-opengl at gmail.com Sun Feb 10 23:19:14 2008 From: charliemac+cl-opengl at gmail.com (Charlie McMackin) Date: Mon, 11 Feb 2008 08:19:14 +0900 Subject: [cl-opengl-devel] Patch for 2d mipmap generation and more mouse buttons In-Reply-To: <47AE2300.7080207@erleuchtet.org> References: <47AE2300.7080207@erleuchtet.org> Message-ID: <6e831e4e0802101519s74ebc09cw928ca80a3a5fa908@mail.gmail.com> I can't speak for the 2D texture section of your patch but none of the new enums in callbacks work for me. > hunk ./glut/callbacks.lisp 183 > - :right-button) > + :right-button > + :wheel-up > + :wheel-down > + :button4 > + :button5 > + :button6 > + :button7) > } I tested with code like: (defmethod glut:mouse ((w gl-window) button state x y) (declare (ignore x y)) (format t "~&Button value is ~a ~%Pressed value is ~a~%" button state)) (defmethod glut:mouse-wheel ((w gl-window) button pressed x y) (declare (ignore x y)) (format t "~&Button value is ~a ~%Pressed value is ~a~%" button pressed)) From cupe-clopengl at erleuchtet.org Tue Feb 12 18:31:35 2008 From: cupe-clopengl at erleuchtet.org (Johann Korndoerfer) Date: Tue, 12 Feb 2008 19:31:35 +0100 Subject: [cl-opengl-devel] Patch for 2d mipmap generation and more mouse buttons In-Reply-To: <6e831e4e0802101519s74ebc09cw928ca80a3a5fa908@mail.gmail.com> References: <47AE2300.7080207@erleuchtet.org> <6e831e4e0802101519s74ebc09cw928ca80a3a5fa908@mail.gmail.com> Message-ID: <47B1E607.70802@erleuchtet.org> > I can't speak for the 2D texture section of your patch but none of > the new enums in callbacks work for me. > (defmethod glut:mouse ((w gl-window) button state x y) > (declare (ignore x y)) > (format t "~&Button value is ~a ~%Pressed value is ~a~%" button state)) after pasting your glut:mouse into my project, i get: Button value is WHEEL-DOWN Pressed value is DOWN Button value is WHEEL-DOWN Pressed value is UP when moving the wheel downward. and: Button value is BUTTON6 Pressed value is DOWN when pressing down one of the weird buttons on my mouse. as it should be. i use opengl 2.1.1 on linux with freeglut 2.4.0. the new enums are not to be found in my freeglut_std.h along with the other ones, which makes it kind of odd that they work for me. sdl uses buttons 4 and 5 as wheel-up/down, too, which is why i tried this in the first place. they seem not to be "officially" supported on windows either as there is a patch for a windows port of glut to make it mousewheel-aware at all at http://www.realmtech.net/opengl/glut.php , providing the very same enums. i found several references on the net indicating the widespread use of 4 and 5 for the wheel and think it is safe to just add the enums to the bindings. those with an older version of glut seem to not have wheel functionality anyway and won't be hurt by this. From charliemac+cl-opengl at gmail.com Tue Feb 12 23:00:20 2008 From: charliemac+cl-opengl at gmail.com (Charlie McMackin) Date: Wed, 13 Feb 2008 08:00:20 +0900 Subject: [cl-opengl-devel] Patch for 2d mipmap generation and more mouse buttons In-Reply-To: <47B1E607.70802@erleuchtet.org> References: <47AE2300.7080207@erleuchtet.org> <6e831e4e0802101519s74ebc09cw928ca80a3a5fa908@mail.gmail.com> <47B1E607.70802@erleuchtet.org> Message-ID: <6e831e4e0802121500s4721f40ay4bc6b1f16ec528d9@mail.gmail.com> > i use opengl 2.1.1 on linux with freeglut 2.4.0. > the new enums are not to be found in my freeglut_std.h along with the > other ones, which makes it kind of odd that they work for me. sdl uses > buttons 4 and 5 as wheel-up/down, too, which is why i tried this in the > first place. they seem not to be "officially" supported on windows > either as there is a patch for a windows port of glut to make it > mousewheel-aware at all at http://www.realmtech.net/opengl/glut.php , > providing the very same enums. This is interesting. Are you sure your system is configured to use freeglut? I ask only because the windows glut you link to is definitely not freeglut. My freeglut-2.4.0 provides a libglut-3.8.0.so lib file. Second are you using cl-opengl-thomas? I queried my mice with xinput and the wheel is mapped to buttons 4 and 5 however my system only provides the enums in the freeglut headers charlie mac From cupe-clopengl at erleuchtet.org Wed Feb 13 01:48:18 2008 From: cupe-clopengl at erleuchtet.org (Johann Korndoerfer) Date: Wed, 13 Feb 2008 02:48:18 +0100 Subject: [cl-opengl-devel] Patch for 2d mipmap generation and more mouse buttons In-Reply-To: <6e831e4e0802121500s4721f40ay4bc6b1f16ec528d9@mail.gmail.com> References: <47AE2300.7080207@erleuchtet.org> <6e831e4e0802101519s74ebc09cw928ca80a3a5fa908@mail.gmail.com> <47B1E607.70802@erleuchtet.org> <6e831e4e0802121500s4721f40ay4bc6b1f16ec528d9@mail.gmail.com> Message-ID: <47B24C62.7020400@erleuchtet.org> > Are you sure your system is configured to use freeglut? yes, i am definitely using the libglut-3.8.0.so of freeglut-2.4.0 (at least that is what lsof tells me). > Second are you using cl-opengl-thomas? yep, like everybody else, i guess. actually i didn't test the patch against the main branch. maybe i should have said so in my initial post :) > I queried my mice > with xinput and the wheel is mapped to buttons 4 and 5 however my > system only provides the enums in the freeglut headers is your graphics card an ati card by any chance? maybe the proprietary nvidia driver i use is handling the mouse events in a different way than other drivers and freeglut just passes along what it gets? i don't know anything about the relationships of the graphics card driver and the glu(t) and opengl libraries, so this is just a guess. but from what i've seen of the linux ati driver so far it wouldn't suprise me if it dropped all but the first three of the mouse buttons. From charliemac+cl-opengl at gmail.com Wed Feb 13 02:28:11 2008 From: charliemac+cl-opengl at gmail.com (Charlie McMackin) Date: Wed, 13 Feb 2008 11:28:11 +0900 Subject: [cl-opengl-devel] Patch for 2d mipmap generation and more mouse buttons In-Reply-To: <47B24C62.7020400@erleuchtet.org> References: <47AE2300.7080207@erleuchtet.org> <6e831e4e0802101519s74ebc09cw928ca80a3a5fa908@mail.gmail.com> <47B1E607.70802@erleuchtet.org> <6e831e4e0802121500s4721f40ay4bc6b1f16ec528d9@mail.gmail.com> <47B24C62.7020400@erleuchtet.org> Message-ID: <6e831e4e0802121828r2d561ee4qedaa7ee02a46fd5a@mail.gmail.com> Yes I do have an ATI card but GLUT uses X for mouse handling so it shouldn't matter. I've since taken a brief look at the freeglut code and it looks like they have quick-hackish ways of detecting mouse features. Either that or freeglut can't handle my slightly bleeding edge Xorg-server. Anyway, I think I've hit the ceiling with glut with what I want to do in my app and should probably bite the bullet and retry cells+togl or cells+gtk. If only cl-clx worked with cl-opengl. sigh. From luismbo at gmail.com Wed Feb 13 02:29:48 2008 From: luismbo at gmail.com (=?ISO-8859-1?Q?Lu=EDs_Oliveira?=) Date: Wed, 13 Feb 2008 02:29:48 +0000 Subject: [cl-opengl-devel] Patch for 2d mipmap generation and more mouse buttons In-Reply-To: <6e831e4e0802101519s74ebc09cw928ca80a3a5fa908@mail.gmail.com> References: <47AE2300.7080207@erleuchtet.org> <6e831e4e0802101519s74ebc09cw928ca80a3a5fa908@mail.gmail.com> Message-ID: <391f79580802121829u4b23a218lf1a96269bff4c258@mail.gmail.com> On 10/02/2008, Charlie McMackin wrote: > (defmethod glut:mouse ((w gl-window) button state x y) > (declare (ignore x y)) > (format t "~&Button value is ~a ~%Pressed value is ~a~%" button state)) > (defmethod glut:mouse-wheel ((w gl-window) button pressed x y) > (declare (ignore x y)) > (format t "~&Button value is ~a ~%Pressed value is ~a~%" button pressed)) I looked at freeglut's source and it seems that whenever the mouse-wheel callback is deactivated, mouse is called instead. And the 'button' argument (and the state/pressed argument as well, IIRC) differs in each case. So if you want to get those new enums, use glut:mouse only, not glut-mouse-wheel. -- Lu?s Oliveira http://student.dei.uc.pt/~lmoliv/ From luismbo at gmail.com Wed Feb 13 13:13:31 2008 From: luismbo at gmail.com (=?ISO-8859-1?Q?Lu=EDs_Oliveira?=) Date: Wed, 13 Feb 2008 13:13:31 +0000 Subject: [cl-opengl-devel] Patch for 2d mipmap generation and more mouse buttons In-Reply-To: <6e831e4e0802121838q81dc758if34c7587b2aea973@mail.gmail.com> References: <47AE2300.7080207@erleuchtet.org> <6e831e4e0802101519s74ebc09cw928ca80a3a5fa908@mail.gmail.com> <391f79580802121829u4b23a218lf1a96269bff4c258@mail.gmail.com> <6e831e4e0802121838q81dc758if34c7587b2aea973@mail.gmail.com> Message-ID: <391f79580802130513r701e1a3fu15822e9127d783ec@mail.gmail.com> On 13/02/2008, Charlie McMackin wrote: > I'll give it a try, but it seems that no one else is hitting the error > on wheel-down due to -1 not be enumerated in mouse-button-state > either. (see other thread where I sent patch) Leads me to be more > suspect of my set-up. IIRC, I get that weird -1 when using the glut:mouse-wheel event. -- Lu?s Oliveira http://student.dei.uc.pt/~lmoliv/ From charliemac+cl-opengl at gmail.com Wed Feb 13 13:31:43 2008 From: charliemac+cl-opengl at gmail.com (Charlie McMackin) Date: Wed, 13 Feb 2008 22:31:43 +0900 Subject: [cl-opengl-devel] Patch for 2d mipmap generation and more mouse buttons In-Reply-To: <391f79580802130513r701e1a3fu15822e9127d783ec@mail.gmail.com> References: <47AE2300.7080207@erleuchtet.org> <6e831e4e0802101519s74ebc09cw928ca80a3a5fa908@mail.gmail.com> <391f79580802121829u4b23a218lf1a96269bff4c258@mail.gmail.com> <6e831e4e0802121838q81dc758if34c7587b2aea973@mail.gmail.com> <391f79580802130513r701e1a3fu15822e9127d783ec@mail.gmail.com> Message-ID: <6e831e4e0802130531t4c77b9a4k621003f830f6b774@mail.gmail.com> > IIRC, I get that weird -1 when using the glut:mouse-wheel event. > You were right, removing the mouse-wheel method allowed me to access the new enums with the normal mouse method. Feels much nicer as well. Handling the -1 with a different keyword name than I provided might still be a good idea for the sorry that stumble upon the glut:mouse-wheel trap :) cm From sean.charles at objitsu.com Tue Feb 19 13:31:49 2008 From: sean.charles at objitsu.com (Sean Charles) Date: Tue, 19 Feb 2008 13:31:49 +0000 Subject: [cl-opengl-devel] 'Best' GL bindings? In-Reply-To: <6e831e4e0802090514o1ea771b1x21c50b64d18c248f@mail.gmail.com> References: <6e831e4e0802090514o1ea771b1x21c50b64d18c248f@mail.gmail.com> Message-ID: Hi, What's the current 'best' set of bindings for OpenGL on an intel iMac please ? I have seen the 'thomas' fork mentioned, what advantages does this offer ? I've used OpenGL and lisp but a long time ago and I want to get back into it! Cheers, Sean. From luismbo at gmail.com Tue Feb 19 13:49:08 2008 From: luismbo at gmail.com (=?ISO-8859-1?Q?Lu=EDs_Oliveira?=) Date: Tue, 19 Feb 2008 13:49:08 +0000 Subject: [cl-opengl-devel] 'Best' GL bindings? In-Reply-To: References: <6e831e4e0802090514o1ea771b1x21c50b64d18c248f@mail.gmail.com> Message-ID: <391f79580802190549h4d79c53cp570070c74608af7c@mail.gmail.com> On 19/02/2008, Sean Charles wrote: > What's the current 'best' set of bindings for OpenGL on an intel iMac > please ? I have seen the 'thomas' fork mentioned, what advantages > does this offer ? I sincerely don't remember all the changes that went into that branch anymore but basically that's where all the patches have been going to. One advantage that comes to mind is that it works with recent versions CFFI. Charlie brought up the issue of merging said branch but there wasn't much reaction so I've just merged it. It was generating way to much needless confusion. (I kept a copy of the previous main branch at and if there are any objections to what's been merged I'm sure we can work them out.) I'll apply the other patches Charlie and Johann sent ASAP. In conclusion, just grab the main branch: darcs get http://common-lisp.net/project/cl-opengl/darcs/cl-opengl -- Lu?s Oliveira http://student.dei.uc.pt/~lmoliv/ From sean.charles at objitsu.com Tue Feb 19 14:12:04 2008 From: sean.charles at objitsu.com (Sean Charles) Date: Tue, 19 Feb 2008 14:12:04 +0000 Subject: [cl-opengl-devel] 'Best' GL bindings? In-Reply-To: <391f79580802190549h4d79c53cp570070c74608af7c@mail.gmail.com> References: <6e831e4e0802090514o1ea771b1x21c50b64d18c248f@mail.gmail.com> <391f79580802190549h4d79c53cp570070c74608af7c@mail.gmail.com> Message-ID: Thanks! I've just done a clean install of CLISP 2.43 from MacPorts and got ASDF up and running... Thanks again! :) On 19 Feb 2008, at 13:49, Lu?s Oliveira wrote: > On 19/02/2008, Sean Charles wrote: >> What's the current 'best' set of bindings for OpenGL on an intel iMac >> please ? I have seen the 'thomas' fork mentioned, what advantages >> does this offer ? > > I sincerely don't remember all the changes that went into that branch > anymore but basically that's where all the patches have been going to. > One advantage that comes to mind is that it works with recent versions > CFFI. > > Charlie brought up the issue of merging said branch but there wasn't > much reaction so I've just merged it. It was generating way to much > needless confusion. (I kept a copy of the previous main branch at > and if there > are any objections to what's been merged I'm sure we can work them > out.) > > I'll apply the other patches Charlie and Johann sent ASAP. > > In conclusion, just grab the main branch: > darcs get http://common-lisp.net/project/cl-opengl/darcs/cl-opengl > > -- > Lu?s Oliveira > http://student.dei.uc.pt/~lmoliv/ >