1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#ifndef __glu_h__
7#ifndef __GLU_H__
8
9#define __glu_h__
10#define __GLU_H__
11
12#include <GL/gl.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18#ifdef UNICODE
19#define gluErrorStringWIN(errCode) ((LPCSTR) gluErrorUnicodeStringEXT(errCode))
20#else
21#define gluErrorStringWIN(errCode) ((LPCWSTR) gluErrorString(errCode))
22#endif
23
24const GLubyte *APIENTRY gluErrorString(GLenum errCode);
25const wchar_t *APIENTRY gluErrorUnicodeStringEXT(GLenum errCode);
26const GLubyte *APIENTRY gluGetString(GLenum name);
27void APIENTRY gluOrtho2D(GLdouble left,GLdouble right,GLdouble bottom,GLdouble top);
28void APIENTRY gluPerspective(GLdouble fovy,GLdouble aspect,GLdouble zNear,GLdouble zFar);
29void APIENTRY gluPickMatrix(GLdouble x,GLdouble y,GLdouble width,GLdouble height,GLint viewport[4]);
30void APIENTRY gluLookAt(GLdouble eyex,GLdouble eyey,GLdouble eyez,GLdouble centerx,GLdouble centery,GLdouble centerz,GLdouble upx,GLdouble upy,GLdouble upz);
31int APIENTRY gluProject(GLdouble objx,GLdouble objy,GLdouble objz,const GLdouble modelMatrix[16],const GLdouble projMatrix[16],const GLint viewport[4],GLdouble *winx,GLdouble *winy,GLdouble *winz);
32int APIENTRY gluUnProject(GLdouble winx,GLdouble winy,GLdouble winz,const GLdouble modelMatrix[16],const GLdouble projMatrix[16],const GLint viewport[4],GLdouble *objx,GLdouble *objy,GLdouble *objz);
33int APIENTRY gluScaleImage(GLenum format,GLint widthin,GLint heightin,GLenum typein,const void *datain,GLint widthout,GLint heightout,GLenum typeout,void *dataout);
34int APIENTRY gluBuild1DMipmaps(GLenum target,GLint components,GLint width,GLenum format,GLenum type,const void *data);
35int APIENTRY gluBuild2DMipmaps(GLenum target,GLint components,GLint width,GLint height,GLenum format,GLenum type,const void *data);
36
37#ifdef __cplusplus
38
39class GLUnurbs;
40class GLUquadric;
41class GLUtesselator;
42
43typedef class GLUnurbs GLUnurbsObj;
44typedef class GLUquadric GLUquadricObj;
45typedef class GLUtesselator GLUtesselatorObj;
46typedef class GLUtesselator GLUtriangulatorObj;
47#else
48
49typedef struct GLUnurbs GLUnurbs;
50typedef struct GLUquadric GLUquadric;
51typedef struct GLUtesselator GLUtesselator;
52typedef struct GLUnurbs GLUnurbsObj;
53typedef struct GLUquadric GLUquadricObj;
54typedef struct GLUtesselator GLUtesselatorObj;
55typedef struct GLUtesselator GLUtriangulatorObj;
56#endif
57
58GLUquadric *APIENTRY gluNewQuadric(void);
59void APIENTRY gluDeleteQuadric(GLUquadric *state);
60void APIENTRY gluQuadricNormals(GLUquadric *quadObject,GLenum normals);
61void APIENTRY gluQuadricTexture(GLUquadric *quadObject,GLboolean textureCoords);
62void APIENTRY gluQuadricOrientation(GLUquadric *quadObject,GLenum orientation);
63void APIENTRY gluQuadricDrawStyle(GLUquadric *quadObject,GLenum drawStyle);
64void APIENTRY gluCylinder(GLUquadric *qobj,GLdouble baseRadius,GLdouble topRadius,GLdouble height,GLint slices,GLint stacks);
65void APIENTRY gluDisk(GLUquadric *qobj,GLdouble innerRadius,GLdouble outerRadius,GLint slices,GLint loops);
66void APIENTRY gluPartialDisk(GLUquadric *qobj,GLdouble innerRadius,GLdouble outerRadius,GLint slices,GLint loops,GLdouble startAngle,GLdouble sweepAngle);
67void APIENTRY gluSphere(GLUquadric *qobj,GLdouble radius,GLint slices,GLint stacks);
68void APIENTRY gluQuadricCallback(GLUquadric *qobj,GLenum which,void (CALLBACK *fn)());
69GLUtesselator *APIENTRY gluNewTess(void);
70void APIENTRY gluDeleteTess(GLUtesselator *tess);
71void APIENTRY gluTessBeginPolygon(GLUtesselator *tess,void *polygon_data);
72void APIENTRY gluTessBeginContour(GLUtesselator *tess);
73void APIENTRY gluTessVertex(GLUtesselator *tess,GLdouble coords[3],void *data);
74void APIENTRY gluTessEndContour(GLUtesselator *tess);
75void APIENTRY gluTessEndPolygon(GLUtesselator *tess);
76void APIENTRY gluTessProperty(GLUtesselator *tess,GLenum which,GLdouble value);
77void APIENTRY gluTessNormal(GLUtesselator *tess,GLdouble x,GLdouble y,GLdouble z);
78void APIENTRY gluTessCallback(GLUtesselator *tess,GLenum which,void (CALLBACK *fn)());
79void APIENTRY gluGetTessProperty(GLUtesselator *tess,GLenum which,GLdouble *value);
80GLUnurbs *APIENTRY gluNewNurbsRenderer(void);
81void APIENTRY gluDeleteNurbsRenderer(GLUnurbs *nobj);
82void APIENTRY gluBeginSurface(GLUnurbs *nobj);
83void APIENTRY gluBeginCurve(GLUnurbs *nobj);
84void APIENTRY gluEndCurve(GLUnurbs *nobj);
85void APIENTRY gluEndSurface(GLUnurbs *nobj);
86void APIENTRY gluBeginTrim(GLUnurbs *nobj);
87void APIENTRY gluEndTrim(GLUnurbs *nobj);
88void APIENTRY gluPwlCurve(GLUnurbs *nobj,GLint count,GLfloat *array,GLint stride,GLenum type);
89void APIENTRY gluNurbsCurve(GLUnurbs *nobj,GLint nknots,GLfloat *knot,GLint stride,GLfloat *ctlarray,GLint order,GLenum type);
90void APIENTRY gluNurbsSurface(GLUnurbs *nobj,GLint sknot_count,float *sknot,GLint tknot_count,GLfloat *tknot,GLint s_stride,GLint t_stride,GLfloat *ctlarray,GLint sorder,GLint torder,GLenum type);
91void APIENTRY gluLoadSamplingMatrices(GLUnurbs *nobj,const GLfloat modelMatrix[16],const GLfloat projMatrix[16],const GLint viewport[4]);
92void APIENTRY gluNurbsProperty(GLUnurbs *nobj,GLenum property,GLfloat value);
93void APIENTRY gluGetNurbsProperty(GLUnurbs *nobj,GLenum property,GLfloat *value);
94void APIENTRY gluNurbsCallback(GLUnurbs *nobj,GLenum which,void (CALLBACK *fn)());
95
96typedef void (CALLBACK *GLUquadricErrorProc)(GLenum);
97typedef void (CALLBACK *GLUtessBeginProc)(GLenum);
98typedef void (CALLBACK *GLUtessEdgeFlagProc) (GLboolean);
99typedef void (CALLBACK *GLUtessVertexProc)(void *);
100typedef void (CALLBACK *GLUtessEndProc)(void);
101typedef void (CALLBACK *GLUtessErrorProc)(GLenum);
102typedef void (CALLBACK *GLUtessCombineProc)(GLdouble[3],void*[4],GLfloat[4],void**);
103typedef void (CALLBACK *GLUtessBeginDataProc)(GLenum,void *);
104typedef void (CALLBACK *GLUtessEdgeFlagDataProc) (GLboolean,void *);
105typedef void (CALLBACK *GLUtessVertexDataProc)(void *,void *);
106typedef void (CALLBACK *GLUtessEndDataProc)(void *);
107typedef void (CALLBACK *GLUtessErrorDataProc)(GLenum,void *);
108typedef void (CALLBACK *GLUtessCombineDataProc)(GLdouble[3],void*[4],GLfloat[4],void**,void*);
109typedef void (CALLBACK *GLUnurbsErrorProc)(GLenum);
110
111#define GLU_VERSION_1_1 1
112#define GLU_VERSION_1_2 1
113
114#define GLU_INVALID_ENUM 100900
115#define GLU_INVALID_VALUE 100901
116#define GLU_OUT_OF_MEMORY 100902
117#define GLU_INCOMPATIBLE_GL_VERSION 100903
118
119#define GLU_VERSION 100800
120#define GLU_EXTENSIONS 100801
121
122#define GLU_TRUE GL_TRUE
123#define GLU_FALSE GL_FALSE
124
125#define GLU_SMOOTH 100000
126#define GLU_FLAT 100001
127#define GLU_NONE 100002
128
129#define GLU_POINT 100010
130#define GLU_LINE 100011
131#define GLU_FILL 100012
132#define GLU_SILHOUETTE 100013
133
134#define GLU_OUTSIDE 100020
135#define GLU_INSIDE 100021
136
137#define GLU_TESS_MAX_COORD 1.0e150
138
139#define GLU_TESS_WINDING_RULE 100140
140#define GLU_TESS_BOUNDARY_ONLY 100141
141#define GLU_TESS_TOLERANCE 100142
142
143#define GLU_TESS_WINDING_ODD 100130
144#define GLU_TESS_WINDING_NONZERO 100131
145#define GLU_TESS_WINDING_POSITIVE 100132
146#define GLU_TESS_WINDING_NEGATIVE 100133
147#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134
148
149#define GLU_TESS_BEGIN 100100
150#define GLU_TESS_VERTEX 100101
151#define GLU_TESS_END 100102
152#define GLU_TESS_ERROR 100103
153#define GLU_TESS_EDGE_FLAG 100104
154#define GLU_TESS_COMBINE 100105
155#define GLU_TESS_BEGIN_DATA 100106
156#define GLU_TESS_VERTEX_DATA 100107
157#define GLU_TESS_END_DATA 100108
158#define GLU_TESS_ERROR_DATA 100109
159#define GLU_TESS_EDGE_FLAG_DATA 100110
160#define GLU_TESS_COMBINE_DATA 100111
161
162#define GLU_TESS_ERROR1 100151
163#define GLU_TESS_ERROR2 100152
164#define GLU_TESS_ERROR3 100153
165#define GLU_TESS_ERROR4 100154
166#define GLU_TESS_ERROR5 100155
167#define GLU_TESS_ERROR6 100156
168#define GLU_TESS_ERROR7 100157
169#define GLU_TESS_ERROR8 100158
170
171#define GLU_TESS_MISSING_BEGIN_POLYGON GLU_TESS_ERROR1
172#define GLU_TESS_MISSING_BEGIN_CONTOUR GLU_TESS_ERROR2
173#define GLU_TESS_MISSING_END_POLYGON GLU_TESS_ERROR3
174#define GLU_TESS_MISSING_END_CONTOUR GLU_TESS_ERROR4
175#define GLU_TESS_COORD_TOO_LARGE GLU_TESS_ERROR5
176#define GLU_TESS_NEED_COMBINE_CALLBACK GLU_TESS_ERROR6
177
178#define GLU_AUTO_LOAD_MATRIX 100200
179#define GLU_CULLING 100201
180#define GLU_SAMPLING_TOLERANCE 100203
181#define GLU_DISPLAY_MODE 100204
182#define GLU_PARAMETRIC_TOLERANCE 100202
183#define GLU_SAMPLING_METHOD 100205
184#define GLU_U_STEP 100206
185#define GLU_V_STEP 100207
186
187#define GLU_PATH_LENGTH 100215
188#define GLU_PARAMETRIC_ERROR 100216
189#define GLU_DOMAIN_DISTANCE 100217
190
191#define GLU_MAP1_TRIM_2 100210
192#define GLU_MAP1_TRIM_3 100211
193
194#define GLU_OUTLINE_POLYGON 100240
195#define GLU_OUTLINE_PATCH 100241
196
197#define GLU_NURBS_ERROR1 100251
198#define GLU_NURBS_ERROR2 100252
199#define GLU_NURBS_ERROR3 100253
200#define GLU_NURBS_ERROR4 100254
201#define GLU_NURBS_ERROR5 100255
202#define GLU_NURBS_ERROR6 100256
203#define GLU_NURBS_ERROR7 100257
204#define GLU_NURBS_ERROR8 100258
205#define GLU_NURBS_ERROR9 100259
206#define GLU_NURBS_ERROR10 100260
207#define GLU_NURBS_ERROR11 100261
208#define GLU_NURBS_ERROR12 100262
209#define GLU_NURBS_ERROR13 100263
210#define GLU_NURBS_ERROR14 100264
211#define GLU_NURBS_ERROR15 100265
212#define GLU_NURBS_ERROR16 100266
213#define GLU_NURBS_ERROR17 100267
214#define GLU_NURBS_ERROR18 100268
215#define GLU_NURBS_ERROR19 100269
216#define GLU_NURBS_ERROR20 100270
217#define GLU_NURBS_ERROR21 100271
218#define GLU_NURBS_ERROR22 100272
219#define GLU_NURBS_ERROR23 100273
220#define GLU_NURBS_ERROR24 100274
221#define GLU_NURBS_ERROR25 100275
222#define GLU_NURBS_ERROR26 100276
223#define GLU_NURBS_ERROR27 100277
224#define GLU_NURBS_ERROR28 100278
225#define GLU_NURBS_ERROR29 100279
226#define GLU_NURBS_ERROR30 100280
227#define GLU_NURBS_ERROR31 100281
228#define GLU_NURBS_ERROR32 100282
229#define GLU_NURBS_ERROR33 100283
230#define GLU_NURBS_ERROR34 100284
231#define GLU_NURBS_ERROR35 100285
232#define GLU_NURBS_ERROR36 100286
233#define GLU_NURBS_ERROR37 100287
234
235void APIENTRY gluBeginPolygon(GLUtesselator *tess);
236void APIENTRY gluNextContour(GLUtesselator *tess,GLenum type);
237void APIENTRY gluEndPolygon(GLUtesselator *tess);
238
239#define GLU_CW 100120
240#define GLU_CCW 100121
241#define GLU_INTERIOR 100122
242#define GLU_EXTERIOR 100123
243#define GLU_UNKNOWN 100124
244
245#define GLU_BEGIN GLU_TESS_BEGIN
246#define GLU_VERTEX GLU_TESS_VERTEX
247#define GLU_END GLU_TESS_END
248#define GLU_ERROR GLU_TESS_ERROR
249#define GLU_EDGE_FLAG GLU_TESS_EDGE_FLAG
250
251#ifdef __cplusplus
252}
253#endif
254#endif
255#endif
256