Debugging in OpenGL, picking specifically

Total newbie here. I am trying to get picking working, so far can’t hit the broad side of a barn. I took the selection/picking logic out of Nehe Tutorial 32 and spliced it into the simpler Nehe-5, using VC++ on WinNT. Works like a charm! But I really want to do it from Common Lisp. Now I have Nehe-5 (original, no picking) working beautifully thru some CL bindings to SDL and OpenGL. But I then clone the picking logic over from VC++ and no hits are found. Even if I elim the pickmatrix call to find everything.

I have gone over the code several times very closely to make sure they are “the same”, so it is probably not an OpenGL issue per se.

Normally what I would do here is print out some diagnostics to show where things stand in both the working VC++ version and not-working CL version. I checked the values passed in to some crucial routines, and they are the same.

What kinds of interrogations can I make of OpenGL’s internal state that might be interesting? I am thinking that just before:

(gl:render-mode gl:+render+)

in CL and the VC++ version I could ask OpenGL what it has on its mind. But what should I ask it? Will it tell me how many objects it knows about or something like that?

I’ll be digging into the books for ideas, but I’m kinda thrashing over here and have been for over a day, so i thought I’d turn to the pros for their thoughts.

ah, no problemo, just me messing up the Cl->C interface. peace. out. kt