blob: 249e37d16c59a25b938020c83970f35384a5540c [file] [log] [blame]
Brian Paul08f03742000-05-22 16:21:27 +00001/* $Id: glu.h,v 1.20 2000/05/22 16:21:27 brianp Exp $ */
jtgafb833d1999-08-19 00:55:39 +00002
3/*
4 * Mesa 3-D graphics library
Brian Paulfbd8f211999-11-11 01:22:25 +00005 * Version: 3.3
6 *
jtgafb833d1999-08-19 00:55:39 +00007 * Copyright (C) 1995-1999 Brian Paul
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Library General Public License for more details.
18 *
19 * You should have received a copy of the GNU Library General Public
20 * License along with this library; if not, write to the Free
21 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 */
23
24
Brian Paule23e2751999-11-15 14:26:07 +000025#ifndef __glu_h__
26#define __glu_h__
jtgafb833d1999-08-19 00:55:39 +000027
28
29#if defined(USE_MGL_NAMESPACE)
30#include "glu_mangle.h"
31#endif
32
Brian Paul9331b671999-11-23 22:41:10 +000033#include "GL/gl.h"
34
jtgafb833d1999-08-19 00:55:39 +000035
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40
jtgafb833d1999-08-19 00:55:39 +000041 /* to facilitate clean DLL building ... */
42#if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN32__))
43# if defined(_MSC_VER) && defined(BUILD_GLU32) /* tag specify we're building mesa as a DLL */
44# define GLUAPI __declspec(dllexport)
45# elif defined(_MSC_VER) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
46# define GLUAPI __declspec(dllimport)
47# else /* for use with static link lib build of Win32 edition only */
48# define GLUAPI extern
49# endif /* _STATIC_MESA support */
Brian Paul08f03742000-05-22 16:21:27 +000050# define GLCALLBACK __stdcall
51# define GLCALLBACKP __stdcall *
jtgafb833d1999-08-19 00:55:39 +000052#else
53# define GLUAPI extern
Brian Paul08f03742000-05-22 16:21:27 +000054# define GLCALLBACK
55# define GLCALLBACKP *
jtgafb833d1999-08-19 00:55:39 +000056#endif /* WIN32 / CYGWIN32 bracket */
57
Brian Paul08f03742000-05-22 16:21:27 +000058/* compatability guard so we don't need to change client code */
59#if defined(_WIN32) && !defined(_WINDEF_) && !defined(_GNU_H_WINDOWS32_BASE) && !defined(OPENSTEP)
60# define CALLBACK GLCALLBACK
61#endif
62
63
64
jtgafb833d1999-08-19 00:55:39 +000065#ifdef macintosh
66 #pragma enumsalwaysint on
67 #if PRAGMA_IMPORT_SUPPORTED
68 #pragma import on
69 #endif
70#endif
71
Brian Paula6f09fa1999-10-22 10:47:01 +000072#ifndef GLUAPI
73#define GLUAPI
74#endif
75
76#ifndef GLAPIENTRY
77#define GLAPIENTRY
78#endif
79
80#ifndef GLCALLBACK
81#define GLCALLBACK
82#endif
83
jtgafb833d1999-08-19 00:55:39 +000084
Brian Paulfbd8f211999-11-11 01:22:25 +000085#define GLU_VERSION_1_1 1
86#define GLU_VERSION_1_2 1
jtgafb833d1999-08-19 00:55:39 +000087
88
Brian Paulfbd8f211999-11-11 01:22:25 +000089#define GLU_TRUE 1
90#define GLU_FALSE 0
jtgafb833d1999-08-19 00:55:39 +000091
92
Brian Paulfbd8f211999-11-11 01:22:25 +000093/* Normal vectors */
94#define GLU_SMOOTH 100000
95#define GLU_FLAT 100001
96#define GLU_NONE 100002
jtgafb833d1999-08-19 00:55:39 +000097
Brian Paulfbd8f211999-11-11 01:22:25 +000098/* Quadric draw styles */
99#define GLU_POINT 100010
100#define GLU_LINE 100011
101#define GLU_FILL 100012
102#define GLU_SILHOUETTE 100013
jtgafb833d1999-08-19 00:55:39 +0000103
Brian Paulfbd8f211999-11-11 01:22:25 +0000104/* Quadric orientation */
105#define GLU_OUTSIDE 100020
106#define GLU_INSIDE 100021
jtgafb833d1999-08-19 00:55:39 +0000107
Brian Paulfbd8f211999-11-11 01:22:25 +0000108/* Tessellator */
109#define GLU_TESS_BEGIN 100100
110#define GLU_TESS_VERTEX 100101
111#define GLU_TESS_END 100102
112#define GLU_TESS_ERROR 100103
113#define GLU_TESS_EDGE_FLAG 100104
114#define GLU_TESS_COMBINE 100105
jtgafb833d1999-08-19 00:55:39 +0000115
Brian Paulfbd8f211999-11-11 01:22:25 +0000116#define GLU_TESS_BEGIN_DATA 100106
117#define GLU_TESS_VERTEX_DATA 100107
118#define GLU_TESS_END_DATA 100108
119#define GLU_TESS_ERROR_DATA 100109
120#define GLU_TESS_EDGE_FLAG_DATA 100110
121#define GLU_TESS_COMBINE_DATA 100111
jtgafb833d1999-08-19 00:55:39 +0000122
Brian Paulfbd8f211999-11-11 01:22:25 +0000123/* Winding rules */
124#define GLU_TESS_WINDING_ODD 100130
125#define GLU_TESS_WINDING_NONZERO 100131
126#define GLU_TESS_WINDING_POSITIVE 100132
127#define GLU_TESS_WINDING_NEGATIVE 100133
128#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134
Gareth Hughes2856b531999-09-10 02:03:31 +0000129
Brian Paulfbd8f211999-11-11 01:22:25 +0000130/* Tessellation properties */
131#define GLU_TESS_WINDING_RULE 100140
132#define GLU_TESS_BOUNDARY_ONLY 100141
133#define GLU_TESS_TOLERANCE 100142
Gareth Hughes2856b531999-09-10 02:03:31 +0000134
Brian Paulfbd8f211999-11-11 01:22:25 +0000135/* Tessellation errors */
136#define GLU_TESS_ERROR1 100151 /* Missing gluBeginPolygon */
137#define GLU_TESS_ERROR2 100152 /* Missing gluBeginContour */
138#define GLU_TESS_ERROR3 100153 /* Missing gluEndPolygon */
139#define GLU_TESS_ERROR4 100154 /* Missing gluEndContour */
140#define GLU_TESS_ERROR5 100155 /* */
141#define GLU_TESS_ERROR6 100156 /* */
142#define GLU_TESS_ERROR7 100157 /* */
143#define GLU_TESS_ERROR8 100158 /* */
jtgafb833d1999-08-19 00:55:39 +0000144
Brian Paulfbd8f211999-11-11 01:22:25 +0000145/* NURBS */
146#define GLU_AUTO_LOAD_MATRIX 100200
147#define GLU_CULLING 100201
Kendall Bennetta7311921999-11-11 03:21:43 +0000148#define GLU_PARAMETRIC_TOLERANCE 100202
Brian Paulfbd8f211999-11-11 01:22:25 +0000149#define GLU_SAMPLING_TOLERANCE 100203
150#define GLU_DISPLAY_MODE 100204
151#define GLU_SAMPLING_METHOD 100205
152#define GLU_U_STEP 100206
153#define GLU_V_STEP 100207
jtgafb833d1999-08-19 00:55:39 +0000154
Brian Paulfbd8f211999-11-11 01:22:25 +0000155#define GLU_PATH_LENGTH 100215
156#define GLU_PARAMETRIC_ERROR 100216
157#define GLU_DOMAIN_DISTANCE 100217
jtgafb833d1999-08-19 00:55:39 +0000158
Brian Paulfbd8f211999-11-11 01:22:25 +0000159#define GLU_MAP1_TRIM_2 100210
160#define GLU_MAP1_TRIM_3 100211
jtgafb833d1999-08-19 00:55:39 +0000161
Brian Paulfbd8f211999-11-11 01:22:25 +0000162#define GLU_OUTLINE_POLYGON 100240
163#define GLU_OUTLINE_PATCH 100241
jtgafb833d1999-08-19 00:55:39 +0000164
Brian Paulfbd8f211999-11-11 01:22:25 +0000165#define GLU_NURBS_ERROR1 100251 /* spline order un-supported */
166#define GLU_NURBS_ERROR2 100252 /* too few knots */
167#define GLU_NURBS_ERROR3 100253 /* valid knot range is empty */
168#define GLU_NURBS_ERROR4 100254 /* decreasing knot sequence */
169#define GLU_NURBS_ERROR5 100255 /* knot multiplicity > spline order */
170#define GLU_NURBS_ERROR6 100256 /* endcurve() must follow bgncurve() */
171#define GLU_NURBS_ERROR7 100257 /* bgncurve() must precede endcurve() */
172#define GLU_NURBS_ERROR8 100258 /* ctrlarray or knot vector is NULL */
173#define GLU_NURBS_ERROR9 100259 /* can't draw pwlcurves */
174#define GLU_NURBS_ERROR10 100260 /* missing gluNurbsCurve() */
175#define GLU_NURBS_ERROR11 100261 /* missing gluNurbsSurface() */
176#define GLU_NURBS_ERROR12 100262 /* endtrim() must precede endsurface() */
177#define GLU_NURBS_ERROR13 100263 /* bgnsurface() must precede endsurface() */
178#define GLU_NURBS_ERROR14 100264 /* curve of improper type passed as trim curve */
179#define GLU_NURBS_ERROR15 100265 /* bgnsurface() must precede bgntrim() */
180#define GLU_NURBS_ERROR16 100266 /* endtrim() must follow bgntrim() */
181#define GLU_NURBS_ERROR17 100267 /* bgntrim() must precede endtrim()*/
182#define GLU_NURBS_ERROR18 100268 /* invalid or missing trim curve*/
183#define GLU_NURBS_ERROR19 100269 /* bgntrim() must precede pwlcurve() */
184#define GLU_NURBS_ERROR20 100270 /* pwlcurve referenced twice*/
185#define GLU_NURBS_ERROR21 100271 /* pwlcurve and nurbscurve mixed */
186#define GLU_NURBS_ERROR22 100272 /* improper usage of trim data type */
187#define GLU_NURBS_ERROR23 100273 /* nurbscurve referenced twice */
188#define GLU_NURBS_ERROR24 100274 /* nurbscurve and pwlcurve mixed */
189#define GLU_NURBS_ERROR25 100275 /* nurbssurface referenced twice */
190#define GLU_NURBS_ERROR26 100276 /* invalid property */
191#define GLU_NURBS_ERROR27 100277 /* endsurface() must follow bgnsurface() */
192#define GLU_NURBS_ERROR28 100278 /* intersecting or misoriented trim curves */
193#define GLU_NURBS_ERROR29 100279 /* intersecting trim curves */
194#define GLU_NURBS_ERROR30 100280 /* UNUSED */
195#define GLU_NURBS_ERROR31 100281 /* unconnected trim curves */
196#define GLU_NURBS_ERROR32 100282 /* unknown knot error */
197#define GLU_NURBS_ERROR33 100283 /* negative vertex count encountered */
198#define GLU_NURBS_ERROR34 100284 /* negative byte-stride */
199#define GLU_NURBS_ERROR35 100285 /* unknown type descriptor */
200#define GLU_NURBS_ERROR36 100286 /* null control point reference */
201#define GLU_NURBS_ERROR37 100287 /* duplicate point on pwlcurve */
jtgafb833d1999-08-19 00:55:39 +0000202
Brian Paul9331b671999-11-23 22:41:10 +0000203/* GLU 1.3 and later */
204#define GLU_NURBS_MODE ?
205
206
Brian Paulfbd8f211999-11-11 01:22:25 +0000207/* Errors */
208#define GLU_INVALID_ENUM 100900
209#define GLU_INVALID_VALUE 100901
210#define GLU_OUT_OF_MEMORY 100902
211#define GLU_INCOMPATIBLE_GL_VERSION 100903
jtgafb833d1999-08-19 00:55:39 +0000212
Brian Paul9331b671999-11-23 22:41:10 +0000213/* GLU 1.1 and later */
Brian Paulfbd8f211999-11-11 01:22:25 +0000214#define GLU_VERSION 100800
215#define GLU_EXTENSIONS 100801
Gareth Hughes2856b531999-09-10 02:03:31 +0000216
Brian Paul9331b671999-11-23 22:41:10 +0000217
218
Brian Paulfbd8f211999-11-11 01:22:25 +0000219/*** GLU 1.0 tessellation - obsolete! ***/
Gareth Hughes2856b531999-09-10 02:03:31 +0000220
Brian Paulfbd8f211999-11-11 01:22:25 +0000221/* Contour types */
222#define GLU_CW 100120
223#define GLU_CCW 100121
224#define GLU_INTERIOR 100122
225#define GLU_EXTERIOR 100123
226#define GLU_UNKNOWN 100124
Gareth Hughes2856b531999-09-10 02:03:31 +0000227
Brian Paulfbd8f211999-11-11 01:22:25 +0000228/* Tessellator */
229#define GLU_BEGIN GLU_TESS_BEGIN
230#define GLU_VERTEX GLU_TESS_VERTEX
231#define GLU_END GLU_TESS_END
232#define GLU_ERROR GLU_TESS_ERROR
233#define GLU_EDGE_FLAG GLU_TESS_EDGE_FLAG
jtgafb833d1999-08-19 00:55:39 +0000234
235
236/*
Gareth Hughes2856b531999-09-10 02:03:31 +0000237 * These are the GLU 1.1 typedefs. GLU 1.3 has different ones!
jtgafb833d1999-08-19 00:55:39 +0000238 */
239#if defined(__BEOS__)
Gareth Hughes2856b531999-09-10 02:03:31 +0000240 /* The BeOS does something funky and makes these typedefs in one
241 * of its system headers.
242 */
jtgafb833d1999-08-19 00:55:39 +0000243#else
Gareth Hughes2856b531999-09-10 02:03:31 +0000244 typedef struct GLUquadric GLUquadricObj;
245 typedef struct GLUnurbs GLUnurbsObj;
246
247 /* FIXME: We need to implement the other 1.3 typedefs - GH */
248 typedef struct GLUtesselator GLUtesselator;
Gareth Hughes49e0bc41999-09-14 03:23:08 +0000249 typedef GLUtesselator GLUtriangulatorObj;
jtgafb833d1999-08-19 00:55:39 +0000250#endif
251
252
253
254#if defined(__BEOS__) || defined(__QUICKDRAW__)
255#pragma export on
256#endif
257
258
259/*
260 *
261 * Miscellaneous functions
262 *
263 */
264
265GLUAPI void GLAPIENTRY gluLookAt( GLdouble eyex, GLdouble eyey, GLdouble eyez,
Brian Paulfbd8f211999-11-11 01:22:25 +0000266 GLdouble centerx, GLdouble centery,
267 GLdouble centerz,
268 GLdouble upx, GLdouble upy, GLdouble upz );
jtgafb833d1999-08-19 00:55:39 +0000269
270
271GLUAPI void GLAPIENTRY gluOrtho2D( GLdouble left, GLdouble right,
Brian Paulfbd8f211999-11-11 01:22:25 +0000272 GLdouble bottom, GLdouble top );
jtgafb833d1999-08-19 00:55:39 +0000273
274
275GLUAPI void GLAPIENTRY gluPerspective( GLdouble fovy, GLdouble aspect,
Brian Paulfbd8f211999-11-11 01:22:25 +0000276 GLdouble zNear, GLdouble zFar );
jtgafb833d1999-08-19 00:55:39 +0000277
278
279GLUAPI void GLAPIENTRY gluPickMatrix( GLdouble x, GLdouble y,
Brian Paulfbd8f211999-11-11 01:22:25 +0000280 GLdouble width, GLdouble height,
281 const GLint viewport[4] );
jtgafb833d1999-08-19 00:55:39 +0000282
283GLUAPI GLint GLAPIENTRY gluProject( GLdouble objx, GLdouble objy, GLdouble objz,
jtgafb833d1999-08-19 00:55:39 +0000284 const GLdouble modelMatrix[16],
285 const GLdouble projMatrix[16],
286 const GLint viewport[4],
Brian Paulfbd8f211999-11-11 01:22:25 +0000287 GLdouble *winx, GLdouble *winy,
288 GLdouble *winz );
289
290GLUAPI GLint GLAPIENTRY gluUnProject( GLdouble winx, GLdouble winy,
291 GLdouble winz,
292 const GLdouble modelMatrix[16],
293 const GLdouble projMatrix[16],
294 const GLint viewport[4],
295 GLdouble *objx, GLdouble *objy,
296 GLdouble *objz );
jtgafb833d1999-08-19 00:55:39 +0000297
298GLUAPI const GLubyte* GLAPIENTRY gluErrorString( GLenum errorCode );
299
300
301
302/*
303 *
304 * Mipmapping and image scaling
305 *
306 */
307
308GLUAPI GLint GLAPIENTRY gluScaleImage( GLenum format,
Brian Paulfbd8f211999-11-11 01:22:25 +0000309 GLint widthin, GLint heightin,
310 GLenum typein, const void *datain,
311 GLint widthout, GLint heightout,
312 GLenum typeout, void *dataout );
jtgafb833d1999-08-19 00:55:39 +0000313
314GLUAPI GLint GLAPIENTRY gluBuild1DMipmaps( GLenum target, GLint components,
Brian Paulfbd8f211999-11-11 01:22:25 +0000315 GLint width, GLenum format,
316 GLenum type, const void *data );
jtgafb833d1999-08-19 00:55:39 +0000317
318GLUAPI GLint GLAPIENTRY gluBuild2DMipmaps( GLenum target, GLint components,
Brian Paulfbd8f211999-11-11 01:22:25 +0000319 GLint width, GLint height,
320 GLenum format,
321 GLenum type, const void *data );
jtgafb833d1999-08-19 00:55:39 +0000322
323
324
325/*
326 *
327 * Quadrics
328 *
329 */
330
331GLUAPI GLUquadricObj* GLAPIENTRY gluNewQuadric( void );
332
333GLUAPI void GLAPIENTRY gluDeleteQuadric( GLUquadricObj *state );
334
335GLUAPI void GLAPIENTRY gluQuadricDrawStyle( GLUquadricObj *quadObject,
Brian Paulfbd8f211999-11-11 01:22:25 +0000336 GLenum drawStyle );
jtgafb833d1999-08-19 00:55:39 +0000337
338GLUAPI void GLAPIENTRY gluQuadricOrientation( GLUquadricObj *quadObject,
Brian Paulfbd8f211999-11-11 01:22:25 +0000339 GLenum orientation );
jtgafb833d1999-08-19 00:55:39 +0000340
341GLUAPI void GLAPIENTRY gluQuadricNormals( GLUquadricObj *quadObject,
Brian Paulfbd8f211999-11-11 01:22:25 +0000342 GLenum normals );
jtgafb833d1999-08-19 00:55:39 +0000343
344GLUAPI void GLAPIENTRY gluQuadricTexture( GLUquadricObj *quadObject,
Brian Paulfbd8f211999-11-11 01:22:25 +0000345 GLboolean textureCoords );
jtgafb833d1999-08-19 00:55:39 +0000346
347GLUAPI void GLAPIENTRY gluQuadricCallback( GLUquadricObj *qobj,
Brian Paulfbd8f211999-11-11 01:22:25 +0000348 GLenum which,
349 void (GLCALLBACK *fn)() );
jtgafb833d1999-08-19 00:55:39 +0000350
351GLUAPI void GLAPIENTRY gluCylinder( GLUquadricObj *qobj,
Brian Paulfbd8f211999-11-11 01:22:25 +0000352 GLdouble baseRadius,
353 GLdouble topRadius,
354 GLdouble height,
355 GLint slices, GLint stacks );
jtgafb833d1999-08-19 00:55:39 +0000356
357GLUAPI void GLAPIENTRY gluSphere( GLUquadricObj *qobj,
Brian Paulfbd8f211999-11-11 01:22:25 +0000358 GLdouble radius, GLint slices,
359 GLint stacks );
jtgafb833d1999-08-19 00:55:39 +0000360
361GLUAPI void GLAPIENTRY gluDisk( GLUquadricObj *qobj,
Brian Paulfbd8f211999-11-11 01:22:25 +0000362 GLdouble innerRadius, GLdouble outerRadius,
363 GLint slices, GLint loops );
jtgafb833d1999-08-19 00:55:39 +0000364
365GLUAPI void GLAPIENTRY gluPartialDisk( GLUquadricObj *qobj, GLdouble innerRadius,
Brian Paulfbd8f211999-11-11 01:22:25 +0000366 GLdouble outerRadius, GLint slices,
367 GLint loops, GLdouble startAngle,
368 GLdouble sweepAngle );
jtgafb833d1999-08-19 00:55:39 +0000369
370
371
372/*
373 *
374 * Nurbs
375 *
376 */
377
378GLUAPI GLUnurbsObj* GLAPIENTRY gluNewNurbsRenderer( void );
379
380GLUAPI void GLAPIENTRY gluDeleteNurbsRenderer( GLUnurbsObj *nobj );
381
382GLUAPI void GLAPIENTRY gluLoadSamplingMatrices( GLUnurbsObj *nobj,
Brian Paulfbd8f211999-11-11 01:22:25 +0000383 const GLfloat modelMatrix[16],
384 const GLfloat projMatrix[16],
385 const GLint viewport[4] );
jtgafb833d1999-08-19 00:55:39 +0000386
387GLUAPI void GLAPIENTRY gluNurbsProperty( GLUnurbsObj *nobj, GLenum property,
Brian Paulfbd8f211999-11-11 01:22:25 +0000388 GLfloat value );
jtgafb833d1999-08-19 00:55:39 +0000389
390GLUAPI void GLAPIENTRY gluGetNurbsProperty( GLUnurbsObj *nobj, GLenum property,
Brian Paulfbd8f211999-11-11 01:22:25 +0000391 GLfloat *value );
jtgafb833d1999-08-19 00:55:39 +0000392
393GLUAPI void GLAPIENTRY gluBeginCurve( GLUnurbsObj *nobj );
394
395GLUAPI void GLAPIENTRY gluEndCurve( GLUnurbsObj * nobj );
396
397GLUAPI void GLAPIENTRY gluNurbsCurve( GLUnurbsObj *nobj, GLint nknots,
Brian Paulfbd8f211999-11-11 01:22:25 +0000398 GLfloat *knot, GLint stride,
399 GLfloat *ctlarray, GLint order,
400 GLenum type );
jtgafb833d1999-08-19 00:55:39 +0000401
402GLUAPI void GLAPIENTRY gluBeginSurface( GLUnurbsObj *nobj );
403
404GLUAPI void GLAPIENTRY gluEndSurface( GLUnurbsObj * nobj );
405
406GLUAPI void GLAPIENTRY gluNurbsSurface( GLUnurbsObj *nobj,
Brian Paulfbd8f211999-11-11 01:22:25 +0000407 GLint sknot_count, GLfloat *sknot,
408 GLint tknot_count, GLfloat *tknot,
409 GLint s_stride, GLint t_stride,
410 GLfloat *ctlarray,
411 GLint sorder, GLint torder,
412 GLenum type );
jtgafb833d1999-08-19 00:55:39 +0000413
414GLUAPI void GLAPIENTRY gluBeginTrim( GLUnurbsObj *nobj );
415
416GLUAPI void GLAPIENTRY gluEndTrim( GLUnurbsObj *nobj );
417
418GLUAPI void GLAPIENTRY gluPwlCurve( GLUnurbsObj *nobj, GLint count,
Brian Paulfbd8f211999-11-11 01:22:25 +0000419 GLfloat *array, GLint stride,
420 GLenum type );
jtgafb833d1999-08-19 00:55:39 +0000421
422GLUAPI void GLAPIENTRY gluNurbsCallback( GLUnurbsObj *nobj, GLenum which,
Brian Paulfbd8f211999-11-11 01:22:25 +0000423 void (GLCALLBACK *fn)() );
jtgafb833d1999-08-19 00:55:39 +0000424
425
426
427/*
428 *
Gareth Hughes2856b531999-09-10 02:03:31 +0000429 * Polygon tessellation
jtgafb833d1999-08-19 00:55:39 +0000430 *
431 */
432
Gareth Hughes2856b531999-09-10 02:03:31 +0000433GLUAPI GLUtesselator* GLAPIENTRY gluNewTess( void );
jtgafb833d1999-08-19 00:55:39 +0000434
Gareth Hughes2856b531999-09-10 02:03:31 +0000435GLUAPI void GLAPIENTRY gluDeleteTess( GLUtesselator *tobj );
jtgafb833d1999-08-19 00:55:39 +0000436
Gareth Hughes2856b531999-09-10 02:03:31 +0000437GLUAPI void GLAPIENTRY gluTessBeginPolygon( GLUtesselator *tobj,
438 void *polygon_data );
jtgafb833d1999-08-19 00:55:39 +0000439
Gareth Hughes2856b531999-09-10 02:03:31 +0000440GLUAPI void GLAPIENTRY gluTessBeginContour( GLUtesselator *tobj );
jtgafb833d1999-08-19 00:55:39 +0000441
Gareth Hughes2856b531999-09-10 02:03:31 +0000442GLUAPI void GLAPIENTRY gluTessVertex( GLUtesselator *tobj, GLdouble coords[3],
443 void *vertex_data );
jtgafb833d1999-08-19 00:55:39 +0000444
Gareth Hughes2856b531999-09-10 02:03:31 +0000445GLUAPI void GLAPIENTRY gluTessEndContour( GLUtesselator *tobj );
jtgafb833d1999-08-19 00:55:39 +0000446
Gareth Hughes2856b531999-09-10 02:03:31 +0000447GLUAPI void GLAPIENTRY gluTessEndPolygon( GLUtesselator *tobj );
448
449GLUAPI void GLAPIENTRY gluTessProperty( GLUtesselator *tobj, GLenum which,
450 GLdouble value );
451
452GLUAPI void GLAPIENTRY gluTessNormal( GLUtesselator *tobj, GLdouble x,
453 GLdouble y, GLdouble z );
454
455GLUAPI void GLAPIENTRY gluTessCallback( GLUtesselator *tobj, GLenum which,
456 void (GLCALLBACK *fn)() );
457
458GLUAPI void GLAPIENTRY gluGetTessProperty( GLUtesselator *tobj, GLenum which,
459 GLdouble *value );
460
461/*
462 *
463 * Obsolete 1.0 tessellation functions
464 *
465 */
466
467GLUAPI void GLAPIENTRY gluBeginPolygon( GLUtesselator *tobj );
468
469GLUAPI void GLAPIENTRY gluNextContour( GLUtesselator *tobj, GLenum type );
470
471GLUAPI void GLAPIENTRY gluEndPolygon( GLUtesselator *tobj );
jtgafb833d1999-08-19 00:55:39 +0000472
473
474
475/*
476 *
477 * New functions in GLU 1.1
478 *
479 */
480
481GLUAPI const GLubyte* GLAPIENTRY gluGetString( GLenum name );
482
483
Brian Paulf893f031999-09-11 11:34:21 +0000484
Brian Paul9331b671999-11-23 22:41:10 +0000485/*
486 *
487 * GLU 1.3 functions
488 *
489 */
490
491GLUAPI GLboolean GLAPIENTRY
492gluCheckExtension(const char *extName, const GLubyte *extString);
493
494
495GLUAPI GLint GLAPIENTRY
496gluBuild3DMipmaps( GLenum target, GLint internalFormat, GLsizei width,
497 GLsizei height, GLsizei depth, GLenum format,
498 GLenum type, const void *data );
499
500GLUAPI GLint GLAPIENTRY
501gluBuild1DMipmapLevels( GLenum target, GLint internalFormat, GLsizei width,
502 GLenum format, GLenum type, GLint level, GLint base,
503 GLint max, const void *data );
504
505GLUAPI GLint GLAPIENTRY
506gluBuild2DMipmapLevels( GLenum target, GLint internalFormat, GLsizei width,
507 GLsizei height, GLenum format, GLenum type,
508 GLint level, GLint base, GLint max,
509 const void *data );
510
511GLUAPI GLint GLAPIENTRY
512gluBuild3DMipmapLevels( GLenum target, GLint internalFormat, GLsizei width,
513 GLsizei height, GLsizei depth, GLenum format,
514 GLenum type, GLint level, GLint base, GLint max,
515 const void *data );
516
517GLUAPI GLint GLAPIENTRY
518gluUnProject4( GLdouble winx, GLdouble winy, GLdouble winz, GLdouble clipw,
519 const GLdouble modelMatrix[16], const GLdouble projMatrix[16],
Brian Paul5fff37e1999-11-24 13:06:48 +0000520 const GLint viewport[4], GLclampd zNear, GLclampd zFar,
Brian Paul9331b671999-11-23 22:41:10 +0000521 GLdouble *objx, GLdouble *objy, GLdouble *objz,
522 GLdouble *objw );
523
524
525
jtgafb833d1999-08-19 00:55:39 +0000526#if defined(__BEOS__) || defined(__QUICKDRAW__)
527#pragma export off
528#endif
529
530
531#ifdef macintosh
532 #pragma enumsalwaysint reset
533 #if PRAGMA_IMPORT_SUPPORTED
534 #pragma import off
535 #endif
536#endif
537
538
539#ifdef __cplusplus
540}
541#endif
542
543
Brian Paule23e2751999-11-15 14:26:07 +0000544#endif /* __glu_h__ */