32 #ifndef __libnurbs2_h__
33 #define __libnurbs2_h__
39 OLDCODE #include <GLES2/gl2.h>
40 OLDCODE #define GLdouble
double
42 OLDCODE #include <GL/gl.h>
43 OLDCODE #include <limits.h>
48 OLDCODE #include <GL/gl.h>
49 OLDCODE #include <limits.h>
53 #if defined (_ANDROID) || defined(ANDROIDNDK) || defined (IPHONE) || defined (QNX) || defined (ANGLEPROJECT)
54 #include <GLES2/gl2.h>
56 #define GLdouble double
58 #define GL_QUAD_STRIP 0x0008
65 #if defined(_MSC_VER) || defined(__MINGW32__)
66 #define GLAPIENTRY __stdcall
73 #define APIENTRY GLAPIENTRY
81 #define GLAPIENTRYP GLAPIENTRY *
84 #define WANT_STATIC_LIBNURBS 1
85 #if defined(_MSC_VER) && defined(WANT_STATIC_LIBNURBS)
86 #undef _DLL //pesky thing shouldn't be defined for a static lib but is
89 #if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32)
91 # define GLAPI __declspec(dllexport)
92 #elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL)
95 # define GLAPI __declspec(dllimport)
108 #define GLU_EXT_object_space_tess 1
109 #define GLU_EXT_nurbs_tessellator 1
116 #define GLU_VERSION_1_1 1
117 #define GLU_VERSION_1_2 1
118 #define GLU_VERSION_1_3 1
121 #define GLU_VERSION 100800
122 #define GLU_EXTENSIONS 100801
125 #define GLU_INVALID_ENUM 100900
126 #define GLU_INVALID_VALUE 100901
127 #define GLU_OUT_OF_MEMORY 100902
128 #define GLU_INCOMPATIBLE_GL_VERSION 100903
129 #define GLU_INVALID_OPERATION 100904
133 #define GLU_OUTLINE_POLYGON 100240
134 #define GLU_OUTLINE_PATCH 100241
137 #define GLU_NURBS_ERROR 100103
138 #define GLU_ERROR 100103
139 #define GLU_NURBS_BEGIN 100164
140 #define GLU_NURBS_BEGIN_EXT 100164
141 #define GLU_NURBS_VERTEX 100165
142 #define GLU_NURBS_VERTEX_EXT 100165
143 #define GLU_NURBS_NORMAL 100166
144 #define GLU_NURBS_NORMAL_EXT 100166
145 #define GLU_NURBS_COLOR 100167
146 #define GLU_NURBS_COLOR_EXT 100167
147 #define GLU_NURBS_TEXTURE_COORD 100168
148 #define GLU_NURBS_TEX_COORD_EXT 100168
149 #define GLU_NURBS_END 100169
150 #define GLU_NURBS_END_EXT 100169
151 #define GLU_NURBS_BEGIN_DATA 100170
152 #define GLU_NURBS_BEGIN_DATA_EXT 100170
153 #define GLU_NURBS_VERTEX_DATA 100171
154 #define GLU_NURBS_VERTEX_DATA_EXT 100171
155 #define GLU_NURBS_NORMAL_DATA 100172
156 #define GLU_NURBS_NORMAL_DATA_EXT 100172
157 #define GLU_NURBS_COLOR_DATA 100173
158 #define GLU_NURBS_COLOR_DATA_EXT 100173
159 #define GLU_NURBS_TEXTURE_COORD_DATA 100174
160 #define GLU_NURBS_TEX_COORD_DATA_EXT 100174
161 #define GLU_NURBS_END_DATA 100175
162 #define GLU_NURBS_END_DATA_EXT 100175
165 #define GLU_NURBS_ERROR1 100251
166 #define GLU_NURBS_ERROR2 100252
167 #define GLU_NURBS_ERROR3 100253
168 #define GLU_NURBS_ERROR4 100254
169 #define GLU_NURBS_ERROR5 100255
170 #define GLU_NURBS_ERROR6 100256
171 #define GLU_NURBS_ERROR7 100257
172 #define GLU_NURBS_ERROR8 100258
173 #define GLU_NURBS_ERROR9 100259
174 #define GLU_NURBS_ERROR10 100260
175 #define GLU_NURBS_ERROR11 100261
176 #define GLU_NURBS_ERROR12 100262
177 #define GLU_NURBS_ERROR13 100263
178 #define GLU_NURBS_ERROR14 100264
179 #define GLU_NURBS_ERROR15 100265
180 #define GLU_NURBS_ERROR16 100266
181 #define GLU_NURBS_ERROR17 100267
182 #define GLU_NURBS_ERROR18 100268
183 #define GLU_NURBS_ERROR19 100269
184 #define GLU_NURBS_ERROR20 100270
185 #define GLU_NURBS_ERROR21 100271
186 #define GLU_NURBS_ERROR22 100272
187 #define GLU_NURBS_ERROR23 100273
188 #define GLU_NURBS_ERROR24 100274
189 #define GLU_NURBS_ERROR25 100275
190 #define GLU_NURBS_ERROR26 100276
191 #define GLU_NURBS_ERROR27 100277
192 #define GLU_NURBS_ERROR28 100278
193 #define GLU_NURBS_ERROR29 100279
194 #define GLU_NURBS_ERROR30 100280
195 #define GLU_NURBS_ERROR31 100281
196 #define GLU_NURBS_ERROR32 100282
197 #define GLU_NURBS_ERROR33 100283
198 #define GLU_NURBS_ERROR34 100284
199 #define GLU_NURBS_ERROR35 100285
200 #define GLU_NURBS_ERROR36 100286
201 #define GLU_NURBS_ERROR37 100287
204 #define GLU_AUTO_LOAD_MATRIX 100200
205 #define GLU_CULLING 100201
206 #define GLU_SAMPLING_TOLERANCE 100203
207 #define GLU_DISPLAY_MODE 100204
208 #define GLU_PARAMETRIC_TOLERANCE 100202
209 #define GLU_SAMPLING_METHOD 100205
210 #define GLU_U_STEP 100206
211 #define GLU_V_STEP 100207
212 #define GLU_NURBS_MODE 100160
213 #define GLU_NURBS_MODE_EXT 100160
214 #define GLU_NURBS_TESSELLATOR 100161
215 #define GLU_NURBS_TESSELLATOR_EXT 100161
216 #define GLU_NURBS_RENDERER 100162
217 #define GLU_NURBS_RENDERER_EXT 100162
220 #define GLU_OBJECT_PARAMETRIC_ERROR 100208
221 #define GLU_OBJECT_PARAMETRIC_ERROR_EXT 100208
222 #define GLU_OBJECT_PATH_LENGTH 100209
223 #define GLU_OBJECT_PATH_LENGTH_EXT 100209
224 #define GLU_PATH_LENGTH 100215
225 #define GLU_PARAMETRIC_ERROR 100216
226 #define GLU_DOMAIN_DISTANCE 100217
229 #define GLU_MAP1_TRIM_2 100210
230 #define GLU_MAP1_TRIM_3 100211
233 #define GLU_POINT 100010
234 #define GLU_LINE 100011
235 #define GLU_FILL 100012
236 #define GLU_SILHOUETTE 100013
242 #define GLU_SMOOTH 100000
243 #define GLU_FLAT 100001
244 #define GLU_NONE 100002
247 #define GLU_OUTSIDE 100020
248 #define GLU_INSIDE 100021
251 #define GLU_TESS_BEGIN 100100
252 #define GLU_BEGIN 100100
253 #define GLU_TESS_VERTEX 100101
254 #define GLU_VERTEX 100101
255 #define GLU_TESS_END 100102
256 #define GLU_END 100102
257 #define GLU_TESS_ERROR 100103
258 #define GLU_TESS_EDGE_FLAG 100104
259 #define GLU_EDGE_FLAG 100104
260 #define GLU_TESS_COMBINE 100105
261 #define GLU_TESS_BEGIN_DATA 100106
262 #define GLU_TESS_VERTEX_DATA 100107
263 #define GLU_TESS_END_DATA 100108
264 #define GLU_TESS_ERROR_DATA 100109
265 #define GLU_TESS_EDGE_FLAG_DATA 100110
266 #define GLU_TESS_COMBINE_DATA 100111
269 #define GLU_CW 100120
270 #define GLU_CCW 100121
271 #define GLU_INTERIOR 100122
272 #define GLU_EXTERIOR 100123
273 #define GLU_UNKNOWN 100124
276 #define GLU_TESS_WINDING_RULE 100140
277 #define GLU_TESS_BOUNDARY_ONLY 100141
278 #define GLU_TESS_TOLERANCE 100142
281 #define GLU_TESS_ERROR1 100151
282 #define GLU_TESS_ERROR2 100152
283 #define GLU_TESS_ERROR3 100153
284 #define GLU_TESS_ERROR4 100154
285 #define GLU_TESS_ERROR5 100155
286 #define GLU_TESS_ERROR6 100156
287 #define GLU_TESS_ERROR7 100157
288 #define GLU_TESS_ERROR8 100158
289 #define GLU_TESS_MISSING_BEGIN_POLYGON 100151
290 #define GLU_TESS_MISSING_BEGIN_CONTOUR 100152
291 #define GLU_TESS_MISSING_END_POLYGON 100153
292 #define GLU_TESS_MISSING_END_CONTOUR 100154
293 #define GLU_TESS_COORD_TOO_LARGE 100155
294 #define GLU_TESS_NEED_COMBINE_CALLBACK 100156
297 #define GLU_TESS_WINDING_ODD 100130
298 #define GLU_TESS_WINDING_NONZERO 100131
299 #define GLU_TESS_WINDING_POSITIVE 100132
300 #define GLU_TESS_WINDING_NEGATIVE 100133
301 #define GLU_TESS_WINDING_ABS_GEQ_TWO 100134
306 #define GL_AUTO_NORMAL 0x0D80
307 #define GL_MAP1_COLOR_4 0x0D90
308 #define GL_MAP1_INDEX 0x0D91
309 #define GL_MAP1_NORMAL 0x0D92
310 #define GL_MAP1_TEXTURE_COORD_1 0x0D93
311 #define GL_MAP1_TEXTURE_COORD_2 0x0D94
312 #define GL_MAP1_TEXTURE_COORD_3 0x0D95
313 #define GL_MAP1_TEXTURE_COORD_4 0x0D96
314 #define GL_MAP1_VERTEX_3 0x0D97
315 #define GL_MAP1_VERTEX_4 0x0D98
316 #define GL_MAP2_COLOR_4 0x0DB0
317 #define GL_MAP2_INDEX 0x0DB1
318 #define GL_MAP2_NORMAL 0x0DB2
319 #define GL_MAP2_TEXTURE_COORD_1 0x0DB3
320 #define GL_MAP2_TEXTURE_COORD_2 0x0DB4
321 #define GL_MAP2_TEXTURE_COORD_3 0x0DB5
322 #define GL_MAP2_TEXTURE_COORD_4 0x0DB6
323 #define GL_MAP2_VERTEX_3 0x0DB7
324 #define GL_MAP2_VERTEX_4 0x0DB8
325 #define GL_MAP1_GRID_DOMAIN 0x0DD0
326 #define GL_MAP1_GRID_SEGMENTS 0x0DD1
327 #define GL_MAP2_GRID_DOMAIN 0x0DD2
328 #define GL_MAP2_GRID_SEGMENTS 0x0DD3
329 #define GL_COEFF 0x0A00
330 #define GL_ORDER 0x0A01
331 #define GL_DOMAIN 0x0A02
340 typedef struct GLUquadric GLUquadric;
345 typedef GLUquadric GLUquadricObj;
349 #define GLU_TESS_MAX_COORD 1.0e150
353 typedef void (GLAPIENTRYP _GLUfuncptr)();
356 GLAPI
void GLAPIENTRY gluBeginCurve (
GLUnurbs* nurb);
358 GLAPI
void GLAPIENTRY gluBeginSurface (
GLUnurbs* nurb);
359 GLAPI
void GLAPIENTRY gluBeginTrim (
GLUnurbs* nurb);
360 GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max,
const void *data);
361 GLAPI GLint GLAPIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type,
const void *data);
362 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);
363 GLAPI GLint GLAPIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type,
const void *data);
364 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);
365 GLAPI GLint GLAPIENTRY gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
const void *data);
366 GLAPI GLboolean GLAPIENTRY gluCheckExtension (
const GLubyte *extName,
const GLubyte *extString);
367 GLAPI
void GLAPIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
368 GLAPI
void GLAPIENTRY gluDeleteNurbsRenderer (
GLUnurbs* nurb);
369 GLAPI
void GLAPIENTRY gluDeleteQuadric (GLUquadric* quad);
371 GLAPI
void GLAPIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
372 GLAPI
void GLAPIENTRY gluEndCurve (
GLUnurbs* nurb);
374 GLAPI
void GLAPIENTRY gluEndSurface (
GLUnurbs* nurb);
375 GLAPI
void GLAPIENTRY gluEndTrim (
GLUnurbs* nurb);
376 GLAPI
const GLubyte * GLAPIENTRY gluErrorString (GLenum error);
377 GLAPI
void GLAPIENTRY gluGetNurbsProperty (
GLUnurbs* nurb, GLenum property, GLfloat* data);
378 GLAPI
const GLubyte * GLAPIENTRY gluGetString (GLenum name);
379 GLAPI
void GLAPIENTRY gluGetTessProperty (
GLUtesselator* tess, GLenum which, GLdouble* data);
380 GLAPI
void GLAPIENTRY gluLoadSamplingMatrices (
GLUnurbs* nurb,
const GLfloat *model,
const GLfloat *perspective,
const GLint *view);
381 GLAPI
void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
382 GLAPI
GLUnurbs* GLAPIENTRY gluNewNurbsRenderer (
void);
383 GLAPI GLUquadric* GLAPIENTRY gluNewQuadric (
void);
385 GLAPI
void GLAPIENTRY gluNextContour (
GLUtesselator* tess, GLenum type);
386 GLAPI
void GLAPIENTRY gluNurbsCallback (
GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
387 GLAPI
void GLAPIENTRY gluNurbsCallbackData (
GLUnurbs* nurb, GLvoid* userData);
388 GLAPI
void GLAPIENTRY gluNurbsCallbackDataEXT (
GLUnurbs* nurb, GLvoid* userData);
389 GLAPI
void GLAPIENTRY gluNurbsCurve (
GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
390 GLAPI
void GLAPIENTRY gluNurbsProperty (
GLUnurbs* nurb, GLenum property, GLfloat value);
391 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);
392 GLAPI
void GLAPIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
393 GLAPI
void GLAPIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
394 GLAPI
void GLAPIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
395 GLAPI
void GLAPIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
396 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);
397 GLAPI
void GLAPIENTRY gluPwlCurve (
GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
398 GLAPI
void GLAPIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
399 GLAPI
void GLAPIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
400 GLAPI
void GLAPIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
401 GLAPI
void GLAPIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
402 GLAPI
void GLAPIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
403 GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn,
const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
404 GLAPI
void GLAPIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
405 GLAPI
void GLAPIENTRY gluTessBeginContour (
GLUtesselator* tess);
406 GLAPI
void GLAPIENTRY gluTessBeginPolygon (
GLUtesselator* tess, GLvoid* data);
407 GLAPI
void GLAPIENTRY gluTessCallback (
GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
408 GLAPI
void GLAPIENTRY gluTessEndContour (
GLUtesselator* tess);
409 GLAPI
void GLAPIENTRY gluTessEndPolygon (
GLUtesselator* tess);
410 GLAPI
void GLAPIENTRY gluTessNormal (
GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
411 GLAPI
void GLAPIENTRY gluTessProperty (
GLUtesselator* tess, GLenum which, GLdouble data);
412 GLAPI
void GLAPIENTRY gluTessVertex (
GLUtesselator* tess, GLdouble *location, GLvoid* data);
413 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);
414 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);