From malcolm.reynolds at gmail.com Mon Feb 15 16:52:00 2010 From: malcolm.reynolds at gmail.com (Malcolm Reynolds) Date: Mon, 15 Feb 2010 16:52:00 +0000 Subject: [cl-opengl-devel] Problems running cl-openl on Snow Leopard In-Reply-To: References: Message-ID: > The only clue I have is that when loading the fasl files (I've deleted > and recompiled all these a bunch of times so I'm pretty sure there's > nothing stale in here) I get the warning you can see at the bottom of > this snippet - the style warning may be nothing but the GLUT warning > looks ominous. ** SNIP ** > STYLE-WARNING: Keyword :CALLING-CONVENTION is obsolete, please use :CONVENTION > 2010-02-15 16:33:13.944 sbcl[766:903] GLUT Warning: invalid glutGet > parameter: 124 > NIL So far I've concluded a value of 124 for glutGet means it's being passed an item from the cenum 'get-param defined in glut/state.lisp - 124 corresponds to the keyword :init-state. If glut is not being initialised then that would certainly explain it falling over. I don't get why this would change though? I'm digging through the headers that are included with my system-provided opengl to see if I can figure out what this value should be. Malcolm From malcolm.reynolds at gmail.com Mon Feb 15 16:38:39 2010 From: malcolm.reynolds at gmail.com (Malcolm Reynolds) Date: Mon, 15 Feb 2010 16:38:39 +0000 Subject: [cl-opengl-devel] Problems running cl-openl on Snow Leopard Message-ID: Hello all, I'm having issues getting cl-opengl working on Snow Leopard 10.6.2. I definitely had some working Lisp OpenGL stuff on my previous laptop (plain old Leopard) but the switch to SL seems to have caused a show stopper (maybe something to do with 64 bits?). I'm using SBCL 1.0.35.2, compiled myself from git. I haven't enabled threads because they are a bit shaky on Mac, and I've specifically compiled a 32 bit version because I have some 32 bit libraries I'd like to link to. I'm using the latest version of cl-opengl from darcs. I open up a new lisp, load :cl-glut-examples using ASDF, and then move into the package and try to run a demo (for the sake of argument #'RB-HELLO although this appears to happen with everything) and the lisp dies with this fairly cryptic error message: * (in-package :cl-glut-examples) # * (rb-hello) 2010-02-15 16:33:44.197 sbcl[766:903] GLUT Warning: invalid glutGet parameter: 124 Mon Feb 15 16:33:44 mreynolds-mbp.local sbcl[766] : kCGErrorInvalidConnection: CGSGetCurrentCursorLocation: Invalid connection Mon Feb 15 16:33:44 mreynolds-mbp.local sbcl[766] : kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged. Mon Feb 15 16:33:44 mreynolds-mbp.local sbcl[766] : kCGErrorInvalidConnection: CGSGetCurrentCursorLocation: Invalid connection Mon Feb 15 16:33:44 mreynolds-mbp.local sbcl[766] : kCGErrorInvalidConnection: CGSNewWindowWithOpaqueShape: Invalid connection 2010-02-15 16:33:44.233 sbcl[766:903] GLUT Fatal Error: internal error: NSInternalInconsistencyException, reason: Error (1002) creating CGSWindow The only clue I have is that when loading the fasl files (I've deleted and recompiled all these a bunch of times so I'm pretty sure there's nothing stale in here) I get the warning you can see at the bottom of this snippet - the style warning may be nothing but the GLUT warning looks ominous. ; loading system definition from ; /Users/malc/opt/lisp/asdf-reg/cl-glut-examples.asd into # ; registering # as CL-GLUT-EXAMPLES ; loading system definition from /Users/malc/opt/lisp/asdf-reg/cl-glut.asd into ; # ; registering # as CL-GLUT ; loading system definition from /Users/malc/opt/lisp/asdf-reg/cl-opengl.asd ; into # ; registering # as CL-OPENGL ; loading system definition from /Users/malc/opt/lisp/asdf-reg/cl-glu.asd into ; # ; registering # as CL-GLU STYLE-WARNING: Keyword :CALLING-CONVENTION is obsolete, please use :CONVENTION 2010-02-15 16:33:13.944 sbcl[766:903] GLUT Warning: invalid glutGet parameter: 124 NIL Does anyone have any ideas on how to track this down? I'm digging through the code right now but I'm by no means skilled at opengl or lisp so it's hard going.. Many thanks, Malcolm From malcolm.reynolds at gmail.com Mon Feb 15 17:04:13 2010 From: malcolm.reynolds at gmail.com (Malcolm Reynolds) Date: Mon, 15 Feb 2010 17:04:13 +0000 Subject: [cl-opengl-devel] Problems running cl-openl on Snow Leopard In-Reply-To: References: Message-ID: > So far I've concluded a value of 124 for glutGet means it's being > passed an item from the cenum 'get-param defined in glut/state.lisp - > 124 corresponds to the keyword :init-state. If glut is not being > initialised then that would certainly explain it falling over. I don't > get why this would change though? I'm digging through the headers that > are included with my system-provided opengl to see if I can figure out > what this value should be. I think I've found the offending section which doesn't match my enum - I've put it at http://paste.lisp.org/display/94992#1. The annotation below is a section of my glut.h found in the /System/Library/Frameworks/GLUT/Headers/ folder - it matches perfectly up until the lisp one defines :init-state (which will be 124 because window-format-id is 123) but there is no constant for init-state or INIT_STATE or anything similar in glut.h. More crucially, the number 124 is included in none of the glut headers. I think I'm pretty much done, I can see why this crashes but have no what should be done to fix it. Anyone with any advice? Cheers Malcolm From 00003b at gmail.com Mon Feb 15 17:41:37 2010 From: 00003b at gmail.com (Bart Botta) Date: Mon, 15 Feb 2010 11:41:37 -0600 Subject: [cl-opengl-devel] Problems running cl-openl on Snow Leopard In-Reply-To: References: Message-ID: <77cb99c01002150941q410a5a9ai698b53eecb34e2e3@mail.gmail.com> Try the version at http://github.com/3b/cl-opengl It has some other issues with threads on OSX 10.6, but as far as i know, should work on unthreaded lisps. (It works on threaded lisps too, but you have to make sure it is only loaded/run from the initial thread on 10.6.) -- b From malcolm.reynolds at gmail.com Tue Feb 23 14:55:03 2010 From: malcolm.reynolds at gmail.com (Malcolm Reynolds) Date: Tue, 23 Feb 2010 14:55:03 +0000 Subject: [cl-opengl-devel] get-tex-image not external? Message-ID: Hi >>> Try the version at http://github.com/3b/cl-opengl I'm using this github branch you pointed me to and it's been working very well so far, so thanks for going to effort to keep the package updated for Snow Leopard. A minor point I've come across is that get-tex-image doesn't seem to be external, is there any particular reason for this / is there some interface I should be accessing it through? I couldn't find one with a quick bit of grepping.. Cheers, Malcolm