I want to use gluUnProject in order to do things on-screen when the user clicks with the mouse.  I'm using Ubuntu, and it seems that the opengl libraries that come with it do not come with the glu(Un)Project methods defined.  However, after poking around a bit in the source, it looks pretty straight-forward to create the lisp methods from the c methods, so I added the following to my glu.lisp file:<br>
<br>(def-foreign-routine ("gluProject" project) void<br>  (obj-x gl:double)<br>  (obj-y gl:double)<br>  (obj-z gl:double)<br>  (modelview (* gl:double)<br>  (projection (* gl:double)<br>  (viewport (* gl:int))<br>
  (win-x (* gl:double)<br>  (win-y (* gl:double)<br>  (win-z (* gl:double)))))))<br>  <br>(def-foreign-routine ("gluUnProject" unproject) void<br>  (win-x gl:double)<br>  (win-y gl:double)<br>  (win-z gl:double)<br>
  (modelview (* gl:double)<br>  (projection (* gl:double)<br>  (viewport (* gl:int))<br>  (obj-x (* gl:double)<br>  (obj-y (* gl:double)<br>  (obj-z (* gl:double)))))))<br><br>These are purely based off of looking around at how the other glu methods were defined. <br>
<br>Are these definitions correct?  I'm unable to really try them out because I don't understand how to pass double pointers to these methods.  I'm just getting started with CL, and loving it so far, but the application I'm currently working on has definitely hit a roadblock.<br>
<br>Can somone point me in the right direction as far as whether how I'm defining these methods is correct, and if so, how I pass pointer-style vars to the method calls to get the results?<br><br>Thanks!<br>