From jakob at resfarm.de Thu Jul 2 20:25:05 2009 From: jakob at resfarm.de (Jakob Reschke) Date: Thu, 2 Jul 2009 22:25:05 +0200 Subject: [cl-opengl-devel] Find out the current matrix-mode? In-Reply-To: <391f79580906291805j6dbcb0d0j6a39266de22e724f@mail.gmail.com> References: <2f9f12b70906291113h4004bf72y112d4d85f0107aa6@mail.gmail.com> <391f79580906291805j6dbcb0d0j6a39266de22e724f@mail.gmail.com> Message-ID: <2f9f12b70907021325w37a6474et8785f71fedc37906@mail.gmail.com> 2009/6/30 Lu?s Oliveira : > You need an active GL context in order to experiment with these calls. > Here's a quick and dirty way to do that: > > (glut:display-window (make-instance 'glut:window)) > > (gl:get-string :version) => "3.0.0 NVIDIA 180.44" > Thank you very much, that did it. From xristos at suspicious.org Wed Jul 8 22:12:12 2009 From: xristos at suspicious.org (xristos) Date: Wed, 8 Jul 2009 23:12:12 +0100 Subject: [cl-opengl-devel] bug fixes & new darwin patch Message-ID: I fixed the following bugs: * enable-event & disable-event do not check if the event is already enabled/disabled. This can lead to enabling the idle callback more than once for a given window which can break the event loop in various ways. For instance, in current cl-opengl, rb-double enables idle once per mouseclick and this leads to multiple entires in *windows-with-idle-event* which in turn means that the idle method will get called multiple times breaking the logic. * Currently the idle callback is disabled only in close, and only when *windows-with-idle-event* is nil. We need to do the same check in disable-event too. Currently this manifests in gears.lisp. If you minimize the window, (disable-event :idle) will get called but the callback will continue to run -> 100% cpu usage. Now for darwin, i fixed all the issues i could find. It now works on sbcl/ccl/ccl64 with no issues. Instead of forcing the glut event loop on the initial thread, i used the trick from ccl opengl-ffi on sbcl too. This means that, on sbcl and ccl/ccl64, a new thread is created (GLUT-thread) which will run the glut event loop. This also has the bonus of making cl-glut work without any changes under slime. The only issue when developing interactively is that one can not call glut functions from a thread other than GLUT-thread _while_ the glut event loop is running. I added warnings to indicate when the event loop runs/stops. If the glut event loop is not running (example: leave-main-loop is called), you can call glut functions from any thread and they will take effect when the glut event loop starts running again. This shouldn't affect normal development, i had to mention it because osx has the tendency to kill the process when one ignores this :-) (All the changes apart from the bug fixes are only for darwin.) -------------- next part -------------- A non-text attachment was scrubbed... Name: cl-opengl-darwin2.diff Type: application/octet-stream Size: 17880 bytes Desc: not available URL: -------------- next part -------------- From xristos at suspicious.org Mon Jul 20 01:05:47 2009 From: xristos at suspicious.org (xristos) Date: Mon, 20 Jul 2009 02:05:47 +0100 Subject: [cl-opengl-devel] darwin patch Message-ID: <6446FE24-743C-4DFC-A8A0-51A0F0ACFB2E@suspicious.org> This is a revised patch that could do with some testing. (Luis: this is basically darwin5 with your fixes and single foreign function declarations that assume patched cffi) I tested it on sbcl(threads/nothreads) on 10.5 and 10.4 and ccl/ccl64 on same platforms. The only issue is when running on threaded lisps on 10.4, you must make sure to call any glut function from cl-glut::*glut-thread* (for instance: by interrupting *glut-thread*) This is not done by default as it could get quite messy and 10.4 is basically obsolete, so the burden for this is on the user. Everything works fine on 10.5 as this issue is not present. Attached patch for cl-opengl-current (you also need darcs cffi for ccl/ccl64) -------------- next part -------------- A non-text attachment was scrubbed... Name: cl-opengl-darwin6.diff Type: application/octet-stream Size: 16646 bytes Desc: not available URL: -------------- next part -------------- From luismbo at gmail.com Sat Jul 25 22:55:21 2009 From: luismbo at gmail.com (=?ISO-8859-1?Q?Lu=EDs_Oliveira?=) Date: Sat, 25 Jul 2009 23:55:21 +0100 Subject: [cl-opengl-devel] darwin patch In-Reply-To: <6446FE24-743C-4DFC-A8A0-51A0F0ACFB2E@suspicious.org> References: <6446FE24-743C-4DFC-A8A0-51A0F0ACFB2E@suspicious.org> Message-ID: <391f79580907251555r196dfe5o8c2cdb9599c248e7@mail.gmail.com> On Mon, Jul 20, 2009 at 2:05 AM, xristos wrote: > This is a revised patch that could do with some testing. > (Luis: this is basically darwin5 with your fixes and single > foreign function declarations that assume patched cffi) I don't have time right now to test this patch but it looks OK so I pushed it to the darcs repository. OSX users, please test. :-) -- Lu?s Oliveira http://student.dei.uc.pt/~lmoliv/