From hrapof at common-lisp.ru Sat Sep 1 13:14:41 2007 From: hrapof at common-lisp.ru (Dmitri Hrapof) Date: Sat, 01 Sep 2007 17:14:41 +0400 Subject: [cl-opengl-devel] texture coord array Message-ID: <46D965C1.1000008@common-lisp.ru> Hello! On SBCL 1.0.9 (if it matters) I had to slightly edit EMIT-GL-ARRAY-BIND-CLAUSE, writing "%gl:tex-coord-pointer" instead of just "tex-coord-pointer", otherwise it complained at run-time that "CL-OPENGL::TEX-COORD-POINTER" was undefined. By the way, what's planned for quadrics and nurbs? CLOS classes with finalizers? Sincerely yours, Dmitri From doug at hcsw.org Tue Sep 4 23:40:10 2007 From: doug at hcsw.org (doug at hcsw.org) Date: Tue, 4 Sep 2007 16:40:10 -0700 Subject: [cl-opengl-devel] Fun GPLed Common Lisp OpenGL Molecule Viewer Message-ID: <20070904234009.GA13881@hcsw.org> Hi LispNYC/cl-opengl-devel! I just released a new Common Lisp program that I quickly hacked for a school assignment and have since cleaned up a bit. We were supposed to use C but I, of course, used lisp. :) It's a fancy 3D, interacive viewer for molecules using the OpenGL graphics libraries and the awesome cl-opengl bindings. Currently included molecules: water, ethanol. Read more about it and download it here: http://hcsw.org/blog.pl I was wondering if anyone can confirm this works for them on whatever environments or has any other comments. Also, cl-opengl-devel: feel free to include it as an example with the bindings if you feel it will help anyone! The random walk framerate testing mode is neat. The code is also good for getting an intuitive feeling for how GL lighting works as well as a good example of using rotation matrices in CL (gl:with-pushed-matrix is brilliant). But as the blog post concludes: The next generation of this program will not be a way to view molecules, but instead a way of interactively exploring diverse types polyhedron, like, for instance, the icosahedron and the infinite class of anti-prisms. And don't forget that every polyhedron has a dual (where the centre of each face becomes a vertex). Flipping between a polyhedron and its dual in real-time will be sweet. Doug Hoyte Chief Operating Officer HCSW Silicon Graphics Division -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From doug at hcsw.org Wed Sep 5 00:01:31 2007 From: doug at hcsw.org (doug at hcsw.org) Date: Tue, 4 Sep 2007 17:01:31 -0700 Subject: [cl-opengl-devel] Fun GPLed Common Lisp OpenGL Molecule Viewer In-Reply-To: <46DDEDA0.6030506@optonline.net> References: <20070904234009.GA13881@hcsw.org> <46DDEDA0.6030506@optonline.net> Message-ID: <20070905000131.GB13881@hcsw.org> Hi Ken! On Tue, Sep 04, 2007 at 07:43:28PM -0400 or thereabouts, Ken Tilton wrote: > Dude! Marketing 101!! Where are the frickin screenshots!!!!! hth, kenny Haha very true: Solid sphere mode, white light source (which you can see as a small sphere in upper right), around 40 slices, ethanol: http://hcsw.org/downloads/molview-screen1.png Mesh sphere mode, yellowish light source (which you can see as a small sphere in lower left), looks like 6 slices, ethanol: http://hcsw.org/downloads/molview-screen2.png Doug -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From t.achim at gmail.com Sat Sep 8 17:46:44 2007 From: t.achim at gmail.com (Tudor Achim) Date: Sat, 8 Sep 2007 13:46:44 -0400 Subject: [cl-opengl-devel] textures Message-ID: Hi, I'm following nehe's tutorials at nehe.gamedev.net, and I'm having a lot of trouble with loading and binding textures. So, I *tried* to approximate what happened in his tutorial: I opened a stream to the bmp file with (setf test (open "/home/tudor/email.bmp" :element-type '(cl-user::unsigned-byte 8))) Then, I made an 1d array of 5000 elements (just so it was 'big enough') and stored the rgb values in it with (read-sequence test-array test) However, when I do (gl:bind-texture gl:tex-image-2d test-array), it says that cl-opengl:tex-image-2d is unbound. What am I doing wrong? Thanks, Tudor -------------- next part -------------- An HTML attachment was scrubbed... URL: From 00003b at gmail.com Sat Sep 8 18:14:43 2007 From: 00003b at gmail.com (Bart Botta) Date: Sat, 8 Sep 2007 13:14:43 -0500 Subject: [cl-opengl-devel] textures In-Reply-To: References: Message-ID: <77cb99c00709081114m65bfab2br961dd57ea61564e3@mail.gmail.com> On 9/8/07, Tudor Achim wrote: > Hi, > I'm following nehe's tutorials at nehe.gamedev.net, and I'm having a lot of > trouble with loading and binding textures. Which one(s) are you looking at? > I opened a stream to the bmp file with > (setf test (open "/home/tudor/email.bmp" :element-type > '(cl-user::unsigned-byte 8))) > Then, I made an 1d array of 5000 elements (just so it was 'big enough') and > stored the rgb values in it with > (read-sequence test-array test) > You'll probably need something more complicated than that (to deal with the BMP file format, etc), but it should at least give you something that would show up if you uploaded it correctly... (though are you sure that is actually 'big enough' for your file? that would only be around 40x40 pixels if I'm counting right.) > However, when I do (gl:bind-texture gl:tex-image-2d test-array), > it says that cl-opengl:tex-image-2d is unbound. > There are a few things wrong here: First, you probably want :tex-image-2d instead of gl:tex-image-2d, cl-opengl converts most OpenGL enums ( things like GL_FOO_BAR in C source) to keywords in lisp (so :foo-bar for GL_FOO_BAR). Next, bind-texture should be taking a GL texture name (an int) as the second parameter, not the actual texture data. You need to allocate a texture name with gl:gen-textures and store that somewhere (and remember to deallocate it later). Then you need to set up the texture, first make it the current texture with bind-texture, then you will probably want some tex-parameter calls to set filtering, and finally upload the image data with tex-image-2d. The tex-image-2d call is where you would pass the test-array parameter you loaded above. If you are only using 1 texture, then you should be able to go from there, otherwise repeat that for each texture, and call bind-texture during rendering to activate the particular you need for a batch of geometry. -- Bart From mikael.lax at bredband.net Wed Sep 12 14:45:30 2007 From: mikael.lax at bredband.net (Mikael Lax) Date: Wed, 12 Sep 2007 16:45:30 +0200 Subject: [cl-opengl-devel] Patch for some shader/object queries. Message-ID: <20070912164530.b36cf8f9.mikael.lax@bredband.net> Hello, I've implemented some of the functions in section 6.1.14 Shader and Program Queries. This also led to the FIXMEs in get-active-attrib and get-active-uniform being fixed (they relied on fixed buffer-sizes which are now queried). Sincerely, Mikael Lax -------------- next part -------------- A non-text attachment was scrubbed... Name: mikael.patch Type: text/x-patch Size: 17750 bytes Desc: not available URL: From mikael.lax at bredband.net Tue Sep 25 13:44:00 2007 From: mikael.lax at bredband.net (Mikael Lax) Date: Tue, 25 Sep 2007 15:44:00 +0200 Subject: [cl-opengl-devel] Patch for texture coord generation. Message-ID: <20070925154400.f3d5c432.mikael.lax@bredband.net> Hello, I've made a small patch to implement tex-gen (see 2.11.4). I had use of it the other day and I saw it was missing. I also noticed two small typos in package.lisp that I fixed (wrong sections being referenced in 2.11.*). Sincerely, Mikael Lax -------------- next part -------------- A non-text attachment was scrubbed... Name: tex-gen.patch Type: text/x-patch Size: 13492 bytes Desc: not available URL: