Tizen 2.1 base
[sdk/emulator/qemu.git] / target-i386 / mesa_glu.h
1 /*
2 ** License Applicability. Except to the extent portions of this file are
3 ** made subject to an alternative license as permitted in the SGI Free
4 ** Software License B, Version 1.1 (the "License"), the contents of this
5 ** file are subject only to the provisions of the License. You may not use
6 ** this file except in compliance with the License. You may obtain a copy
7 ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
8 ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
9 ** 
10 ** http://oss.sgi.com/projects/FreeB
11 ** 
12 ** Note that, as provided in the License, the Software is distributed on an
13 ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
14 ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
15 ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
16 ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
17 ** 
18 ** Original Code. The Original Code is: OpenGL Sample Implementation,
19 ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
20 ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
21 ** Copyright in any portions created by third parties is as indicated
22 ** elsewhere herein. All Rights Reserved.
23 ** 
24 ** Additional Notice Provisions: This software was created using the
25 ** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
26 ** not been independently verified as being compliant with the OpenGL(R)
27 ** version 1.2.1 Specification.
28 */
29
30 #ifndef __glu_h__
31 #define __glu_h__
32
33 #if defined(USE_MGL_NAMESPACE)
34 #include "glu_mangle.h"
35 #endif
36
37 //#include <GL/gl.h>
38 #include "mesa_gl.h"
39
40 #ifndef GLAPIENTRY
41 #define GLAPIENTRY
42 #endif
43
44 #ifndef GLAPIENTRYP
45 #define GLAPIENTRYP GLAPIENTRY *
46 #endif
47
48 #ifdef GLAPI
49 #undef GLAPI
50 #endif
51
52 /* __WIN32__ */
53 #if !defined(__WIN32__) && (defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__))
54 #  define __WIN32__
55 #endif
56
57 /* GLAPI, part 1 (use WINGDIAPI, if defined) */
58 #if defined(__WIN32__) && defined(WINGDIAPI)
59 #  define GLAPI WINGDIAPI
60 #endif
61
62 #if !defined(GLAPI)
63 #  if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32)
64 #    define GLAPI __declspec(dllexport)
65 #  elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
66 #    define GLAPI __declspec(dllimport)
67 #  else /* for use with static link lib build of Win32 edition only */
68 #    define GLAPI extern
69 #  endif /* _STATIC_MESA support */
70
71 #endif
72
73 #ifndef GLAPI
74 #define GLAPI
75 #endif
76
77 #ifdef __cplusplus
78 extern "C" {
79 #endif
80
81 /*************************************************************/
82
83 /* Extensions */
84 #define GLU_EXT_object_space_tess          1
85 #define GLU_EXT_nurbs_tessellator          1
86
87 /* Boolean */
88 #define GLU_FALSE                          0
89 #define GLU_TRUE                           1
90
91 /* Version */
92 #define GLU_VERSION_1_1                    1
93 #define GLU_VERSION_1_2                    1
94 #define GLU_VERSION_1_3                    1
95
96 /* StringName */
97 #define GLU_VERSION                        100800
98 #define GLU_EXTENSIONS                     100801
99
100 /* ErrorCode */
101 #define GLU_INVALID_ENUM                   100900
102 #define GLU_INVALID_VALUE                  100901
103 #define GLU_OUT_OF_MEMORY                  100902
104 #define GLU_INCOMPATIBLE_GL_VERSION        100903
105 #define GLU_INVALID_OPERATION              100904
106
107 /* NurbsDisplay */
108 /*      GLU_FILL */
109 #define GLU_OUTLINE_POLYGON                100240
110 #define GLU_OUTLINE_PATCH                  100241
111
112 /* NurbsCallback */
113 #define GLU_NURBS_ERROR                    100103
114 #define GLU_ERROR                          100103
115 #define GLU_NURBS_BEGIN                    100164
116 #define GLU_NURBS_BEGIN_EXT                100164
117 #define GLU_NURBS_VERTEX                   100165
118 #define GLU_NURBS_VERTEX_EXT               100165
119 #define GLU_NURBS_NORMAL                   100166
120 #define GLU_NURBS_NORMAL_EXT               100166
121 #define GLU_NURBS_COLOR                    100167
122 #define GLU_NURBS_COLOR_EXT                100167
123 #define GLU_NURBS_TEXTURE_COORD            100168
124 #define GLU_NURBS_TEX_COORD_EXT            100168
125 #define GLU_NURBS_END                      100169
126 #define GLU_NURBS_END_EXT                  100169
127 #define GLU_NURBS_BEGIN_DATA               100170
128 #define GLU_NURBS_BEGIN_DATA_EXT           100170
129 #define GLU_NURBS_VERTEX_DATA              100171
130 #define GLU_NURBS_VERTEX_DATA_EXT          100171
131 #define GLU_NURBS_NORMAL_DATA              100172
132 #define GLU_NURBS_NORMAL_DATA_EXT          100172
133 #define GLU_NURBS_COLOR_DATA               100173
134 #define GLU_NURBS_COLOR_DATA_EXT           100173
135 #define GLU_NURBS_TEXTURE_COORD_DATA       100174
136 #define GLU_NURBS_TEX_COORD_DATA_EXT       100174
137 #define GLU_NURBS_END_DATA                 100175
138 #define GLU_NURBS_END_DATA_EXT             100175
139
140 /* NurbsError */
141 #define GLU_NURBS_ERROR1                   100251
142 #define GLU_NURBS_ERROR2                   100252
143 #define GLU_NURBS_ERROR3                   100253
144 #define GLU_NURBS_ERROR4                   100254
145 #define GLU_NURBS_ERROR5                   100255
146 #define GLU_NURBS_ERROR6                   100256
147 #define GLU_NURBS_ERROR7                   100257
148 #define GLU_NURBS_ERROR8                   100258
149 #define GLU_NURBS_ERROR9                   100259
150 #define GLU_NURBS_ERROR10                  100260
151 #define GLU_NURBS_ERROR11                  100261
152 #define GLU_NURBS_ERROR12                  100262
153 #define GLU_NURBS_ERROR13                  100263
154 #define GLU_NURBS_ERROR14                  100264
155 #define GLU_NURBS_ERROR15                  100265
156 #define GLU_NURBS_ERROR16                  100266
157 #define GLU_NURBS_ERROR17                  100267
158 #define GLU_NURBS_ERROR18                  100268
159 #define GLU_NURBS_ERROR19                  100269
160 #define GLU_NURBS_ERROR20                  100270
161 #define GLU_NURBS_ERROR21                  100271
162 #define GLU_NURBS_ERROR22                  100272
163 #define GLU_NURBS_ERROR23                  100273
164 #define GLU_NURBS_ERROR24                  100274
165 #define GLU_NURBS_ERROR25                  100275
166 #define GLU_NURBS_ERROR26                  100276
167 #define GLU_NURBS_ERROR27                  100277
168 #define GLU_NURBS_ERROR28                  100278
169 #define GLU_NURBS_ERROR29                  100279
170 #define GLU_NURBS_ERROR30                  100280
171 #define GLU_NURBS_ERROR31                  100281
172 #define GLU_NURBS_ERROR32                  100282
173 #define GLU_NURBS_ERROR33                  100283
174 #define GLU_NURBS_ERROR34                  100284
175 #define GLU_NURBS_ERROR35                  100285
176 #define GLU_NURBS_ERROR36                  100286
177 #define GLU_NURBS_ERROR37                  100287
178
179 /* NurbsProperty */
180 #define GLU_AUTO_LOAD_MATRIX               100200
181 #define GLU_CULLING                        100201
182 #define GLU_SAMPLING_TOLERANCE             100203
183 #define GLU_DISPLAY_MODE                   100204
184 #define GLU_PARAMETRIC_TOLERANCE           100202
185 #define GLU_SAMPLING_METHOD                100205
186 #define GLU_U_STEP                         100206
187 #define GLU_V_STEP                         100207
188 #define GLU_NURBS_MODE                     100160
189 #define GLU_NURBS_MODE_EXT                 100160
190 #define GLU_NURBS_TESSELLATOR              100161
191 #define GLU_NURBS_TESSELLATOR_EXT          100161
192 #define GLU_NURBS_RENDERER                 100162
193 #define GLU_NURBS_RENDERER_EXT             100162
194
195 /* NurbsSampling */
196 #define GLU_OBJECT_PARAMETRIC_ERROR        100208
197 #define GLU_OBJECT_PARAMETRIC_ERROR_EXT    100208
198 #define GLU_OBJECT_PATH_LENGTH             100209
199 #define GLU_OBJECT_PATH_LENGTH_EXT         100209
200 #define GLU_PATH_LENGTH                    100215
201 #define GLU_PARAMETRIC_ERROR               100216
202 #define GLU_DOMAIN_DISTANCE                100217
203
204 /* NurbsTrim */
205 #define GLU_MAP1_TRIM_2                    100210
206 #define GLU_MAP1_TRIM_3                    100211
207
208 /* QuadricDrawStyle */
209 #define GLU_POINT                          100010
210 #define GLU_LINE                           100011
211 #define GLU_FILL                           100012
212 #define GLU_SILHOUETTE                     100013
213
214 /* QuadricCallback */
215 /*      GLU_ERROR */
216
217 /* QuadricNormal */
218 #define GLU_SMOOTH                         100000
219 #define GLU_FLAT                           100001
220 #define GLU_NONE                           100002
221
222 /* QuadricOrientation */
223 #define GLU_OUTSIDE                        100020
224 #define GLU_INSIDE                         100021
225
226 /* TessCallback */
227 #define GLU_TESS_BEGIN                     100100
228 #define GLU_BEGIN                          100100
229 #define GLU_TESS_VERTEX                    100101
230 #define GLU_VERTEX                         100101
231 #define GLU_TESS_END                       100102
232 #define GLU_END                            100102
233 #define GLU_TESS_ERROR                     100103
234 #define GLU_TESS_EDGE_FLAG                 100104
235 #define GLU_EDGE_FLAG                      100104
236 #define GLU_TESS_COMBINE                   100105
237 #define GLU_TESS_BEGIN_DATA                100106
238 #define GLU_TESS_VERTEX_DATA               100107
239 #define GLU_TESS_END_DATA                  100108
240 #define GLU_TESS_ERROR_DATA                100109
241 #define GLU_TESS_EDGE_FLAG_DATA            100110
242 #define GLU_TESS_COMBINE_DATA              100111
243
244 /* TessContour */
245 #define GLU_CW                             100120
246 #define GLU_CCW                            100121
247 #define GLU_INTERIOR                       100122
248 #define GLU_EXTERIOR                       100123
249 #define GLU_UNKNOWN                        100124
250
251 /* TessProperty */
252 #define GLU_TESS_WINDING_RULE              100140
253 #define GLU_TESS_BOUNDARY_ONLY             100141
254 #define GLU_TESS_TOLERANCE                 100142
255
256 /* TessError */
257 #define GLU_TESS_ERROR1                    100151
258 #define GLU_TESS_ERROR2                    100152
259 #define GLU_TESS_ERROR3                    100153
260 #define GLU_TESS_ERROR4                    100154
261 #define GLU_TESS_ERROR5                    100155
262 #define GLU_TESS_ERROR6                    100156
263 #define GLU_TESS_ERROR7                    100157
264 #define GLU_TESS_ERROR8                    100158
265 #define GLU_TESS_MISSING_BEGIN_POLYGON     100151
266 #define GLU_TESS_MISSING_BEGIN_CONTOUR     100152
267 #define GLU_TESS_MISSING_END_POLYGON       100153
268 #define GLU_TESS_MISSING_END_CONTOUR       100154
269 #define GLU_TESS_COORD_TOO_LARGE           100155
270 #define GLU_TESS_NEED_COMBINE_CALLBACK     100156
271
272 /* TessWinding */
273 #define GLU_TESS_WINDING_ODD               100130
274 #define GLU_TESS_WINDING_NONZERO           100131
275 #define GLU_TESS_WINDING_POSITIVE          100132
276 #define GLU_TESS_WINDING_NEGATIVE          100133
277 #define GLU_TESS_WINDING_ABS_GEQ_TWO       100134
278
279 /*************************************************************/
280
281
282 #ifdef __cplusplus
283 class GLUnurbs;
284 class GLUquadric;
285 class GLUtesselator;
286 #else
287 typedef struct GLUnurbs GLUnurbs;
288 typedef struct GLUquadric GLUquadric;
289 typedef struct GLUtesselator GLUtesselator;
290 #endif
291
292 typedef GLUnurbs GLUnurbsObj;
293 typedef GLUquadric GLUquadricObj;
294 typedef GLUtesselator GLUtesselatorObj;
295 typedef GLUtesselator GLUtriangulatorObj;
296
297 #define GLU_TESS_MAX_COORD 1.0e150
298
299 /* Internal convenience typedefs */
300 typedef void (GLAPIENTRYP _GLUfuncptr)(void);
301
302 GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb);
303 GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess);
304 GLAPI void GLAPIENTRY gluBeginSurface (GLUnurbs* nurb);
305 GLAPI void GLAPIENTRY gluBeginTrim (GLUnurbs* nurb);
306 GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
307 GLAPI GLint GLAPIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
308 GLAPI GLint GLAPIENTRY gluBuild2DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
309 GLAPI GLint GLAPIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
310 GLAPI GLint GLAPIENTRY gluBuild3DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
311 GLAPI GLint GLAPIENTRY gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
312 GLAPI GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString);
313 GLAPI void GLAPIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
314 GLAPI void GLAPIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb);
315 GLAPI void GLAPIENTRY gluDeleteQuadric (GLUquadric* quad);
316 GLAPI void GLAPIENTRY gluDeleteTess (GLUtesselator* tess);
317 GLAPI void GLAPIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
318 GLAPI void GLAPIENTRY gluEndCurve (GLUnurbs* nurb);
319 GLAPI void GLAPIENTRY gluEndPolygon (GLUtesselator* tess);
320 GLAPI void GLAPIENTRY gluEndSurface (GLUnurbs* nurb);
321 GLAPI void GLAPIENTRY gluEndTrim (GLUnurbs* nurb);
322 GLAPI const GLubyte * GLAPIENTRY gluErrorString (GLenum error);
323 GLAPI void GLAPIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
324 GLAPI const GLubyte * GLAPIENTRY gluGetString (GLenum name);
325 GLAPI void GLAPIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
326 GLAPI void GLAPIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
327 GLAPI void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
328 GLAPI GLUnurbs* GLAPIENTRY gluNewNurbsRenderer (void);
329 GLAPI GLUquadric* GLAPIENTRY gluNewQuadric (void);
330 GLAPI GLUtesselator* GLAPIENTRY gluNewTess (void);
331 GLAPI void GLAPIENTRY gluNextContour (GLUtesselator* tess, GLenum type);
332 GLAPI void GLAPIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
333 GLAPI void GLAPIENTRY gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
334 GLAPI void GLAPIENTRY gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
335 GLAPI void GLAPIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
336 GLAPI void GLAPIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
337 GLAPI void GLAPIENTRY gluNurbsSurface (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type);
338 GLAPI void GLAPIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
339 GLAPI void GLAPIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
340 GLAPI void GLAPIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
341 GLAPI void GLAPIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
342 GLAPI GLint GLAPIENTRY gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ);
343 GLAPI void GLAPIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
344 GLAPI void GLAPIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
345 GLAPI void GLAPIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
346 GLAPI void GLAPIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
347 GLAPI void GLAPIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
348 GLAPI void GLAPIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
349 GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
350 GLAPI void GLAPIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
351 GLAPI void GLAPIENTRY gluTessBeginContour (GLUtesselator* tess);
352 GLAPI void GLAPIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
353 GLAPI void GLAPIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
354 GLAPI void GLAPIENTRY gluTessEndContour (GLUtesselator* tess);
355 GLAPI void GLAPIENTRY gluTessEndPolygon (GLUtesselator* tess);
356 GLAPI void GLAPIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
357 GLAPI void GLAPIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
358 GLAPI void GLAPIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
359 GLAPI GLint GLAPIENTRY gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ);
360 GLAPI GLint GLAPIENTRY gluUnProject4 (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble nearVal, GLdouble farVal, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW);
361
362 #ifdef __cplusplus
363 }
364 #endif
365
366 #endif /* __glu_h__ */