Bill's coming back online merge. API breaking changes!
[cl-glfw.git] / lib / glu.lisp
blob70ca6cba70c5d4d3defc21e5538462cbffdc7c25
1 (defpackage #:cl-glfw-openglu
2 (:use #:cl-glfw-types #:cffi #:cl)
3 (:shadowing-import-from #:cl-glfw-types #:boolean #:byte #:float #:char #:string)
4 (:nicknames #:cl-glfw-glu #:openglu #:glu)
5 (:export #:boolean #:double #:enum #:float #:int #:sizei +ext-object-space-tess+ +ext-nurbs-tessellator+ +false+ +true+ +version-1-1+ +version-1-2+ +version-1-3+ +version+ +extensions+ +invalid-enum+ +invalid-value+ +out-of-memory+ +incompatible-gl-version+ +invalid-operation+ +outline-polygon+ +outline-patch+ +nurbs-error+ +error+ +nurbs-begin+ +nurbs-begin-ext+ +nurbs-vertex+ +nurbs-vertex-ext+ +nurbs-normal+ +nurbs-normal-ext+ +nurbs-color+ +nurbs-color-ext+ +nurbs-texture-coord+ +nurbs-tex-coord-ext+ +nurbs-end+ +nurbs-end-ext+ +nurbs-begin-data+ +nurbs-begin-data-ext+ +nurbs-vertex-data+ +nurbs-vertex-data-ext+ +nurbs-normal-data+ +nurbs-normal-data-ext+ +nurbs-color-data+ +nurbs-color-data-ext+ +nurbs-texture-coord-data+ +nurbs-tex-coord-data-ext+ +nurbs-end-data+ +nurbs-end-data-ext+ +nurbs-error-1+ +nurbs-error-2+ +nurbs-error-3+ +nurbs-error-4+ +nurbs-error-5+ +nurbs-error-6+ +nurbs-error-7+ +nurbs-error-8+ +nurbs-error-9+ +nurbs-error-10+ +nurbs-error-11+ +nurbs-error-12+ +nurbs-error-13+ +nurbs-error-14+ +nurbs-error-15+ +nurbs-error-16+ +nurbs-error-17+ +nurbs-error-18+ +nurbs-error-19+ +nurbs-error-20+ +nurbs-error-21+ +nurbs-error-22+ +nurbs-error-23+ +nurbs-error-24+ +nurbs-error-25+ +nurbs-error-26+ +nurbs-error-27+ +nurbs-error-28+ +nurbs-error-29+ +nurbs-error-30+ +nurbs-error-31+ +nurbs-error-32+ +nurbs-error-33+ +nurbs-error-34+ +nurbs-error-35+ +nurbs-error-36+ +nurbs-error-37+ +auto-load-matrix+ +culling+ +sampling-tolerance+ +display-mode+ +parametric-tolerance+ +sampling-method+ +u-step+ +v-step+ +nurbs-mode+ +nurbs-mode-ext+ +nurbs-tessellator+ +nurbs-tessellator-ext+ +nurbs-renderer+ +nurbs-renderer-ext+ +object-parametric-error+ +object-parametric-error-ext+ +object-path-length+ +object-path-length-ext+ +path-length+ +parametric-error+ +domain-distance+ +map-1-trim-2+ +map-1-trim-3+ +point+ +line+ +fill+ +silhouette+ +smooth+ +flat+ +none+ +outside+ +inside+ +tess-begin+ +begin+ +tess-vertex+ +vertex+ +tess-end+ +end+ +tess-error+ +tess-edge-flag+ +edge-flag+ +tess-combine+ +tess-begin-data+ +tess-vertex-data+ +tess-end-data+ +tess-error-data+ +tess-edge-flag-data+ +tess-combine-data+ +cw+ +ccw+ +interior+ +exterior+ +unknown+ +tess-winding-rule+ +tess-boundary-only+ +tess-tolerance+ +tess-error-1+ +tess-error-2+ +tess-error-3+ +tess-error-4+ +tess-error-5+ +tess-error-6+ +tess-error-7+ +tess-error-8+ +tess-missing-begin-polygon+ +tess-missing-begin-contour+ +tess-missing-end-polygon+ +tess-missing-end-contour+ +tess-coord-too-large+ +tess-need-combine-callback+ +tess-winding-odd+ +tess-winding-nonzero+ +tess-winding-positive+ +tess-winding-negative+ +tess-winding-abs-geq-two+ +tess-max-coord+ begin-curve begin-polygon begin-surface begin-trim build-1d-mipmap-levels build-1d-mipmaps build-2d-mipmap-levels build-2d-mipmaps build-3d-mipmap-levels build-3d-mipmaps check-extension cylinder delete-nurbs-renderer delete-quadric delete-tess disk end-curve end-polygon end-surface end-trim error-string get-nurbs-property get-string get-tess-property load-sampling-matrices look-at new-nurbs-renderer new-quadric new-tess next-contour nurbs-callback nurbs-callback-data nurbs-callback-dataext nurbs-curve nurbs-property nurbs-surface ortho-2d partial-disk perspective pick-matrix project pwl-curve quadric-callback quadric-draw-style quadric-normals quadric-orientation quadric-texture scale-image sphere tess-begin-contour tess-begin-polygon tess-callback tess-end-contour tess-end-polygon tess-normal tess-property tess-vertex un-project un-project-4))
7 (in-package #:cl-glfw-glu)
9 (ignore-errors
10 (load-foreign-library '(:or "glu32.dll"
11 (:default "libGLU")
12 (:default "openglu")
13 (:default "GLU")
14 (:default "glu")
15 (:default "openglu32")
16 (:default "glu32")
17 "libGLU.so.1")))
18 ;; Extensions
19 (defconstant +ext-object-space-tess+ 1)
20 (defconstant +ext-nurbs-tessellator+ 1)
21 ;; Boolean
22 (defconstant +false+ 0)
23 (defconstant +true+ 1)
24 ;; Version
25 (defconstant +version-1-1+ 1)
26 (defconstant +version-1-2+ 1)
27 (defconstant +version-1-3+ 1)
28 ;; StringName
29 (defconstant +version+ 100800)
30 (defconstant +extensions+ 100801)
31 ;; ErrorCode
32 (defconstant +invalid-enum+ 100900)
33 (defconstant +invalid-value+ 100901)
34 (defconstant +out-of-memory+ 100902)
35 (defconstant +incompatible-gl-version+ 100903)
36 (defconstant +invalid-operation+ 100904)
37 ;; NurbsDisplay
38 ;; GLU_FILL
39 (defconstant +outline-polygon+ 100240)
40 (defconstant +outline-patch+ 100241)
41 ;; NurbsCallback
42 (defconstant +nurbs-error+ 100103)
43 (defconstant +error+ 100103)
44 (defconstant +nurbs-begin+ 100164)
45 (defconstant +nurbs-begin-ext+ 100164)
46 (defconstant +nurbs-vertex+ 100165)
47 (defconstant +nurbs-vertex-ext+ 100165)
48 (defconstant +nurbs-normal+ 100166)
49 (defconstant +nurbs-normal-ext+ 100166)
50 (defconstant +nurbs-color+ 100167)
51 (defconstant +nurbs-color-ext+ 100167)
52 (defconstant +nurbs-texture-coord+ 100168)
53 (defconstant +nurbs-tex-coord-ext+ 100168)
54 (defconstant +nurbs-end+ 100169)
55 (defconstant +nurbs-end-ext+ 100169)
56 (defconstant +nurbs-begin-data+ 100170)
57 (defconstant +nurbs-begin-data-ext+ 100170)
58 (defconstant +nurbs-vertex-data+ 100171)
59 (defconstant +nurbs-vertex-data-ext+ 100171)
60 (defconstant +nurbs-normal-data+ 100172)
61 (defconstant +nurbs-normal-data-ext+ 100172)
62 (defconstant +nurbs-color-data+ 100173)
63 (defconstant +nurbs-color-data-ext+ 100173)
64 (defconstant +nurbs-texture-coord-data+ 100174)
65 (defconstant +nurbs-tex-coord-data-ext+ 100174)
66 (defconstant +nurbs-end-data+ 100175)
67 (defconstant +nurbs-end-data-ext+ 100175)
68 ;; NurbsError
69 (defconstant +nurbs-error-1+ 100251)
70 (defconstant +nurbs-error-2+ 100252)
71 (defconstant +nurbs-error-3+ 100253)
72 (defconstant +nurbs-error-4+ 100254)
73 (defconstant +nurbs-error-5+ 100255)
74 (defconstant +nurbs-error-6+ 100256)
75 (defconstant +nurbs-error-7+ 100257)
76 (defconstant +nurbs-error-8+ 100258)
77 (defconstant +nurbs-error-9+ 100259)
78 (defconstant +nurbs-error-10+ 100260)
79 (defconstant +nurbs-error-11+ 100261)
80 (defconstant +nurbs-error-12+ 100262)
81 (defconstant +nurbs-error-13+ 100263)
82 (defconstant +nurbs-error-14+ 100264)
83 (defconstant +nurbs-error-15+ 100265)
84 (defconstant +nurbs-error-16+ 100266)
85 (defconstant +nurbs-error-17+ 100267)
86 (defconstant +nurbs-error-18+ 100268)
87 (defconstant +nurbs-error-19+ 100269)
88 (defconstant +nurbs-error-20+ 100270)
89 (defconstant +nurbs-error-21+ 100271)
90 (defconstant +nurbs-error-22+ 100272)
91 (defconstant +nurbs-error-23+ 100273)
92 (defconstant +nurbs-error-24+ 100274)
93 (defconstant +nurbs-error-25+ 100275)
94 (defconstant +nurbs-error-26+ 100276)
95 (defconstant +nurbs-error-27+ 100277)
96 (defconstant +nurbs-error-28+ 100278)
97 (defconstant +nurbs-error-29+ 100279)
98 (defconstant +nurbs-error-30+ 100280)
99 (defconstant +nurbs-error-31+ 100281)
100 (defconstant +nurbs-error-32+ 100282)
101 (defconstant +nurbs-error-33+ 100283)
102 (defconstant +nurbs-error-34+ 100284)
103 (defconstant +nurbs-error-35+ 100285)
104 (defconstant +nurbs-error-36+ 100286)
105 (defconstant +nurbs-error-37+ 100287)
106 ;; NurbsProperty
107 (defconstant +auto-load-matrix+ 100200)
108 (defconstant +culling+ 100201)
109 (defconstant +sampling-tolerance+ 100203)
110 (defconstant +display-mode+ 100204)
111 (defconstant +parametric-tolerance+ 100202)
112 (defconstant +sampling-method+ 100205)
113 (defconstant +u-step+ 100206)
114 (defconstant +v-step+ 100207)
115 (defconstant +nurbs-mode+ 100160)
116 (defconstant +nurbs-mode-ext+ 100160)
117 (defconstant +nurbs-tessellator+ 100161)
118 (defconstant +nurbs-tessellator-ext+ 100161)
119 (defconstant +nurbs-renderer+ 100162)
120 (defconstant +nurbs-renderer-ext+ 100162)
121 ;; NurbsSampling
122 (defconstant +object-parametric-error+ 100208)
123 (defconstant +object-parametric-error-ext+ 100208)
124 (defconstant +object-path-length+ 100209)
125 (defconstant +object-path-length-ext+ 100209)
126 (defconstant +path-length+ 100215)
127 (defconstant +parametric-error+ 100216)
128 (defconstant +domain-distance+ 100217)
129 ;; NurbsTrim
130 (defconstant +map-1-trim-2+ 100210)
131 (defconstant +map-1-trim-3+ 100211)
132 ;; QuadricDrawStyle
133 (defconstant +point+ 100010)
134 (defconstant +line+ 100011)
135 (defconstant +fill+ 100012)
136 (defconstant +silhouette+ 100013)
137 ;; QuadricCallback
138 ;; GLU_ERROR
139 ;; QuadricNormal
140 (defconstant +smooth+ 100000)
141 (defconstant +flat+ 100001)
142 (defconstant +none+ 100002)
143 ;; QuadricOrientation
144 (defconstant +outside+ 100020)
145 (defconstant +inside+ 100021)
146 ;; TessCallback
147 (defconstant +tess-begin+ 100100)
148 (defconstant +begin+ 100100)
149 (defconstant +tess-vertex+ 100101)
150 (defconstant +vertex+ 100101)
151 (defconstant +tess-end+ 100102)
152 (defconstant +end+ 100102)
153 (defconstant +tess-error+ 100103)
154 (defconstant +tess-edge-flag+ 100104)
155 (defconstant +edge-flag+ 100104)
156 (defconstant +tess-combine+ 100105)
157 (defconstant +tess-begin-data+ 100106)
158 (defconstant +tess-vertex-data+ 100107)
159 (defconstant +tess-end-data+ 100108)
160 (defconstant +tess-error-data+ 100109)
161 (defconstant +tess-edge-flag-data+ 100110)
162 (defconstant +tess-combine-data+ 100111)
163 ;; TessContour
164 (defconstant +cw+ 100120)
165 (defconstant +ccw+ 100121)
166 (defconstant +interior+ 100122)
167 (defconstant +exterior+ 100123)
168 (defconstant +unknown+ 100124)
169 ;; TessProperty
170 (defconstant +tess-winding-rule+ 100140)
171 (defconstant +tess-boundary-only+ 100141)
172 (defconstant +tess-tolerance+ 100142)
173 ;; TessError
174 (defconstant +tess-error-1+ 100151)
175 (defconstant +tess-error-2+ 100152)
176 (defconstant +tess-error-3+ 100153)
177 (defconstant +tess-error-4+ 100154)
178 (defconstant +tess-error-5+ 100155)
179 (defconstant +tess-error-6+ 100156)
180 (defconstant +tess-error-7+ 100157)
181 (defconstant +tess-error-8+ 100158)
182 (defconstant +tess-missing-begin-polygon+ 100151)
183 (defconstant +tess-missing-begin-contour+ 100152)
184 (defconstant +tess-missing-end-polygon+ 100153)
185 (defconstant +tess-missing-end-contour+ 100154)
186 (defconstant +tess-coord-too-large+ 100155)
187 (defconstant +tess-need-combine-callback+ 100156)
188 ;; TessWinding
189 (defconstant +tess-winding-odd+ 100130)
190 (defconstant +tess-winding-nonzero+ 100131)
191 (defconstant +tess-winding-positive+ 100132)
192 (defconstant +tess-winding-negative+ 100133)
193 (defconstant +tess-winding-abs-geq-two+ 100134)
194 ;; ***********************************************************
195 (defconstant +tess-max-coord+ 1.0d150)
197 (defcfun ("gluBeginCurve" begin-curve) :void (nurb :pointer))
198 (defcfun ("gluBeginSurface" begin-surface) :void (nurb :pointer))
199 (defcfun ("gluBeginTrim" begin-trim) :void (nurb :pointer))
200 (defcfun ("gluBuild1DMipmaps" build-1d-mipmaps) int (target enum) (internalFormat int) (width sizei) (format enum) (type enum) (data :pointer))
201 (defcfun ("gluBuild2DMipmaps" build-2d-mipmaps) int (target enum) (internalFormat int) (width sizei) (height sizei) (format enum) (type enum) (data :pointer))
202 (defcfun ("gluCylinder" cylinder) :void (quad :pointer) (base double) (top double) (height double) (slices int) (stacks int))
203 (defcfun ("gluDeleteNurbsRenderer" delete-nurbs-renderer) :void (nurb :pointer))
204 (defcfun ("gluDeleteQuadric" delete-quadric) :void (quad :pointer))
205 (defcfun ("gluDisk" disk) :void (quad :pointer) (inner double) (outer double) (slices int) (loops int))
206 (defcfun ("gluEndCurve" end-curve) :void (nurb :pointer))
207 (defcfun ("gluEndSurface" end-surface) :void (nurb :pointer))
208 (defcfun ("gluEndTrim" end-trim) :void (nurb :pointer))
209 (defcfun ("gluErrorString" error-string) :pointer (error enum))
210 (defcfun ("gluGetNurbsProperty" get-nurbs-property) :void (nurb :pointer) (property enum) (data :pointer))
211 (defcfun ("gluLoadSamplingMatrices" load-sampling-matrices) :void (nurb :pointer) (model :pointer) (perspective :pointer) (view :pointer))
212 (defcfun ("gluLookAt" look-at) :void (eyeX double) (eyeY double) (eyeZ double) (centerX double) (centerY double) (centerZ double) (upX double) (upY double) (upZ double))
213 (defcfun ("gluNewNurbsRenderer" new-nurbs-renderer) :pointer )
214 (defcfun ("gluNewQuadric" new-quadric) :pointer )
215 (defcfun ("gluNurbsCurve" nurbs-curve) :void (nurb :pointer) (knotCount int) (knots :pointer) (stride int) (control :pointer) (order int) (type enum))
216 (defcfun ("gluNurbsProperty" nurbs-property) :void (nurb :pointer) (property enum) (value float))
217 (defcfun ("gluNurbsSurface" nurbs-surface) :void (nurb :pointer) (sKnotCount int) (sKnots :pointer) (tKnotCount int) (tKnots :pointer) (sStride int) (tStride int) (control :pointer) (sOrder int) (tOrder int) (type enum))
218 (defcfun ("gluOrtho2D" ortho-2d) :void (left double) (right double) (bottom double) (top double))
219 (defcfun ("gluPartialDisk" partial-disk) :void (quad :pointer) (inner double) (outer double) (slices int) (loops int) (start double) (sweep double))
220 (defcfun ("gluPerspective" perspective) :void (fovy double) (aspect double) (zNear double) (zFar double))
221 (defcfun ("gluPickMatrix" pick-matrix) :void (x double) (y double) (delX double) (delY double) (viewport :pointer))
222 (defcfun ("gluProject" project) int (objX double) (objY double) (objZ double) (model :pointer) (proj :pointer) (view :pointer) (winX :pointer) (winY :pointer) (winZ :pointer))
223 (defcfun ("gluPwlCurve" pwl-curve) :void (nurb :pointer) (count int) (data :pointer) (stride int) (type enum))
224 (defcfun ("gluQuadricCallback" quadric-callback) :void (quad :pointer) (which enum) (CallBackFunc :pointer))
225 (defcfun ("gluQuadricDrawStyle" quadric-draw-style) :void (quad :pointer) (draw enum))
226 (defcfun ("gluQuadricNormals" quadric-normals) :void (quad :pointer) (normal enum))
227 (defcfun ("gluQuadricOrientation" quadric-orientation) :void (quad :pointer) (orientation enum))
228 (defcfun ("gluQuadricTexture" quadric-texture) :void (quad :pointer) (texture boolean))
229 (defcfun ("gluSphere" sphere) :void (quad :pointer) (radius double) (slices int) (stacks int))
230 (defcfun ("gluUnProject" un-project) int (winX double) (winY double) (winZ double) (model :pointer) (proj :pointer) (view :pointer) (objX :pointer) (objY :pointer) (objZ :pointer))