Leaked source code of windows server 2003
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.

950 lines
23 KiB

  1. /*
  2. ** Copyright 1991-1993, 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. * AUTOMATICALLY UPDATED OR GENERATED BY SGI: DO NOT EDIT
  19. * IF YOU MUST MODIFY THIS FILE, PLEASE CONTACT ptar@sgi.com 415-390-1483
  20. */
  21. #include "precomp.h"
  22. #pragma hdrstop
  23. #define const // Don't bother with const
  24. #include <imfuncs.h>
  25. #include "glsbmsg.h"
  26. #include "glsbmsgh.h"
  27. VOID * FASTCALL
  28. sbs_glAddSwapHintRectWIN ( __GLcontext *gc, IN GLMSG_ADDSWAPHINTRECTWIN *pMsg )
  29. {
  30. __glim_AddSwapHintRectWIN(
  31. pMsg->xs, pMsg->ys, pMsg->xe, pMsg->ye);
  32. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  33. }
  34. VOID * FASTCALL
  35. sbs_glDrawPolyArray ( __GLcontext *gc, IN GLMSG_DRAWPOLYARRAY *pMsg )
  36. {
  37. __glim_DrawPolyArray( pMsg->pa0 );
  38. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  39. }
  40. VOID * FASTCALL
  41. sbs_glColor4fv ( __GLcontext *gc, IN GLMSG_COLOR4FV *pMsg )
  42. {
  43. __glim_Color4fv( pMsg->v );
  44. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  45. }
  46. VOID * FASTCALL
  47. sbs_glEdgeFlag ( __GLcontext *gc, IN GLMSG_EDGEFLAG *pMsg )
  48. {
  49. __glim_EdgeFlag( pMsg->flag );
  50. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  51. }
  52. VOID * FASTCALL
  53. sbs_glIndexf ( __GLcontext *gc, IN GLMSG_INDEXF *pMsg )
  54. {
  55. __glim_Indexf( pMsg->c );
  56. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  57. }
  58. VOID * FASTCALL
  59. sbs_glNormal3fv ( __GLcontext *gc, IN GLMSG_NORMAL3FV *pMsg )
  60. {
  61. __glim_Normal3fv( pMsg->v );
  62. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  63. }
  64. VOID * FASTCALL
  65. sbs_glRasterPos4fv ( __GLcontext *gc, IN GLMSG_RASTERPOS4FV *pMsg )
  66. {
  67. __glim_RasterPos4fv( pMsg->v );
  68. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  69. }
  70. VOID * FASTCALL
  71. sbs_glTexCoord4fv ( __GLcontext *gc, IN GLMSG_TEXCOORD4FV *pMsg )
  72. {
  73. __glim_TexCoord4fv( pMsg->v );
  74. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  75. }
  76. VOID * FASTCALL
  77. sbs_glClipPlane ( __GLcontext *gc, IN GLMSG_CLIPPLANE *pMsg )
  78. {
  79. __glim_ClipPlane( pMsg->plane, pMsg->equation );
  80. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  81. }
  82. VOID * FASTCALL
  83. sbs_glColorMaterial ( __GLcontext *gc, IN GLMSG_COLORMATERIAL *pMsg )
  84. {
  85. __glim_ColorMaterial( pMsg->face, pMsg->mode );
  86. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  87. }
  88. VOID * FASTCALL
  89. sbs_glCullFace ( __GLcontext *gc, IN GLMSG_CULLFACE *pMsg )
  90. {
  91. __glim_CullFace( pMsg->mode );
  92. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  93. }
  94. VOID * FASTCALL
  95. sbs_glFogfv ( __GLcontext *gc, IN GLMSG_FOGFV *pMsg )
  96. {
  97. __glim_Fogfv( pMsg->pname, &pMsg->params[0] );
  98. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  99. }
  100. VOID * FASTCALL
  101. sbs_glFrontFace ( __GLcontext *gc, IN GLMSG_FRONTFACE *pMsg )
  102. {
  103. __glim_FrontFace( pMsg->mode );
  104. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  105. }
  106. VOID * FASTCALL
  107. sbs_glHint ( __GLcontext *gc, IN GLMSG_HINT *pMsg )
  108. {
  109. __glim_Hint( pMsg->target, pMsg->mode );
  110. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  111. }
  112. VOID * FASTCALL
  113. sbs_glLightfv ( __GLcontext *gc, IN GLMSG_LIGHTFV *pMsg )
  114. {
  115. __glim_Lightfv( pMsg->light, pMsg->pname, &pMsg->params[0] );
  116. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  117. }
  118. VOID * FASTCALL
  119. sbs_glLightModelfv ( __GLcontext *gc, IN GLMSG_LIGHTMODELFV *pMsg )
  120. {
  121. __glim_LightModelfv( pMsg->pname, &pMsg->params[0] );
  122. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  123. }
  124. VOID * FASTCALL
  125. sbs_glLineStipple ( __GLcontext *gc, IN GLMSG_LINESTIPPLE *pMsg )
  126. {
  127. __glim_LineStipple( pMsg->factor, pMsg->pattern );
  128. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  129. }
  130. VOID * FASTCALL
  131. sbs_glLineWidth ( __GLcontext *gc, IN GLMSG_LINEWIDTH *pMsg )
  132. {
  133. __glim_LineWidth( pMsg->width );
  134. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  135. }
  136. VOID * FASTCALL
  137. sbs_glMaterialfv ( __GLcontext *gc, IN GLMSG_MATERIALFV *pMsg )
  138. {
  139. __glim_Materialfv( pMsg->face, pMsg->pname, &pMsg->params[0] );
  140. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  141. }
  142. VOID * FASTCALL
  143. sbs_glPointSize ( __GLcontext *gc, IN GLMSG_POINTSIZE *pMsg )
  144. {
  145. __glim_PointSize( pMsg->size );
  146. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  147. }
  148. VOID * FASTCALL
  149. sbs_glPolygonMode ( __GLcontext *gc, IN GLMSG_POLYGONMODE *pMsg )
  150. {
  151. __glim_PolygonMode( pMsg->face, pMsg->mode );
  152. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  153. }
  154. VOID * FASTCALL
  155. sbs_glScissor ( __GLcontext *gc, IN GLMSG_SCISSOR *pMsg )
  156. {
  157. __glim_Scissor( pMsg->x, pMsg->y, pMsg->width, pMsg->height );
  158. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  159. }
  160. VOID * FASTCALL
  161. sbs_glShadeModel ( __GLcontext *gc, IN GLMSG_SHADEMODEL *pMsg )
  162. {
  163. __glim_ShadeModel( pMsg->mode );
  164. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  165. }
  166. VOID * FASTCALL
  167. sbs_glTexParameterfv ( __GLcontext *gc, IN GLMSG_TEXPARAMETERFV *pMsg )
  168. {
  169. __glim_TexParameterfv( pMsg->target, pMsg->pname, &pMsg->params[0] );
  170. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  171. }
  172. VOID * FASTCALL
  173. sbs_glTexParameteriv ( __GLcontext *gc, IN GLMSG_TEXPARAMETERIV *pMsg )
  174. {
  175. __glim_TexParameteriv( pMsg->target, pMsg->pname, &pMsg->params[0] );
  176. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  177. }
  178. VOID * FASTCALL
  179. sbs_glTexEnvfv ( __GLcontext *gc, IN GLMSG_TEXENVFV *pMsg )
  180. {
  181. __glim_TexEnvfv( pMsg->target, pMsg->pname, &pMsg->params[0] );
  182. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  183. }
  184. VOID * FASTCALL
  185. sbs_glTexEnviv ( __GLcontext *gc, IN GLMSG_TEXENVIV *pMsg )
  186. {
  187. __glim_TexEnviv( pMsg->target, pMsg->pname, &pMsg->params[0] );
  188. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  189. }
  190. VOID * FASTCALL
  191. sbs_glTexGenfv ( __GLcontext *gc, IN GLMSG_TEXGENFV *pMsg )
  192. {
  193. __glim_TexGenfv( pMsg->coord, pMsg->pname, &pMsg->params[0] );
  194. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  195. }
  196. VOID * FASTCALL
  197. sbs_glInitNames ( __GLcontext *gc, IN GLMSG_INITNAMES *pMsg )
  198. {
  199. __glim_InitNames( );
  200. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  201. }
  202. VOID * FASTCALL
  203. sbs_glLoadName ( __GLcontext *gc, IN GLMSG_LOADNAME *pMsg )
  204. {
  205. __glim_LoadName( pMsg->name );
  206. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  207. }
  208. VOID * FASTCALL
  209. sbs_glPassThrough ( __GLcontext *gc, IN GLMSG_PASSTHROUGH *pMsg )
  210. {
  211. __glim_PassThrough( pMsg->token );
  212. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  213. }
  214. VOID * FASTCALL
  215. sbs_glPopName ( __GLcontext *gc, IN GLMSG_POPNAME *pMsg )
  216. {
  217. __glim_PopName( );
  218. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  219. }
  220. VOID * FASTCALL
  221. sbs_glPushName ( __GLcontext *gc, IN GLMSG_PUSHNAME *pMsg )
  222. {
  223. __glim_PushName( pMsg->name );
  224. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  225. }
  226. VOID * FASTCALL
  227. sbs_glDrawBuffer ( __GLcontext *gc, IN GLMSG_DRAWBUFFER *pMsg )
  228. {
  229. __glim_DrawBuffer( pMsg->mode );
  230. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  231. }
  232. VOID * FASTCALL
  233. sbs_glClear ( __GLcontext *gc, IN GLMSG_CLEAR *pMsg )
  234. {
  235. __glim_Clear( pMsg->mask );
  236. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  237. }
  238. VOID * FASTCALL
  239. sbs_glClearAccum ( __GLcontext *gc, IN GLMSG_CLEARACCUM *pMsg )
  240. {
  241. __glim_ClearAccum( pMsg->red, pMsg->green, pMsg->blue, pMsg->alpha );
  242. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  243. }
  244. VOID * FASTCALL
  245. sbs_glClearIndex ( __GLcontext *gc, IN GLMSG_CLEARINDEX *pMsg )
  246. {
  247. __glim_ClearIndex( pMsg->c );
  248. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  249. }
  250. VOID * FASTCALL
  251. sbs_glClearColor ( __GLcontext *gc, IN GLMSG_CLEARCOLOR *pMsg )
  252. {
  253. __glim_ClearColor( pMsg->red, pMsg->green, pMsg->blue, pMsg->alpha );
  254. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  255. }
  256. VOID * FASTCALL
  257. sbs_glClearStencil ( __GLcontext *gc, IN GLMSG_CLEARSTENCIL *pMsg )
  258. {
  259. __glim_ClearStencil( pMsg->s );
  260. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  261. }
  262. VOID * FASTCALL
  263. sbs_glClearDepth ( __GLcontext *gc, IN GLMSG_CLEARDEPTH *pMsg )
  264. {
  265. __glim_ClearDepth( pMsg->depth );
  266. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  267. }
  268. VOID * FASTCALL
  269. sbs_glStencilMask ( __GLcontext *gc, IN GLMSG_STENCILMASK *pMsg )
  270. {
  271. __glim_StencilMask( pMsg->mask );
  272. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  273. }
  274. VOID * FASTCALL
  275. sbs_glColorMask ( __GLcontext *gc, IN GLMSG_COLORMASK *pMsg )
  276. {
  277. __glim_ColorMask( pMsg->red, pMsg->green, pMsg->blue, pMsg->alpha );
  278. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  279. }
  280. VOID * FASTCALL
  281. sbs_glDepthMask ( __GLcontext *gc, IN GLMSG_DEPTHMASK *pMsg )
  282. {
  283. __glim_DepthMask( pMsg->flag );
  284. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  285. }
  286. VOID * FASTCALL
  287. sbs_glIndexMask ( __GLcontext *gc, IN GLMSG_INDEXMASK *pMsg )
  288. {
  289. __glim_IndexMask( pMsg->mask );
  290. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  291. }
  292. VOID * FASTCALL
  293. sbs_glAccum ( __GLcontext *gc, IN GLMSG_ACCUM *pMsg )
  294. {
  295. __glim_Accum( pMsg->op, pMsg->value );
  296. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  297. }
  298. VOID * FASTCALL
  299. sbs_glDisable ( __GLcontext *gc, IN GLMSG_DISABLE *pMsg )
  300. {
  301. __glim_Disable( pMsg->cap );
  302. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  303. }
  304. VOID * FASTCALL
  305. sbs_glEnable ( __GLcontext *gc, IN GLMSG_ENABLE *pMsg )
  306. {
  307. __glim_Enable( pMsg->cap );
  308. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  309. }
  310. VOID * FASTCALL
  311. sbs_glPopAttrib ( __GLcontext *gc, IN GLMSG_POPATTRIB *pMsg )
  312. {
  313. __glim_PopAttrib( );
  314. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  315. }
  316. VOID * FASTCALL
  317. sbs_glPushAttrib ( __GLcontext *gc, IN GLMSG_PUSHATTRIB *pMsg )
  318. {
  319. __glim_PushAttrib( pMsg->mask );
  320. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  321. }
  322. VOID * FASTCALL
  323. sbs_glAlphaFunc ( __GLcontext *gc, IN GLMSG_ALPHAFUNC *pMsg )
  324. {
  325. __glim_AlphaFunc( pMsg->func, pMsg->ref );
  326. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  327. }
  328. VOID * FASTCALL
  329. sbs_glBlendFunc ( __GLcontext *gc, IN GLMSG_BLENDFUNC *pMsg )
  330. {
  331. __glim_BlendFunc( pMsg->sfactor, pMsg->dfactor );
  332. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  333. }
  334. VOID * FASTCALL
  335. sbs_glLogicOp ( __GLcontext *gc, IN GLMSG_LOGICOP *pMsg )
  336. {
  337. __glim_LogicOp( pMsg->opcode );
  338. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  339. }
  340. VOID * FASTCALL
  341. sbs_glStencilFunc ( __GLcontext *gc, IN GLMSG_STENCILFUNC *pMsg )
  342. {
  343. __glim_StencilFunc( pMsg->func, pMsg->ref, pMsg->mask );
  344. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  345. }
  346. VOID * FASTCALL
  347. sbs_glStencilOp ( __GLcontext *gc, IN GLMSG_STENCILOP *pMsg )
  348. {
  349. __glim_StencilOp( pMsg->fail, pMsg->zfail, pMsg->zpass );
  350. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  351. }
  352. VOID * FASTCALL
  353. sbs_glDepthFunc ( __GLcontext *gc, IN GLMSG_DEPTHFUNC *pMsg )
  354. {
  355. __glim_DepthFunc( pMsg->func );
  356. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  357. }
  358. VOID * FASTCALL
  359. sbs_glPixelZoom ( __GLcontext *gc, IN GLMSG_PIXELZOOM *pMsg )
  360. {
  361. __glim_PixelZoom( pMsg->xfactor, pMsg->yfactor );
  362. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  363. }
  364. VOID * FASTCALL
  365. sbs_glPixelTransferf ( __GLcontext *gc, IN GLMSG_PIXELTRANSFERF *pMsg )
  366. {
  367. __glim_PixelTransferf( pMsg->pname, pMsg->param );
  368. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  369. }
  370. VOID * FASTCALL
  371. sbs_glPixelTransferi ( __GLcontext *gc, IN GLMSG_PIXELTRANSFERI *pMsg )
  372. {
  373. __glim_PixelTransferi( pMsg->pname, pMsg->param );
  374. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  375. }
  376. VOID * FASTCALL
  377. sbs_glPixelStoref ( __GLcontext *gc, IN GLMSG_PIXELSTOREF *pMsg )
  378. {
  379. __glim_PixelStoref( pMsg->pname, pMsg->param );
  380. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  381. }
  382. VOID * FASTCALL
  383. sbs_glPixelStorei ( __GLcontext *gc, IN GLMSG_PIXELSTOREI *pMsg )
  384. {
  385. __glim_PixelStorei( pMsg->pname, pMsg->param );
  386. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  387. }
  388. VOID * FASTCALL
  389. sbs_glPixelMapfv ( __GLcontext *gc, IN GLMSG_PIXELMAPFV *pMsg )
  390. {
  391. // VARIABLE_IN
  392. VOID *pData;
  393. VOID *NextOffset;
  394. NextOffset = (VOID *) ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  395. pData = (VOID *) pMsg->valuesOff;
  396. __glim_PixelMapfv( pMsg->map, pMsg->mapsize, pData );
  397. return( NextOffset );
  398. }
  399. VOID * FASTCALL
  400. sbs_glPixelMapuiv ( __GLcontext *gc, IN GLMSG_PIXELMAPUIV *pMsg )
  401. {
  402. // VARIABLE_IN
  403. VOID *pData;
  404. VOID *NextOffset;
  405. NextOffset = (VOID *) ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  406. pData = (VOID *) pMsg->valuesOff;
  407. __glim_PixelMapuiv( pMsg->map, pMsg->mapsize, pData );
  408. return( NextOffset );
  409. }
  410. VOID * FASTCALL
  411. sbs_glPixelMapusv ( __GLcontext *gc, IN GLMSG_PIXELMAPUSV *pMsg )
  412. {
  413. // VARIABLE_IN
  414. VOID *pData;
  415. VOID *NextOffset;
  416. NextOffset = (VOID *) ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  417. pData = (VOID *) pMsg->valuesOff;
  418. __glim_PixelMapusv( pMsg->map, pMsg->mapsize, pData );
  419. return( NextOffset );
  420. }
  421. VOID * FASTCALL
  422. sbs_glReadBuffer ( __GLcontext *gc, IN GLMSG_READBUFFER *pMsg )
  423. {
  424. __glim_ReadBuffer( pMsg->mode );
  425. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  426. }
  427. VOID * FASTCALL
  428. sbs_glCopyPixels ( __GLcontext *gc, IN GLMSG_COPYPIXELS *pMsg )
  429. {
  430. #ifdef _MCD_
  431. if (((__GLGENcontext *)gc)->pMcdState)
  432. {
  433. // This function potentially touches the framebuffer memory. Since,
  434. // this function is not going to first pass through the MCD driver
  435. // (which would give the MCD driver the oportunity to sync to the HW),
  436. // we need to do this synchronization explicitly.
  437. GenMcdSynchronize((__GLGENcontext *)gc);
  438. }
  439. #endif
  440. __glim_CopyPixels( pMsg->x, pMsg->y, pMsg->width, pMsg->height, pMsg->type );
  441. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  442. }
  443. VOID * FASTCALL
  444. sbs_glGetBooleanv ( __GLcontext *gc, IN GLMSG_GETBOOLEANV *pMsg )
  445. {
  446. __glim_GetBooleanv( pMsg->pname, pMsg->params );
  447. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  448. }
  449. VOID * FASTCALL
  450. sbs_glGetClipPlane ( __GLcontext *gc, IN GLMSG_GETCLIPPLANE *pMsg )
  451. {
  452. __glim_GetClipPlane( pMsg->plane, pMsg->equation );
  453. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  454. }
  455. VOID * FASTCALL
  456. sbs_glGetDoublev ( __GLcontext *gc, IN GLMSG_GETDOUBLEV *pMsg )
  457. {
  458. __glim_GetDoublev( pMsg->pname, pMsg->params );
  459. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  460. }
  461. VOID * FASTCALL
  462. sbs_glGetError ( __GLcontext *gc, IN GLMSG_GETERROR *pMsg )
  463. {
  464. GLTEB_RETURNVALUE() =
  465. (ULONG)__glim_GetError( );
  466. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  467. }
  468. VOID * FASTCALL
  469. sbs_glGetFloatv ( __GLcontext *gc, IN GLMSG_GETFLOATV *pMsg )
  470. {
  471. __glim_GetFloatv( pMsg->pname, pMsg->params );
  472. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  473. }
  474. VOID * FASTCALL
  475. sbs_glGetIntegerv ( __GLcontext *gc, IN GLMSG_GETINTEGERV *pMsg )
  476. {
  477. __glim_GetIntegerv( pMsg->pname, pMsg->params );
  478. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  479. }
  480. VOID * FASTCALL
  481. sbs_glGetLightfv ( __GLcontext *gc, IN GLMSG_GETLIGHTFV *pMsg )
  482. {
  483. __glim_GetLightfv( pMsg->light, pMsg->pname, pMsg->params );
  484. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  485. }
  486. VOID * FASTCALL
  487. sbs_glGetLightiv ( __GLcontext *gc, IN GLMSG_GETLIGHTIV *pMsg )
  488. {
  489. __glim_GetLightiv( pMsg->light, pMsg->pname, pMsg->params );
  490. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  491. }
  492. VOID * FASTCALL
  493. sbs_glGetMapdv ( __GLcontext *gc, IN GLMSG_GETMAPDV *pMsg )
  494. {
  495. // VARIABLE_OUT
  496. VOID *pData;
  497. VOID *NextOffset;
  498. NextOffset = (VOID *) ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  499. pData = (VOID *) pMsg->vOff;
  500. __glim_GetMapdv( pMsg->target, pMsg->query, pData );
  501. return( NextOffset );
  502. }
  503. VOID * FASTCALL
  504. sbs_glGetMapfv ( __GLcontext *gc, IN GLMSG_GETMAPFV *pMsg )
  505. {
  506. // VARIABLE_OUT
  507. VOID *pData;
  508. VOID *NextOffset;
  509. NextOffset = (VOID *) ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  510. pData = (VOID *) pMsg->vOff;
  511. __glim_GetMapfv( pMsg->target, pMsg->query, pData );
  512. return( NextOffset );
  513. }
  514. VOID * FASTCALL
  515. sbs_glGetMapiv ( __GLcontext *gc, IN GLMSG_GETMAPIV *pMsg )
  516. {
  517. // VARIABLE_OUT
  518. VOID *pData;
  519. VOID *NextOffset;
  520. NextOffset = (VOID *) ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  521. pData = (VOID *) pMsg->vOff;
  522. __glim_GetMapiv( pMsg->target, pMsg->query, pData );
  523. return( NextOffset );
  524. }
  525. VOID * FASTCALL
  526. sbs_glGetMaterialfv ( __GLcontext *gc, IN GLMSG_GETMATERIALFV *pMsg )
  527. {
  528. __glim_GetMaterialfv( pMsg->face, pMsg->pname, pMsg->params );
  529. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  530. }
  531. VOID * FASTCALL
  532. sbs_glGetMaterialiv ( __GLcontext *gc, IN GLMSG_GETMATERIALIV *pMsg )
  533. {
  534. __glim_GetMaterialiv( pMsg->face, pMsg->pname, pMsg->params );
  535. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  536. }
  537. VOID * FASTCALL
  538. sbs_glGetPixelMapfv ( __GLcontext *gc, IN GLMSG_GETPIXELMAPFV *pMsg )
  539. {
  540. // VARIABLE_OUT
  541. VOID *pData;
  542. VOID *NextOffset;
  543. NextOffset = (VOID *) ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  544. pData = (VOID *) pMsg->valuesOff;
  545. __glim_GetPixelMapfv( pMsg->map, pData );
  546. return( NextOffset );
  547. }
  548. VOID * FASTCALL
  549. sbs_glGetPixelMapuiv ( __GLcontext *gc, IN GLMSG_GETPIXELMAPUIV *pMsg )
  550. {
  551. // VARIABLE_OUT
  552. VOID *pData;
  553. VOID *NextOffset;
  554. NextOffset = (VOID *) ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  555. pData = (VOID *) pMsg->valuesOff;
  556. __glim_GetPixelMapuiv( pMsg->map, pData );
  557. return( NextOffset );
  558. }
  559. VOID * FASTCALL
  560. sbs_glGetPixelMapusv ( __GLcontext *gc, IN GLMSG_GETPIXELMAPUSV *pMsg )
  561. {
  562. // VARIABLE_OUT
  563. VOID *pData;
  564. VOID *NextOffset;
  565. NextOffset = (VOID *) ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  566. pData = (VOID *) pMsg->valuesOff;
  567. __glim_GetPixelMapusv( pMsg->map, pData );
  568. return( NextOffset );
  569. }
  570. VOID * FASTCALL
  571. sbs_glGetTexEnvfv ( __GLcontext *gc, IN GLMSG_GETTEXENVFV *pMsg )
  572. {
  573. __glim_GetTexEnvfv( pMsg->target, pMsg->pname, pMsg->params );
  574. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  575. }
  576. VOID * FASTCALL
  577. sbs_glGetTexEnviv ( __GLcontext *gc, IN GLMSG_GETTEXENVIV *pMsg )
  578. {
  579. __glim_GetTexEnviv( pMsg->target, pMsg->pname, pMsg->params );
  580. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  581. }
  582. VOID * FASTCALL
  583. sbs_glGetTexGendv ( __GLcontext *gc, IN GLMSG_GETTEXGENDV *pMsg )
  584. {
  585. __glim_GetTexGendv( pMsg->coord, pMsg->pname, pMsg->params );
  586. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  587. }
  588. VOID * FASTCALL
  589. sbs_glGetTexGenfv ( __GLcontext *gc, IN GLMSG_GETTEXGENFV *pMsg )
  590. {
  591. __glim_GetTexGenfv( pMsg->coord, pMsg->pname, pMsg->params );
  592. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  593. }
  594. VOID * FASTCALL
  595. sbs_glGetTexGeniv ( __GLcontext *gc, IN GLMSG_GETTEXGENIV *pMsg )
  596. {
  597. __glim_GetTexGeniv( pMsg->coord, pMsg->pname, pMsg->params );
  598. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  599. }
  600. VOID * FASTCALL
  601. sbs_glGetTexParameterfv ( __GLcontext *gc, IN GLMSG_GETTEXPARAMETERFV *pMsg )
  602. {
  603. __glim_GetTexParameterfv( pMsg->target, pMsg->pname, pMsg->params );
  604. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  605. }
  606. VOID * FASTCALL
  607. sbs_glGetTexParameteriv ( __GLcontext *gc, IN GLMSG_GETTEXPARAMETERIV *pMsg )
  608. {
  609. __glim_GetTexParameteriv( pMsg->target, pMsg->pname, pMsg->params );
  610. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  611. }
  612. VOID * FASTCALL
  613. sbs_glGetTexLevelParameterfv ( __GLcontext *gc, IN GLMSG_GETTEXLEVELPARAMETERFV *pMsg )
  614. {
  615. __glim_GetTexLevelParameterfv( pMsg->target, pMsg->level, pMsg->pname, pMsg->params );
  616. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  617. }
  618. VOID * FASTCALL
  619. sbs_glGetTexLevelParameteriv ( __GLcontext *gc, IN GLMSG_GETTEXLEVELPARAMETERIV *pMsg )
  620. {
  621. __glim_GetTexLevelParameteriv( pMsg->target, pMsg->level, pMsg->pname, pMsg->params );
  622. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  623. }
  624. VOID * FASTCALL
  625. sbs_glIsEnabled ( __GLcontext *gc, IN GLMSG_ISENABLED *pMsg )
  626. {
  627. GLTEB_RETURNVALUE() =
  628. (ULONG)__glim_IsEnabled( pMsg->cap );
  629. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  630. }
  631. VOID * FASTCALL
  632. sbs_glDepthRange ( __GLcontext *gc, IN GLMSG_DEPTHRANGE *pMsg )
  633. {
  634. __glim_DepthRange( pMsg->zNear, pMsg->zFar );
  635. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  636. }
  637. VOID * FASTCALL
  638. sbs_glFrustum ( __GLcontext *gc, IN GLMSG_FRUSTUM *pMsg )
  639. {
  640. __glim_Frustum( pMsg->left, pMsg->right, pMsg->bottom, pMsg->top, pMsg->zNear, pMsg->zFar );
  641. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  642. }
  643. VOID * FASTCALL
  644. sbs_glLoadIdentity ( __GLcontext *gc, IN GLMSG_LOADIDENTITY *pMsg )
  645. {
  646. __glim_LoadIdentity( );
  647. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  648. }
  649. VOID * FASTCALL
  650. sbs_glLoadMatrixf ( __GLcontext *gc, IN GLMSG_LOADMATRIXF *pMsg )
  651. {
  652. __glim_LoadMatrixf( pMsg->m );
  653. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  654. }
  655. VOID * FASTCALL
  656. sbs_glMatrixMode ( __GLcontext *gc, IN GLMSG_MATRIXMODE *pMsg )
  657. {
  658. __glim_MatrixMode( pMsg->mode );
  659. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  660. }
  661. VOID * FASTCALL
  662. sbs_glMultMatrixf ( __GLcontext *gc, IN GLMSG_MULTMATRIXF *pMsg )
  663. {
  664. __glim_MultMatrixf( pMsg->m );
  665. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  666. }
  667. VOID * FASTCALL
  668. sbs_glOrtho ( __GLcontext *gc, IN GLMSG_ORTHO *pMsg )
  669. {
  670. __glim_Ortho( pMsg->left, pMsg->right, pMsg->bottom, pMsg->top, pMsg->zNear, pMsg->zFar );
  671. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  672. }
  673. VOID * FASTCALL
  674. sbs_glPopMatrix ( __GLcontext *gc, IN GLMSG_POPMATRIX *pMsg )
  675. {
  676. __glim_PopMatrix( );
  677. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  678. }
  679. VOID * FASTCALL
  680. sbs_glPushMatrix ( __GLcontext *gc, IN GLMSG_PUSHMATRIX *pMsg )
  681. {
  682. __glim_PushMatrix( );
  683. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  684. }
  685. VOID * FASTCALL
  686. sbs_glRotatef ( __GLcontext *gc, IN GLMSG_ROTATEF *pMsg )
  687. {
  688. __glim_Rotatef( pMsg->angle, pMsg->x, pMsg->y, pMsg->z );
  689. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  690. }
  691. VOID * FASTCALL
  692. sbs_glScalef ( __GLcontext *gc, IN GLMSG_SCALEF *pMsg )
  693. {
  694. __glim_Scalef( pMsg->x, pMsg->y, pMsg->z );
  695. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  696. }
  697. VOID * FASTCALL
  698. sbs_glTranslatef ( __GLcontext *gc, IN GLMSG_TRANSLATEF *pMsg )
  699. {
  700. __glim_Translatef( pMsg->x, pMsg->y, pMsg->z );
  701. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  702. }
  703. VOID * FASTCALL
  704. sbs_glViewport ( __GLcontext *gc, IN GLMSG_VIEWPORT *pMsg )
  705. {
  706. __glim_Viewport( pMsg->x, pMsg->y, pMsg->width, pMsg->height );
  707. return ( (BYTE *)pMsg + GLMSG_ALIGN(sizeof(*pMsg)) );
  708. }