Hi,

I'm having a bit of an issue rendering fonts in specified colours in 
SDL-TTF. Below is my code, with (window-test) being a call-back function 
for a button in a GUI written in CAPI. What happens is that when the 
button in clicked, the SDL window pops up, and the text is rendered but 
never in the correct colour. The colour displayed seems to change each 
time the button is clicked. I've tried a number of approaches to setting 
the colour based upon the examples, documentation and source code but to 
no avail. What am I doing wrong?

(defun window-test (data interface)
   (sdl:with-init ()
     (sdl:with-display (1024 768 :bpp 24 :title-caption "simple bmp 
example")
       (make-stim)
       (sdl:set-framerate 10)
       (sdl:with-events ()
                        (:quit () t)
                        (:keydown (:key key)
                         (if (sdl:key= key :SDLK_ESCAPE)
                           (sdl:push-quitevent)))
                        (:videoexpose () (sdl:update-display))))))

(defun make-stim ()
   (sdl:with-color (#(255 255 255))
     (sdl-ttf:with-open-font ("times.ttf" 48 "C:/Windows/fonts/")
       (sdl-ttf:render-font-solid "C5" :update-p t))))

The platform I am developing in  is LispWorks Personal 5.0.1 on Windows 
XP (which is running in a VMWare virtual machine on a Mac). I installed 
lispbuilder-sdl using the Lisp-Starter-Kit method.

Thanks in advance for any help.

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

Reply via email to