[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gcl-devel] UFFI & CL-SDL

From: Erik Andersson
Subject: Re: [Gcl-devel] UFFI & CL-SDL
Date: Fri, 15 Aug 2003 17:37:54 +0200 (MEST)

On Fri, 15 Aug 2003, Michael Koehne wrote:

>   can you just tar.gz your work - and eMail it to me. I'm working on a
>   similar topic - but I currently play around with GCL using raw X and
>   OpenGL implementing a 3D extension for the eMUDs (EMACS/LISP) client,
>   and with CLISP using sockets and implementing the server part.

I haven't really done anything worth zipping. In the makdefs file I added
LIBS=... -lSDL -lpthread

Then I made a c file with the following:

#include <SDL/SDL.h>

void sdl_lisp_init(void)
  SDL_SetVideoMode( 640, 480, 16, SDL_HWSURFACE);

void sdl_lisp_quit(void)

And a corresponding lisp file:

(clines "void sdl_lisp_quit(void);")
(clines "void sdl_lisp_init(void);")

(defentry sdl-quit () (void "sdl_lisp_quit"))
(defentry sdl-lisp-init () (void "sdl_lisp_init"))

And then I made a saved_ansi_gcl that included the .o from the C-file in

>   *hm* I wonder how CL-SDL works in comparison - or if, its possible
>   to port CL-UFFI to gcl. UFFI and SDL might offer a way to port my
>   game to other platforms.

The first thing I tried was to use UFFI and CL-SDL, and I also wondered if
it was possible to port it. There really should be an ANSI-standard for ffi,
but I suppose it would be pretty much impossible to create something
portable across all common lisp systems.

The sad thing is that it took days for me to get to the point where I'm
able to just create a SDL-windows in common lisp. I think I will use
Guile for development (in Guile it's trivial) instead and port it to
GCL when I understand ffi better.

/Erik Andersson

reply via email to

[Prev in Thread] Current Thread [Next in Thread]