ReactOS  0.4.13-dev-247-g0f29b3f
glu.h
Go to the documentation of this file.
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 #define _GLU_H
33 
34 #include <stddef.h> /* for wchar_t */
35 #include <GL/gl.h>
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 /*************************************************************/
42 
43 /* Boolean */
44 #define GLU_FALSE 0
45 #define GLU_TRUE 1
46 
47 /* Version */
48 #define GLU_VERSION_1_1 1
49 #define GLU_VERSION_1_2 1
50 
51 /* StringName */
52 #define GLU_VERSION 100800
53 #define GLU_EXTENSIONS 100801
54 
55 /* ErrorCode */
56 #define GLU_INVALID_ENUM 100900
57 #define GLU_INVALID_VALUE 100901
58 #define GLU_OUT_OF_MEMORY 100902
59 #define GLU_INVALID_OPERATION 100904
60 
61 /* NurbsDisplay */
62 /* GLU_FILL */
63 #define GLU_OUTLINE_POLYGON 100240
64 #define GLU_OUTLINE_PATCH 100241
65 
66 /* NurbsError */
67 #define GLU_NURBS_ERROR1 100251
68 #define GLU_NURBS_ERROR2 100252
69 #define GLU_NURBS_ERROR3 100253
70 #define GLU_NURBS_ERROR4 100254
71 #define GLU_NURBS_ERROR5 100255
72 #define GLU_NURBS_ERROR6 100256
73 #define GLU_NURBS_ERROR7 100257
74 #define GLU_NURBS_ERROR8 100258
75 #define GLU_NURBS_ERROR9 100259
76 #define GLU_NURBS_ERROR10 100260
77 #define GLU_NURBS_ERROR11 100261
78 #define GLU_NURBS_ERROR12 100262
79 #define GLU_NURBS_ERROR13 100263
80 #define GLU_NURBS_ERROR14 100264
81 #define GLU_NURBS_ERROR15 100265
82 #define GLU_NURBS_ERROR16 100266
83 #define GLU_NURBS_ERROR17 100267
84 #define GLU_NURBS_ERROR18 100268
85 #define GLU_NURBS_ERROR19 100269
86 #define GLU_NURBS_ERROR20 100270
87 #define GLU_NURBS_ERROR21 100271
88 #define GLU_NURBS_ERROR22 100272
89 #define GLU_NURBS_ERROR23 100273
90 #define GLU_NURBS_ERROR24 100274
91 #define GLU_NURBS_ERROR25 100275
92 #define GLU_NURBS_ERROR26 100276
93 #define GLU_NURBS_ERROR27 100277
94 #define GLU_NURBS_ERROR28 100278
95 #define GLU_NURBS_ERROR29 100279
96 #define GLU_NURBS_ERROR30 100280
97 #define GLU_NURBS_ERROR31 100281
98 #define GLU_NURBS_ERROR32 100282
99 #define GLU_NURBS_ERROR33 100283
100 #define GLU_NURBS_ERROR34 100284
101 #define GLU_NURBS_ERROR35 100285
102 #define GLU_NURBS_ERROR36 100286
103 #define GLU_NURBS_ERROR37 100287
104 
105 /* NurbsProperty */
106 #define GLU_AUTO_LOAD_MATRIX 100200
107 #define GLU_CULLING 100201
108 #define GLU_SAMPLING_TOLERANCE 100203
109 #define GLU_DISPLAY_MODE 100204
110 #define GLU_PARAMETRIC_TOLERANCE 100202
111 #define GLU_SAMPLING_METHOD 100205
112 #define GLU_U_STEP 100206
113 #define GLU_V_STEP 100207
114 
115 /* NurbsSampling */
116 #define GLU_PATH_LENGTH 100215
117 #define GLU_PARAMETRIC_ERROR 100216
118 #define GLU_DOMAIN_DISTANCE 100217
119 
120 /* NurbsTrim */
121 #define GLU_MAP1_TRIM_2 100210
122 #define GLU_MAP1_TRIM_3 100211
123 
124 /* QuadricDrawStyle */
125 #define GLU_POINT 100010
126 #define GLU_LINE 100011
127 #define GLU_FILL 100012
128 #define GLU_SILHOUETTE 100013
129 
130 /* QuadricCallback */
131 #define GLU_ERROR 100103
132 
133 /* QuadricNormal */
134 #define GLU_SMOOTH 100000
135 #define GLU_FLAT 100001
136 #define GLU_NONE 100002
137 
138 /* QuadricOrientation */
139 #define GLU_OUTSIDE 100020
140 #define GLU_INSIDE 100021
141 
142 /* TessCallback */
143 #define GLU_TESS_BEGIN 100100
144 #define GLU_BEGIN 100100
145 #define GLU_TESS_VERTEX 100101
146 #define GLU_VERTEX 100101
147 #define GLU_TESS_END 100102
148 #define GLU_END 100102
149 #define GLU_TESS_ERROR 100103
150 #define GLU_TESS_EDGE_FLAG 100104
151 #define GLU_EDGE_FLAG 100104
152 #define GLU_TESS_COMBINE 100105
153 #define GLU_TESS_BEGIN_DATA 100106
154 #define GLU_TESS_VERTEX_DATA 100107
155 #define GLU_TESS_END_DATA 100108
156 #define GLU_TESS_ERROR_DATA 100109
157 #define GLU_TESS_EDGE_FLAG_DATA 100110
158 #define GLU_TESS_COMBINE_DATA 100111
159 
160 /* TessContour */
161 #define GLU_CW 100120
162 #define GLU_CCW 100121
163 #define GLU_INTERIOR 100122
164 #define GLU_EXTERIOR 100123
165 #define GLU_UNKNOWN 100124
166 
167 /* TessProperty */
168 #define GLU_TESS_WINDING_RULE 100140
169 #define GLU_TESS_BOUNDARY_ONLY 100141
170 #define GLU_TESS_TOLERANCE 100142
171 
172 /* TessError */
173 #define GLU_TESS_ERROR1 100151
174 #define GLU_TESS_ERROR2 100152
175 #define GLU_TESS_ERROR3 100153
176 #define GLU_TESS_ERROR4 100154
177 #define GLU_TESS_ERROR5 100155
178 #define GLU_TESS_ERROR6 100156
179 #define GLU_TESS_ERROR7 100157
180 #define GLU_TESS_ERROR8 100158
181 #define GLU_TESS_MISSING_BEGIN_POLYGON 100151
182 #define GLU_TESS_MISSING_BEGIN_CONTOUR 100152
183 #define GLU_TESS_MISSING_END_POLYGON 100153
184 #define GLU_TESS_MISSING_END_CONTOUR 100154
185 #define GLU_TESS_COORD_TOO_LARGE 100155
186 #define GLU_TESS_NEED_COMBINE_CALLBACK 100156
187 
188 /* TessWinding */
189 #define GLU_TESS_WINDING_ODD 100130
190 #define GLU_TESS_WINDING_NONZERO 100131
191 #define GLU_TESS_WINDING_POSITIVE 100132
192 #define GLU_TESS_WINDING_NEGATIVE 100133
193 #define GLU_TESS_WINDING_ABS_GEQ_TWO 100134
194 
195 /* Obsolete. For compatibility with previous Sun OpenGL versions */
196 #define GLU_INCOMPATIBLE_GL_VERSION 100903
197 
198 
199 /*************************************************************/
200 
201 
202 #ifdef __cplusplus
203 class GLUnurbs;
204 class GLUquadric;
205 class GLUtesselator;
206 #else
207 typedef struct GLUnurbs GLUnurbs;
208 typedef struct GLUquadric GLUquadric;
210 #endif
211 
216 
217 #define GLU_TESS_MAX_COORD 1.0e150
218 
219 /* Internal convenience typedefs */
220 typedef void (APIENTRY *_GLUfuncptr)();
221 
222 GLAPI void APIENTRY gluBeginCurve (GLUnurbs* nurb);
225 GLAPI void APIENTRY gluBeginTrim (GLUnurbs* nurb);
232 GLAPI void APIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
233 GLAPI void APIENTRY gluEndCurve (GLUnurbs* nurb);
235 GLAPI void APIENTRY gluEndSurface (GLUnurbs* nurb);
236 GLAPI void APIENTRY gluEndTrim (GLUnurbs* nurb);
242 GLAPI void APIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
243 GLAPI void APIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
248 GLAPI void APIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
249 GLAPI void APIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
251 GLAPI void APIENTRY gluNurbsSurface (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type);
253 GLAPI void APIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
255 GLAPI void APIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
256 GLAPI GLint APIENTRY gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ);
263 GLAPI GLint APIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
264 GLAPI void APIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
270 GLAPI void APIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
273 GLAPI GLint APIENTRY gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ);
274 GLAPI GLint APIENTRY 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);
275 
276 #ifdef UNICODE
277 #define gluErrorStringWIN gluErrorUnicodeStringEXT
278 #else
279 #define gluErrorStringWIN gluErrorString
280 #endif
281 
282 #ifdef __cplusplus
283 }
284 #endif
285 
286 #endif /* __glu_h__ */
double GLdouble
Definition: gl.h:163
GLAPI void GLAPIENTRY gluPwlCurve(GLUnurbs *nurb, GLint count, GLfloat *data, GLint stride, GLenum type)
GLint GLint GLsizei width
Definition: gl.h:1546
GLuint GLdouble GLdouble GLint GLint order
Definition: glext.h:11194
GLAPI void GLAPIENTRY gluSphere(GLUquadric *quad, GLdouble radius, GLint slices, GLint stacks)
Definition: quad.c:694
GLAPI void GLAPIENTRY gluTessEndPolygon(GLUtesselator *tess)
Definition: tess.c:500
#define error(str)
Definition: mkdosfs.c:1605
GLAPI void GLAPIENTRY gluLookAt(GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ)
Definition: project.c:108
GLUnurbs GLUnurbsObj
Definition: glu.h:279
unsigned char GLubyte
Definition: gl.h:157
static GLenum which
Definition: wgl_font.c:159
GLuint GLuint GLsizei count
Definition: gl.h:1545
typedef void(GLAPIENTRYP _GLUfuncptr)(void)
GLAPI void GLAPIENTRY gluPickMatrix(GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport)
GLAPI const wchar_t *APIENTRY gluErrorUnicodeStringEXT(GLenum error)
GLAPI void GLAPIENTRY gluGetTessProperty(GLUtesselator *tess, GLenum which, GLdouble *data)
Definition: tess.c:240
GLAPI void GLAPIENTRY gluTessEndContour(GLUtesselator *tess)
Definition: tess.c:493
GLAPI void GLAPIENTRY gluGetNurbsProperty(GLUnurbs *nurb, GLenum property, GLfloat *data)
Definition: glinterface.cc:359
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLUtesselator GLUtriangulatorObj
Definition: glu.h:282
GLAPI void GLAPIENTRY gluCylinder(GLUquadric *quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks)
Definition: quad.c:150
GLAPI void GLAPIENTRY gluBeginTrim(GLUnurbs *nurb)
Definition: glinterface.cc:131
GLAPI void GLAPIENTRY gluOrtho2D(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top)
Definition: project.c:57
GLAPI GLUtesselator *GLAPIENTRY gluNewTess(void)
Definition: tess.c:92
GLAPI void GLAPIENTRY gluEndTrim(GLUnurbs *nurb)
Definition: glinterface.cc:141
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
GLAPI void GLAPIENTRY gluDisk(GLUquadric *quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops)
Definition: quad.c:424
GLAPI void GLAPIENTRY gluTessProperty(GLUtesselator *tess, GLenum which, GLdouble data)
Definition: tess.c:201
GLAPI void GLAPIENTRY gluDeleteNurbsRenderer(GLUnurbs *nurb)
Definition: glinterface.cc:75
void(APIENTRY * _GLUfuncptr)()
Definition: glu.h:220
GLAPI void GLAPIENTRY gluDeleteQuadric(GLUquadric *quad)
Definition: quad.c:73
int GLsizei
Definition: gl.h:160
unsigned char GLboolean
Definition: gl.h:151
GLdouble zFar
Definition: glext.h:10465
GLAPI void GLAPIENTRY gluTessBeginContour(GLUtesselator *tess)
Definition: tess.c:476
GLAPI void GLAPIENTRY gluNextContour(GLUtesselator *tess, GLenum type)
Definition: tess.c:620
GLAPI void GLAPIENTRY gluBeginPolygon(GLUtesselator *tess)
Definition: tess.c:611
GLAPI void GLAPIENTRY gluPartialDisk(GLUquadric *quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep)
Definition: quad.c:431
GLint GLint bottom
Definition: glext.h:7726
GLAPI void GLAPIENTRY gluNurbsProperty(GLUnurbs *nurb, GLenum property, GLfloat value)
Definition: glinterface.cc:243
GLUquadric GLUquadricObj
Definition: glu.h:280
GLenum internalFormat
Definition: glext.h:8404
GLsizei stride
Definition: glext.h:5848
GLAPI GLUnurbs *GLAPIENTRY gluNewNurbsRenderer(void)
Definition: glinterface.cc:66
GLAPI void GLAPIENTRY gluPerspective(GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar)
Definition: project.c:65
GLenum GLuint texture
Definition: glext.h:6295
GLAPI void GLAPIENTRY gluQuadricOrientation(GLUquadric *quad, GLenum orientation)
Definition: quad.c:120
GLint left
Definition: glext.h:7726
GLAPI GLUquadric *GLAPIENTRY gluNewQuadric(void)
Definition: quad.c:54
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)
GLdouble GLdouble right
Definition: glext.h:10859
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
int clipW
Definition: vnc.c:99
GLUtesselator GLUtesselatorObj
Definition: glu.h:281
GLAPI const GLubyte *GLAPIENTRY gluGetString(GLenum name)
Definition: registry.c:44
static void quad(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3, GLuint pv)
Definition: quads.c:63
GLAPI void GLAPIENTRY gluBeginCurve(GLUnurbs *nurb)
Definition: glinterface.cc:99
unsigned int GLenum
Definition: gl.h:150
GLdouble GLdouble GLdouble GLdouble GLdouble zNear
Definition: glext.h:10859
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLAPI void GLAPIENTRY gluNurbsCurve(GLUnurbs *nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type)
GLAPI void GLAPIENTRY gluQuadricTexture(GLUquadric *quad, GLboolean texture)
Definition: quad.c:114
GLAPI void GLAPIENTRY gluTessVertex(GLUtesselator *tess, GLdouble *location, GLvoid *data)
GLAPI void GLAPIENTRY gluQuadricCallback(GLUquadric *quad, GLenum which, _GLUfuncptr CallBackFunc)
Definition: quad.c:86
GLAPI void GLAPIENTRY gluNurbsCallback(GLUnurbs *nurb, GLenum which, _GLUfuncptr CallBackFunc)
Definition: glinterface.cc:430
GLAPI void GLAPIENTRY gluLoadSamplingMatrices(GLUnurbs *nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view)
GLuint start
Definition: gl.h:1545
GLAPI void GLAPIENTRY gluQuadricNormals(GLUquadric *quad, GLenum normal)
Definition: quad.c:99
GLAPI GLint GLAPIENTRY gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid *dataOut)
Definition: mipmap.c:3498
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)
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLAPI void GLAPIENTRY gluDeleteTess(GLUtesselator *tess)
Definition: tess.c:193
#define GLAPI
Definition: glu.h:61
float GLfloat
Definition: gl.h:161
Definition: name.c:36
GLAPI void GLAPIENTRY gluBeginSurface(GLUnurbs *nurb)
Definition: glinterface.cc:89
GLAPI const GLubyte *GLAPIENTRY gluErrorString(GLenum error)
Definition: error.c:66
GLAPI void GLAPIENTRY gluEndSurface(GLUnurbs *nurb)
Definition: glinterface.cc:111
GLenum target
Definition: glext.h:7315
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)
Definition: glinterface.cc:199
int GLint
Definition: gl.h:156
GLAPI void GLAPIENTRY gluEndCurve(GLUnurbs *nurb)
Definition: glinterface.cc:105
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
GLAPI void GLAPIENTRY gluTessCallback(GLUtesselator *tess, GLenum which, _GLUfuncptr CallBackFunc)
Definition: tess.c:276
GLAPI GLint GLAPIENTRY gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data)
Definition: mipmap.c:3672
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)
GLAPI GLint GLAPIENTRY gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data)
Definition: mipmap.c:4584
#define APIENTRY
Definition: api.h:79
GLAPI void GLAPIENTRY gluTessNormal(GLUtesselator *tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ)
Definition: tess.c:268
GLAPI void GLAPIENTRY gluTessBeginPolygon(GLUtesselator *tess, GLvoid *data)
Definition: tess.c:462
GLAPI void GLAPIENTRY gluQuadricDrawStyle(GLUquadric *quad, GLenum draw)
Definition: quad.c:134
GLAPI void GLAPIENTRY gluEndPolygon(GLUtesselator *tess)
Definition: tess.c:628