How can we get an optimized surface in cl-sdl2?

oleg harput olegharput at gmail.com
Mon Oct 26 05:16:24 UTC 2020


(let* ((SURFACE (sdl2:load-bmp
"/home/huseyin/quicklisp/local-projects/sdl2-made-easy/assets/gods.bmp"))

           (OPTIMIZED-SURFACE (sdl2:convert-surface SURFACE
sdl2:+pixelformat-


                                                               unknown+)))

as i understand, in order to get an optimized surface the second argument
of "sdl2:convert-surface" must be one of many constants in "constants.lisp"
file:

(defconstant +pixelformat-unknown+ sdl2-ffi:+sdl-pixelformat-unknown+)

(defconstant +pixelformat-index1lsb+ sdl2-ffi:+sdl-pixelformat-index1lsb+)

(defconstant +pixelformat-index1msb+ sdl2-ffi:+sdl-pixelformat-index1msb+)

...

Here i choosed the first one because i have no idea which one i must choose.

Is that enough in order to get an optimized surface in cl-sdl2?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20201026/54b13520/attachment.htm>


More information about the cffi-devel mailing list