Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1277 lines
25 KiB

  1. /*
  2. ** Copyright 1992, Silicon Graphics, Inc.
  3. ** All Rights Reserved.
  4. **
  5. ** This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6. ** the contents of this file may not be disclosed to third parties, copied or
  7. ** duplicated in any form, in whole or in part, without the prior written
  8. ** permission of Silicon Graphics, Inc.
  9. **
  10. ** RESTRICTED RIGHTS LEGEND:
  11. ** Use, duplication or disclosure by the Government is subject to restrictions
  12. ** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13. ** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14. ** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15. ** rights reserved under the Copyright Laws of the United States.
  16. **
  17. */
  18. #include <windows.h>
  19. #include <GL/gl.h>
  20. #include <GL/glu.h>
  21. #include <stdlib.h>
  22. #include <setjmp.h>
  23. struct JumpBuffer {
  24. jmp_buf buf;
  25. };
  26. #define mysetjmp(x) setjmp((x)->buf)
  27. #define mylongjmp(x,y) longjmp((x)->buf, y)
  28. /* <<AT&T USL C++ Language System <3.0.1> 02/03/92>> */
  29. /* < ../clients/glinterface.c++ > */
  30. void *__vec_new (void *, int , int , void *);
  31. void __vec_ct (void *, int , int , void *);
  32. void __vec_dt (void *, int , int , void *);
  33. void __vec_delete (void *, int , int , void *, int , int );
  34. typedef int (*__vptp)(void);
  35. struct __mptr {short d; short i; __vptp f; };
  36. typedef unsigned int GLenum ;
  37. typedef unsigned char GLboolean ;
  38. typedef unsigned int GLbitfield ;
  39. typedef signed char GLbyte ;
  40. typedef short GLshort ;
  41. typedef int GLint ;
  42. typedef int GLsizei ;
  43. typedef unsigned char GLubyte ;
  44. typedef unsigned short GLushort ;
  45. typedef unsigned int GLuint ;
  46. typedef float GLfloat ;
  47. typedef float GLclampf ;
  48. typedef double GLdouble ;
  49. typedef double GLclampd ;
  50. typedef void GLvoid ;
  51. typedef struct GLUquadricObj GLUquadricObj ;
  52. typedef struct GLUtriangulatorObj GLUtriangulatorObj ;
  53. struct GLUnurbsObj;
  54. typedef unsigned int size_t ;
  55. // extern void *malloc (size_t );
  56. // extern void free (void *);
  57. struct JumpBuffer;
  58. struct Buffer;
  59. struct Buffer {
  60. struct Buffer *next__6Buffer ;
  61. };
  62. struct Pool;
  63. enum __Q2_4Pool5Magic { is_allocated__Q2_4Pool5Magic = 62369, is_free__Q2_4Pool5Magic = 61858} ;
  64. struct Pool {
  65. struct Buffer *freelist__4Pool ;
  66. char *blocklist__4Pool [32];
  67. int nextblock__4Pool ;
  68. char *curblock__4Pool ;
  69. int buffersize__4Pool ;
  70. int nextsize__4Pool ;
  71. int nextfree__4Pool ;
  72. int initsize__4Pool ;
  73. char *name__4Pool ;
  74. int magic__4Pool ;
  75. };
  76. void __glgrow__4PoolFv (struct Pool *);
  77. struct PooledObj;
  78. struct PooledObj {
  79. char __W3__9PooledObj ;
  80. };
  81. typedef float REAL ;
  82. typedef void (*Pfvv )(void );
  83. typedef void (*Pfvf )(float *);
  84. typedef int (*cmpfunc )(void *, void *);
  85. typedef REAL Knot ;
  86. typedef REAL *Knot_ptr ;
  87. struct TrimVertex;
  88. struct PwlArc;
  89. struct PwlArc {
  90. char __W3__9PooledObj ;
  91. struct TrimVertex *pts__6PwlArc ;
  92. int npts__6PwlArc ;
  93. long type__6PwlArc ;
  94. };
  95. struct TrimVertex;
  96. struct TrimVertex {
  97. REAL param__10TrimVertex [2];
  98. long nuid__10TrimVertex ;
  99. };
  100. typedef struct TrimVertex *TrimVertex_p ;
  101. struct Bin;
  102. struct Arc;
  103. struct BezierArc;
  104. typedef struct Arc *Arc_ptr ;
  105. enum arc_side { arc_none = 0, arc_right = 1, arc_top = 2, arc_left = 3, arc_bottom = 4} ;
  106. struct Arc;
  107. struct Arc {
  108. char __W3__9PooledObj ;
  109. Arc_ptr prev__3Arc ;
  110. Arc_ptr next__3Arc ;
  111. Arc_ptr link__3Arc ;
  112. struct BezierArc *bezierArc__3Arc ;
  113. struct PwlArc *pwlArc__3Arc ;
  114. long type__3Arc ;
  115. long nuid__3Arc ;
  116. };
  117. extern int __glbezier_tag__3Arc ;
  118. extern int __glarc_tag__3Arc ;
  119. extern int __gltail_tag__3Arc ;
  120. struct Bin;
  121. struct Bin {
  122. struct Arc *head__3Bin ;
  123. struct Arc *current__3Bin ;
  124. };
  125. struct Sorter;
  126. struct Sorter {
  127. int es__6Sorter ;
  128. struct __mptr *__vptr__6Sorter ;
  129. };
  130. struct FlistSorter;
  131. struct FlistSorter {
  132. int es__6Sorter ;
  133. struct __mptr *__vptr__6Sorter ;
  134. };
  135. struct Flist;
  136. struct Flist {
  137. REAL *pts__5Flist ;
  138. int npts__5Flist ;
  139. int start__5Flist ;
  140. int end__5Flist ;
  141. struct FlistSorter sorter__5Flist ;
  142. };
  143. struct Backend;
  144. struct Jarcloc;
  145. struct Jarcloc {
  146. struct Arc *arc__7Jarcloc ;
  147. struct TrimVertex *p__7Jarcloc ;
  148. struct TrimVertex *plast__7Jarcloc ;
  149. };
  150. struct Trimline;
  151. struct Trimline {
  152. struct TrimVertex **pts__8Trimline ;
  153. long numverts__8Trimline ;
  154. long i__8Trimline ;
  155. long size__8Trimline ;
  156. struct Jarcloc jarcl__8Trimline ;
  157. struct TrimVertex t__8Trimline ;
  158. struct TrimVertex b__8Trimline ;
  159. struct TrimVertex *tinterp__8Trimline ;
  160. struct TrimVertex *binterp__8Trimline ;
  161. };
  162. struct Gridline;
  163. struct Gridline {
  164. long v__8Gridline ;
  165. REAL vval__8Gridline ;
  166. long vindex__8Gridline ;
  167. long ustart__8Gridline ;
  168. long uend__8Gridline ;
  169. };
  170. struct Uarray;
  171. struct Uarray {
  172. long size__6Uarray ;
  173. long ulines__6Uarray ;
  174. REAL *uarray__6Uarray ;
  175. };
  176. struct Backend;
  177. struct TrimRegion;
  178. void __gl__dt__8TrimlineFv (struct Trimline *, int );
  179. void __gl__dt__6UarrayFv (struct Uarray *, int );
  180. struct TrimRegion {
  181. struct Trimline left__10TrimRegion ;
  182. struct Trimline right__10TrimRegion ;
  183. struct Gridline top__10TrimRegion ;
  184. struct Gridline bot__10TrimRegion ;
  185. struct Uarray uarray__10TrimRegion ;
  186. REAL oneOverDu__10TrimRegion ;
  187. };
  188. struct GridTrimVertex;
  189. struct __Q2_4Hull4Side;
  190. struct __Q2_4Hull4Side {
  191. struct Trimline *left__Q2_4Hull4Side ;
  192. struct Gridline *line__Q2_4Hull4Side ;
  193. struct Trimline *right__Q2_4Hull4Side ;
  194. long index__Q2_4Hull4Side ;
  195. };
  196. struct Hull;
  197. struct Hull {
  198. struct __Q2_4Hull4Side lower__4Hull ;
  199. struct __Q2_4Hull4Side upper__4Hull ;
  200. struct Trimline fakeleft__4Hull ;
  201. struct Trimline fakeright__4Hull ;
  202. struct TrimRegion *PTrimRegion;
  203. struct TrimRegion OTrimRegion;
  204. };
  205. struct Backend;
  206. struct GridTrimVertex;
  207. struct Mesher;
  208. struct Mesher {
  209. struct __Q2_4Hull4Side lower__4Hull ;
  210. struct __Q2_4Hull4Side upper__4Hull ;
  211. struct Trimline fakeleft__4Hull ;
  212. struct Trimline fakeright__4Hull ;
  213. struct TrimRegion *PTrimRegion;
  214. struct Backend *backend__6Mesher ;
  215. struct Pool p__6Mesher ;
  216. unsigned int stacksize__6Mesher ;
  217. struct GridTrimVertex **vdata__6Mesher ;
  218. struct GridTrimVertex *last__6Mesher [2];
  219. int itop__6Mesher ;
  220. int lastedge__6Mesher ;
  221. struct TrimRegion OTrimRegion;
  222. };
  223. extern float __glZERO__6Mesher ;
  224. struct Backend;
  225. struct GridVertex;
  226. struct GridTrimVertex;
  227. struct CoveAndTiler;
  228. struct CoveAndTiler {
  229. struct Backend *backend__12CoveAndTiler ;
  230. struct TrimRegion *PTrimRegion;
  231. struct TrimRegion OTrimRegion;
  232. };
  233. extern int __glMAXSTRIPSIZE__12CoveAndTil0 ;
  234. struct Backend;
  235. struct Slicer;
  236. struct Slicer {
  237. struct Backend *backend__12CoveAndTiler ;
  238. struct TrimRegion *PTrimRegion;
  239. struct Mesher OMesher;
  240. struct Backend *backend__6Slicer ;
  241. REAL oneOverDu__6Slicer ;
  242. REAL du__6Slicer ;
  243. REAL dv__6Slicer ;
  244. int isolines__6Slicer ;
  245. };
  246. struct BezierArc;
  247. struct TrimVertexPool;
  248. struct ArcTessellator;
  249. struct ArcTessellator {
  250. struct Pool *pwlarcpool__14ArcTessellator ;
  251. struct TrimVertexPool *trimvertexpool__14ArcTessellator ;
  252. };
  253. extern REAL __glgl_Bernstein__14ArcTessell0 [][24][24];
  254. struct TrimVertexPool;
  255. struct TrimVertexPool {
  256. struct Pool pool__14TrimVertexPool ;
  257. struct TrimVertex **vlist__14TrimVertexPool ;
  258. int nextvlistslot__14TrimVertexPool ;
  259. int vlistsize__14TrimVertexPool ;
  260. };
  261. struct Renderhints;
  262. struct Backend;
  263. struct Quilt;
  264. struct Patchlist;
  265. struct Curvelist;
  266. struct JumpBuffer;
  267. struct Subdivider;
  268. enum __Q2_10Subdivider3dir { down__Q2_10Subdivider3dir = 0, same__Q2_10Subdivider3dir = 1, up__Q2_10Subdivider3dir = 2, none__Q2_10Subdivider3dir = 3} ;
  269. struct Subdivider {
  270. struct Slicer slicer__10Subdivider ;
  271. struct ArcTessellator arctessellator__10Subdivider ;
  272. struct Pool arcpool__10Subdivider ;
  273. struct Pool bezierarcpool__10Subdivider ;
  274. struct Pool pwlarcpool__10Subdivider ;
  275. struct TrimVertexPool trimvertexpool__10Subdivider ;
  276. struct JumpBuffer *jumpbuffer__10Subdivider ;
  277. struct Renderhints *renderhints__10Subdivider ;
  278. struct Backend *backend__10Subdivider ;
  279. struct Bin initialbin__10Subdivider ;
  280. struct Arc *pjarc__10Subdivider ;
  281. int s_index__10Subdivider ;
  282. int t_index__10Subdivider ;
  283. struct Quilt *qlist__10Subdivider ;
  284. struct Flist spbrkpts__10Subdivider ;
  285. struct Flist tpbrkpts__10Subdivider ;
  286. struct Flist smbrkpts__10Subdivider ;
  287. struct Flist tmbrkpts__10Subdivider ;
  288. REAL stepsizes__10Subdivider [4];
  289. int showDegenerate__10Subdivider ;
  290. int isArcTypeBezier__10Subdivider ;
  291. };
  292. struct Renderhints;
  293. struct Renderhints {
  294. REAL display_method__11Renderhints ;
  295. REAL errorchecking__11Renderhints ;
  296. REAL subdivisions__11Renderhints ;
  297. REAL tmp1__11Renderhints ;
  298. int displaydomain__11Renderhints ;
  299. int maxsubdivisions__11Renderhints ;
  300. int wiretris__11Renderhints ;
  301. int wirequads__11Renderhints ;
  302. };
  303. struct GridVertex;
  304. struct GridVertex {
  305. long gparam__10GridVertex [2];
  306. };
  307. struct GridTrimVertex;
  308. struct GridTrimVertex {
  309. char __W3__9PooledObj ;
  310. struct TrimVertex dummyt__14GridTrimVertex ;
  311. struct GridVertex dummyg__14GridTrimVertex ;
  312. struct TrimVertex *t__14GridTrimVertex ;
  313. struct GridVertex *g__14GridTrimVertex ;
  314. };
  315. typedef struct GridTrimVertex *GridTrimVertex_p ;
  316. struct BasicCurveEvaluator;
  317. struct BasicSurfaceEvaluator;
  318. struct Backend;
  319. struct Backend {
  320. struct BasicCurveEvaluator *curveEvaluator__7Backend ;
  321. struct BasicSurfaceEvaluator *surfaceEvaluator__7Backend ;
  322. int wireframetris__7Backend ;
  323. int wireframequads__7Backend ;
  324. int npts__7Backend ;
  325. REAL mesh__7Backend [3][4];
  326. int meshindex__7Backend ;
  327. };
  328. struct Mapdesc;
  329. struct Maplist;
  330. void __gl__dt__4PoolFv (struct Pool *, int );
  331. struct Maplist {
  332. struct Pool mapdescPool__7Maplist ;
  333. struct Mapdesc *maps__7Maplist ;
  334. struct Mapdesc **lastmap__7Maplist ;
  335. struct Backend *backend__7Maplist ;
  336. };
  337. struct Mapdesc *__gllocate__7MaplistFl (struct Maplist *, long );
  338. void __glremove__7MaplistFP7Mapdesc (struct Maplist *, struct Mapdesc *);
  339. enum Curvetype { ct_nurbscurve = 0, ct_pwlcurve = 1, ct_none = 2} ;
  340. struct Property;
  341. struct O_surface;
  342. struct O_nurbssurface;
  343. struct O_trim;
  344. struct O_pwlcurve;
  345. struct O_nurbscurve;
  346. struct O_curve;
  347. struct Quilt;
  348. union __Q2_7O_curve4__C1;
  349. union __Q2_7O_curve4__C1 {
  350. struct O_nurbscurve *o_nurbscurve ;
  351. struct O_pwlcurve *o_pwlcurve ;
  352. };
  353. struct O_curve;
  354. struct O_curve {
  355. char __W3__9PooledObj ;
  356. union __Q2_7O_curve4__C1 curve__7O_curve ;
  357. int curvetype__7O_curve ;
  358. struct O_curve *next__7O_curve ;
  359. struct O_surface *owner__7O_curve ;
  360. int used__7O_curve ;
  361. int save__7O_curve ;
  362. long nuid__7O_curve ;
  363. };
  364. struct O_nurbscurve;
  365. struct O_nurbscurve {
  366. char __W3__9PooledObj ;
  367. struct Quilt *bezier_curves__12O_nurbscurve ;
  368. long type__12O_nurbscurve ;
  369. REAL tesselation__12O_nurbscurve ;
  370. int method__12O_nurbscurve ;
  371. struct O_nurbscurve *next__12O_nurbscurve ;
  372. int used__12O_nurbscurve ;
  373. int save__12O_nurbscurve ;
  374. struct O_curve *owner__12O_nurbscurve ;
  375. };
  376. struct O_pwlcurve;
  377. struct O_pwlcurve {
  378. char __W3__9PooledObj ;
  379. struct TrimVertex *pts__10O_pwlcurve ;
  380. int npts__10O_pwlcurve ;
  381. struct O_pwlcurve *next__10O_pwlcurve ;
  382. int used__10O_pwlcurve ;
  383. int save__10O_pwlcurve ;
  384. struct O_curve *owner__10O_pwlcurve ;
  385. };
  386. struct O_trim;
  387. struct O_trim {
  388. char __W3__9PooledObj ;
  389. struct O_curve *o_curve__6O_trim ;
  390. struct O_trim *next__6O_trim ;
  391. int save__6O_trim ;
  392. };
  393. struct O_nurbssurface;
  394. struct O_nurbssurface {
  395. char __W3__9PooledObj ;
  396. struct Quilt *bezier_patches__14O_nurbssurface ;
  397. long type__14O_nurbssurface ;
  398. struct O_surface *owner__14O_nurbssurface ;
  399. struct O_nurbssurface *next__14O_nurbssurface ;
  400. int save__14O_nurbssurface ;
  401. int used__14O_nurbssurface ;
  402. };
  403. struct O_surface;
  404. struct O_surface {
  405. char __W3__9PooledObj ;
  406. struct O_nurbssurface *o_nurbssurface__9O_surface ;
  407. struct O_trim *o_trim__9O_surface ;
  408. int save__9O_surface ;
  409. long nuid__9O_surface ;
  410. };
  411. struct Property;
  412. struct Property {
  413. char __W3__9PooledObj ;
  414. long type__8Property ;
  415. long tag__8Property ;
  416. REAL value__8Property ;
  417. int save__8Property ;
  418. };
  419. struct NurbsTessellator;
  420. struct Knotvector;
  421. struct Quilt;
  422. struct DisplayList;
  423. struct BasicCurveEvaluator;
  424. struct BasicSurfaceEvaluator;
  425. struct NurbsTessellator;
  426. struct NurbsTessellator {
  427. struct Renderhints renderhints__16NurbsTessellator ;
  428. struct Maplist maplist__16NurbsTessellator ;
  429. struct Backend backend__16NurbsTessellator ;
  430. struct Subdivider subdivider__16NurbsTessellator ;
  431. struct JumpBuffer *jumpbuffer__16NurbsTessellator ;
  432. struct Pool o_pwlcurvePool__16NurbsTessellator ;
  433. struct Pool o_nurbscurvePool__16NurbsTessellator ;
  434. struct Pool o_curvePool__16NurbsTessellator ;
  435. struct Pool o_trimPool__16NurbsTessellator ;
  436. struct Pool o_surfacePool__16NurbsTessellator ;
  437. struct Pool o_nurbssurfacePool__16NurbsTessellator ;
  438. struct Pool propertyPool__16NurbsTessellator ;
  439. struct Pool quiltPool__16NurbsTessellator ;
  440. struct TrimVertexPool extTrimVertexPool__16NurbsTessellator ;
  441. int inSurface__16NurbsTessellator ;
  442. int inCurve__16NurbsTessellator ;
  443. int inTrim__16NurbsTessellator ;
  444. int isCurveModified__16NurbsTessellator ;
  445. int isTrimModified__16NurbsTessellator ;
  446. int isSurfaceModified__16NurbsTessellator ;
  447. int isDataValid__16NurbsTessellator ;
  448. int numTrims__16NurbsTessellator ;
  449. int playBack__16NurbsTessellator ;
  450. struct O_trim **nextTrim__16NurbsTessellator ;
  451. struct O_curve **nextCurve__16NurbsTessellator ;
  452. struct O_nurbscurve **nextNurbscurve__16NurbsTessellator ;
  453. struct O_pwlcurve **nextPwlcurve__16NurbsTessellator ;
  454. struct O_nurbssurface **nextNurbssurface__16NurbsTessellator ;
  455. struct O_surface *currentSurface__16NurbsTessellator ;
  456. struct O_trim *currentTrim__16NurbsTessellator ;
  457. struct O_curve *currentCurve__16NurbsTessellator ;
  458. struct DisplayList *dl__16NurbsTessellator ;
  459. struct __mptr *__vptr__16NurbsTessellator ;
  460. };
  461. extern char *__glNurbsErrors [];
  462. struct CachingEvaluator;
  463. enum __Q2_16CachingEvaluator11ServiceMode { play__Q2_16CachingEvaluator11ServiceMode = 0, record__Q2_16CachingEvaluator11ServiceMode = 1, playAndRecord__Q2_16CachingEvaluator11ServiceMode = 2} ;
  464. struct CachingEvaluator {
  465. struct __mptr *__vptr__16CachingEvaluator ;
  466. };
  467. struct BasicSurfaceEvaluator;
  468. struct BasicSurfaceEvaluator {
  469. struct __mptr *__vptr__16CachingEvaluator ;
  470. };
  471. static void *__nw__FUi (size_t );
  472. struct SurfaceMap;
  473. struct OpenGLSurfaceEvaluator;
  474. struct StoredVertex;
  475. struct StoredVertex;
  476. struct StoredVertex {
  477. int type__12StoredVertex ;
  478. REAL coord__12StoredVertex [2];
  479. long point__12StoredVertex [2];
  480. };
  481. struct OpenGLSurfaceEvaluator;
  482. struct OpenGLSurfaceEvaluator {
  483. struct __mptr *__vptr__16CachingEvaluator ;
  484. struct StoredVertex *vertexCache__22OpenGLSurfaceEvaluator [3];
  485. int tmeshing__22OpenGLSurfaceEvaluator ;
  486. int which__22OpenGLSurfaceEvaluator ;
  487. int vcount__22OpenGLSurfaceEvaluator ;
  488. };
  489. void __glcoord2f__22OpenGLSurfaceEv0 (struct OpenGLSurfaceEvaluator *, REAL , REAL );
  490. void __glpoint2i__22OpenGLSurfaceEv0 (struct OpenGLSurfaceEvaluator *, long , long );
  491. struct BasicCurveEvaluator;
  492. struct BasicCurveEvaluator {
  493. struct __mptr *__vptr__16CachingEvaluator ;
  494. };
  495. struct CurveMap;
  496. struct OpenGLCurveEvaluator;
  497. struct OpenGLCurveEvaluator {
  498. struct __mptr *__vptr__16CachingEvaluator ;
  499. };
  500. struct GLUnurbsObj;
  501. struct GLUnurbsObj {
  502. struct Renderhints renderhints__16NurbsTessellator ;
  503. struct Maplist maplist__16NurbsTessellator ;
  504. struct Backend backend__16NurbsTessellator ;
  505. struct Subdivider subdivider__16NurbsTessellator ;
  506. struct JumpBuffer *jumpbuffer__16NurbsTessellator ;
  507. struct Pool o_pwlcurvePool__16NurbsTessellator ;
  508. struct Pool o_nurbscurvePool__16NurbsTessellator ;
  509. struct Pool o_curvePool__16NurbsTessellator ;
  510. struct Pool o_trimPool__16NurbsTessellator ;
  511. struct Pool o_surfacePool__16NurbsTessellator ;
  512. struct Pool o_nurbssurfacePool__16NurbsTessellator ;
  513. struct Pool propertyPool__16NurbsTessellator ;
  514. struct Pool quiltPool__16NurbsTessellator ;
  515. struct TrimVertexPool extTrimVertexPool__16NurbsTessellator ;
  516. int inSurface__16NurbsTessellator ;
  517. int inCurve__16NurbsTessellator ;
  518. int inTrim__16NurbsTessellator ;
  519. int isCurveModified__16NurbsTessellator ;
  520. int isTrimModified__16NurbsTessellator ;
  521. int isSurfaceModified__16NurbsTessellator ;
  522. int isDataValid__16NurbsTessellator ;
  523. int numTrims__16NurbsTessellator ;
  524. int playBack__16NurbsTessellator ;
  525. struct O_trim **nextTrim__16NurbsTessellator ;
  526. struct O_curve **nextCurve__16NurbsTessellator ;
  527. struct O_nurbscurve **nextNurbscurve__16NurbsTessellator ;
  528. struct O_pwlcurve **nextPwlcurve__16NurbsTessellator ;
  529. struct O_nurbssurface **nextNurbssurface__16NurbsTessellator ;
  530. struct O_surface *currentSurface__16NurbsTessellator ;
  531. struct O_trim *currentTrim__16NurbsTessellator ;
  532. struct O_curve *currentCurve__16NurbsTessellator ;
  533. struct DisplayList *dl__16NurbsTessellator ;
  534. struct __mptr *__vptr__16NurbsTessellator ;
  535. GLUnurbsErrorProc errorCallback__11GLUnurbsObj;
  536. GLboolean autoloadmode__11GLUnurbsObj ;
  537. struct OpenGLSurfaceEvaluator surfaceEvaluator__11GLUnurbsObj ;
  538. struct OpenGLCurveEvaluator curveEvaluator__11GLUnurbsObj ;
  539. };
  540. void __gl__dt__22OpenGLSurfaceEvalu0 (struct OpenGLSurfaceEvaluator *, int );
  541. void __gl__dt__20OpenGLCurveEvaluat0 (struct OpenGLCurveEvaluator *, int );
  542. void __gl__dt__16NurbsTessellatorFv (struct NurbsTessellator *, int );
  543. struct GLUnurbsObj *__gl__ct__11GLUnurbsObjFv (struct GLUnurbsObj *);
  544. extern struct __mptr* __gl__ptbl_vec_____clients_gli0[];
  545. struct GLUnurbsObj *gluNewNurbsRenderer (void )
  546. {
  547. struct GLUnurbsObj *__1t ;
  548. struct GLUnurbsObj *__0__X23 ;
  549. __1t = __gl__ct__11GLUnurbsObjFv ( (struct GLUnurbsObj *)0 ) ;
  550. return __1t ;
  551. }
  552. void gluDeleteNurbsRenderer (struct GLUnurbsObj *__1r )
  553. {
  554. ((void )( (((struct GLUnurbsObj *)__1r )?( ( (((struct GLUnurbsObj *)__1r )-> __vptr__16NurbsTessellator = (struct __mptr *) __gl__ptbl_vec_____clients_gli0[0]), (((struct
  555. GLUnurbsObj *)__1r )?( ( __gl__dt__20OpenGLCurveEvaluat0 ( (struct OpenGLCurveEvaluator *)(& ((struct GLUnurbsObj *)__1r )-> curveEvaluator__11GLUnurbsObj ), 2) , ( __gl__dt__22OpenGLSurfaceEvalu0 ( (struct OpenGLSurfaceEvaluator *)(&
  556. ((struct GLUnurbsObj *)__1r )-> surfaceEvaluator__11GLUnurbsObj ), 2) , ( __gl__dt__16NurbsTessellatorFv ( ((struct NurbsTessellator *)((struct GLUnurbsObj *)__1r )), 0 ) , (( (
  557. (((void *)((struct GLUnurbsObj *)__1r ))?( free ( ((void *)((struct GLUnurbsObj *)__1r ))) , 0 ) :( 0 ) )) , 0 )
  558. )) ) ) , 0 ) :( 0 ) )) , 0 ) :( 0 ) )) );
  559. }
  560. void __glbgnsurface__16NurbsTessell0 (struct NurbsTessellator *, long );
  561. void gluBeginSurface (struct GLUnurbsObj *__1r )
  562. {
  563. __glbgnsurface__16NurbsTessell0 ( (struct NurbsTessellator *)__1r , (long )0 ) ;
  564. }
  565. void __glbgncurve__16NurbsTessellat0 (struct NurbsTessellator *, long );
  566. void gluBeginCurve (struct GLUnurbsObj *__1r )
  567. {
  568. __glbgncurve__16NurbsTessellat0 ( (struct NurbsTessellator *)__1r , (long )0 ) ;
  569. }
  570. void __glendcurve__16NurbsTessellat0 (struct NurbsTessellator *);
  571. void gluEndCurve (struct GLUnurbsObj *__1r )
  572. {
  573. __glendcurve__16NurbsTessellat0 ( (struct NurbsTessellator *)__1r ) ;
  574. }
  575. void __glendsurface__16NurbsTessell0 (struct NurbsTessellator *);
  576. void gluEndSurface (struct GLUnurbsObj *__1r )
  577. {
  578. __glendsurface__16NurbsTessell0 ( (struct NurbsTessellator *)__1r ) ;
  579. }
  580. void __glbgntrim__16NurbsTessellato0 (struct NurbsTessellator *);
  581. void gluBeginTrim (struct GLUnurbsObj *__1r )
  582. {
  583. __glbgntrim__16NurbsTessellato0 ( (struct NurbsTessellator *)__1r ) ;
  584. }
  585. void __glendtrim__16NurbsTessellato0 (struct NurbsTessellator *);
  586. void gluEndTrim (struct GLUnurbsObj *__1r )
  587. {
  588. __glendtrim__16NurbsTessellato0 ( (struct NurbsTessellator *)__1r ) ;
  589. }
  590. void __glpwlcurve__16NurbsTessellat0 (struct NurbsTessellator *, long , float *, long , long );
  591. void gluPwlCurve (struct GLUnurbsObj *__1r , GLint __1count , float *__1array ,
  592. GLint __1stride , GLenum __1type )
  593. {
  594. GLenum __1realType ;
  595. switch (__1type ){
  596. case 100210 :
  597. __1realType = 0x8 ;
  598. break ;
  599. case 100211 :
  600. __1realType = 0xd ;
  601. break ;
  602. default :
  603. __1realType = __1type ;
  604. break ;
  605. }
  606. __glpwlcurve__16NurbsTessellat0 ( (struct NurbsTessellator *)__1r , (long )__1count , __1array , (long )((sizeof (float ))* __1stride ), (long )__1realType ) ;
  607. }
  608. void __glnurbscurve__16NurbsTessell0 (struct NurbsTessellator *, long , float *, long , float *, long , long
  609. );
  610. void gluNurbsCurve (struct GLUnurbsObj *__1r , GLint __1nknots , float *__1knot , GLint __1stride ,
  611. float *__1ctlarray , GLint __1order , GLenum __1type )
  612. {
  613. GLenum __1realType ;
  614. switch (__1type ){
  615. case 100210 :
  616. __1realType = 0x8 ;
  617. break ;
  618. case 100211 :
  619. __1realType = 0xd ;
  620. break ;
  621. default :
  622. __1realType = __1type ;
  623. break ;
  624. }
  625. __glnurbscurve__16NurbsTessell0 ( (struct NurbsTessellator *)__1r , (long )__1nknots , __1knot , (long )((sizeof (float ))* __1stride ), __1ctlarray , (long )__1order ,
  626. (long )__1realType ) ;
  627. }
  628. void __glnurbssurface__16NurbsTesse0 (struct NurbsTessellator *, long , float *, long , float *, long , long
  629. , float *, long , long , long );
  630. void gluNurbsSurface (struct GLUnurbsObj *__1r , GLint __1sknot_count , GLfloat *__1sknot ,
  631. GLint __1tknot_count , GLfloat *__1tknot ,
  632. GLint __1s_stride , GLint __1t_stride ,
  633. GLfloat *__1ctlarray , GLint __1sorder , GLint __1torder ,
  634. GLenum __1type )
  635. {
  636. __glnurbssurface__16NurbsTesse0 (
  637. (struct NurbsTessellator *)__1r , (long )__1sknot_count , __1sknot , (long )__1tknot_count , __1tknot , (long )((sizeof (float ))* __1s_stride ), (long
  638. )((sizeof (float ))* __1t_stride ), __1ctlarray , (long )__1sorder , (long )__1torder , (long )__1type ) ;
  639. }
  640. void __gluseGLMatrices__11GLUnurbsO0 (struct GLUnurbsObj *, GLfloat *, GLfloat *, GLint *);
  641. void gluLoadSamplingMatrices (struct GLUnurbsObj *__1r , GLfloat *__1modelMatrix ,
  642. GLfloat *__1projMatrix ,
  643. GLint *__1viewport )
  644. {
  645. __gluseGLMatrices__11GLUnurbsO0 ( (struct GLUnurbsObj *)__1r , __1modelMatrix , __1projMatrix , __1viewport ) ;
  646. }
  647. void __glsetnurbsproperty__16NurbsT1 (struct NurbsTessellator *, long , long , float );
  648. void __glsetnurbsproperty__16NurbsT0 (struct NurbsTessellator *, long , float );
  649. void gluNurbsProperty (struct GLUnurbsObj *__1r , GLenum __1property , GLfloat __1value )
  650. {
  651. GLfloat __1nurbsValue ;
  652. switch (__1property ){
  653. case 100200 :
  654. ( (__1value ?( (((struct GLUnurbsObj *)__1r )-> autoloadmode__11GLUnurbsObj = 1 ), 0 ) :(((struct GLUnurbsObj *)__1r )-> autoloadmode__11GLUnurbsObj = 0 )))
  655. ;
  656. return ;
  657. case 100201 :
  658. if (__1value != 0.0 ){
  659. __1nurbsValue = 1.0 ;
  660. }
  661. else
  662. {
  663. __1nurbsValue = 0.0 ;
  664. }
  665. __glsetnurbsproperty__16NurbsT1 ( (struct NurbsTessellator *)__1r , (long )0x0DB7 , (long )2 , __1nurbsValue ) ;
  666. __glsetnurbsproperty__16NurbsT1 ( (struct NurbsTessellator *)__1r , (long )0x0DB8 , (long )2 , __1nurbsValue ) ;
  667. __glsetnurbsproperty__16NurbsT1 ( (struct NurbsTessellator *)__1r , (long )0x0D97 , (long )2 , __1nurbsValue ) ;
  668. __glsetnurbsproperty__16NurbsT1 ( (struct NurbsTessellator *)__1r , (long )0x0D98 , (long )2 , __1nurbsValue ) ;
  669. return ;
  670. case 100203 :
  671. __glsetnurbsproperty__16NurbsT1 ( (struct NurbsTessellator *)__1r , (long )0x0DB7 , (long )1 , __1value ) ;
  672. __glsetnurbsproperty__16NurbsT1 ( (struct NurbsTessellator *)__1r , (long )0x0DB8 , (long )1 , __1value ) ;
  673. __glsetnurbsproperty__16NurbsT1 ( (struct NurbsTessellator *)__1r , (long )0x0D97 , (long )1 , __1value ) ;
  674. __glsetnurbsproperty__16NurbsT1 ( (struct NurbsTessellator *)__1r , (long )0x0D98 , (long )1 , __1value ) ;
  675. return ;
  676. case 100204 :
  677. if (__1value == 100012 ){
  678. __1nurbsValue = 1.0 ;
  679. }
  680. else
  681. if (__1value == 100240 ){
  682. __1nurbsValue = 2.0 ;
  683. }
  684. else
  685. if (__1value == 100241 ){
  686. __1nurbsValue = 5.0 ;
  687. }
  688. else
  689. {
  690. ( (((struct GLUnurbsObj *)__1r )-> errorCallback__11GLUnurbsObj ?( ((*((struct GLUnurbsObj *)__1r )-> errorCallback__11GLUnurbsObj ))( ((unsigned int )100901 )) , 0 )
  691. :( 0 ) )) ;
  692. return ;
  693. }
  694. __glsetnurbsproperty__16NurbsT0 ( (struct NurbsTessellator *)__1r , (long )3 , __1nurbsValue ) ;
  695. break ;
  696. default :
  697. ( (((struct GLUnurbsObj *)__1r )-> errorCallback__11GLUnurbsObj ?( ((*((struct GLUnurbsObj *)__1r )-> errorCallback__11GLUnurbsObj ))( ((unsigned int )100900 )) , 0 ) :(
  698. 0 ) )) ;
  699. return ;
  700. }
  701. }
  702. void __glgetnurbsproperty__16NurbsT1 (struct NurbsTessellator *, long , long , float *);
  703. void __glgetnurbsproperty__16NurbsT0 (struct NurbsTessellator *, long , float *);
  704. void gluGetNurbsProperty (struct GLUnurbsObj *__1r , GLenum __1property , GLfloat *__1value )
  705. {
  706. GLfloat __1nurbsValue ;
  707. switch (__1property ){
  708. case 100200 :
  709. if (( ((struct GLUnurbsObj *)__1r )-> autoloadmode__11GLUnurbsObj ) ){
  710. ((*__1value ))= 1 ;
  711. }
  712. else
  713. {
  714. ((*__1value ))= 0 ;
  715. }
  716. break ;
  717. case 100201 :
  718. __glgetnurbsproperty__16NurbsT1 ( (struct NurbsTessellator *)__1r , (long )0x0DB7 , (long )2 , & __1nurbsValue ) ;
  719. if (__1nurbsValue == 1.0 ){
  720. ((*__1value ))= 1 ;
  721. }
  722. else
  723. {
  724. ((*__1value ))= 0 ;
  725. }
  726. break ;
  727. case 100203 :
  728. __glgetnurbsproperty__16NurbsT1 ( (struct NurbsTessellator *)__1r , (long )0x0DB7 , (long )1 , __1value ) ;
  729. break ;
  730. case 100204 :
  731. __glgetnurbsproperty__16NurbsT0 ( (struct NurbsTessellator *)__1r , (long )3 , & __1nurbsValue ) ;
  732. if (__1nurbsValue == 1.0 ){
  733. ((*__1value ))= 100012 ;
  734. }
  735. else
  736. if (__1nurbsValue == 2.0 ){
  737. ((*__1value ))= 100240 ;
  738. }
  739. else
  740. {
  741. ((*__1value ))= 100241 ;
  742. }
  743. break ;
  744. default :
  745. ( (((struct GLUnurbsObj *)__1r )-> errorCallback__11GLUnurbsObj ?( ((*((struct GLUnurbsObj *)__1r )-> errorCallback__11GLUnurbsObj ))( ((unsigned int )100900 )) , 0 ) :(
  746. 0 ) )) ;
  747. return ;
  748. }
  749. }
  750. void gluNurbsCallback (struct GLUnurbsObj *__1r , GLenum __1which , void (CALLBACK*__1fn )())
  751. {
  752. switch (__1which ){
  753. case 100103 :
  754. __1r -> errorCallback__11GLUnurbsObj = (GLUnurbsErrorProc) __1fn ;
  755. break ;
  756. default :
  757. ( (((struct GLUnurbsObj *)__1r )-> errorCallback__11GLUnurbsObj ?( ((*((struct GLUnurbsObj *)__1r )-> errorCallback__11GLUnurbsObj ))( ((unsigned int )100900 )) , 0 ) :(
  758. 0 ) )) ;
  759. return ;
  760. }
  761. }
  762. extern struct __mptr __gl__vtbl__11GLUnurbsObj[];
  763. static void *__nw__FUi (
  764. size_t __1s )
  765. {
  766. void *__1__Xp00qshqaiaa ;
  767. __1__Xp00qshqaiaa = malloc ( __1s ) ;
  768. if (__1__Xp00qshqaiaa ){
  769. return __1__Xp00qshqaiaa ;
  770. }
  771. else
  772. {
  773. return __1__Xp00qshqaiaa ;
  774. }
  775. }
  776. struct __mptr* __gl__ptbl_vec_____clients_gli0[] = {
  777. __gl__vtbl__11GLUnurbsObj,
  778. };
  779. /* the end */