Charlie Burrows wrote:
> My IFS Designer application was just being tested with sbcl and
> there's a problem. It would seem that for every point I draw to the
> sdl:surface sbcl warns me about an optimization note regarding
> sdl:event-loop. An IFS requires 1000s of points to be drawn so this is
> quite nasty.
SBCL wants to know alien types at runtime; it seems that UFFI does not pass
this information to the compiler. A quick patch to IFS:
(defmethod draw ((sdl ifs-sdl) surface)
#+sbcl (declare (type (sb-alien:alien (* sdl:surface)) surface)) ; <- here
(process-points sdl)
(sdl:draw-filled-rectangle
surface 0 0
(sdl:surface-w surface) (sdl:surface-h surface) 0 0 0)
(let ((draw-pt))
(dolist (point (ifs:points (ifs sdl)) t)
(setq draw-pt (matrix:m* point (view-transform sdl)))
;;(print (matrix:matrix draw-pt))
(when (and (> (sdl:surface-w surface) (matrix:x draw-pt) 0)
(> (sdl:surface-h surface) (matrix:y draw-pt) 0))
(sdl:draw-pixel surface
(std-round (matrix:x draw-pt))
(std-round (matrix:y draw-pt))
255 255 255))))
surface)
--
Regards,
Alexey Dejneka
"Alas, the spheres of truth are less transparent than those of
illusion." -- L.E.J. Brouwer
|