Clone of mesa.
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

glu.h 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  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. #ifndef __glu_h__
  30. #define __glu_h__
  31. #if defined(USE_MGL_NAMESPACE)
  32. #include "glu_mangle.h"
  33. #endif
  34. #include <GL/gl.h>
  35. #ifndef GLAPIENTRY
  36. #define GLAPIENTRY
  37. #endif
  38. #ifndef GLAPIENTRYP
  39. #define GLAPIENTRYP GLAPIENTRY *
  40. #endif
  41. #ifdef GLAPI
  42. #undef GLAPI
  43. #endif
  44. # if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32)
  45. # define GLAPI __declspec(dllexport)
  46. # elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
  47. # define GLAPI __declspec(dllimport)
  48. # else /* for use with static link lib build of Win32 edition only */
  49. # define GLAPI extern
  50. # endif /* _STATIC_MESA support */
  51. #ifndef GLAPI
  52. #define GLAPI
  53. #endif
  54. #ifdef __cplusplus
  55. extern "C" {
  56. #endif
  57. /*************************************************************/
  58. /* Extensions */
  59. #define GLU_EXT_object_space_tess 1
  60. #define GLU_EXT_nurbs_tessellator 1
  61. /* Boolean */
  62. #define GLU_FALSE 0
  63. #define GLU_TRUE 1
  64. /* Version */
  65. #define GLU_VERSION_1_1 1
  66. #define GLU_VERSION_1_2 1
  67. #define GLU_VERSION_1_3 1
  68. /* StringName */
  69. #define GLU_VERSION 100800
  70. #define GLU_EXTENSIONS 100801
  71. /* ErrorCode */
  72. #define GLU_INVALID_ENUM 100900
  73. #define GLU_INVALID_VALUE 100901
  74. #define GLU_OUT_OF_MEMORY 100902
  75. #define GLU_INCOMPATIBLE_GL_VERSION 100903
  76. #define GLU_INVALID_OPERATION 100904
  77. /* NurbsDisplay */
  78. /* GLU_FILL */
  79. #define GLU_OUTLINE_POLYGON 100240
  80. #define GLU_OUTLINE_PATCH 100241
  81. /* NurbsCallback */
  82. #define GLU_NURBS_ERROR 100103
  83. #define GLU_ERROR 100103
  84. #define GLU_NURBS_BEGIN 100164
  85. #define GLU_NURBS_BEGIN_EXT 100164
  86. #define GLU_NURBS_VERTEX 100165
  87. #define GLU_NURBS_VERTEX_EXT 100165
  88. #define GLU_NURBS_NORMAL 100166
  89. #define GLU_NURBS_NORMAL_EXT 100166
  90. #define GLU_NURBS_COLOR 100167
  91. #define GLU_NURBS_COLOR_EXT 100167
  92. #define GLU_NURBS_TEXTURE_COORD 100168
  93. #define GLU_NURBS_TEX_COORD_EXT 100168
  94. #define GLU_NURBS_END 100169
  95. #define GLU_NURBS_END_EXT 100169
  96. #define GLU_NURBS_BEGIN_DATA 100170
  97. #define GLU_NURBS_BEGIN_DATA_EXT 100170
  98. #define GLU_NURBS_VERTEX_DATA 100171
  99. #define GLU_NURBS_VERTEX_DATA_EXT 100171
  100. #define GLU_NURBS_NORMAL_DATA 100172
  101. #define GLU_NURBS_NORMAL_DATA_EXT 100172
  102. #define GLU_NURBS_COLOR_DATA 100173
  103. #define GLU_NURBS_COLOR_DATA_EXT 100173
  104. #define GLU_NURBS_TEXTURE_COORD_DATA 100174
  105. #define GLU_NURBS_TEX_COORD_DATA_EXT 100174
  106. #define GLU_NURBS_END_DATA 100175
  107. #define GLU_NURBS_END_DATA_EXT 100175
  108. /* NurbsError */
  109. #define GLU_NURBS_ERROR1 100251
  110. #define GLU_NURBS_ERROR2 100252
  111. #define GLU_NURBS_ERROR3 100253
  112. #define GLU_NURBS_ERROR4 100254
  113. #define GLU_NURBS_ERROR5 100255
  114. #define GLU_NURBS_ERROR6 100256
  115. #define GLU_NURBS_ERROR7 100257
  116. #define GLU_NURBS_ERROR8 100258
  117. #define GLU_NURBS_ERROR9 100259
  118. #define GLU_NURBS_ERROR10 100260
  119. #define GLU_NURBS_ERROR11 100261
  120. #define GLU_NURBS_ERROR12 100262
  121. #define GLU_NURBS_ERROR13 100263
  122. #define GLU_NURBS_ERROR14 100264
  123. #define GLU_NURBS_ERROR15 100265
  124. #define GLU_NURBS_ERROR16 100266
  125. #define GLU_NURBS_ERROR17 100267
  126. #define GLU_NURBS_ERROR18 100268
  127. #define GLU_NURBS_ERROR19 100269
  128. #define GLU_NURBS_ERROR20 100270
  129. #define GLU_NURBS_ERROR21 100271
  130. #define GLU_NURBS_ERROR22 100272
  131. #define GLU_NURBS_ERROR23 100273
  132. #define GLU_NURBS_ERROR24 100274
  133. #define GLU_NURBS_ERROR25 100275
  134. #define GLU_NURBS_ERROR26 100276
  135. #define GLU_NURBS_ERROR27 100277
  136. #define GLU_NURBS_ERROR28 100278
  137. #define GLU_NURBS_ERROR29 100279
  138. #define GLU_NURBS_ERROR30 100280
  139. #define GLU_NURBS_ERROR31 100281
  140. #define GLU_NURBS_ERROR32 100282
  141. #define GLU_NURBS_ERROR33 100283
  142. #define GLU_NURBS_ERROR34 100284
  143. #define GLU_NURBS_ERROR35 100285
  144. #define GLU_NURBS_ERROR36 100286
  145. #define GLU_NURBS_ERROR37 100287
  146. /* NurbsProperty */
  147. #define GLU_AUTO_LOAD_MATRIX 100200
  148. #define GLU_CULLING 100201
  149. #define GLU_SAMPLING_TOLERANCE 100203
  150. #define GLU_DISPLAY_MODE 100204
  151. #define GLU_PARAMETRIC_TOLERANCE 100202
  152. #define GLU_SAMPLING_METHOD 100205
  153. #define GLU_U_STEP 100206
  154. #define GLU_V_STEP 100207
  155. #define GLU_NURBS_MODE 100160
  156. #define GLU_NURBS_MODE_EXT 100160
  157. #define GLU_NURBS_TESSELLATOR 100161
  158. #define GLU_NURBS_TESSELLATOR_EXT 100161
  159. #define GLU_NURBS_RENDERER 100162
  160. #define GLU_NURBS_RENDERER_EXT 100162
  161. /* NurbsSampling */
  162. #define GLU_OBJECT_PARAMETRIC_ERROR 100208
  163. #define GLU_OBJECT_PARAMETRIC_ERROR_EXT 100208
  164. #define GLU_OBJECT_PATH_LENGTH 100209
  165. #define GLU_OBJECT_PATH_LENGTH_EXT 100209
  166. #define GLU_PATH_LENGTH 100215
  167. #define GLU_PARAMETRIC_ERROR 100216
  168. #define GLU_DOMAIN_DISTANCE 100217
  169. /* NurbsTrim */
  170. #define GLU_MAP1_TRIM_2 100210
  171. #define GLU_MAP1_TRIM_3 100211
  172. /* QuadricDrawStyle */
  173. #define GLU_POINT 100010
  174. #define GLU_LINE 100011
  175. #define GLU_FILL 100012
  176. #define GLU_SILHOUETTE 100013
  177. /* QuadricCallback */
  178. /* GLU_ERROR */
  179. /* QuadricNormal */
  180. #define GLU_SMOOTH 100000
  181. #define GLU_FLAT 100001
  182. #define GLU_NONE 100002
  183. /* QuadricOrientation */
  184. #define GLU_OUTSIDE 100020
  185. #define GLU_INSIDE 100021
  186. /* TessCallback */
  187. #define GLU_TESS_BEGIN 100100
  188. #define GLU_BEGIN 100100
  189. #define GLU_TESS_VERTEX 100101
  190. #define GLU_VERTEX 100101
  191. #define GLU_TESS_END 100102
  192. #define GLU_END 100102
  193. #define GLU_TESS_ERROR 100103
  194. #define GLU_TESS_EDGE_FLAG 100104
  195. #define GLU_EDGE_FLAG 100104
  196. #define GLU_TESS_COMBINE 100105
  197. #define GLU_TESS_BEGIN_DATA 100106
  198. #define GLU_TESS_VERTEX_DATA 100107
  199. #define GLU_TESS_END_DATA 100108
  200. #define GLU_TESS_ERROR_DATA 100109
  201. #define GLU_TESS_EDGE_FLAG_DATA 100110
  202. #define GLU_TESS_COMBINE_DATA 100111
  203. /* TessContour */
  204. #define GLU_CW 100120
  205. #define GLU_CCW 100121
  206. #define GLU_INTERIOR 100122
  207. #define GLU_EXTERIOR 100123
  208. #define GLU_UNKNOWN 100124
  209. /* TessProperty */
  210. #define GLU_TESS_WINDING_RULE 100140
  211. #define GLU_TESS_BOUNDARY_ONLY 100141
  212. #define GLU_TESS_TOLERANCE 100142
  213. /* TessError */
  214. #define GLU_TESS_ERROR1 100151
  215. #define GLU_TESS_ERROR2 100152
  216. #define GLU_TESS_ERROR3 100153
  217. #define GLU_TESS_ERROR4 100154
  218. #define GLU_TESS_ERROR5 100155
  219. #define GLU_TESS_ERROR6 100156
  220. #define GLU_TESS_ERROR7 100157
  221. #define GLU_TESS_ERROR8 100158
  222. #define GLU_TESS_MISSING_BEGIN_POLYGON 100151
  223. #define GLU_TESS_MISSING_BEGIN_CONTOUR 100152
  224. #define GLU_TESS_MISSING_END_POLYGON 100153
  225. #define GLU_TESS_MISSING_END_CONTOUR 100154
  226. #define GLU_TESS_COORD_TOO_LARGE 100155
  227. #define GLU_TESS_NEED_COMBINE_CALLBACK 100156
  228. /* TessWinding */
  229. #define GLU_TESS_WINDING_ODD 100130
  230. #define GLU_TESS_WINDING_NONZERO 100131
  231. #define GLU_TESS_WINDING_POSITIVE 100132
  232. #define GLU_TESS_WINDING_NEGATIVE 100133
  233. #define GLU_TESS_WINDING_ABS_GEQ_TWO 100134
  234. /*************************************************************/
  235. #ifdef __cplusplus
  236. class GLUnurbs;
  237. class GLUquadric;
  238. class GLUtesselator;
  239. #else
  240. typedef struct GLUnurbs GLUnurbs;
  241. typedef struct GLUquadric GLUquadric;
  242. typedef struct GLUtesselator GLUtesselator;
  243. #endif
  244. typedef GLUnurbs GLUnurbsObj;
  245. typedef GLUquadric GLUquadricObj;
  246. typedef GLUtesselator GLUtesselatorObj;
  247. typedef GLUtesselator GLUtriangulatorObj;
  248. #define GLU_TESS_MAX_COORD 1.0e150
  249. /* Internal convenience typedefs */
  250. typedef void (GLAPIENTRYP _GLUfuncptr)();
  251. GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb);
  252. GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess);
  253. GLAPI void GLAPIENTRY gluBeginSurface (GLUnurbs* nurb);
  254. GLAPI void GLAPIENTRY gluBeginTrim (GLUnurbs* nurb);
  255. GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
  256. GLAPI GLint GLAPIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
  257. 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);
  258. GLAPI GLint GLAPIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
  259. 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);
  260. GLAPI GLint GLAPIENTRY gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
  261. GLAPI GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString);
  262. GLAPI void GLAPIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
  263. GLAPI void GLAPIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb);
  264. GLAPI void GLAPIENTRY gluDeleteQuadric (GLUquadric* quad);
  265. GLAPI void GLAPIENTRY gluDeleteTess (GLUtesselator* tess);
  266. GLAPI void GLAPIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
  267. GLAPI void GLAPIENTRY gluEndCurve (GLUnurbs* nurb);
  268. GLAPI void GLAPIENTRY gluEndPolygon (GLUtesselator* tess);
  269. GLAPI void GLAPIENTRY gluEndSurface (GLUnurbs* nurb);
  270. GLAPI void GLAPIENTRY gluEndTrim (GLUnurbs* nurb);
  271. GLAPI const GLubyte * GLAPIENTRY gluErrorString (GLenum error);
  272. GLAPI void GLAPIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
  273. GLAPI const GLubyte * GLAPIENTRY gluGetString (GLenum name);
  274. GLAPI void GLAPIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
  275. GLAPI void GLAPIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
  276. GLAPI void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
  277. GLAPI GLUnurbs* GLAPIENTRY gluNewNurbsRenderer (void);
  278. GLAPI GLUquadric* GLAPIENTRY gluNewQuadric (void);
  279. GLAPI GLUtesselator* GLAPIENTRY gluNewTess (void);
  280. GLAPI void GLAPIENTRY gluNextContour (GLUtesselator* tess, GLenum type);
  281. GLAPI void GLAPIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
  282. GLAPI void GLAPIENTRY gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
  283. GLAPI void GLAPIENTRY gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
  284. GLAPI void GLAPIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
  285. GLAPI void GLAPIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
  286. 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);
  287. GLAPI void GLAPIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
  288. GLAPI void GLAPIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
  289. GLAPI void GLAPIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
  290. GLAPI void GLAPIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
  291. 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);
  292. GLAPI void GLAPIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
  293. GLAPI void GLAPIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
  294. GLAPI void GLAPIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
  295. GLAPI void GLAPIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
  296. GLAPI void GLAPIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
  297. GLAPI void GLAPIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
  298. GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
  299. GLAPI void GLAPIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
  300. GLAPI void GLAPIENTRY gluTessBeginContour (GLUtesselator* tess);
  301. GLAPI void GLAPIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
  302. GLAPI void GLAPIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
  303. GLAPI void GLAPIENTRY gluTessEndContour (GLUtesselator* tess);
  304. GLAPI void GLAPIENTRY gluTessEndPolygon (GLUtesselator* tess);
  305. GLAPI void GLAPIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
  306. GLAPI void GLAPIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
  307. GLAPI void GLAPIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
  308. 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);
  309. 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);
  310. #ifdef __cplusplus
  311. }
  312. #endif
  313. #endif /* __glu_h__ */