2019-03-22 21:21:26 +03:00
|
|
|
(not-on-windows
|
|
|
|
(system-include "SDL2/SDL_image.h")
|
2019-06-14 11:46:15 +03:00
|
|
|
(add-pkg "SDL2_image"))
|
2017-06-26 12:15:03 +03:00
|
|
|
|
2019-03-22 21:21:26 +03:00
|
|
|
(defmodule IMG
|
|
|
|
(defmodule Windows
|
|
|
|
(defdynamic header-path "C:\\SDL2_image-2.0.4\\include")
|
|
|
|
(defdynamic library-path "C:\\SDL2_image-2.0.4\\lib\\x86\\")))
|
|
|
|
|
|
|
|
(windows-only
|
|
|
|
(system-include "SDL_image.h")
|
|
|
|
(add-cflag (str "-I" IMG.Windows.header-path))
|
|
|
|
(add-lib (str "/link " IMG.Windows.library-path "SDL2_image.lib ")))
|
2019-03-22 21:12:33 +03:00
|
|
|
|
2018-03-20 14:49:46 +03:00
|
|
|
(defmodule IMG
|
|
|
|
(register load-texture (Fn [(Ptr SDL_Renderer) (Ptr Char)] (Ptr SDL_Texture)) "IMG_LoadTexture")
|
|
|
|
(register load (Fn [(Ptr Char)] (Ptr SDL_Surface)) "IMG_Load")
|
|
|
|
)
|