Common lisp 如何使用lispbuilder绘制曲面

Common lisp 如何使用lispbuilder绘制曲面,common-lisp,Common Lisp,我想使用绘制曲面,但无法将用户指南/api转换为工作示例 这就是我目前拥有的: (defun func (version) (sdl:with-init () (sdl:window 1023 768 :title-caption "Move a rectangle using the mouse") (setf (sdl:frame-rate) 60) (setf *map-surface* (sdl:load-image "...src/resources/map

我想使用绘制曲面,但无法将用户指南/api转换为工作示例

这就是我目前拥有的:

(defun func (version)
  (sdl:with-init ()
    (sdl:window 1023 768 :title-caption "Move a rectangle using the mouse")
    (setf (sdl:frame-rate) 60)
    (setf *map-surface* (sdl:load-image "...src/resources/map.jpg"))
    (sdl:with-events ()
      (:quit-event () t)
      (:key-down-event ()
               (sdl:push-quit-event))
      (:idle ()
         (sdl:draw-surface *map-surface*) 

         ;; Change the color of the box if the left mouse button is depressed
         (when (sdl:mouse-left-p)
           (setf *random-color* (sdl:color :r (random 255) :g (random 255) :b (random 255))))

          ;; Clear the display each game loop
          (sdl:clear-display sdl:*black*)

          ;; Draw the box having a center at the mouse x/y coordinates.
          (sdl:draw-box (sdl:rectangle-from-midpoint-* (sdl:mouse-x) (sdl:mouse-y) 20 20)
                 :color *random-color*)

          ;; Redraw the display
          (sdl:update-display))))))

但它根本没有画出表面。我已经检查了曲面是否已成功加载。我还希望您能推荐一份涵盖该库的教程/论文,因为实际的用户指南并不适合初学者。

事实上,一切正常。但当您每次sdl:clear display sdl:*black*重新绘制屏幕时,您将看不到图片。试着评论这句话