From tl at di.fc.ul.pt Fri Sep 1 00:14:23 2006 From: tl at di.fc.ul.pt (Thibault Langlois) Date: Fri, 01 Sep 2006 01:14:23 +0100 Subject: [cl-opengl-devel] Problem compiling cl-opengl for cmucl In-Reply-To: <391f79580608311652r66788ca1y1661bb7f4651ca06@mail.gmail.com> References: <1157039844.6123.12.camel@wok> <87ac5klqua.fsf@jamesjb.com> <1157067770.5952.12.camel@wok> <391f79580608311652r66788ca1y1661bb7f4651ca06@mail.gmail.com> Message-ID: <1157069664.5952.19.camel@wok> On Fri, 2006-09-01 at 00:52 +0100, Lu?s Oliveira wrote: > On 9/1/06, Thibault Langlois wrote: > > CL-GLUT-EXAMPLES> (rb-double) > > > > arithmetic error DIVISION-BY-ZERO signalled > > [Condition of type DIVISION-BY-ZERO] > [...] > > Is it a known issue ? > > Maybe. Try the following perhaps: > > (sb-int:with-float-traps-masked (:invalid :divide-by-zero) > (rb-double)) > It worked fine. Thanks. > > > Another detail: when gears or glut-teapot are running if I destroy the > > window (clicking on the cross), the lisp dies too. Is it supposed to to > > behave like this ? > > Not at all. Someone else mentioned this problem in #lisp and was using > FreeGLUT 2.2. IIRC, upgrading to version 2.4 fixed that. > I am using freeglut 2.2 too. You must be right. Obrigado. Thibault From charlie.burrows at gmail.com Thu Sep 21 17:08:55 2006 From: charlie.burrows at gmail.com (Charlie Burrows) Date: Thu, 21 Sep 2006 13:08:55 -0400 Subject: [cl-opengl-devel] Trying to do Nehe tutorials Message-ID: <7780d94d0609211008u48f86da1xce7dad4d99d1020b@mail.gmail.com> Hi, I've been trying to do the nehe tutorials in cl-opengl and I've got the first two working but there's a small problem. It is probably an opengl issue rather than a cl-opengl problem but I'm sure all you nice people won't mind my ignorance (too much) and besides where else could I post my code and get a reply! Ok so I've got two classes; the first one works find (as far as it goes) the second also works but only if I don't enable depth testing. If I enable depth testing then the two shapes I draw disappear. The code is here: http://paste.lisp.org/display/26461 In the mean time I will continue with the tutorials. Cheers, Charlie --- Kenny made me do it! From luismbo at gmail.com Thu Sep 21 21:45:37 2006 From: luismbo at gmail.com (=?ISO-8859-1?Q?Lu=EDs_Oliveira?=) Date: Thu, 21 Sep 2006 22:45:37 +0100 Subject: [cl-opengl-devel] Trying to do Nehe tutorials In-Reply-To: <7780d94d0609211008u48f86da1xce7dad4d99d1020b@mail.gmail.com> References: <7780d94d0609211008u48f86da1xce7dad4d99d1020b@mail.gmail.com> Message-ID: <391f79580609211445s77342f74qcbfe4119e24ccbd@mail.gmail.com> On 9/21/06, Charlie Burrows wrote: > I've been trying to do the nehe tutorials in cl-opengl and I've got > the first two working but there's a small problem. It is probably an > opengl issue rather than a cl-opengl problem but I'm sure all you nice > people won't mind my ignorance (too much) and besides where else could > I post my code and get a reply! I don't have much time to try your code at the moment, maybe someone else can run it and debug it, though. Anyway, just wanted to tell you that patches adding NeHe code to the examples directories are most welcome. Try to follow the coding conventions in the other examples if possible. Also, comments regarding the GLUT CLOS API (ah, 3 acronyms in a row) are also welcome. It's mostly an experiment since GLUT sucks, but still. :) -- Lu?s Oliveira http://student.dei.uc.pt/~lmoliv/ From kentilton at gmail.com Thu Sep 21 23:43:06 2006 From: kentilton at gmail.com (Ken Tilton) Date: Thu, 21 Sep 2006 19:43:06 -0400 Subject: [cl-opengl-devel] Trying to do Nehe tutorials In-Reply-To: <7780d94d0609211008u48f86da1xce7dad4d99d1020b@mail.gmail.com> References: <7780d94d0609211008u48f86da1xce7dad4d99d1020b@mail.gmail.com> Message-ID: On 9/21/06, Charlie Burrows wrote: > > Hi, > I've been trying to do the nehe tutorials in cl-opengl and I've got > the first two working but there's a small problem. It is probably an > opengl issue rather than a cl-opengl problem but I'm sure all you nice > people won't mind my ignorance (too much) and besides where else could > I post my code and get a reply! > > Ok so I've got two classes; the first one works find (as far as it > goes) the second also works but only if I don't enable depth testing. > If I enable depth testing then the two shapes I draw disappear. > The code is here: http://paste.lisp.org/display/26461 I wonder why you ever see anything. Where are you setting the color? I must be missing something since you say you see something without depth testing. This is nehe-2? nehe-2 sets colors: int DrawGLScene(GLvoid) // Here's Where We Do All The Drawing { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear Screen And Depth Buffer glLoadIdentity(); // Reset The Current Modelview Matrix glTranslatef(-1.5f,0.0f,-6.0f); // Move Left 1.5Units And Into The Screen 6.0 glBegin(GL_TRIANGLES); // Drawing Using Triangles glColor3f(1.0f,0.0f,0.0f); // Set The Color To Red glVertex3f( 0.0f, 1.0f, 0.0f); // Top glColor3f(0.0f,1.0f,0.0f); // Set The Color To Green glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left glColor3f(0.0f,0.0f,1.0f); // Set The Color To Blue glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right glEnd(); // Finished Drawing The Triangle glTranslatef(3.0f,0.0f,0.0f); // Move Right 3 Units glColor3f(0.5f,0.5f,1.0f); // Set The Color To Blue One Time Only glBegin(GL_QUADS); // Draw A Quad glVertex3f(-1.0f, 1.0f, 0.0f); // Top Left glVertex3f( 1.0f, 1.0f, 0.0f); // Top Right glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left glEnd(); // Done Drawing The Quad return TRUE; // Keep Going } Confused. kt ps. I suggest you make each example standalone and not try to inherit code for lesson 2 from lesson 1 if this is going to be stuff in a public library. Of course if you just want to mix in CLOS training I understand, but it may compromise the value of the contrib to cl-opengl. kt -------------- next part -------------- An HTML attachment was scrubbed... URL: From charlie.burrows at gmail.com Fri Sep 22 13:03:23 2006 From: charlie.burrows at gmail.com (Charlie Burrows) Date: Fri, 22 Sep 2006 09:03:23 -0400 Subject: [cl-opengl-devel] Re: Trying to do Nehe tutorials In-Reply-To: <7780d94d0609220602o34c0f95q8c4bb753264b5a9c@mail.gmail.com> References: <7780d94d0609211008u48f86da1xce7dad4d99d1020b@mail.gmail.com> <7780d94d0609220602o34c0f95q8c4bb753264b5a9c@mail.gmail.com> Message-ID: <7780d94d0609220603s50f09b3m7cf944730502365f@mail.gmail.com> ---------- Forwarded message ---------- From: Charlie Burrows Date: Sep 22, 2006 9:02 AM Subject: Re: [cl-opengl-devel] Trying to do Nehe tutorials To: Ken Tilton On 9/21/06, Ken Tilton wrote: > I wonder why you ever see anything. Where are you setting the color? I must > be missing something since you say you see something without depth testing. > This is nehe-2? nehe-2 sets colors: White seems to be the default colour. From my reading of the Nehe site nehe-1 is just a window, nehe-2 is the two white shapes and nehe-3 is the example with the colour blended triangle and the blue square. In any case I have also done nehe-3 (my numbering) and it suffers the same affliction as the nehe-2. > kt > > ps. I suggest you make each example standalone and not try to inherit code > for lesson 2 from lesson 1 if this is going to be stuff in a public library. > Of course if you just want to mix in CLOS training I understand, but it may > compromise the value of the contrib to cl-opengl. kt I am starting to come around to your way of thinking although it seems like there will be a limited amount of inheritance; mostly from nehe-1 which just sets up the environment. We'll see as it develops but don't worry there's not much chance of my going clos crazy. Cheers, Charlie From charlie.burrows at gmail.com Fri Sep 22 13:17:12 2006 From: charlie.burrows at gmail.com (Charlie Burrows) Date: Fri, 22 Sep 2006 09:17:12 -0400 Subject: [cl-opengl-devel] Trying to do Nehe tutorials In-Reply-To: <391f79580609211445s77342f74qcbfe4119e24ccbd@mail.gmail.com> References: <7780d94d0609211008u48f86da1xce7dad4d99d1020b@mail.gmail.com> <391f79580609211445s77342f74qcbfe4119e24ccbd@mail.gmail.com> Message-ID: <7780d94d0609220617u6392df5dt4c453010cbb9d6f9@mail.gmail.com> On 9/21/06, Lu?s Oliveira wrote: > I don't have much time to try your code at the moment, maybe someone > else can run it and debug it, though. Anyway, just wanted to tell you > that patches adding NeHe code to the examples directories are most > welcome. Try to follow the coding conventions in the other examples if > possible. Yup, no problem. I'm pretty much copying the redbook examples structure and trying to go from there. > > Also, comments regarding the GLUT CLOS API (ah, 3 acronyms in a row) > are also welcome. It's mostly an experiment since GLUT sucks, but > still. :) I haven't used glut enough to say if its good or bad in general. I just like the fact that I don't have to invoke (and therefore require) a random windowing library so I don't know how deeply I'll explore glut. Like I said, I'm new to gl so I can't say what I'm going to use or not. So far I really like the GCA (not just a TLA but a TAA) but I'll let you know if anything irritates me! Cheers, Charlie From charlie.burrows at gmail.com Fri Sep 22 17:25:19 2006 From: charlie.burrows at gmail.com (Charlie Burrows) Date: Fri, 22 Sep 2006 13:25:19 -0400 Subject: [cl-opengl-devel] Nehe Tutorials Message-ID: <7780d94d0609221025s3fcc026aqa6881837274ee2fd@mail.gmail.com> Ok so I'm dumb. Although to be fair to me it was a single character wrong! (gl:depth-test :equal) != (gl:depth-test :lequal). I'm guessing that my code (with the :equal) would only have displayed overlapping objects if their depth was equal. That sounds very silly to me! On with the examples ... Cheers, Charlie From charlie.burrows at gmail.com Thu Sep 28 17:14:14 2006 From: charlie.burrows at gmail.com (Charlie Burrows) Date: Thu, 28 Sep 2006 13:14:14 -0400 Subject: [cl-opengl-devel] Nehe Tutorials 1-6 are done. Message-ID: <7780d94d0609281014g6b0efb15qb4204711a67ee57@mail.gmail.com> Hi, I've completed the Nehe tutorials 1-6. There is only one issue (the path to the texture image) which I will solve soon. My question is, how would you like me to submit it? I would just put it up on my personal website but I'd rather it was a part of the standard cl-opengl distribution because it is less likely to be marginalized . What do you think would be best? Cheers, Charlie From kentilton at gmail.com Thu Sep 28 17:17:21 2006 From: kentilton at gmail.com (Ken Tilton) Date: Thu, 28 Sep 2006 13:17:21 -0400 Subject: [cl-opengl-devel] Nehe Tutorials 1-6 are done. In-Reply-To: <7780d94d0609281014g6b0efb15qb4204711a67ee57@mail.gmail.com> References: <7780d94d0609281014g6b0efb15qb4204711a67ee57@mail.gmail.com> Message-ID: way to go, charlie. I was thinking of you last night when I solved a texture problem by randomly changing some value I spotted in desperation. :) ken -------------- next part -------------- An HTML attachment was scrubbed... URL: From luismbo at gmail.com Thu Sep 28 17:20:41 2006 From: luismbo at gmail.com (=?ISO-8859-1?Q?Lu=EDs_Oliveira?=) Date: Thu, 28 Sep 2006 18:20:41 +0100 Subject: [cl-opengl-devel] Nehe Tutorials 1-6 are done. In-Reply-To: <7780d94d0609281014g6b0efb15qb4204711a67ee57@mail.gmail.com> References: <7780d94d0609281014g6b0efb15qb4204711a67ee57@mail.gmail.com> Message-ID: <391f79580609281020r49c41815t3d858425b39fbac0@mail.gmail.com> On 9/28/06, Charlie Burrows wrote: > I've completed the Nehe tutorials 1-6. There is only one issue (the > path to the texture image) which I will solve soon. My question is, > how would you like me to submit it? Send us a link. I'll put them in the cl-opengl tree. -- Lu?s Oliveira http://student.dei.uc.pt/~lmoliv/ From charlie.burrows at gmail.com Thu Sep 28 21:27:57 2006 From: charlie.burrows at gmail.com (Charlie Burrows) Date: Thu, 28 Sep 2006 17:27:57 -0400 Subject: [cl-opengl-devel] Nehe Tutorials 1-6 are done. In-Reply-To: <7780d94d0609281111x6171009ev4c39f8ed8f9f0b32@mail.gmail.com> References: <7780d94d0609281014g6b0efb15qb4204711a67ee57@mail.gmail.com> <391f79580609281020r49c41815t3d858425b39fbac0@mail.gmail.com> <7780d94d0609281111x6171009ev4c39f8ed8f9f0b32@mail.gmail.com> Message-ID: <7780d94d0609281427l22df0d34p94b866b43a6dc4ec@mail.gmail.com> Sorry, I just realized that with the texture encapsulated in the lisp file there is really no need to include sunras.lisp. Also feel free to leave out nehe6.lisp and Cantelope-small.lisp if you don't like the encapsulted texture idea. I don't particularly like it either but I wouldn't know how to find the distribution directory to load the correct picture on an arbitrary machine. Cheers, Charlie From charlie.burrows at gmail.com Thu Sep 28 21:30:04 2006 From: charlie.burrows at gmail.com (Charlie Burrows) Date: Thu, 28 Sep 2006 17:30:04 -0400 Subject: [cl-opengl-devel] Re: Nehe Tutorials 1-6 are done. In-Reply-To: <7780d94d0609281111x6171009ev4c39f8ed8f9f0b32@mail.gmail.com> References: <7780d94d0609281014g6b0efb15qb4204711a67ee57@mail.gmail.com> <391f79580609281020r49c41815t3d858425b39fbac0@mail.gmail.com> <7780d94d0609281111x6171009ev4c39f8ed8f9f0b32@mail.gmail.com> Message-ID: <7780d94d0609281430q2932de93v46f8570aefe841cd@mail.gmail.com> On 9/28/06, Lu?s Oliveira wrote: > Send us a link. I'll put them in the cl-opengl tree. > Here they are, the website isn't yet but the link should still work. I still have some work to do, like putting back the comments for each line etc. Will I be able to use darcs to submit patches once it's up there? Also I sidestepped the whole image loading issue by putting all the image data (64x64x24 bits) into a lisp file. I'm open to suggestions. http://charlie.burrows.googlepages.com/nehe.tar.gz Enjoy! Charlie p.s. sorry for double sending Lu?s; I just can trust gmail to dwim. From jamesjb at jamesjb.com Thu Sep 28 22:59:34 2006 From: jamesjb at jamesjb.com (James Bielman) Date: Thu, 28 Sep 2006 15:59:34 -0700 Subject: [cl-opengl-devel] Re: Nehe Tutorials 1-6 are done. In-Reply-To: <7780d94d0609281430q2932de93v46f8570aefe841cd@mail.gmail.com> (Charlie Burrows's message of "Thu, 28 Sep 2006 17:30:04 -0400") References: <7780d94d0609281014g6b0efb15qb4204711a67ee57@mail.gmail.com> <391f79580609281020r49c41815t3d858425b39fbac0@mail.gmail.com> <7780d94d0609281111x6171009ev4c39f8ed8f9f0b32@mail.gmail.com> <7780d94d0609281430q2932de93v46f8570aefe841cd@mail.gmail.com> Message-ID: <87irj7ha21.fsf@jamesjb.com> "Charlie Burrows" writes: > Also I sidestepped the whole image loading issue by putting all the > image data (64x64x24 bits) into a lisp file. I'm open to > suggestions. One idea that might be worth looking into is loading the data into an array at compile time using EVAL-WHEN. You can find the texture relative to the source file by using *COMPILE-FILE-PATHNAME* (perhaps falling back to *LOAD-PATHNAME* when loading the source). This makes it easy to distribute textures as normal files but also doesn't require the texture file when delivering an executable. James From charlie.burrows at gmail.com Fri Sep 29 00:48:37 2006 From: charlie.burrows at gmail.com (Charlie Burrows) Date: Thu, 28 Sep 2006 20:48:37 -0400 Subject: [cl-opengl-devel] Re: Nehe Tutorials 1-6 are done. In-Reply-To: <87irj7ha21.fsf@jamesjb.com> References: <7780d94d0609281014g6b0efb15qb4204711a67ee57@mail.gmail.com> <391f79580609281020r49c41815t3d858425b39fbac0@mail.gmail.com> <7780d94d0609281111x6171009ev4c39f8ed8f9f0b32@mail.gmail.com> <7780d94d0609281430q2932de93v46f8570aefe841cd@mail.gmail.com> <87irj7ha21.fsf@jamesjb.com> Message-ID: <7780d94d0609281748p7ba92d8en6dc12963e873dbfe@mail.gmail.com> On 9/28/06, James Bielman wrote: > "Charlie Burrows" writes: > > > Also I sidestepped the whole image loading issue by putting all the > > image data (64x64x24 bits) into a lisp file. I'm open to > > suggestions. > > One idea that might be worth looking into is loading the data into an > array at compile time using EVAL-WHEN. You can find the texture > relative to the source file by using *COMPILE-FILE-PATHNAME* (perhaps > falling back to *LOAD-PATHNAME* when loading the source). > > This makes it easy to distribute textures as normal files but also > doesn't require the texture file when delivering an executable. > > James > Cool I will give that a try tomorrow. I've been using cl for ~4 years now and I still feel like I'm just scratching the surface. I like that! Cheers, Charlie From charlie.burrows at gmail.com Fri Sep 29 18:43:36 2006 From: charlie.burrows at gmail.com (Charlie Burrows) Date: Fri, 29 Sep 2006 14:43:36 -0400 Subject: [cl-opengl-devel] Re: Nehe Tutorials 1-6 are done. In-Reply-To: <7780d94d0609291111n420245b6y32dbe110124e14cc@mail.gmail.com> References: <7780d94d0609281014g6b0efb15qb4204711a67ee57@mail.gmail.com> <391f79580609281020r49c41815t3d858425b39fbac0@mail.gmail.com> <7780d94d0609281111x6171009ev4c39f8ed8f9f0b32@mail.gmail.com> <7780d94d0609281430q2932de93v46f8570aefe841cd@mail.gmail.com> <391f79580609281435ta321a87q94a376be964f8d57@mail.gmail.com> <7780d94d0609291111n420245b6y32dbe110124e14cc@mail.gmail.com> Message-ID: <7780d94d0609291143y5a5ae830pcc8bc2345efde672@mail.gmail.com> On 9/28/06, Lu?s Oliveira wrote: > On 9/28/06, Charlie Burrows wrote: > > p.s. sorry for double sending Lu?s; I just can trust gmail to dwim. > > Heh. No problem. Btw, I have my hands very full atm so it'll take a > while before I can look at your examples properly and integrate them. > So, my apologies in advance. > > -- > Lu?s Oliveira > http://student.dei.uc.pt/~lmoliv/ > Actually that's a good thing since they don't work against the latest cl-opengl version anyway. Originaly I had some trouble getting cl-opengl to compile so I got an older tar referenced in the archives of this list and I've been using that one. I just remembered and thought I'd check the latest again and it works (with a couple of changes) but my stuff doesn't. There's only a couple of issues with cl-opengl (under clisp 2.38 win32): #\Esc is not a valid key under clisp apparently and you can't compare characters to keys directly so (eql key #\Esc) must become (eql key (char-code #\Escape)). That's how it worked for me anyway. So you can hold off on looking at the nehes until I've had a chance to update them. Cheers, Charlie.