blob: 5eaa5547482bdf297c0b44b14292fa9f9bd95188 [file] [log] [blame]
jtgafb833d1999-08-19 00:55:39 +00001/*
Brian Paul1bb327e2001-03-17 00:29:47 +00002** 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*/
jtgafb833d1999-08-19 00:55:39 +000029
Brian Paul1bb327e2001-03-17 00:29:47 +000030#ifndef __glu_h__
31#define __glu_h__
jtgafb833d1999-08-19 00:55:39 +000032
Karl Schultz80d58552001-09-20 22:19:41 +000033#if defined(USE_MGL_NAMESPACE)
34#include "glu_mangle.h"
35#endif
36
Brian Paul1bb327e2001-03-17 00:29:47 +000037#include <GL/gl.h>
jtgafb833d1999-08-19 00:55:39 +000038
Brian Paul41771982002-08-27 21:47:31 +000039#ifndef GLAPIENTRY
40#define GLAPIENTRY
41#endif
42
43#ifndef GLAPI
44#define GLAPI
45#endif
46
jtgafb833d1999-08-19 00:55:39 +000047#ifdef __cplusplus
48extern "C" {
49#endif
50
Brian Paul1bb327e2001-03-17 00:29:47 +000051/*************************************************************/
jtgafb833d1999-08-19 00:55:39 +000052
Brian Paul1bb327e2001-03-17 00:29:47 +000053/* Extensions */
54#define GLU_EXT_object_space_tess 1
55#define GLU_EXT_nurbs_tessellator 1
56
57/* Boolean */
58#define GLU_FALSE 0
59#define GLU_TRUE 1
60
61/* Version */
62#define GLU_VERSION_1_1 1
63#define GLU_VERSION_1_2 1
64#define GLU_VERSION_1_3 1
65
66/* StringName */
67#define GLU_VERSION 100800
68#define GLU_EXTENSIONS 100801
69
70/* ErrorCode */
71#define GLU_INVALID_ENUM 100900
72#define GLU_INVALID_VALUE 100901
73#define GLU_OUT_OF_MEMORY 100902
74#define GLU_INVALID_OPERATION 100904
75
76/* NurbsDisplay */
77/* GLU_FILL */
78#define GLU_OUTLINE_POLYGON 100240
79#define GLU_OUTLINE_PATCH 100241
80
81/* NurbsCallback */
82#define GLU_NURBS_ERROR 100103
83#define GLU_ERROR 100103
84#define GLU_NURBS_BEGIN 100164
85#define GLU_NURBS_BEGIN_EXT 100164
86#define GLU_NURBS_VERTEX 100165
87#define GLU_NURBS_VERTEX_EXT 100165
88#define GLU_NURBS_NORMAL 100166
89#define GLU_NURBS_NORMAL_EXT 100166
90#define GLU_NURBS_COLOR 100167
91#define GLU_NURBS_COLOR_EXT 100167
92#define GLU_NURBS_TEXTURE_COORD 100168
93#define GLU_NURBS_TEX_COORD_EXT 100168
94#define GLU_NURBS_END 100169
95#define GLU_NURBS_END_EXT 100169
96#define GLU_NURBS_BEGIN_DATA 100170
97#define GLU_NURBS_BEGIN_DATA_EXT 100170
98#define GLU_NURBS_VERTEX_DATA 100171
99#define GLU_NURBS_VERTEX_DATA_EXT 100171
100#define GLU_NURBS_NORMAL_DATA 100172
101#define GLU_NURBS_NORMAL_DATA_EXT 100172
102#define GLU_NURBS_COLOR_DATA 100173
103#define GLU_NURBS_COLOR_DATA_EXT 100173
104#define GLU_NURBS_TEXTURE_COORD_DATA 100174
105#define GLU_NURBS_TEX_COORD_DATA_EXT 100174
106#define GLU_NURBS_END_DATA 100175
107#define GLU_NURBS_END_DATA_EXT 100175
108
109/* NurbsError */
110#define GLU_NURBS_ERROR1 100251
111#define GLU_NURBS_ERROR2 100252
112#define GLU_NURBS_ERROR3 100253
113#define GLU_NURBS_ERROR4 100254
114#define GLU_NURBS_ERROR5 100255
115#define GLU_NURBS_ERROR6 100256
116#define GLU_NURBS_ERROR7 100257
117#define GLU_NURBS_ERROR8 100258
118#define GLU_NURBS_ERROR9 100259
119#define GLU_NURBS_ERROR10 100260
120#define GLU_NURBS_ERROR11 100261
121#define GLU_NURBS_ERROR12 100262
122#define GLU_NURBS_ERROR13 100263
123#define GLU_NURBS_ERROR14 100264
124#define GLU_NURBS_ERROR15 100265
125#define GLU_NURBS_ERROR16 100266
126#define GLU_NURBS_ERROR17 100267
127#define GLU_NURBS_ERROR18 100268
128#define GLU_NURBS_ERROR19 100269
129#define GLU_NURBS_ERROR20 100270
130#define GLU_NURBS_ERROR21 100271
131#define GLU_NURBS_ERROR22 100272
132#define GLU_NURBS_ERROR23 100273
133#define GLU_NURBS_ERROR24 100274
134#define GLU_NURBS_ERROR25 100275
135#define GLU_NURBS_ERROR26 100276
136#define GLU_NURBS_ERROR27 100277
137#define GLU_NURBS_ERROR28 100278
138#define GLU_NURBS_ERROR29 100279
139#define GLU_NURBS_ERROR30 100280
140#define GLU_NURBS_ERROR31 100281
141#define GLU_NURBS_ERROR32 100282
142#define GLU_NURBS_ERROR33 100283
143#define GLU_NURBS_ERROR34 100284
144#define GLU_NURBS_ERROR35 100285
145#define GLU_NURBS_ERROR36 100286
146#define GLU_NURBS_ERROR37 100287
147
148/* NurbsProperty */
149#define GLU_AUTO_LOAD_MATRIX 100200
150#define GLU_CULLING 100201
151#define GLU_SAMPLING_TOLERANCE 100203
152#define GLU_DISPLAY_MODE 100204
153#define GLU_PARAMETRIC_TOLERANCE 100202
154#define GLU_SAMPLING_METHOD 100205
155#define GLU_U_STEP 100206
156#define GLU_V_STEP 100207
157#define GLU_NURBS_MODE 100160
158#define GLU_NURBS_MODE_EXT 100160
159#define GLU_NURBS_TESSELLATOR 100161
160#define GLU_NURBS_TESSELLATOR_EXT 100161
161#define GLU_NURBS_RENDERER 100162
162#define GLU_NURBS_RENDERER_EXT 100162
163
164/* NurbsSampling */
165#define GLU_OBJECT_PARAMETRIC_ERROR 100208
166#define GLU_OBJECT_PARAMETRIC_ERROR_EXT 100208
167#define GLU_OBJECT_PATH_LENGTH 100209
168#define GLU_OBJECT_PATH_LENGTH_EXT 100209
169#define GLU_PATH_LENGTH 100215
170#define GLU_PARAMETRIC_ERROR 100216
171#define GLU_DOMAIN_DISTANCE 100217
172
173/* NurbsTrim */
174#define GLU_MAP1_TRIM_2 100210
175#define GLU_MAP1_TRIM_3 100211
176
177/* QuadricDrawStyle */
178#define GLU_POINT 100010
179#define GLU_LINE 100011
180#define GLU_FILL 100012
181#define GLU_SILHOUETTE 100013
182
183/* QuadricCallback */
184/* GLU_ERROR */
185
186/* QuadricNormal */
187#define GLU_SMOOTH 100000
188#define GLU_FLAT 100001
189#define GLU_NONE 100002
190
191/* QuadricOrientation */
192#define GLU_OUTSIDE 100020
193#define GLU_INSIDE 100021
194
195/* TessCallback */
196#define GLU_TESS_BEGIN 100100
197#define GLU_BEGIN 100100
198#define GLU_TESS_VERTEX 100101
199#define GLU_VERTEX 100101
200#define GLU_TESS_END 100102
201#define GLU_END 100102
202#define GLU_TESS_ERROR 100103
203#define GLU_TESS_EDGE_FLAG 100104
204#define GLU_EDGE_FLAG 100104
205#define GLU_TESS_COMBINE 100105
206#define GLU_TESS_BEGIN_DATA 100106
207#define GLU_TESS_VERTEX_DATA 100107
208#define GLU_TESS_END_DATA 100108
209#define GLU_TESS_ERROR_DATA 100109
210#define GLU_TESS_EDGE_FLAG_DATA 100110
211#define GLU_TESS_COMBINE_DATA 100111
212
213/* TessContour */
214#define GLU_CW 100120
215#define GLU_CCW 100121
216#define GLU_INTERIOR 100122
217#define GLU_EXTERIOR 100123
218#define GLU_UNKNOWN 100124
219
220/* TessProperty */
221#define GLU_TESS_WINDING_RULE 100140
222#define GLU_TESS_BOUNDARY_ONLY 100141
223#define GLU_TESS_TOLERANCE 100142
224
225/* TessError */
226#define GLU_TESS_ERROR1 100151
227#define GLU_TESS_ERROR2 100152
228#define GLU_TESS_ERROR3 100153
229#define GLU_TESS_ERROR4 100154
230#define GLU_TESS_ERROR5 100155
231#define GLU_TESS_ERROR6 100156
232#define GLU_TESS_ERROR7 100157
233#define GLU_TESS_ERROR8 100158
234#define GLU_TESS_MISSING_BEGIN_POLYGON 100151
235#define GLU_TESS_MISSING_BEGIN_CONTOUR 100152
236#define GLU_TESS_MISSING_END_POLYGON 100153
237#define GLU_TESS_MISSING_END_CONTOUR 100154
238#define GLU_TESS_COORD_TOO_LARGE 100155
239#define GLU_TESS_NEED_COMBINE_CALLBACK 100156
240
241/* TessWinding */
242#define GLU_TESS_WINDING_ODD 100130
243#define GLU_TESS_WINDING_NONZERO 100131
244#define GLU_TESS_WINDING_POSITIVE 100132
245#define GLU_TESS_WINDING_NEGATIVE 100133
246#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134
247
248/*************************************************************/
Brian Paulf8860232000-07-11 14:11:04 +0000249
250
Brian Paul1bb327e2001-03-17 00:29:47 +0000251#ifdef __cplusplus
252class GLUnurbs;
253class GLUquadric;
254class GLUtesselator;
jtgafb833d1999-08-19 00:55:39 +0000255#else
Brian Paul1bb327e2001-03-17 00:29:47 +0000256typedef struct GLUnurbs GLUnurbs;
257typedef struct GLUquadric GLUquadric;
258typedef struct GLUtesselator GLUtesselator;
Brian Paul08f03742000-05-22 16:21:27 +0000259#endif
260
Brian Paulcd060fc2001-11-09 22:04:24 +0000261typedef GLUnurbs GLUnurbsObj;
262typedef GLUquadric GLUquadricObj;
263typedef GLUtesselator GLUtesselatorObj;
264typedef GLUtesselator GLUtriangulatorObj;
Brian Paul08f03742000-05-22 16:21:27 +0000265
Brian Paul1bb327e2001-03-17 00:29:47 +0000266#define GLU_TESS_MAX_COORD 1.0e150
jtgafb833d1999-08-19 00:55:39 +0000267
Brian Paul1bb327e2001-03-17 00:29:47 +0000268/* Internal convenience typedefs */
Karl Schultz445e3cb2001-09-21 20:39:03 +0000269typedef void (GLAPIENTRY *_GLUfuncptr)();
Brian Paula6f09fa1999-10-22 10:47:01 +0000270
Brian Paul04120f62001-09-14 22:19:18 +0000271GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb);
272GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess);
273GLAPI void GLAPIENTRY gluBeginSurface (GLUnurbs* nurb);
274GLAPI void GLAPIENTRY gluBeginTrim (GLUnurbs* nurb);
275GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
276GLAPI GLint GLAPIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
277GLAPI GLint GLAPIENTRY gluBuild2DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
278GLAPI GLint GLAPIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
279GLAPI 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);
280GLAPI GLint GLAPIENTRY gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
281GLAPI GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString);
282GLAPI void GLAPIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
283GLAPI void GLAPIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb);
284GLAPI void GLAPIENTRY gluDeleteQuadric (GLUquadric* quad);
285GLAPI void GLAPIENTRY gluDeleteTess (GLUtesselator* tess);
286GLAPI void GLAPIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
287GLAPI void GLAPIENTRY gluEndCurve (GLUnurbs* nurb);
288GLAPI void GLAPIENTRY gluEndPolygon (GLUtesselator* tess);
289GLAPI void GLAPIENTRY gluEndSurface (GLUnurbs* nurb);
290GLAPI void GLAPIENTRY gluEndTrim (GLUnurbs* nurb);
291GLAPI const GLubyte * GLAPIENTRY gluErrorString (GLenum error);
292GLAPI void GLAPIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
293GLAPI const GLubyte * GLAPIENTRY gluGetString (GLenum name);
294GLAPI void GLAPIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
295GLAPI void GLAPIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
296GLAPI void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
297GLAPI GLUnurbs* GLAPIENTRY gluNewNurbsRenderer (void);
298GLAPI GLUquadric* GLAPIENTRY gluNewQuadric (void);
299GLAPI GLUtesselator* GLAPIENTRY gluNewTess (void);
300GLAPI void GLAPIENTRY gluNextContour (GLUtesselator* tess, GLenum type);
301GLAPI void GLAPIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
302GLAPI void GLAPIENTRY gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
303GLAPI void GLAPIENTRY gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
304GLAPI void GLAPIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
305GLAPI void GLAPIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
306GLAPI 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);
307GLAPI void GLAPIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
308GLAPI void GLAPIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
309GLAPI void GLAPIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
310GLAPI void GLAPIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
311GLAPI GLint GLAPIENTRY gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ);
312GLAPI void GLAPIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
313GLAPI void GLAPIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
314GLAPI void GLAPIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
315GLAPI void GLAPIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
316GLAPI void GLAPIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
317GLAPI void GLAPIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
318GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
319GLAPI void GLAPIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
320GLAPI void GLAPIENTRY gluTessBeginContour (GLUtesselator* tess);
321GLAPI void GLAPIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
322GLAPI void GLAPIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
323GLAPI void GLAPIENTRY gluTessEndContour (GLUtesselator* tess);
324GLAPI void GLAPIENTRY gluTessEndPolygon (GLUtesselator* tess);
325GLAPI void GLAPIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
326GLAPI void GLAPIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
327GLAPI void GLAPIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
328GLAPI GLint GLAPIENTRY gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ);
Karl Schultz8674e702001-09-20 20:47:26 +0000329GLAPI 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);
jtgafb833d1999-08-19 00:55:39 +0000330
331#ifdef __cplusplus
332}
333#endif
334
Brian Paul1bb327e2001-03-17 00:29:47 +0000335#endif /* __glu_h__ */