Trivial fix of WITH-IMAGES.
[cl-devil.git] / ilut.lisp
blob0a28a02bb56d633f66443d3116820d833cafd828
1 ;;;; cl-devil -- DevIL binding for CL. See README for licensing information.
3 (in-package :ilut)
5 (define-foreign-library ilut
6 (:unix (:or "libILUT" "libILUT.so.1"))
7 (t (:default "libILUT")))
8 (use-foreign-library ilut)
10 (defcenum state-definition
11 (:palette-mode #x0600)
12 (:opengl-conv #x0610)
13 (:d3d-miplevels #x0620)
14 (:maxtex-width #x0630)
15 (:maxtex-height #x0631)
16 (:maxtex-depth #x0632)
17 (:gl-use-s3tc #x0634)
18 (:d3d-use-dxtc #x0634)
19 (:gl-gen-s3tc #x0635)
20 (:d3d-gen-dxtc #x0635)
21 (:s3tc-format #x0705)
22 (:dxtc-format #x0705)
23 (:d3d-pool #x0706)
24 (:d3d-alpha-key-color #x0707)
25 (:d3d-alpha-key-colour #x0707))
27 (defcenum renderer
28 (:opengl 0)
29 (:allegro 1)
30 (:win32 2)
31 (:direct3d8 3)
32 (:direct3d9 4))
34 (defcfun ("ilutRenderer" renderer) :boolean (renderer renderer))
35 (defcfun ("ilutEnable" enable) :boolean (state state-definition))
36 (defcfun ("ilutDisable" disable) :boolean (state state-definition))
37 (defcfun ("ilutGetBoolean" get-boolean) :boolean (state state-definition))
38 ;;; OpenGL
39 (defcfun ("ilutGLBindTexImage" gl-bind-tex-image) :uint)
40 (defcfun ("ilutGLBindMipmaps" gl-bind-mipmaps) :uint)
41 (defcfun ("ilutGLBuildMipmaps" gl-build-mipmaps) :boolean)
42 (defcfun ("ilutGLLoadImage" gl-load-image) :uint (file-name :string))
43 (defcfun ("ilutGLScreen" gl-screen) :boolean)
44 (defcfun ("ilutGLScreenie" gl-screenie) :boolean)
45 (defcfun ("ilutGLSaveImage" gl-save-image) :boolean (file-name :string) (tex-id :uint))
46 (defcfun ("ilutGLSetTex" gl-set-tex) :boolean (tex-id :uint))
47 (defcfun ("ilutGLTexImage" gl-tex-image) :boolean (level :uint))
48 (defcfun ("ilutGLSubTex" gl-sub-tex) :boolean (tex-id :uint) (x-offset :uint) (y-offset :uint))
49 ;;; SDL
50 (defcfun ("ilutConvertToSDLSurface" convert-to-sdl-surface) :pointer (flags :uint))
51 (defcfun ("ilutSDLSurfaceLoadImage" sdl-surface-load-image) :pointer (file-name :string))
52 (defcfun ("ilutSDLSurfaceFromBitmap" sdl-surface-from-bitmap) :boolean (surface :pointer))