From greg at smolyn.org Tue Feb 6 19:40:49 2007 From: greg at smolyn.org (Greg Smolyn) Date: Tue, 6 Feb 2007 15:40:49 -0400 Subject: [cl-opengl-devel] shader programming functions Message-ID: <35e6f0550702061140v419fc524hee4bf18985ca225d@mail.gmail.com> Hi, I'm starting to do some shader programming and I see that such functions as glGetShaderiv and glGetShaderInfoLog (and the associated 'program' variants) are missing. Is there a reason for this or should I just go ahead and add them? -greg -------------- next part -------------- An HTML attachment was scrubbed... URL: From luismbo at gmail.com Tue Feb 6 21:45:44 2007 From: luismbo at gmail.com (=?ISO-8859-1?Q?Lu=EDs_Oliveira?=) Date: Tue, 6 Feb 2007 21:45:44 +0000 Subject: [cl-opengl-devel] shader programming functions In-Reply-To: <35e6f0550702061140v419fc524hee4bf18985ca225d@mail.gmail.com> References: <35e6f0550702061140v419fc524hee4bf18985ca225d@mail.gmail.com> Message-ID: <391f79580702061345i9290059n43dae316c3ac2a0c@mail.gmail.com> On 06/02/07, Greg Smolyn wrote: > Is there a reason for this or should I just go ahead and add them? Go for it. While you're at it, please get us a nice Lisp-to-GLSL converter. I recall someone with a blog in Planet Lisp that was hacking on something like that. Ah, there: . -- Lu?s Oliveira http://student.dei.uc.pt/~lmoliv/ From greg at smolyn.org Mon Feb 12 17:17:47 2007 From: greg at smolyn.org (Greg Smolyn) Date: Mon, 12 Feb 2007 13:17:47 -0400 Subject: [cl-opengl-devel] ATI + OpenGL 2.0 Message-ID: <35e6f0550702120917p2e9a0b71m9349ba172a1c1123@mail.gmail.com> Hi again, I've been working with a number of OpenGL 2.0 concepts such as shader programs, and I've come across a bit of a snag with ATI's OpenGL 2.0support. The shader programs work fine with the libGL.so as supplied by nvidia (on my home machine), but when using libGL.so from ATI on my work machine, functions such as create-shader fail, as there is no such symbol in the library. Using glXGetProcAddress to get the function pointer for glCreateShader, however, is the required work around for the ATI library. I was tempted to create a cl-glew library binding, however this won't really work that well, as _that_ library also doesn't include all the symbols, and relies on C preprocessor macros heavily to do the right thing. Anyways, I was thinking instead of modifying cl-opengl instead to (perhaps dependant on some switch?) use glXGetProcAddress for those functions that aren't directly callable, memoized of course. Does this sort of thing make sense in this context? It's been a while since I've done a lot of lisp, and I'm also not super familiar with FFIs, so I want to make sure I do this the lispyiest way possible. -greg -------------- next part -------------- An HTML attachment was scrubbed... URL: From charliemac+cl-opengl at gmail.com Wed Feb 14 00:15:12 2007 From: charliemac+cl-opengl at gmail.com (Charlie McMackin) Date: Wed, 14 Feb 2007 09:15:12 +0900 Subject: [cl-opengl-devel] ATI + OpenGL 2.0 In-Reply-To: <35e6f0550702120917p2e9a0b71m9349ba172a1c1123@mail.gmail.com> References: <35e6f0550702120917p2e9a0b71m9349ba172a1c1123@mail.gmail.com> Message-ID: <6e831e4e0702131615v782c271en34a681904872240f@mail.gmail.com> Hi Greg, I don't know if you've checked out Bart Botta's cl-opengl modifications, but it is further along with generated OpenGL bindings. His changes have been out there for a while but I've seen no word, yay or nay, about merging them into the main tree so it should still be treated as experimental. But all of the examples do work on my ati mobility 9600. If you don't like the changes, it still could be used for ideas of one way to address the get-process-address issue. However there is no glx-get-process-address function. Bart's approach uses the glut library to get the equivalent (at least on linux). I think it might be nice to have a glx-get-process-address implemented if just to avoid loading cl-glut for those who don't want to load it. This is all from a fellow user, not a main dev so take it with a scrutinous eye. Here are links to the relevant posts by Bart: http://article.gmane.org/gmane.lisp.cl-opengl.devel/68/ http://article.gmane.org/gmane.lisp.cl-opengl.devel/63/ charlie mac From 00003b at gmail.com Wed Feb 14 03:55:26 2007 From: 00003b at gmail.com (Bart Botta) Date: Tue, 13 Feb 2007 21:55:26 -0600 Subject: [cl-opengl-devel] ATI + OpenGL 2.0 In-Reply-To: <6e831e4e0702131615v782c271en34a681904872240f@mail.gmail.com> References: <35e6f0550702120917p2e9a0b71m9349ba172a1c1123@mail.gmail.com> <6e831e4e0702131615v782c271en34a681904872240f@mail.gmail.com> Message-ID: <77cb99c00702131955m5426e52eyf8e2cdc79c131e82@mail.gmail.com> On 2/13/07, Charlie McMackin wrote: > However there is no glx-get-process-address function. Bart's approach > uses the glut library to get the equivalent (at least on linux). I > think it might be nice to have a glx-get-process-address implemented > if just to avoid loading cl-glut for those who don't want to load it. > My code is configurable to use any function that can translate from a string to a function pointer, it just uses GLUT in the examples since that's what the examples use. I've used it with lispbuilder-sdl, and it should work directly with the glx,wgl, etc. functions as well if you add a defcfun for them. To use another function, just do (setf cl-opengl-bindings::*gl-get-proc-address* #'foo-get-proc-address) at some point after loading cl-opengl and before you try to use any functions from an extension or from GL version>1.1. -- Bart