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