ReactOS 0.4.16-dev-197-g92996da
glu.h
Go to the documentation of this file.
1/*
2 * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
3 * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice including the dates of first publication and
13 * either this permission notice or a reference to
14 * http://oss.sgi.com/projects/FreeB/
15 * shall be included in all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
22 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 * SOFTWARE.
24 *
25 * Except as contained in this notice, the name of Silicon Graphics, Inc.
26 * shall not be used in advertising or otherwise to promote the sale, use or
27 * other dealings in this Software without prior written authorization from
28 * Silicon Graphics, Inc.
29 */
30
31#ifndef __glu_h__
32#define __glu_h__
33
34#if defined(USE_MGL_NAMESPACE)
35#include "glu_mangle.h"
36#endif
37
38#include <GL/gl.h>
39
40#ifndef GLAPIENTRY
41#if defined(_MSC_VER) || defined(__MINGW32__)
42#define GLAPIENTRY __stdcall
43#else
44#define GLAPIENTRY
45#endif
46#endif
47
48#ifndef GLAPIENTRYP
49#define GLAPIENTRYP GLAPIENTRY *
50#endif
51
52#if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32)
53# undef GLAPI
54# define GLAPI __declspec(dllexport)
55#elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL)
56/* tag specifying we're building for DLL runtime support */
57# undef GLAPI
58# define GLAPI __declspec(dllimport)
59#elif !defined(GLAPI)
60/* for use with static link lib build of Win32 edition only */
61# define GLAPI extern
62#endif /* _STATIC_MESA support */
63
64#ifdef __cplusplus
65extern "C" {
66#endif
67
68/*************************************************************/
69
70/* Extensions */
71#define GLU_EXT_object_space_tess 1
72#define GLU_EXT_nurbs_tessellator 1
73
74/* Boolean */
75#define GLU_FALSE 0
76#define GLU_TRUE 1
77
78/* Version */
79#define GLU_VERSION_1_1 1
80#define GLU_VERSION_1_2 1
81#define GLU_VERSION_1_3 1
82
83/* StringName */
84#define GLU_VERSION 100800
85#define GLU_EXTENSIONS 100801
86
87/* ErrorCode */
88#define GLU_INVALID_ENUM 100900
89#define GLU_INVALID_VALUE 100901
90#define GLU_OUT_OF_MEMORY 100902
91#define GLU_INCOMPATIBLE_GL_VERSION 100903
92#define GLU_INVALID_OPERATION 100904
93
94/* NurbsDisplay */
95/* GLU_FILL */
96#define GLU_OUTLINE_POLYGON 100240
97#define GLU_OUTLINE_PATCH 100241
98
99/* NurbsCallback */
100#define GLU_NURBS_ERROR 100103
101#define GLU_ERROR 100103
102#define GLU_NURBS_BEGIN 100164
103#define GLU_NURBS_BEGIN_EXT 100164
104#define GLU_NURBS_VERTEX 100165
105#define GLU_NURBS_VERTEX_EXT 100165
106#define GLU_NURBS_NORMAL 100166
107#define GLU_NURBS_NORMAL_EXT 100166
108#define GLU_NURBS_COLOR 100167
109#define GLU_NURBS_COLOR_EXT 100167
110#define GLU_NURBS_TEXTURE_COORD 100168
111#define GLU_NURBS_TEX_COORD_EXT 100168
112#define GLU_NURBS_END 100169
113#define GLU_NURBS_END_EXT 100169
114#define GLU_NURBS_BEGIN_DATA 100170
115#define GLU_NURBS_BEGIN_DATA_EXT 100170
116#define GLU_NURBS_VERTEX_DATA 100171
117#define GLU_NURBS_VERTEX_DATA_EXT 100171
118#define GLU_NURBS_NORMAL_DATA 100172
119#define GLU_NURBS_NORMAL_DATA_EXT 100172
120#define GLU_NURBS_COLOR_DATA 100173
121#define GLU_NURBS_COLOR_DATA_EXT 100173
122#define GLU_NURBS_TEXTURE_COORD_DATA 100174
123#define GLU_NURBS_TEX_COORD_DATA_EXT 100174
124#define GLU_NURBS_END_DATA 100175
125#define GLU_NURBS_END_DATA_EXT 100175
126
127/* NurbsError */
128#define GLU_NURBS_ERROR1 100251
129#define GLU_NURBS_ERROR2 100252
130#define GLU_NURBS_ERROR3 100253
131#define GLU_NURBS_ERROR4 100254
132#define GLU_NURBS_ERROR5 100255
133#define GLU_NURBS_ERROR6 100256
134#define GLU_NURBS_ERROR7 100257
135#define GLU_NURBS_ERROR8 100258
136#define GLU_NURBS_ERROR9 100259
137#define GLU_NURBS_ERROR10 100260
138#define GLU_NURBS_ERROR11 100261
139#define GLU_NURBS_ERROR12 100262
140#define GLU_NURBS_ERROR13 100263
141#define GLU_NURBS_ERROR14 100264
142#define GLU_NURBS_ERROR15 100265
143#define GLU_NURBS_ERROR16 100266
144#define GLU_NURBS_ERROR17 100267
145#define GLU_NURBS_ERROR18 100268
146#define GLU_NURBS_ERROR19 100269
147#define GLU_NURBS_ERROR20 100270
148#define GLU_NURBS_ERROR21 100271
149#define GLU_NURBS_ERROR22 100272
150#define GLU_NURBS_ERROR23 100273
151#define GLU_NURBS_ERROR24 100274
152#define GLU_NURBS_ERROR25 100275
153#define GLU_NURBS_ERROR26 100276
154#define GLU_NURBS_ERROR27 100277
155#define GLU_NURBS_ERROR28 100278
156#define GLU_NURBS_ERROR29 100279
157#define GLU_NURBS_ERROR30 100280
158#define GLU_NURBS_ERROR31 100281
159#define GLU_NURBS_ERROR32 100282
160#define GLU_NURBS_ERROR33 100283
161#define GLU_NURBS_ERROR34 100284
162#define GLU_NURBS_ERROR35 100285
163#define GLU_NURBS_ERROR36 100286
164#define GLU_NURBS_ERROR37 100287
165
166/* NurbsProperty */
167#define GLU_AUTO_LOAD_MATRIX 100200
168#define GLU_CULLING 100201
169#define GLU_SAMPLING_TOLERANCE 100203
170#define GLU_DISPLAY_MODE 100204
171#define GLU_PARAMETRIC_TOLERANCE 100202
172#define GLU_SAMPLING_METHOD 100205
173#define GLU_U_STEP 100206
174#define GLU_V_STEP 100207
175#define GLU_NURBS_MODE 100160
176#define GLU_NURBS_MODE_EXT 100160
177#define GLU_NURBS_TESSELLATOR 100161
178#define GLU_NURBS_TESSELLATOR_EXT 100161
179#define GLU_NURBS_RENDERER 100162
180#define GLU_NURBS_RENDERER_EXT 100162
181
182/* NurbsSampling */
183#define GLU_OBJECT_PARAMETRIC_ERROR 100208
184#define GLU_OBJECT_PARAMETRIC_ERROR_EXT 100208
185#define GLU_OBJECT_PATH_LENGTH 100209
186#define GLU_OBJECT_PATH_LENGTH_EXT 100209
187#define GLU_PATH_LENGTH 100215
188#define GLU_PARAMETRIC_ERROR 100216
189#define GLU_DOMAIN_DISTANCE 100217
190
191/* NurbsTrim */
192#define GLU_MAP1_TRIM_2 100210
193#define GLU_MAP1_TRIM_3 100211
194
195/* QuadricDrawStyle */
196#define GLU_POINT 100010
197#define GLU_LINE 100011
198#define GLU_FILL 100012
199#define GLU_SILHOUETTE 100013
200
201/* QuadricCallback */
202/* GLU_ERROR */
203
204/* QuadricNormal */
205#define GLU_SMOOTH 100000
206#define GLU_FLAT 100001
207#define GLU_NONE 100002
208
209/* QuadricOrientation */
210#define GLU_OUTSIDE 100020
211#define GLU_INSIDE 100021
212
213/* TessCallback */
214#define GLU_TESS_BEGIN 100100
215#define GLU_BEGIN 100100
216#define GLU_TESS_VERTEX 100101
217#define GLU_VERTEX 100101
218#define GLU_TESS_END 100102
219#define GLU_END 100102
220#define GLU_TESS_ERROR 100103
221#define GLU_TESS_EDGE_FLAG 100104
222#define GLU_EDGE_FLAG 100104
223#define GLU_TESS_COMBINE 100105
224#define GLU_TESS_BEGIN_DATA 100106
225#define GLU_TESS_VERTEX_DATA 100107
226#define GLU_TESS_END_DATA 100108
227#define GLU_TESS_ERROR_DATA 100109
228#define GLU_TESS_EDGE_FLAG_DATA 100110
229#define GLU_TESS_COMBINE_DATA 100111
230
231/* TessContour */
232#define GLU_CW 100120
233#define GLU_CCW 100121
234#define GLU_INTERIOR 100122
235#define GLU_EXTERIOR 100123
236#define GLU_UNKNOWN 100124
237
238/* TessProperty */
239#define GLU_TESS_WINDING_RULE 100140
240#define GLU_TESS_BOUNDARY_ONLY 100141
241#define GLU_TESS_TOLERANCE 100142
242
243/* TessError */
244#define GLU_TESS_ERROR1 100151
245#define GLU_TESS_ERROR2 100152
246#define GLU_TESS_ERROR3 100153
247#define GLU_TESS_ERROR4 100154
248#define GLU_TESS_ERROR5 100155
249#define GLU_TESS_ERROR6 100156
250#define GLU_TESS_ERROR7 100157
251#define GLU_TESS_ERROR8 100158
252#define GLU_TESS_MISSING_BEGIN_POLYGON 100151
253#define GLU_TESS_MISSING_BEGIN_CONTOUR 100152
254#define GLU_TESS_MISSING_END_POLYGON 100153
255#define GLU_TESS_MISSING_END_CONTOUR 100154
256#define GLU_TESS_COORD_TOO_LARGE 100155
257#define GLU_TESS_NEED_COMBINE_CALLBACK 100156
258
259/* TessWinding */
260#define GLU_TESS_WINDING_ODD 100130
261#define GLU_TESS_WINDING_NONZERO 100131
262#define GLU_TESS_WINDING_POSITIVE 100132
263#define GLU_TESS_WINDING_NEGATIVE 100133
264#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134
265
266/*************************************************************/
267
268
269#ifdef __cplusplus
270class GLUnurbs;
271class GLUquadric;
272class GLUtesselator;
273#else
274typedef struct GLUnurbs GLUnurbs;
275typedef struct GLUquadric GLUquadric;
277#endif
278
283
284#define GLU_TESS_MAX_COORD 1.0e150
285
286/* Internal convenience typedefs */
288
299GLAPI GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString);
304GLAPI void GLAPIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
313GLAPI void GLAPIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
314GLAPI void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
320GLAPI void GLAPIENTRY gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
324GLAPI 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);
326GLAPI void GLAPIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
329GLAPI GLint GLAPIENTRY gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ);
336GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
337GLAPI void GLAPIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
343GLAPI void GLAPIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
346GLAPI GLint GLAPIENTRY gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ);
347GLAPI 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);
348
349#ifdef __cplusplus
350}
351#endif
352
353#endif /* __glu_h__ */
GLAPI GLUquadric *GLAPIENTRY gluNewQuadric(void)
Definition: quad.c:54
GLAPI GLUtesselator *GLAPIENTRY gluNewTess(void)
Definition: tess.c:92
GLUtesselator GLUtriangulatorObj
Definition: glu.h:282
GLUtesselator GLUtesselatorObj
Definition: glu.h:281
#define GLAPIENTRYP
Definition: glu.h:49
GLUnurbs GLUnurbsObj
Definition: glu.h:279
GLAPI GLUnurbs *GLAPIENTRY gluNewNurbsRenderer(void)
Definition: glinterface.cc:66
#define GLAPIENTRY
Definition: glu.h:44
#define GLAPI
Definition: glu.h:61
GLUquadric GLUquadricObj
Definition: glu.h:280
unsigned char GLubyte
Definition: gl.h:157
GLuint start
Definition: gl.h:1545
GLint GLint GLsizei GLsizei GLsizei depth
Definition: gl.h:1546
GLint level
Definition: gl.h:1546
float GLfloat
Definition: gl.h:161
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
double GLdouble
Definition: gl.h:163
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
unsigned int GLenum
Definition: gl.h:150
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
int GLsizei
Definition: gl.h:160
int GLint
Definition: gl.h:156
GLint GLint GLsizei width
Definition: gl.h:1546
unsigned char GLboolean
Definition: gl.h:151
GLenum GLuint texture
Definition: glext.h:6295
GLsizei stride
Definition: glext.h:5848
GLdouble GLdouble GLdouble GLdouble GLdouble zNear
Definition: glext.h:10859
GLdouble zFar
Definition: glext.h:10465
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
GLdouble GLdouble right
Definition: glext.h:10859
GLint left
Definition: glext.h:7726
GLint GLint bottom
Definition: glext.h:7726
GLuint GLdouble GLdouble GLint GLint order
Definition: glext.h:11194
GLenum internalFormat
Definition: glext.h:8404
GLenum target
Definition: glext.h:7315
#define gluBuild1DMipmaps
Definition: glu_mangle.h:34
#define gluQuadricCallback
Definition: glu_mangle.h:42
#define gluBuild2DMipmapLevels
Definition: glu_mangle.h:78
#define gluDisk
Definition: glu_mangle.h:45
#define gluCheckExtension
Definition: glu_mangle.h:81
#define gluNurbsSurface
Definition: glu_mangle.h:57
#define gluBuild3DMipmaps
Definition: glu_mangle.h:80
#define gluNextContour
Definition: glu_mangle.h:74
#define gluOrtho2D
Definition: glu_mangle.h:27
#define gluScaleImage
Definition: glu_mangle.h:33
#define gluEndCurve
Definition: glu_mangle.h:53
#define gluTessEndPolygon
Definition: glu_mangle.h:67
#define gluTessVertex
Definition: glu_mangle.h:66
#define gluLoadSamplingMatrices
Definition: glu_mangle.h:49
#define gluPerspective
Definition: glu_mangle.h:28
#define gluLookAt
Definition: glu_mangle.h:26
#define gluTessBeginContour
Definition: glu_mangle.h:65
#define gluBeginPolygon
Definition: glu_mangle.h:73
#define gluTessEndContour
Definition: glu_mangle.h:68
#define gluPartialDisk
Definition: glu_mangle.h:46
#define gluPickMatrix
Definition: glu_mangle.h:29
#define gluNurbsCallbackDataEXT
Definition: glu_mangle.h:84
#define gluQuadricNormals
Definition: glu_mangle.h:40
#define gluBeginSurface
Definition: glu_mangle.h:55
#define gluDeleteNurbsRenderer
Definition: glu_mangle.h:48
#define gluGetTessProperty
Definition: glu_mangle.h:72
#define gluNurbsCurve
Definition: glu_mangle.h:54
#define gluProject
Definition: glu_mangle.h:30
#define gluBuild1DMipmapLevels
Definition: glu_mangle.h:77
#define gluDeleteTess
Definition: glu_mangle.h:63
#define gluNurbsCallback
Definition: glu_mangle.h:61
#define gluTessProperty
Definition: glu_mangle.h:69
#define gluBeginCurve
Definition: glu_mangle.h:52
#define gluEndSurface
Definition: glu_mangle.h:56
#define gluGetNurbsProperty
Definition: glu_mangle.h:51
#define gluEndPolygon
Definition: glu_mangle.h:75
#define gluTessCallback
Definition: glu_mangle.h:71
#define gluTessNormal
Definition: glu_mangle.h:70
#define gluCylinder
Definition: glu_mangle.h:43
#define gluNurbsProperty
Definition: glu_mangle.h:50
#define gluPwlCurve
Definition: glu_mangle.h:60
#define gluTessBeginPolygon
Definition: glu_mangle.h:64
#define gluUnProject
Definition: glu_mangle.h:31
#define gluNurbsCallbackData
Definition: glu_mangle.h:83
#define gluGetString
Definition: glu_mangle.h:76
#define gluQuadricOrientation
Definition: glu_mangle.h:39
#define gluSphere
Definition: glu_mangle.h:44
#define gluBuild2DMipmaps
Definition: glu_mangle.h:35
#define gluQuadricTexture
Definition: glu_mangle.h:41
#define gluQuadricDrawStyle
Definition: glu_mangle.h:38
#define gluDeleteQuadric
Definition: glu_mangle.h:37
#define gluEndTrim
Definition: glu_mangle.h:59
#define gluBuild3DMipmapLevels
Definition: glu_mangle.h:79
#define gluBeginTrim
Definition: glu_mangle.h:58
#define gluUnProject4
Definition: glu_mangle.h:82
#define gluErrorString
Definition: glu_mangle.h:32
#define error(str)
Definition: mkdosfs.c:1605
@ normal
Definition: optimize.h:166
static void quad(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3, GLuint pv)
Definition: quads.c:63
Definition: dialog.c:52
Definition: format.c:58
Definition: name.c:39
#define max(a, b)
Definition: svc.c:63
Definition: pdh_main.c:94
int clipW
Definition: vnc.c:99
static GLenum which
Definition: wgl_font.c:159
void(WINAPI * _GLUfuncptr)(void)
Definition: wgl_font.c:148