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.

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