[cells-devel] OpenMCL porting progress update

Kenneth Tilton ktilton at nyc.rr.com
Thu Oct 28 19:41:25 UTC 2004


On Oct 28, 2004, at 1:56 PM, Frank Goenninger wrote:

> Hi Kenny and all the other mostly read-onlies ;-)
>
> I have been digging into the GLUT-INIT issue for a couple of hours.
> First thing to do was to update UFFI to the current stable version of
> 1.4.28.
>
> This fixed a couple of things. Next surprise for me was to discover 
> that
> the code in the ffi-extender package was OpenMCL/MCL unaware. So this
> got me into trouble as Kenny does a lot of things in that package that 
> I
> call "advanced stuff".

Oops. :) Sounds like you are past that though.

>
> This is where I am still just completing the OpenMCL way of doing
> things. Along that path I had the joy of learning OpenMCL's FFI and 
> some
> of UFFI's internals. Becoming better with Common Lisp, guys...
>
> Another thing I could find was an interesting part of sample code in 
> the
> OpenMCL distro:

Ah, lucky us! Do they have a working OpenGL demo?

>
> x-x-x
> (in-package :opengl)
>
> ;; glut complains if it's initialized redundantly
> (let ((glut-initialized-p nil))
>   (defun initialize-glut ()
>     (let ((command-line-strings (list "openmcl")))
>       (when (not glut-initialized-p)
>         (ccl::with-string-vector (argv command-line-strings)
>           (rlet ((argvp (* t))    ; glutinit takes (* (:signed 32)) 
> and (* (* (:unsigned 8)))
> 		 (argcp :signed)) ; so why are these declared as (* t) and :signed?
> 	    (setf (%get-long argcp) (length command-line-strings)
> 		  (%get-ptr argvp) argv)
> 	    (#_glutInit argcp argvp)))
> 	(setf glut-initialized-p t))))
>   ;; When a saved image is restarted, it needs to know that glut
>   ;; hasn't been initialized yet.
>   (defun uninitialize-glut ()
>     (setf glut-initialized-p nil))
>   )
>
> (pushnew #'uninitialize-glut ccl::*save-exit-functions*
> 	 :key #'ccl::function-name)
> x-x-x
>
> I am currently translating this into an UFFI-version and hope to fix
> the problem calling GLUT-INIT.
>
> That's it, unfortunately. I am still not at the speed I wish to be...

Can't wait to see what you do at full speed if you think this is slow. 
:)

Over here I have managed to build enough under Lispworks to run 
lesson-14, except now I have to sort out glutInit and feature out 
glut-set-option and set up glut-wm-close etc etc., so I am right behind 
you. Let's keep each other posted.

btw, I used the latest UFFI and this time Lispworks did not complain 
about anything. That made me happy. :)

kt





More information about the cells-devel mailing list