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.

319 lines
8.5 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 <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/glcurveval.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 unsigned int size_t ;
  51. // extern void *malloc (size_t );
  52. // extern void free (void *);
  53. typedef float REAL ;
  54. typedef void (*Pfvv )(void );
  55. typedef void (*Pfvf )(float *);
  56. typedef int (*cmpfunc )(void *, void *);
  57. typedef REAL Knot ;
  58. typedef REAL *Knot_ptr ;
  59. struct CachingEvaluator;
  60. enum __Q2_16CachingEvaluator11ServiceMode { play__Q2_16CachingEvaluator11ServiceMode = 0, record__Q2_16CachingEvaluator11ServiceMode = 1, playAndRecord__Q2_16CachingEvaluator11ServiceMode = 2} ;
  61. struct CachingEvaluator {
  62. struct __mptr *__vptr__16CachingEvaluator ;
  63. };
  64. struct BasicCurveEvaluator;
  65. struct BasicCurveEvaluator {
  66. struct __mptr *__vptr__16CachingEvaluator ;
  67. };
  68. static void *__nw__FUi (size_t );
  69. struct CurveMap;
  70. struct OpenGLCurveEvaluator;
  71. struct OpenGLCurveEvaluator {
  72. struct __mptr *__vptr__16CachingEvaluator ;
  73. };
  74. extern struct __mptr* __gl__ptbl_vec_____clients_glc0[];
  75. struct OpenGLCurveEvaluator *__gl__ct__20OpenGLCurveEvaluat0 (struct OpenGLCurveEvaluator *__0this )
  76. {
  77. struct BasicCurveEvaluator *__0__X6 ;
  78. struct CachingEvaluator *__0__X4 ;
  79. void *__1__Xp0025pnaiaa ;
  80. if (__0this || (__0this = (struct OpenGLCurveEvaluator *)__nw__FUi ( sizeof (struct OpenGLCurveEvaluator)) ))( (__0this = (struct OpenGLCurveEvaluator *)( (__0__X6 = (((struct BasicCurveEvaluator *)__0this ))),
  81. ( ((__0__X6 || (__0__X6 = (struct BasicCurveEvaluator *)__nw__FUi ( sizeof (struct BasicCurveEvaluator)) ))?( (__0__X6 = (struct BasicCurveEvaluator *)( (__0__X4 = (((struct CachingEvaluator *)__0__X6 ))),
  82. ( ((__0__X4 || (__0__X4 = (struct CachingEvaluator *)( (__1__Xp0025pnaiaa = malloc ( (sizeof (struct CachingEvaluator))) ), (__1__Xp0025pnaiaa ?(((void *)__1__Xp0025pnaiaa )):(((void *)__1__Xp0025pnaiaa )))) ))?(__0__X4 ->
  83. __vptr__16CachingEvaluator = (struct __mptr *) __gl__ptbl_vec_____clients_glc0[0]):0 ), ((__0__X4 ))) ) ), (__0__X6 -> __vptr__16CachingEvaluator = (struct __mptr *) __gl__ptbl_vec_____clients_glc0[1])) :0 ), ((__0__X6 ))) ) ),
  84. (__0this -> __vptr__16CachingEvaluator = (struct __mptr *) __gl__ptbl_vec_____clients_glc0[2])) ;
  85. return __0this ;
  86. }
  87. void __gl__dt__20OpenGLCurveEvaluat0 (struct OpenGLCurveEvaluator *__0this ,
  88. int __0__free )
  89. { if (__0this ){
  90. __0this -> __vptr__16CachingEvaluator = (struct __mptr *) __gl__ptbl_vec_____clients_glc0[2];
  91. if (__0this )if (__0__free & 1)( (((void *)__0this )?( free ( ((void *)__0this )) , 0 ) :( 0 ) ))
  92. ;
  93. }
  94. }
  95. void __gladdMap__20OpenGLCurveEvalu0 (struct OpenGLCurveEvaluator *__0this , struct CurveMap *__1m )
  96. {
  97. }
  98. void __glrange1f__20OpenGLCurveEval0 (struct OpenGLCurveEvaluator *__0this , long __1type , REAL *__1from , REAL *__1to )
  99. {
  100. }
  101. void
  102. __gldomain1f__20OpenGLCurveEva0 (struct OpenGLCurveEvaluator *__0this , REAL __1ulo , REAL __1uhi )
  103. {
  104. }
  105. // extern void glBegin (GLenum );
  106. void __glbgnline__20OpenGLCurveEval0 (struct OpenGLCurveEvaluator *__0this )
  107. {
  108. glBegin ( (unsigned int )0x0003 ) ;
  109. }
  110. // extern void glEnd (void );
  111. void __glendline__20OpenGLCurveEval0 (struct OpenGLCurveEvaluator *__0this )
  112. {
  113. glEnd ( ) ;
  114. }
  115. // extern void glDisable (GLenum );
  116. void __gldisable__20OpenGLCurveEval0 (struct OpenGLCurveEvaluator *__0this , long __1type )
  117. {
  118. glDisable ( (unsigned int )__1type ) ;
  119. }
  120. // extern void glEnable (GLenum );
  121. void __glenable__20OpenGLCurveEvalu0 (struct OpenGLCurveEvaluator *__0this , long __1type )
  122. {
  123. glEnable ( (unsigned int )__1type ) ;
  124. }
  125. // extern void glMapGrid1f (GLint , GLfloat , GLfloat );
  126. void __glmapgrid1f__20OpenGLCurveEv0 (struct OpenGLCurveEvaluator *__0this , long __1nu , REAL __1u0 , REAL __1u1 )
  127. {
  128. glMapGrid1f ( (int )__1nu , __1u0 , __1u1 ) ;
  129. }
  130. // extern void glPushAttrib (GLbitfield );
  131. void __glbgnmap1f__20OpenGLCurveEva0 (struct OpenGLCurveEvaluator *__0this , long __1__A7 )
  132. {
  133. glPushAttrib ( (unsigned int )0x00010000 ) ;
  134. }
  135. // extern void glPopAttrib (void );
  136. void __glendmap1f__20OpenGLCurveEva0 (struct OpenGLCurveEvaluator *__0this )
  137. {
  138. glPopAttrib ( ) ;
  139. }
  140. // extern void glMap1f (GLenum , GLfloat , GLfloat , GLint , GLint , GLfloat *);
  141. void __glmap1f__20OpenGLCurveEvalua0 (struct OpenGLCurveEvaluator *__0this ,
  142. long __1type ,
  143. REAL __1ulo ,
  144. REAL __1uhi ,
  145. long __1stride ,
  146. long __1order ,
  147. REAL *__1pts )
  148. {
  149. glMap1f ( (unsigned
  150. int )__1type , __1ulo , __1uhi , (int )__1stride , (int )__1order , (float *)__1pts ) ;
  151. }
  152. // extern void glEvalMesh1 (GLenum , GLint , GLint );
  153. void __glmapmesh1f__20OpenGLCurveEv0 (struct OpenGLCurveEvaluator *__0this , long __1style , long __1from , long __1to )
  154. {
  155. switch (__1style ){
  156. default :
  157. case 0 :
  158. case
  159. 1 :
  160. glEvalMesh1 ( (unsigned int )0x1B01 , (int )__1from , (int )__1to ) ;
  161. break ;
  162. case 2 :
  163. glEvalMesh1 ( (unsigned int )0x1B00 , (int )__1from , (int )__1to ) ;
  164. break ;
  165. }
  166. }
  167. // extern void glEvalPoint1 (GLint );
  168. void __glevalpoint1i__20OpenGLCurve0 (struct OpenGLCurveEvaluator *__0this , long __1i )
  169. {
  170. glEvalPoint1 ( (int )__1i ) ;
  171. }
  172. // extern void glEvalCoord1f (GLfloat );
  173. void __glevalcoord1f__20OpenGLCurve0 (struct OpenGLCurveEvaluator *__0this , long __1__A8 , REAL __1u )
  174. {
  175. glEvalCoord1f ( __1u ) ;
  176. }
  177. int __glcanRecord__16CachingEvalua0 (struct CachingEvaluator *);
  178. int __glcanPlayAndRecord__16Cachin0 (struct CachingEvaluator *);
  179. int __glcreateHandle__16CachingEva0 (struct CachingEvaluator *, int );
  180. void __glbeginOutput__16CachingEval0 (struct CachingEvaluator *, int , int );
  181. void __glendOutput__16CachingEvalua0 (struct CachingEvaluator *);
  182. void __gldiscardRecording__16Cachin0 (struct CachingEvaluator *, int );
  183. void __glplayRecording__16CachingEv0 (struct CachingEvaluator *, int );
  184. struct __mptr __gl__vtbl__20OpenGLCurveEvalu0[] = {0,0,0,
  185. 0,0,(__vptp)__glcanRecord__16CachingEvalua0 ,
  186. 0,0,(__vptp)__glcanPlayAndRecord__16Cachin0 ,
  187. 0,0,(__vptp)__glcreateHandle__16CachingEva0 ,
  188. 0,0,(__vptp)__glbeginOutput__16CachingEval0 ,
  189. 0,0,(__vptp)__glendOutput__16CachingEvalua0 ,
  190. 0,0,(__vptp)__gldiscardRecording__16Cachin0 ,
  191. 0,0,(__vptp)__glplayRecording__16CachingEv0 ,
  192. 0,0,(__vptp)__gldomain1f__20OpenGLCurveEva0 ,
  193. 0,0,(__vptp)__glrange1f__20OpenGLCurveEval0 ,
  194. 0,0,(__vptp)__glenable__20OpenGLCurveEvalu0 ,
  195. 0,0,(__vptp)__gldisable__20OpenGLCurveEval0 ,
  196. 0,0,(__vptp)__glbgnmap1f__20OpenGLCurveEva0 ,
  197. 0,0,(__vptp)__glmap1f__20OpenGLCurveEvalua0 ,
  198. 0,0,(__vptp)__glmapgrid1f__20OpenGLCurveEv0 ,
  199. 0,0,(__vptp)__glmapmesh1f__20OpenGLCurveEv0 ,
  200. 0,0,(__vptp)__glevalcoord1f__20OpenGLCurve0 ,
  201. 0,0,(__vptp)__glendmap1f__20OpenGLCurveEva0 ,
  202. 0,0,(__vptp)__glbgnline__20OpenGLCurveEval0 ,
  203. 0,0,(__vptp)__glendline__20OpenGLCurveEval0 ,
  204. 0,0,0};
  205. extern struct __mptr __gl__vtbl__19BasicCurveEvalua0[];
  206. extern struct __mptr __gl__vtbl__16CachingEvaluator[];
  207. static void *__nw__FUi (
  208. size_t __1s )
  209. {
  210. void *__1__Xp0025pnaiaa ;
  211. __1__Xp0025pnaiaa = malloc ( __1s ) ;
  212. if (__1__Xp0025pnaiaa ){
  213. return __1__Xp0025pnaiaa ;
  214. }
  215. else
  216. {
  217. return __1__Xp0025pnaiaa ;
  218. }
  219. }
  220. struct __mptr* __gl__ptbl_vec_____clients_glc0[] = {
  221. __gl__vtbl__16CachingEvaluator,
  222. __gl__vtbl__19BasicCurveEvalua0,
  223. __gl__vtbl__20OpenGLCurveEvalu0,
  224. };
  225. /* the end */