I think that a video expose event being generated on *initial* window display 
may be OS dependent. 

Definitely the display should be redraw if you have an :IDLE event containing 
an update display. 

As you surmised, events are generated even if you haven't defined a specific 
handler in with-events. These unhandled events are just thrown on the floor. 

Can you send you code, and I'll take a look. 

- Luke

------Original Message------
From: David Trudgett
Sender: application-builder-boun...@lispniks.com
To: application-builder@lispniks.com
ReplyTo: Application Builder Discussion
Subject: [ab] Problem with "hello world" example code
Sent: Sep 19, 2009 20:21


Hi all,

I am having an issue with the example code shown on the following page:

    http://code.google.com/p/lispbuilder/wiki/LispbuilderSDL

    (sdl:with-init ()
      (sdl:window 320 240)
      (sdl:draw-surface (sdl:load-image "lisp.bmp"))
        (sdl:with-events ()
          (:quit-event () t)
          (:video-expose-event (sdl:update-display))))

The problem is that the image does not display until a window exposure
event occurs, and this happens whether or not there is anything
attached to :VIDEO-EXPOSE-EVENT, as shown above. Putting an
UPDATE-DISPLAY immediately after DRAW-SURFACE and in :IDLE event also
makes no difference.

Drawing rectangles on the surface on mouse move events shows the same
behaviour (the rectangles only appear after moving another window over
the drawing surface, or after minimising and then maximising, for
example).

A user on #lispgames suggested using gl:flush, which I haven't been
able to try yet, but I don't believe it should be necessary, as I
haven't seen it in any of the examples. The same or another user on
#lispgames confirmed that they were getting the same problem when they
tried the example code.

I get the problem whatever lisp I am using (mostly SBCL, but also
CLISP, and I think I have tried CCL, too). I run the code in
Emacs/SLIME on Linux. Everything is a fairly recent version. If it
matters, I can certainly find out the versions of every relevant
component I am using.

I am hoping to get some cool (for me, anyway) stuff done using
lispbuilder (or is it called 'application builder' now?) but, as you
can imagine, I was quite disappointed when I couldn't even get "hello
world" to work properly.

Hoping there is some easy explanation and fix!

Cheers,
David Trudgett
_______________________________________________
application-builder mailing list
application-builder@lispniks.com
http://www.lispniks.com/mailman/listinfo/application-builder

_______________________________________________
application-builder mailing list
application-builder@lispniks.com
http://www.lispniks.com/mailman/listinfo/application-builder

Reply via email to