X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=gacela_FTGL.lisp;h=8fa2bd02fa625e9491fdf04b5ed1e5da2299a0f4;hb=4fe9bd9e78b0e3cee1133da2abcb05bc98322b31;hp=7e0b332c96dfaf0c02f34e067802797e3e05b0b3;hpb=725dbc52d30cf457f98fa4e0e5bf1051da09d1b9;p=gacela.git diff --git a/gacela_FTGL.lisp b/gacela_FTGL.lisp index 7e0b332..8fa2bd0 100644 --- a/gacela_FTGL.lisp +++ b/gacela_FTGL.lisp @@ -17,6 +17,16 @@ (in-package :gacela) +(defmacro mapcconst (type c-type name) + (let ((c-header (concatenate 'string c-type " gacela_" name " (void)")) + (c-body (concatenate 'string "return " name ";")) + (c-name (concatenate 'string "gacela_" name)) + (lisp-name (intern (string-upcase name)))) + `(progn + (defcfun ,c-header 0 ,c-body) + (defentry ,lisp-name () (,type ,c-name)) + (eval-when (load) (defconstant ,lisp-name (,lisp-name)))))) + (clines "#include ") (mapcconst int "int" "ft_encoding_unicode") @@ -35,7 +45,11 @@ (defcfun "void gacela_ftglRenderFont (int font, char *string, int mode)" 0 "ftglRenderFont (font, string, mode);") +(defcfun "void gacela_ftglDestroyFont (int font)" 0 + "ftglDestroyFont (font);") + (defentry ftglCreateTextureFont (string) (int "gacela_ftglCreateTextureFont")) (defentry ftglSetFontFaceSize (int int int) (int "gacela_ftglSetFontFaceSize")) (defentry ftglSetFontCharMap (int int) (int "gacela_ftglSetFontCharMap")) (defentry ftglRenderFont (int string int) (void "gacela_ftglRenderFont")) +(defentry ftglDestroyFont (int) (void "gacela_ftglDestroyFont"))