source: golgotha/src/i4/video/glide/glide.h @ 80

Last change on this file since 80 was 80, checked in by Sam Hocevar, 11 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
  • Property svn:keywords set to Id
File size: 72.6 KB
Line 
1#ifdef _WINDOWS
2
3
4#ifndef DYNAHEADER
5#define DYNAHEADER 1
6#endif
7
8/*******************************************************************
9 * THIS HEADER HAS BEEN HACKED BY AN EXPERIMENTAL PERL SCRIPT
10 * dynafy.pl
11 * on 7 Jul 97
12 *
13 * The new functionality allows glide2x.dll to be loaded dynamically.
14 * To do this,
15 * 1. #define DYNAHEADER wherever you include this header,
16 *    glide.h. 
17 * 2. You must also #define DYNAHEADER _CREATE_STORAGE in your
18 *    file where main() is defined.
19 * 3. call GetProcAddresses();
20 */
21/*
22** Copyright (c) 1995, 3Dfx Interactive, Inc.
23** All Rights Reserved.
24**
25** This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.;
26** the contents of this file may not be disclosed to third parties, copied or
27** duplicated in any form, in whole or in part, without the prior written
28** permission of 3Dfx Interactive, Inc.
29**
30** RESTRICTED RIGHTS LEGEND:
31** Use, duplication or disclosure by the Government is subject to restrictions
32** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
33** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
34** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
35** rights reserved under the Copyright Laws of the United States.
36*/
37
38/*
39** GLIDE.H
40**
41** The following #defines are relevant when using Glide:
42**
43** One of the following "platform constants" must be defined during
44** compilation:
45**
46**            __DOS__           Defined for 32-bit DOS applications
47**            __WIN32__         Defined for 32-bit Windows applications
48**            __sparc__         Defined for Sun Solaris/SunOS
49**            __linux__         Defined for Linux applications
50**            __IRIX__          Defined for SGI Irix applications
51**
52*/
53#ifndef __GLIDE_H__
54#define __GLIDE_H__
55
56/* The following include has been replaced
57 * by the processed text from the header file.
58 * #include <3dfx.h>
59 */
60/*
61** Copyright (c) 1995, 3Dfx Interactive, Inc.
62** All Rights Reserved.
63**
64** This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.;
65** the contents of this file may not be disclosed to third parties, copied or
66** duplicated in any form, in whole or in part, without the prior written
67** permission of 3Dfx Interactive, Inc.
68**
69** RESTRICTED RIGHTS LEGEND:
70** Use, duplication or disclosure by the Government is subject to restrictions
71** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
72** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
73** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished  -
74** rights reserved under the Copyright Laws of the United States.
75**
76** $Revision: 1.3 $
77** $Date: 1997/11/21 19:18:47 $
78*/
79#ifndef __3DFX_H__
80#define __3DFX_H__
81
82/*
83** basic data types
84*/
85typedef unsigned char   FxU8;
86typedef signed   char   FxI8;
87typedef unsigned short  FxU16;
88typedef signed   short  FxI16;
89typedef signed   long   FxI32;
90typedef unsigned long   FxU32;
91typedef int             FxBool;
92typedef float           FxFloat;
93typedef double          FxDouble;
94
95/*
96** color types
97*/
98typedef unsigned long                FxColor_t;
99typedef struct { float r, g, b, a; } FxColor4;
100
101/*
102** fundamental types
103*/
104#define FXTRUE    1
105#define FXFALSE   0
106
107/*
108** helper macros
109*/
110#define FXUNUSED( a ) ( (a) = (a) )
111#define FXBIT( i )    ( 1L << (i) )
112
113/*
114** export macros
115*/
116
117#ifdef _WINDOWS
118#ifndef WIN32
119#define WIN32 1
120#endif
121#endif
122
123#if defined(WIN32) || defined(__WATCOMC__)
124  #define FX_ENTRY extern
125  #define FX_CALL  __stdcall
126  #if defined (MSVC16)
127    #undef FX_ENTRY
128    #undef FX_CALL
129    #define FX_ENTRY
130    #define FX_CALL
131  #endif
132#elif defined(__DJGPP__)
133  #define FX_ENTRY extern
134  #define FX_CALL
135#elif defined(__unix__)
136  #define FX_ENTRY extern
137  #define FX_CALL
138#else
139  #warning define FX_ENTRY & FX_CALL for your compiler
140  #define FX_ENTRY extern
141  #define FX_CALL
142#endif
143
144/*
145** x86 compiler specific stuff
146*/
147#if defined(__BORLANDC_)
148
149#  define REALMODE
150
151#  define REGW( a, b ) ((a).x.b)
152#  define REGB( a, b ) ((a).h.b)
153#  define INT86( a, b, c ) int86(a,b,c)
154#  define INT86X( a, b, c, d ) int86x(a,b,c,d)
155
156#  define RM_SEG( a ) FP_SEG( a )
157#  define RM_OFF( a ) FP_OFF( a )
158
159#elif defined(__WATCOMC__)
160
161#  undef FP_SEG
162#  undef FP_OFF
163
164#  define REGW( a, b ) ((a).w.b)
165#  define REGB( a, b ) ((a).h.b)
166#  define INT86( a, b, c ) int386(a,b,c)
167#  define INT86X( a, b, c, d ) int386x(a,b,c,d)
168
169#  define RM_SEG( a )  ( ( ( ( FxU32 ) (a) ) & 0x000F0000 ) >> 4 )
170#  define RM_OFF( a )  ( ( FxU16 ) (a) )
171
172#endif
173
174#endif
175/* The following include has been replaced
176 * by the processed text from the header file.
177 * #include <sst1vid.h>
178 */
179/*
180** Copyright (c) 1995, 3Dfx Interactive, Inc.
181** All Rights Reserved.
182**
183** This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.;
184** the contents of this file may not be disclosed to third parties, copied or
185** duplicated in any form, in whole or in part, without the prior written
186** permission of 3Dfx Interactive, Inc.
187**
188** RESTRICTED RIGHTS LEGEND:
189** Use, duplication or disclosure by the Government is subject to restrictions
190** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
191** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
192** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
193** rights reserved under the Copyright Laws of the United States.
194**
195** $Header: /u/crack/.cvs_code/i4/video/glide/glide.h,v 1.3 1997/11/21 19:18:47 jc Exp $
196** $Log: glide.h,v $
197** Revision 1.3  1997/11/21 19:18:47  jc
198** *** empty log message ***
199**
200** Revision 1.2  1997/10/21 16:36:56  jc
201** *** empty log message ***
202**
203** Revision 1.1  2017/10/20 10:52:51  trey
204** *** empty log message ***
205**
206 *
207 * 5     7/24/96 3:43p Sellers
208 * added 512x384 @ 60 Hz for arcade monitors
209 * added 512x256 @ 60 Hz for arcade monitors
210 *
211 * 4     7/18/96 10:58a Sellers
212 * fixed FT and TF clock delay values for lower frequencies with
213 * .5/.5 combos
214 *
215 * 3     6/18/96 6:54p Sellers
216 * added sst1InitShutdownSli() to fix Glide Splash screen problems with
217 * SLI
218 *
219 * 2     6/13/96 7:45p Sellers
220 * added "voodoo.ini" support
221 * added DirectX support
222 * misc cleanup
223 *
224 * 2     6/11/96 1:43p Sellers
225 * added support for 60, 75, 85, and 120 Hz refresh rates for "most"
226 * resolutions
227 *
228 * 1     5/08/96 5:43p Paik
229 * Video definitions
230*/
231#ifndef __SST1VID_H__
232#define __SST1VID_H__
233
234#ifdef __cplusplus
235extern "C" {
236#endif
237
238/* Video defines */
239
240typedef FxI32 GrScreenRefresh_t;
241#define GR_REFRESH_60Hz   0x0
242#define GR_REFRESH_70Hz   0x1
243#define GR_REFRESH_72Hz   0x2
244#define GR_REFRESH_75Hz   0x3
245#define GR_REFRESH_80Hz   0x4
246#define GR_REFRESH_90Hz   0x5
247#define GR_REFRESH_100Hz  0x6
248#define GR_REFRESH_85Hz   0x7
249#define GR_REFRESH_120Hz  0x8
250#define GR_REFRESH_NONE   0xff
251
252typedef FxI32 GrScreenResolution_t;
253#define GR_RESOLUTION_320x200   0x0
254#define GR_RESOLUTION_320x240   0x1
255#define GR_RESOLUTION_400x256   0x2
256#define GR_RESOLUTION_512x384   0x3
257#define GR_RESOLUTION_640x200   0x4
258#define GR_RESOLUTION_640x350   0x5
259#define GR_RESOLUTION_640x400   0x6
260#define GR_RESOLUTION_640x480   0x7
261#define GR_RESOLUTION_800x600   0x8
262#define GR_RESOLUTION_960x720   0x9
263#define GR_RESOLUTION_856x480   0xa
264#define GR_RESOLUTION_512x256   0xb
265#define GR_RESOLUTION_NONE      0xff
266
267#ifdef __cplusplus
268}
269#endif
270
271#endif /* __SST1VID_H__ */
272/* The following include has been replaced
273 * by the processed text from the header file.
274 * #include <glidesys.h>
275 */
276/*
277** Copyright (c) 1995, 3Dfx Interactive, Inc.
278** All Rights Reserved.
279**
280** This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.;
281** the contents of this file may not be disclosed to third parties, copied or
282** duplicated in any form, in whole or in part, without the prior written
283** permission of 3Dfx Interactive, Inc.
284**
285** RESTRICTED RIGHTS LEGEND:
286** Use, duplication or disclosure by the Government is subject to restrictions
287n** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
288** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
289** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
290** rights reserved under the Copyright Laws of the United States.
291**
292** $Header: /u/crack/.cvs_code/i4/video/glide/glide.h,v 1.3 1997/11/21 19:18:47 jc Exp $
293** $Log: glide.h,v $
294** Revision 1.3  1997/11/21 19:18:47  jc
295** *** empty log message ***
296**
297** Revision 1.2  1997/10/21 16:36:56  jc
298** *** empty log message ***
299**
300** Revision 1.1  2017/10/20 10:52:51  trey
301** *** empty log message ***
302**
303*/
304#ifndef __GLIDESYS_H__
305#define __GLIDESYS_H__
306
307/*
308n** -----------------------------------------------------------------------
309** COMPILER/ENVIRONMENT CONFIGURATION
310** -----------------------------------------------------------------------
311*/
312
313/* Endianness is stored in bits [30:31] */
314#define GLIDE_ENDIAN_SHIFT      30
315#define GLIDE_ENDIAN_LITTLE     (0x1 << GLIDE_ENDIAN_SHIFT)
316#define GLIDE_ENDIAN_BIG        (0x2 << GLIDE_ENDIAN_SHIFT)
317
318/* OS is stored in bits [0:6] */
319#define GLIDE_OS_SHIFT          0
320#define GLIDE_OS_UNIX           0x1
321#define GLIDE_OS_DOS32          0x2
322#define GLIDE_OS_WIN32          0x4
323#define GLIDE_OS_SYSTEM7        0x8
324#define GLIDE_OS_OS2            0x10
325#define GLIDE_OS_OTHER          0x20 /* For Proprietary Arcade HW */
326
327/* Sim vs. Hardware is stored in bits [7:8] */
328#define GLIDE_SST_SHIFT         7
329#define GLIDE_SST_SIM           (0x1 << GLIDE_SST_SHIFT)
330#define GLIDE_SST_HW            (0x2 << GLIDE_SST_SHIFT )
331
332/* Hardware Type is stored in bits [9:12] */
333#define GLIDE_HW_SHIFT          9
334#define GLIDE_HW_SST1           (0x1 << GLIDE_HW_SHIFT)
335#define GLIDE_HW_SST96          (0x2 << GLIDE_HW_SHIFT)
336#define GLIDE_HW_SSTH3          (0x4 << GLIDE_HW_SHIFT)
337#define GLIDE_HW_SST2           (0x8 << GLIDE_HW_SHIFT)
338
339/*
340** Make sure we handle all instances of WIN32
341*/
342#ifndef __WIN32__
343#  if defined ( _WIN32 ) || defined (WIN32) || defined(__NT__)
344#    define __WIN32__
345#  endif
346#endif
347
348/* We need two checks on the OS: one for endian, the other for OS */
349/* Check for endianness */
350#if defined(__IRIX__) || defined(__sparc__) || defined(MACOS)
351#  define GLIDE_ENDIAN    GLIDE_ENDIAN_BIG
352#else
353#  define GLIDE_ENDIAN GLIDE_ENDIAN_LITTLE
354#endif
355
356/* Check for OS */
357#if defined(__IRIX__) || defined(__sparc__) || defined(__linux__)
358#  define GLIDE_OS        GLIDE_OS_UNIX
359#elif defined(__DOS__)
360#  define GLIDE_OS        GLIDE_OS_DOS32
361#elif defined(__WIN32__)
362#  define GLIDE_OS        GLIDE_OS_WIN32
363#endif
364
365/* Check for Simulator vs. Hardware */
366#ifdef GLIDE_SIMULATOR
367#  define GLIDE_SST       GLIDE_SST_SIM
368#else
369#  define GLIDE_SST     GLIDE_SST_HW
370#endif
371
372/* Check for type of hardware */
373#ifdef SST96
374#  define GLIDE_HW        GLIDE_HW_SST96
375#elif defined(SSTH3)
376#  define GLIDE_HW        GLIDE_HW_SSTH3
377#elif defined(SST2)
378#  define GLIDE_HW        GLIDE_HW_SST2
379#else /* Default to SST1 */
380#  define GLIDE_HW        GLIDE_HW_SST1
381#endif
382
383
384#define GLIDE_PLATFORM (GLIDE_ENDIAN | GLIDE_OS | GLIDE_SST | GLIDE_HW)
385
386/*
387** Control the number of TMUs
388*/
389#ifndef GLIDE_NUM_TMU
390#  define GLIDE_NUM_TMU 2
391#endif
392
393
394#if ( ( GLIDE_NUM_TMU < 0 ) && ( GLIDE_NUM_TMU > 3 ) )
395#  error "GLIDE_NUM_TMU set to an invalid value"
396#endif
397
398#endif /* __GLIDESYS_H__ */
399
400#ifdef __cplusplus
401extern "C" {
402#endif
403
404/*
405** -----------------------------------------------------------------------
406** TYPE DEFINITIONS
407** -----------------------------------------------------------------------
408*/
409typedef FxU32 GrColor_t;
410typedef FxU8  GrAlpha_t;
411typedef FxU32 GrMipMapId_t;
412typedef FxU8  GrFog_t;
413
414/*
415** -----------------------------------------------------------------------
416** CONSTANTS AND TYPES
417** -----------------------------------------------------------------------
418*/
419#define MAX_NUM_SST            4
420#define MAX_MIPMAPS_PER_SST    1024
421#define GR_FOG_TABLE_SIZE      64
422#define GR_NULL_MIPMAP_HANDLE  ((GrMipMapId_t) -1)
423#define GR_ZDEPTHVALUE_NEAREST  0xFFFF
424#define GR_ZDEPTHVALUE_FARTHEST 0x0000
425#define GR_WDEPTHVALUE_NEAREST  0x0000
426#define GR_WDEPTHVALUE_FARTHEST 0xFFFF
427
428#define GR_MIPMAPLEVELMASK_EVEN  FXBIT(0)
429#define GR_MIPMAPLEVELMASK_ODD  FXBIT(1)
430#define GR_MIPMAPLEVELMASK_BOTH (GR_MIPMAPLEVELMASK_EVEN | GR_MIPMAPLEVELMASK_ODD )
431
432#define GR_LODBIAS_BILINEAR     0.5
433#define GR_LODBIAS_TRILINEAR    0.0
434
435typedef FxI32 GrChipID_t;
436#define GR_TMU0         0x0
437#define GR_TMU1         0x1
438#define GR_TMU2         0x2
439#define GR_FBI          0x3
440
441typedef FxI32 GrCombineFunction_t;
442#define GR_COMBINE_FUNCTION_ZERO        0x0
443#define GR_COMBINE_FUNCTION_NONE        GR_COMBINE_FUNCTION_ZERO
444#define GR_COMBINE_FUNCTION_LOCAL       0x1
445#define GR_COMBINE_FUNCTION_LOCAL_ALPHA 0x2
446#define GR_COMBINE_FUNCTION_SCALE_OTHER 0x3
447#define GR_COMBINE_FUNCTION_BLEND_OTHER GR_COMBINE_FUNCTION_SCALE_OTHER
448#define GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL 0x4
449#define GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL_ALPHA 0x5
450#define GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL 0x6
451#define GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL_ADD_LOCAL 0x7
452#define GR_COMBINE_FUNCTION_BLEND GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL_ADD_LOCAL
453#define GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL_ADD_LOCAL_ALPHA 0x8
454#define GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL 0x9
455#define GR_COMBINE_FUNCTION_BLEND_LOCAL GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL
456#define GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL_ALPHA 0x10
457
458typedef FxI32 GrCombineFactor_t;
459#define GR_COMBINE_FACTOR_ZERO          0x0
460#define GR_COMBINE_FACTOR_NONE          GR_COMBINE_FACTOR_ZERO
461#define GR_COMBINE_FACTOR_LOCAL         0x1
462#define GR_COMBINE_FACTOR_OTHER_ALPHA   0x2
463#define GR_COMBINE_FACTOR_LOCAL_ALPHA   0x3
464#define GR_COMBINE_FACTOR_TEXTURE_ALPHA 0x4
465#define GR_COMBINE_FACTOR_DETAIL_FACTOR GR_COMBINE_FACTOR_TEXTURE_ALPHA
466#define GR_COMBINE_FACTOR_LOD_FRACTION  0x5
467#define GR_COMBINE_FACTOR_ONE           0x8
468#define GR_COMBINE_FACTOR_ONE_MINUS_LOCAL 0x9
469#define GR_COMBINE_FACTOR_ONE_MINUS_OTHER_ALPHA 0xa
470#define GR_COMBINE_FACTOR_ONE_MINUS_LOCAL_ALPHA 0xb
471#define GR_COMBINE_FACTOR_ONE_MINUS_TEXTURE_ALPHA 0xc
472#define GR_COMBINE_FACTOR_ONE_MINUS_DETAIL_FACTOR GR_COMBINE_FACTOR_ONE_MINUS_TEXTURE_ALPHA
473#define GR_COMBINE_FACTOR_ONE_MINUS_LOD_FRACTION 0xd
474
475
476typedef FxI32 GrCombineLocal_t;
477#define GR_COMBINE_LOCAL_ITERATED 0x0
478#define GR_COMBINE_LOCAL_CONSTANT 0x1
479#define GR_COMBINE_LOCAL_NONE GR_COMBINE_LOCAL_CONSTANT
480#define GR_COMBINE_LOCAL_DEPTH  0x2
481
482typedef FxI32 GrCombineOther_t;
483#define GR_COMBINE_OTHER_ITERATED 0x0
484#define GR_COMBINE_OTHER_TEXTURE 0x1
485#define GR_COMBINE_OTHER_CONSTANT 0x2
486#define GR_COMBINE_OTHER_NONE GR_COMBINE_OTHER_CONSTANT
487
488
489typedef FxI32 GrAlphaSource_t;
490#define GR_ALPHASOURCE_CC_ALPHA 0x0
491#define GR_ALPHASOURCE_ITERATED_ALPHA 0x1
492#define GR_ALPHASOURCE_TEXTURE_ALPHA 0x2
493#define GR_ALPHASOURCE_TEXTURE_ALPHA_TIMES_ITERATED_ALPHA 0x3
494
495
496typedef FxI32 GrColorCombineFnc_t;
497#define GR_COLORCOMBINE_ZERO 0x0
498#define GR_COLORCOMBINE_CCRGB 0x1
499#define GR_COLORCOMBINE_ITRGB 0x2
500#define GR_COLORCOMBINE_ITRGB_DELTA0 0x3
501#define GR_COLORCOMBINE_DECAL_TEXTURE 0x4
502#define GR_COLORCOMBINE_TEXTURE_TIMES_CCRGB 0x5
503#define GR_COLORCOMBINE_TEXTURE_TIMES_ITRGB 0x6
504#define GR_COLORCOMBINE_TEXTURE_TIMES_ITRGB_DELTA0 0x7
505#define GR_COLORCOMBINE_TEXTURE_TIMES_ITRGB_ADD_ALPHA 0x8
506#define GR_COLORCOMBINE_TEXTURE_TIMES_ALPHA 0x9
507#define GR_COLORCOMBINE_TEXTURE_TIMES_ALPHA_ADD_ITRGB 0xa
508#define GR_COLORCOMBINE_TEXTURE_ADD_ITRGB 0xb
509#define GR_COLORCOMBINE_TEXTURE_SUB_ITRGB 0xc
510#define GR_COLORCOMBINE_CCRGB_BLEND_ITRGB_ON_TEXALPHA 0xd
511#define GR_COLORCOMBINE_DIFF_SPEC_A 0xe
512#define GR_COLORCOMBINE_DIFF_SPEC_B 0xf
513#define GR_COLORCOMBINE_ONE 0x10
514
515typedef FxI32 GrAlphaBlendFnc_t;
516#define GR_BLEND_ZERO 0x0
517#define GR_BLEND_SRC_ALPHA 0x1
518#define GR_BLEND_SRC_COLOR 0x2
519#define GR_BLEND_DST_COLOR GR_BLEND_SRC_COLOR
520#define GR_BLEND_DST_ALPHA 0x3
521#define GR_BLEND_ONE 0x4
522#define GR_BLEND_ONE_MINUS_SRC_ALPHA 0x5
523#define GR_BLEND_ONE_MINUS_SRC_COLOR 0x6
524#define GR_BLEND_ONE_MINUS_DST_COLOR GR_BLEND_ONE_MINUS_SRC_COLOR
525#define GR_BLEND_ONE_MINUS_DST_ALPHA 0x7
526#define GR_BLEND_RESERVED_8 0x8
527#define GR_BLEND_RESERVED_9 0x9
528#define GR_BLEND_RESERVED_A 0xa
529#define GR_BLEND_RESERVED_B 0xb
530#define GR_BLEND_RESERVED_C 0xc
531#define GR_BLEND_RESERVED_D 0xd
532#define GR_BLEND_RESERVED_E 0xe
533#define GR_BLEND_ALPHA_SATURATE 0xf
534#define GR_BLEND_PREFOG_COLOR GR_BLEND_ALPHA_SATURATE
535
536typedef FxI32 GrAspectRatio_t;
537#define GR_ASPECT_8x1 0x0       /* 8W x 1H */
538#define GR_ASPECT_4x1 0x1       /* 4W x 1H */
539#define GR_ASPECT_2x1 0x2       /* 2W x 1H */
540#define GR_ASPECT_1x1 0x3       /* 1W x 1H */
541#define GR_ASPECT_1x2 0x4       /* 1W x 2H */
542#define GR_ASPECT_1x4 0x5       /* 1W x 4H */
543#define GR_ASPECT_1x8 0x6       /* 1W x 8H */
544
545typedef FxI32 GrBuffer_t;
546#define GR_BUFFER_FRONTBUFFER   0x0
547#define GR_BUFFER_BACKBUFFER    0x1
548#define GR_BUFFER_AUXBUFFER     0x2
549#define GR_BUFFER_DEPTHBUFFER   0x3
550#define GR_BUFFER_ALPHABUFFER   0x4
551#define GR_BUFFER_TRIPLEBUFFER  0x5
552
553typedef FxI32 GrChromakeyMode_t;
554#define GR_CHROMAKEY_DISABLE    0x0
555#define GR_CHROMAKEY_ENABLE     0x1
556
557typedef FxI32 GrCmpFnc_t;
558#define GR_CMP_NEVER    0x0
559#define GR_CMP_LESS     0x1
560#define GR_CMP_EQUAL    0x2
561#define GR_CMP_LEQUAL   0x3
562#define GR_CMP_GREATER  0x4
563#define GR_CMP_NOTEQUAL 0x5
564#define GR_CMP_GEQUAL   0x6
565#define GR_CMP_ALWAYS   0x7
566
567typedef FxI32 GrColorFormat_t;
568#define GR_COLORFORMAT_ARGB     0x0
569#define GR_COLORFORMAT_ABGR     0x1
570
571#define GR_COLORFORMAT_RGBA     0x2
572#define GR_COLORFORMAT_BGRA     0x3
573
574typedef FxI32 GrCullMode_t;
575#define GR_CULL_DISABLE         0x0
576#define GR_CULL_NEGATIVE        0x1
577#define GR_CULL_POSITIVE        0x2
578
579typedef FxI32 GrDepthBufferMode_t;
580#define GR_DEPTHBUFFER_DISABLE                  0x0
581#define GR_DEPTHBUFFER_ZBUFFER                  0x1
582#define GR_DEPTHBUFFER_WBUFFER                  0x2
583#define GR_DEPTHBUFFER_ZBUFFER_COMPARE_TO_BIAS  0x3
584#define GR_DEPTHBUFFER_WBUFFER_COMPARE_TO_BIAS  0x4
585
586typedef FxI32 GrDitherMode_t;
587#define GR_DITHER_DISABLE       0x0
588#define GR_DITHER_2x2           0x1
589#define GR_DITHER_4x4           0x2
590
591typedef FxI32 GrFogMode_t;
592#define GR_FOG_DISABLE          0x0
593#define GR_FOG_WITH_ITERATED_ALPHA 0x1
594#define GR_FOG_WITH_TABLE       0x2
595#define GR_FOG_MULT2            0x100
596#define GR_FOG_ADD2             0x200
597
598typedef FxU32 GrLock_t;
599#define GR_LFB_READ_ONLY  0x00
600#define GR_LFB_WRITE_ONLY 0x01
601#define GR_LFB_IDLE       0x00
602#define GR_LFB_NOIDLE     0x10
603
604typedef FxI32 GrLfbBypassMode_t;
605#define GR_LFBBYPASS_DISABLE    0x0
606#define GR_LFBBYPASS_ENABLE     0x1
607
608typedef FxI32 GrLfbWriteMode_t;
609#define GR_LFBWRITEMODE_565        0x0 /* RGB:RGB */
610#define GR_LFBWRITEMODE_555        0x1 /* RGB:RGB */
611#define GR_LFBWRITEMODE_1555       0x2 /* ARGB:ARGB */
612#define GR_LFBWRITEMODE_RESERVED1  0x3
613#define GR_LFBWRITEMODE_888        0x4 /* RGB */
614#define GR_LFBWRITEMODE_8888       0x5 /* ARGB */
615#define GR_LFBWRITEMODE_RESERVED2  0x6
616#define GR_LFBWRITEMODE_RESERVED3  0x7
617#define GR_LFBWRITEMODE_RESERVED4  0x8
618#define GR_LFBWRITEMODE_RESERVED5  0x9
619#define GR_LFBWRITEMODE_RESERVED6  0xa
620#define GR_LFBWRITEMODE_RESERVED7  0xb
621#define GR_LFBWRITEMODE_565_DEPTH  0xc /* RGB:DEPTH */
622#define GR_LFBWRITEMODE_555_DEPTH  0xd /* RGB:DEPTH */
623#define GR_LFBWRITEMODE_1555_DEPTH 0xe /* ARGB:DEPTH */
624#define GR_LFBWRITEMODE_ZA16       0xf /* DEPTH:DEPTH */
625#define GR_LFBWRITEMODE_ANY        0xFF
626
627
628typedef FxI32 GrOriginLocation_t;
629#define GR_ORIGIN_UPPER_LEFT    0x0
630#define GR_ORIGIN_LOWER_LEFT    0x1
631#define GR_ORIGIN_ANY           0xFF
632
633typedef struct {
634    int                size;
635    void               *lfbPtr;
636    FxU32              strideInBytes;       
637    GrLfbWriteMode_t   writeMode;
638    GrOriginLocation_t origin;
639} GrLfbInfo_t;
640
641typedef FxI32 GrLOD_t;
642#define GR_LOD_256              0x0
643#define GR_LOD_128              0x1
644#define GR_LOD_64               0x2
645#define GR_LOD_32               0x3
646#define GR_LOD_16               0x4
647#define GR_LOD_8                0x5
648#define GR_LOD_4                0x6
649#define GR_LOD_2                0x7
650#define GR_LOD_1                0x8
651
652typedef FxI32 GrMipMapMode_t;
653#define GR_MIPMAP_DISABLE               0x0 /* no mip mapping  */
654#define GR_MIPMAP_NEAREST               0x1 /* use nearest mipmap */
655#define GR_MIPMAP_NEAREST_DITHER        0x2 /* GR_MIPMAP_NEAREST + LOD dith */
656
657
658typedef FxI32 GrSmoothingMode_t;
659#define GR_SMOOTHING_DISABLE    0x0
660#define GR_SMOOTHING_ENABLE     0x1
661
662typedef FxI32 GrTextureClampMode_t;
663#define GR_TEXTURECLAMP_WRAP    0x0
664#define GR_TEXTURECLAMP_CLAMP   0x1
665
666typedef FxI32 GrTextureCombineFnc_t;
667#define GR_TEXTURECOMBINE_ZERO          0x0 /* texout = 0 */
668#define GR_TEXTURECOMBINE_DECAL         0x1 /* texout = texthis */
669#define GR_TEXTURECOMBINE_OTHER         0x2 /* this TMU in passthru mode */
670#define GR_TEXTURECOMBINE_ADD           0x3 /* tout = tthis + t(this+1) */
671#define GR_TEXTURECOMBINE_MULTIPLY      0x4 /* texout = tthis * t(this+1) */
672#define GR_TEXTURECOMBINE_SUBTRACT      0x5 /* Sutract from upstream TMU */
673#define GR_TEXTURECOMBINE_DETAIL        0x6 /* detail--detail on tthis */
674#define GR_TEXTURECOMBINE_DETAIL_OTHER  0x7 /* detail--detail on tthis+1 */
675#define GR_TEXTURECOMBINE_TRILINEAR_ODD 0x8 /* trilinear--odd levels tthis*/
676#define GR_TEXTURECOMBINE_TRILINEAR_EVEN 0x9 /*trilinear--even levels tthis*/
677#define GR_TEXTURECOMBINE_ONE           0xa /* texout = 0xFFFFFFFF */
678
679typedef FxI32 GrTextureFilterMode_t;
680#define GR_TEXTUREFILTER_POINT_SAMPLED  0x0
681#define GR_TEXTUREFILTER_BILINEAR       0x1
682
683typedef FxI32 GrTextureFormat_t;
684#define GR_TEXFMT_8BIT                  0x0
685#define GR_TEXFMT_RGB_332 GR_TEXFMT_8BIT
686#define GR_TEXFMT_YIQ_422               0x1
687#define GR_TEXFMT_ALPHA_8               0x2 /* (0..0xFF) alpha     */
688#define GR_TEXFMT_INTENSITY_8           0x3 /* (0..0xFF) intensity */
689#define GR_TEXFMT_ALPHA_INTENSITY_44    0x4
690#define GR_TEXFMT_P_8                   0x5 /* 8-bit palette */
691#define GR_TEXFMT_RSVD0                 0x6
692#define GR_TEXFMT_RSVD1                 0x7
693#define GR_TEXFMT_16BIT                 0x8
694#define GR_TEXFMT_ARGB_8332 GR_TEXFMT_16BIT
695#define GR_TEXFMT_AYIQ_8422             0x9
696#define GR_TEXFMT_RGB_565               0xa
697#define GR_TEXFMT_ARGB_1555             0xb
698#define GR_TEXFMT_ARGB_4444             0xc
699#define GR_TEXFMT_ALPHA_INTENSITY_88    0xd
700#define GR_TEXFMT_AP_88                 0xe /* 8-bit alpha 8-bit palette */
701#define GR_TEXFMT_RSVD2                 0xf
702
703typedef FxU32 GrTexTable_t;
704#define GR_TEXTABLE_NCC0    0x0
705#define GR_TEXTABLE_NCC1    0x1
706#define GR_TEXTABLE_PALETTE 0x2
707
708typedef FxU32 GrNCCTable_t;
709#define GR_NCCTABLE_NCC0    0x0
710#define GR_NCCTABLE_NCC1    0x1
711
712typedef FxU32 GrTexBaseRange_t;
713#define GR_TEXBASE_256      0x0
714#define GR_TEXBASE_128      0x1
715#define GR_TEXBASE_64       0x2
716#define GR_TEXBASE_32_TO_1  0x3
717
718#define GLIDE_STATE_PAD_SIZE 312
719#ifdef GLIDE_LIB
720typedef struct _GrState_s GrState;
721#else
722typedef struct _GrState_s {
723  char pad[GLIDE_STATE_PAD_SIZE];
724} GrState;
725#endif
726
727/*
728** -----------------------------------------------------------------------
729** STRUCTURES
730** -----------------------------------------------------------------------
731*/
732/*
733** 3DF texture file structs
734*/
735typedef struct
736{
737  FxU32               width, height;
738  int                 small_lod, large_lod;
739  GrAspectRatio_t     aspect_ratio;
740  GrTextureFormat_t   format;
741} Gu3dfHeader;
742
743typedef struct
744{
745  FxU8  yRGB[16];
746  FxI16 iRGB[4][3];
747  FxI16 qRGB[4][3];
748  FxU32 packed_data[12];
749} GuNccTable;
750
751typedef struct {
752    FxU32 data[256];
753} GuTexPalette;
754
755typedef union {
756    GuNccTable   nccTable;
757    GuTexPalette palette;
758} GuTexTable;
759
760typedef struct
761{
762  Gu3dfHeader  header;
763  GuTexTable   table;
764  void        *data;
765  FxU32        mem_required;    /* memory required for mip map in bytes. */
766} Gu3dfInfo;
767
768typedef struct {
769    GrLOD_t           smallLod;
770    GrLOD_t           largeLod;
771    GrAspectRatio_t   aspectRatio;
772    GrTextureFormat_t format;
773    void              *data;
774} GrTexInfo;
775
776typedef struct
777{
778  int           sst;                    /* SST where this texture map was stored  */
779  FxBool        valid;                  /* set when this table entry is allocated*/
780  int           width, height;
781  GrAspectRatio_t aspect_ratio;         /* aspect ratio of the mip map.  */
782  void          *data;                  /* actual texture data  */
783
784  GrTextureFormat_t  format;                    /* format of the texture table */
785  GrMipMapMode_t     mipmap_mode;               /* mip map mode for this texture */
786  GrTextureFilterMode_t   magfilter_mode;       /* filtering to be used when magnified */
787  GrTextureFilterMode_t   minfilter_mode;       /* filtering to be used with minified  */
788  GrTextureClampMode_t    s_clamp_mode;         /* how this texture should be clamped in s */
789  GrTextureClampMode_t    t_clamp_mode;         /* how this texture should be clamped in t */
790  FxU32         tLOD;                   /* Register value for tLOD register */
791  FxU32         tTextureMode;           /* Register value for tTextureMode register
792                                           not including non-texture specific bits */
793  FxU32         lod_bias;               /* LOD bias of the mip map in preshifted 4.2*/
794  GrLOD_t       lod_min, lod_max;       /* largest and smallest levels of detail  */
795  int           tmu;                    /* tmu on which this texture resides */
796  FxU32         odd_even_mask;          /* mask specifying levels on this tmu  */
797  FxU32         tmu_base_address;       /* base addr (in TMU mem) of this texture */
798  FxBool        trilinear;              /* should we blend by lod? */
799
800  GuNccTable    ncc_table;              /* NCC compression table (optional) */
801} GrMipMapInfo;
802
803typedef int GrSstType;
804#define GR_SSTTYPE_VOODOO    0
805#define GR_SSTTYPE_SST96     1
806#define GR_SSTTYPE_AT3D      2
807
808typedef struct GrTMUConfig_St {
809  int    tmuRev;                /* Rev of Texelfx chip */
810  int    tmuRam;                /* 1, 2, or 4 MB */
811} GrTMUConfig_t;
812
813typedef struct GrVoodooConfig_St {
814  int    fbRam;                         /* 1, 2, or 4 MB */
815  int    fbiRev;                        /* Rev of Pixelfx chip */
816  int    nTexelfx;                      /* How many texelFX chips are there? */
817  FxBool sliDetect;                     /* Is it a scan-line interleaved board? */
818  GrTMUConfig_t tmuConfig[GLIDE_NUM_TMU];   /* Configuration of the Texelfx chips */
819} GrVoodooConfig_t;
820
821typedef struct GrSst96Config_St {
822  int   fbRam;                  /* How much? */
823  int   nTexelfx;
824  GrTMUConfig_t tmuConfig;
825} GrSst96Config_t;
826
827typedef struct GrAT3DConfig_St {
828  int   rev;
829} GrAT3DConfig_t;
830
831
832typedef struct {
833  int num_sst;                  /* # of HW units in the system */
834  struct {
835    GrSstType type;             /* Which hardware is it? */
836    union SstBoard_u {
837      GrVoodooConfig_t  VoodooConfig;
838      GrSst96Config_t   SST96Config;
839      GrAT3DConfig_t    AT3DConfig;
840    } sstBoard;
841  } SSTs[MAX_NUM_SST];          /* configuration for each board */
842} GrHwConfiguration;
843
844typedef struct GrSstPerfStats_s {
845  FxU32  pixelsIn;              /* # pixels processed (minus buffer clears) */
846  FxU32  chromaFail;            /* # pixels not drawn due to chroma key */
847  FxU32  zFuncFail;             /* # pixels not drawn due to Z comparison */
848  FxU32  aFuncFail;             /* # pixels not drawn due to alpha comparison */
849  FxU32  pixelsOut;             /* # pixels drawn (including buffer clears) */
850} GrSstPerfStats_t;
851
852
853typedef struct {
854  float  sow;                   /* s texture ordinate (s over w) */
855  float  tow;                   /* t texture ordinate (t over w) */ 
856  float  oow;                   /* 1/w (used mipmapping - really 0xfff/w) */
857}  GrTmuVertex;
858
859/*
860** GrVertex
861** If these are changed the C & assembly language trisetup routines MUST
862** be changed, for they will no longer work.
863*/
864typedef struct
865{
866  float x, y, z;                /* X, Y, and Z of scrn space -- Z is ignored */
867  float r, g, b;                /* R, G, B, ([0..255.0]) */
868  float ooz;                    /* 65535/Z (used for Z-buffering) */
869  float a;                      /* Alpha [0..255.0] */
870  float oow;                    /* 1/W (used for W-buffering, texturing) */
871  GrTmuVertex  tmuvtx[GLIDE_NUM_TMU];
872} GrVertex;
873
874/* For indexing GrVertex as a float *.
875   CHANGE THESE IF THE VERTEX STRUCTURE CHANGES!
876   */
877#define GR_VERTEX_X_OFFSET              0
878#define GR_VERTEX_Y_OFFSET              1
879#define GR_VERTEX_Z_OFFSET              2
880#define GR_VERTEX_R_OFFSET              3
881#define GR_VERTEX_G_OFFSET              4
882#define GR_VERTEX_B_OFFSET              5
883#define GR_VERTEX_OOZ_OFFSET            6
884#define GR_VERTEX_A_OFFSET              7
885#define GR_VERTEX_OOW_OFFSET            8
886#define GR_VERTEX_SOW_TMU0_OFFSET       9
887#define GR_VERTEX_TOW_TMU0_OFFSET       10
888#define GR_VERTEX_OOW_TMU0_OFFSET       11
889#define GR_VERTEX_SOW_TMU1_OFFSET       12
890#define GR_VERTEX_TOW_TMU1_OFFSET       13
891#define GR_VERTEX_OOW_TMU1_OFFSET       14
892#if (GLIDE_NUM_TMU > 2)
893#define GR_VERTEX_SOW_TMU2_OFFSET       15
894#define GR_VERTEX_TOW_TMU2_OFFSET       16
895#define GR_VERTEX_OOW_TMU2_OFFSET       17
896#endif
897
898typedef FxU32 GrLfbSrcFmt_t;
899#define GR_LFB_SRC_FMT_565          0x00
900#define GR_LFB_SRC_FMT_555          0x01
901#define GR_LFB_SRC_FMT_1555         0x02
902#define GR_LFB_SRC_FMT_888          0x04
903#define GR_LFB_SRC_FMT_8888         0x05
904#define GR_LFB_SRC_FMT_565_DEPTH    0x0c
905#define GR_LFB_SRC_FMT_555_DEPTH    0x0d
906#define GR_LFB_SRC_FMT_1555_DEPTH   0x0e
907#define GR_LFB_SRC_FMT_ZA16         0x0f
908#define GR_LFB_SRC_FMT_RLE16        0x80
909
910typedef FxI32 GrPassthruMode_t;
911#define GR_PASSTHRU_SHOW_VGA    0x0
912#define GR_PASSTHRU_SHOW_SST1   0x1
913
914typedef FxU32 GrHint_t;
915#define GR_HINTTYPE_MIN                 0
916#define GR_HINT_STWHINT                 0
917#define GR_HINT_FIFOCHECKHINT           1
918#define GR_HINT_FPUPRECISION            2
919#define GR_HINT_ALLOW_MIPMAP_DITHER     3
920#define GR_HINTTYPE_MAX                 3
921
922typedef FxU32 GrSTWHint_t;
923#define GR_STWHINT_W_DIFF_FBI   FXBIT(0)
924#define GR_STWHINT_W_DIFF_TMU0  FXBIT(1)
925#define GR_STWHINT_ST_DIFF_TMU0 FXBIT(2)
926#define GR_STWHINT_W_DIFF_TMU1  FXBIT(3)
927#define GR_STWHINT_ST_DIFF_TMU1 FXBIT(4)
928#define GR_STWHINT_W_DIFF_TMU2  FXBIT(5)
929#define GR_STWHINT_ST_DIFF_TMU2 FXBIT(6)
930
931typedef FxU32 GrControl_t;
932#define GR_CONTROL_ACTIVATE   0x1
933#define GR_CONTROL_DEACTIVATE 0x2
934#define GR_CONTROL_RESIZE     0x3
935#define GR_CONTROL_MOVE       0x4
936
937#define GR_GENERATE_FIFOCHECK_HINT_MASK(swHWM, swLWM) \
938  (((swHWM & 0xffff) << 16) | (swLWM & 0xffff))
939
940/*
941** -----------------------------------------------------------------------
942** FUNCTION PROTOTYPES
943** -----------------------------------------------------------------------
944*/
945#ifndef FX_GLIDE_NO_FUNC_PROTO
946/*
947** rendering functions
948*/
949#ifdef DYNAHEADER
950typedef void( FX_CALL *grDrawLine_fpt )( const GrVertex *v1, const GrVertex *v2 );
951#else
952
953FX_ENTRY void FX_CALL
954grDrawLine( const GrVertex *v1, const GrVertex *v2 );
955
956#endif /* DYNAHEADER */
957
958#ifdef DYNAHEADER
959typedef void( FX_CALL *grDrawPlanarPolygon_fpt )( int nverts, const int ilist[], const GrVertex vlist[] );
960#else
961
962FX_ENTRY void FX_CALL
963grDrawPlanarPolygon( int nverts, const int ilist[], const GrVertex vlist[] );
964
965#endif /* DYNAHEADER */
966
967#ifdef DYNAHEADER
968typedef void( FX_CALL *grDrawPlanarPolygonVertexList_fpt )( int nverts, const GrVertex vlist[] );
969#else
970
971FX_ENTRY void FX_CALL
972grDrawPlanarPolygonVertexList( int nverts, const GrVertex vlist[] );
973
974#endif /* DYNAHEADER */
975
976#ifdef DYNAHEADER
977typedef void( FX_CALL *grDrawPoint_fpt )( const GrVertex *pt );
978#else
979
980FX_ENTRY void FX_CALL
981grDrawPoint( const GrVertex *pt );
982
983#endif /* DYNAHEADER */
984
985#ifdef DYNAHEADER
986typedef void( FX_CALL *grDrawPolygon_fpt )( int nverts, const int ilist[], const GrVertex vlist[] );
987#else
988
989FX_ENTRY void FX_CALL
990grDrawPolygon( int nverts, const int ilist[], const GrVertex vlist[] );
991
992#endif /* DYNAHEADER */
993
994#ifdef DYNAHEADER
995typedef void( FX_CALL *grDrawPolygonVertexList_fpt )( int nverts, const GrVertex vlist[] );
996#else
997
998FX_ENTRY void FX_CALL
999grDrawPolygonVertexList( int nverts, const GrVertex vlist[] );
1000
1001#endif /* DYNAHEADER */
1002
1003#ifdef DYNAHEADER
1004typedef void( FX_CALL *grDrawTriangle_fpt )( const GrVertex *a, const GrVertex *b, const GrVertex *c );
1005#else
1006
1007FX_ENTRY void FX_CALL
1008grDrawTriangle( const GrVertex *a, const GrVertex *b, const GrVertex *c );
1009
1010#endif /* DYNAHEADER */
1011
1012/*
1013** buffer management
1014*/
1015#ifdef DYNAHEADER
1016typedef void( FX_CALL *grBufferClear_fpt )( GrColor_t color, GrAlpha_t alpha, FxU16 depth );
1017#else
1018
1019FX_ENTRY void FX_CALL
1020grBufferClear( GrColor_t color, GrAlpha_t alpha, FxU16 depth );
1021
1022#endif /* DYNAHEADER */
1023
1024#ifdef DYNAHEADER
1025typedef int( FX_CALL *grBufferNumPending_fpt )( void );
1026#else
1027
1028FX_ENTRY int FX_CALL
1029grBufferNumPending( void );
1030
1031#endif /* DYNAHEADER */
1032
1033#ifdef DYNAHEADER
1034typedef void( FX_CALL *grBufferSwap_fpt )( int swap_interval );
1035#else
1036
1037FX_ENTRY void FX_CALL
1038grBufferSwap( int swap_interval );
1039
1040#endif /* DYNAHEADER */
1041
1042#ifdef DYNAHEADER
1043typedef void( FX_CALL *grRenderBuffer_fpt )( GrBuffer_t buffer );
1044#else
1045
1046FX_ENTRY void FX_CALL
1047grRenderBuffer( GrBuffer_t buffer );
1048
1049#endif /* DYNAHEADER */
1050
1051/*
1052** error management
1053*/
1054typedef void (*GrErrorCallbackFnc_t)( const char *string, FxBool fatal );
1055
1056#ifdef DYNAHEADER
1057typedef void( FX_CALL *grErrorSetCallback_fpt )( GrErrorCallbackFnc_t fnc );
1058#else
1059
1060FX_ENTRY void FX_CALL
1061grErrorSetCallback( GrErrorCallbackFnc_t fnc );
1062
1063#endif /* DYNAHEADER */
1064
1065/*
1066** SST routines
1067*/
1068#ifdef DYNAHEADER
1069typedef void( FX_CALL *grSstIdle_fpt )(void );
1070#else
1071
1072FX_ENTRY void FX_CALL
1073grSstIdle(void);
1074
1075#endif /* DYNAHEADER */
1076
1077#ifdef DYNAHEADER
1078typedef FxU32( FX_CALL *grSstVideoLine_fpt )( void );
1079#else
1080
1081FX_ENTRY FxU32 FX_CALL
1082grSstVideoLine( void );
1083
1084#endif /* DYNAHEADER */
1085
1086#ifdef DYNAHEADER
1087typedef FxBool( FX_CALL *grSstVRetraceOn_fpt )( void );
1088#else
1089
1090FX_ENTRY FxBool FX_CALL
1091grSstVRetraceOn( void );
1092
1093#endif /* DYNAHEADER */
1094
1095#ifdef DYNAHEADER
1096typedef FxBool( FX_CALL *grSstIsBusy_fpt )( void );
1097#else
1098
1099FX_ENTRY FxBool FX_CALL
1100grSstIsBusy( void );
1101
1102#endif /* DYNAHEADER */
1103
1104#ifdef DYNAHEADER
1105typedef FxBool( FX_CALL *grSstWinOpen_fpt )( FxU32 hWnd, GrScreenResolution_t screen_resolution, GrScreenRefresh_t refresh_rate, GrColorFormat_t color_format, GrOriginLocation_t origin_location, int nColBuffers, int nAuxBuffers );
1106#else
1107
1108FX_ENTRY FxBool FX_CALL
1109grSstWinOpen(
1110          FxU32                hWnd,
1111          GrScreenResolution_t screen_resolution,
1112          GrScreenRefresh_t    refresh_rate,
1113          GrColorFormat_t      color_format,
1114          GrOriginLocation_t   origin_location,
1115          int                  nColBuffers,
1116          int                  nAuxBuffers);
1117
1118#endif /* DYNAHEADER */
1119
1120#ifdef DYNAHEADER
1121typedef void( FX_CALL *grSstWinClose_fpt )( void );
1122#else
1123
1124FX_ENTRY void FX_CALL
1125grSstWinClose( void );
1126
1127#endif /* DYNAHEADER */
1128
1129#ifdef DYNAHEADER
1130typedef FxBool( FX_CALL *grSstControl_fpt )( FxU32 code );
1131#else
1132
1133FX_ENTRY FxBool FX_CALL
1134grSstControl( FxU32 code );
1135
1136#endif /* DYNAHEADER */
1137
1138#ifdef DYNAHEADER
1139typedef FxBool( FX_CALL *grSstQueryHardware_fpt )( GrHwConfiguration *hwconfig );
1140#else
1141
1142FX_ENTRY FxBool FX_CALL
1143grSstQueryHardware( GrHwConfiguration *hwconfig );
1144
1145#endif /* DYNAHEADER */
1146
1147#ifdef DYNAHEADER
1148typedef FxBool( FX_CALL *grSstQueryBoards_fpt )( GrHwConfiguration *hwconfig );
1149#else
1150
1151FX_ENTRY FxBool FX_CALL
1152grSstQueryBoards( GrHwConfiguration *hwconfig );
1153
1154#endif /* DYNAHEADER */
1155
1156#ifdef DYNAHEADER
1157typedef void( FX_CALL *grSstOrigin_fpt )(GrOriginLocation_t origin );
1158#else
1159
1160FX_ENTRY void FX_CALL
1161grSstOrigin(GrOriginLocation_t  origin);
1162
1163#endif /* DYNAHEADER */
1164
1165#ifdef DYNAHEADER
1166typedef void( FX_CALL *grSstSelect_fpt )( int which_sst );
1167#else
1168
1169FX_ENTRY void FX_CALL
1170grSstSelect( int which_sst );
1171
1172#endif /* DYNAHEADER */
1173
1174#ifdef DYNAHEADER
1175typedef int( FX_CALL *grSstScreenHeight_fpt )( void );
1176#else
1177
1178FX_ENTRY int FX_CALL
1179grSstScreenHeight( void );
1180
1181#endif /* DYNAHEADER */
1182
1183#ifdef DYNAHEADER
1184typedef int( FX_CALL *grSstScreenWidth_fpt )( void );
1185#else
1186
1187FX_ENTRY int FX_CALL
1188grSstScreenWidth( void );
1189
1190#endif /* DYNAHEADER */
1191
1192#ifdef DYNAHEADER
1193typedef FxU32( FX_CALL *grSstStatus_fpt )( void );
1194#else
1195
1196FX_ENTRY FxU32 FX_CALL
1197grSstStatus( void );
1198
1199#endif /* DYNAHEADER */
1200
1201/*
1202**  Drawing Statistics
1203*/
1204#ifdef DYNAHEADER
1205typedef void( FX_CALL *grSstPerfStats_fpt )(GrSstPerfStats_t *pStats );
1206#else
1207
1208FX_ENTRY void FX_CALL
1209grSstPerfStats(GrSstPerfStats_t *pStats);
1210
1211#endif /* DYNAHEADER */
1212
1213#ifdef DYNAHEADER
1214typedef void( FX_CALL *grSstResetPerfStats_fpt )(void );
1215#else
1216
1217FX_ENTRY void FX_CALL
1218grSstResetPerfStats(void);
1219
1220#endif /* DYNAHEADER */
1221
1222#ifdef DYNAHEADER
1223typedef void( FX_CALL *grResetTriStats_fpt )( );
1224#else
1225
1226FX_ENTRY void FX_CALL
1227grResetTriStats();
1228
1229#endif /* DYNAHEADER */
1230
1231#ifdef DYNAHEADER
1232typedef void( FX_CALL *grTriStats_fpt )(FxU32 *trisProcessed, FxU32 *trisDrawn );
1233#else
1234
1235FX_ENTRY void FX_CALL
1236grTriStats(FxU32 *trisProcessed, FxU32 *trisDrawn);
1237
1238#endif /* DYNAHEADER */
1239
1240/*
1241** Glide configuration and special effect maintenance functions
1242*/
1243#ifdef DYNAHEADER
1244typedef void( FX_CALL *grAlphaBlendFunction_fpt )( GrAlphaBlendFnc_t rgb_sf, GrAlphaBlendFnc_t rgb_df, GrAlphaBlendFnc_t alpha_sf, GrAlphaBlendFnc_t alpha_df );
1245#else
1246
1247FX_ENTRY void FX_CALL
1248grAlphaBlendFunction(
1249                     GrAlphaBlendFnc_t rgb_sf,   GrAlphaBlendFnc_t rgb_df,
1250                     GrAlphaBlendFnc_t alpha_sf, GrAlphaBlendFnc_t alpha_df
1251                     );
1252
1253#endif /* DYNAHEADER */
1254
1255#ifdef DYNAHEADER
1256typedef void( FX_CALL *grAlphaCombine_fpt )( GrCombineFunction_t function, GrCombineFactor_t factor, GrCombineLocal_t local, GrCombineOther_t other, FxBool invert );
1257#else
1258
1259FX_ENTRY void FX_CALL
1260grAlphaCombine(
1261               GrCombineFunction_t function, GrCombineFactor_t factor,
1262               GrCombineLocal_t local, GrCombineOther_t other,
1263               FxBool invert
1264               );
1265
1266#endif /* DYNAHEADER */
1267
1268#ifdef DYNAHEADER
1269typedef void( FX_CALL *grAlphaControlsITRGBLighting_fpt )( FxBool enable );
1270#else
1271
1272FX_ENTRY void FX_CALL
1273grAlphaControlsITRGBLighting( FxBool enable );
1274
1275#endif /* DYNAHEADER */
1276
1277#ifdef DYNAHEADER
1278typedef void( FX_CALL *grAlphaTestFunction_fpt )( GrCmpFnc_t function );
1279#else
1280
1281FX_ENTRY void FX_CALL
1282grAlphaTestFunction( GrCmpFnc_t function );
1283
1284#endif /* DYNAHEADER */
1285
1286#ifdef DYNAHEADER
1287typedef void( FX_CALL *grAlphaTestReferenceValue_fpt )( GrAlpha_t value );
1288#else
1289
1290FX_ENTRY void FX_CALL
1291grAlphaTestReferenceValue( GrAlpha_t value );
1292
1293#endif /* DYNAHEADER */
1294
1295#ifdef DYNAHEADER
1296typedef void( FX_CALL *grChromakeyMode_fpt )( GrChromakeyMode_t mode );
1297#else
1298
1299FX_ENTRY void FX_CALL
1300grChromakeyMode( GrChromakeyMode_t mode );
1301
1302#endif /* DYNAHEADER */
1303
1304#ifdef DYNAHEADER
1305typedef void( FX_CALL *grChromakeyValue_fpt )( GrColor_t value );
1306#else
1307
1308FX_ENTRY void FX_CALL
1309grChromakeyValue( GrColor_t value );
1310
1311#endif /* DYNAHEADER */
1312
1313#ifdef DYNAHEADER
1314typedef void( FX_CALL *grClipWindow_fpt )( int minx, int miny, int maxx, int maxy );
1315#else
1316
1317FX_ENTRY void FX_CALL
1318grClipWindow( int minx, int miny, int maxx, int maxy );
1319
1320#endif /* DYNAHEADER */
1321
1322#ifdef DYNAHEADER
1323typedef void( FX_CALL *grColorCombine_fpt )( GrCombineFunction_t function, GrCombineFactor_t factor, GrCombineLocal_t local, GrCombineOther_t other, FxBool invert );
1324#else
1325
1326FX_ENTRY void FX_CALL
1327grColorCombine(
1328               GrCombineFunction_t function, GrCombineFactor_t factor,
1329               GrCombineLocal_t local, GrCombineOther_t other,
1330               FxBool invert );
1331
1332#endif /* DYNAHEADER */
1333
1334#ifdef DYNAHEADER
1335typedef void( FX_CALL *grColorMask_fpt )( FxBool rgb, FxBool a );
1336#else
1337
1338FX_ENTRY void FX_CALL
1339grColorMask( FxBool rgb, FxBool a );
1340
1341#endif /* DYNAHEADER */
1342
1343#ifdef DYNAHEADER
1344typedef void( FX_CALL *grCullMode_fpt )( GrCullMode_t mode );
1345#else
1346
1347FX_ENTRY void FX_CALL
1348grCullMode( GrCullMode_t mode );
1349
1350#endif /* DYNAHEADER */
1351
1352#ifdef DYNAHEADER
1353typedef void( FX_CALL *grConstantColorValue_fpt )( GrColor_t value );
1354#else
1355
1356FX_ENTRY void FX_CALL
1357grConstantColorValue( GrColor_t value );
1358
1359#endif /* DYNAHEADER */
1360
1361#ifdef DYNAHEADER
1362typedef void( FX_CALL *grConstantColorValue4_fpt )( float a, float r, float g, float b );
1363#else
1364
1365FX_ENTRY void FX_CALL
1366grConstantColorValue4( float a, float r, float g, float b );
1367
1368#endif /* DYNAHEADER */
1369
1370#ifdef DYNAHEADER
1371typedef void( FX_CALL *grDepthBiasLevel_fpt )( FxI16 level );
1372#else
1373
1374FX_ENTRY void FX_CALL
1375grDepthBiasLevel( FxI16 level );
1376
1377#endif /* DYNAHEADER */
1378
1379#ifdef DYNAHEADER
1380typedef void( FX_CALL *grDepthBufferFunction_fpt )( GrCmpFnc_t function );
1381#else
1382
1383FX_ENTRY void FX_CALL
1384grDepthBufferFunction( GrCmpFnc_t function );
1385
1386#endif /* DYNAHEADER */
1387
1388#ifdef DYNAHEADER
1389typedef void( FX_CALL *grDepthBufferMode_fpt )( GrDepthBufferMode_t mode );
1390#else
1391
1392FX_ENTRY void FX_CALL
1393grDepthBufferMode( GrDepthBufferMode_t mode );
1394
1395#endif /* DYNAHEADER */
1396
1397#ifdef DYNAHEADER
1398typedef void( FX_CALL *grDepthMask_fpt )( FxBool mask );
1399#else
1400
1401FX_ENTRY void FX_CALL
1402grDepthMask( FxBool mask );
1403
1404#endif /* DYNAHEADER */
1405
1406#ifdef DYNAHEADER
1407typedef void( FX_CALL *grDisableAllEffects_fpt )( void );
1408#else
1409
1410FX_ENTRY void FX_CALL
1411grDisableAllEffects( void );
1412
1413#endif /* DYNAHEADER */
1414
1415#ifdef DYNAHEADER
1416typedef void( FX_CALL *grDitherMode_fpt )( GrDitherMode_t mode );
1417#else
1418
1419FX_ENTRY void FX_CALL
1420grDitherMode( GrDitherMode_t mode );
1421
1422#endif /* DYNAHEADER */
1423
1424#ifdef DYNAHEADER
1425typedef void( FX_CALL *grFogColorValue_fpt )( GrColor_t fogcolor );
1426#else
1427
1428FX_ENTRY void FX_CALL
1429grFogColorValue( GrColor_t fogcolor );
1430
1431#endif /* DYNAHEADER */
1432
1433#ifdef DYNAHEADER
1434typedef void( FX_CALL *grFogMode_fpt )( GrFogMode_t mode );
1435#else
1436
1437FX_ENTRY void FX_CALL
1438grFogMode( GrFogMode_t mode );
1439
1440#endif /* DYNAHEADER */
1441
1442#ifdef DYNAHEADER
1443typedef void( FX_CALL *grFogTable_fpt )( const GrFog_t ft[GR_FOG_TABLE_SIZE] );
1444#else
1445
1446FX_ENTRY void FX_CALL
1447grFogTable( const GrFog_t ft[GR_FOG_TABLE_SIZE] );
1448
1449#endif /* DYNAHEADER */
1450
1451#ifdef DYNAHEADER
1452typedef void( FX_CALL *grGammaCorrectionValue_fpt )( float value );
1453#else
1454
1455FX_ENTRY void FX_CALL
1456grGammaCorrectionValue( float value );
1457
1458#endif /* DYNAHEADER */
1459
1460#ifdef DYNAHEADER
1461typedef void( FX_CALL *grSplash_fpt )(float x, float y, float width, float height, FxU32 frame );
1462#else
1463
1464FX_ENTRY void FX_CALL
1465grSplash(float x, float y, float width, float height, FxU32 frame);
1466
1467#endif /* DYNAHEADER */
1468
1469/*
1470** texture mapping control functions
1471*/
1472#ifdef DYNAHEADER
1473typedef FxU32( FX_CALL *grTexCalcMemRequired_fpt )( GrLOD_t lodmin, GrLOD_t lodmax, GrAspectRatio_t aspect, GrTextureFormat_t fmt );
1474#else
1475
1476FX_ENTRY FxU32 FX_CALL
1477grTexCalcMemRequired(
1478                     GrLOD_t lodmin, GrLOD_t lodmax,
1479                     GrAspectRatio_t aspect, GrTextureFormat_t fmt);
1480
1481#endif /* DYNAHEADER */
1482
1483#ifdef DYNAHEADER
1484typedef FxU32( FX_CALL *grTexTextureMemRequired_fpt )( FxU32 evenOdd, GrTexInfo *info );
1485#else
1486
1487FX_ENTRY FxU32 FX_CALL
1488grTexTextureMemRequired( FxU32     evenOdd,
1489                                 GrTexInfo *info   );
1490
1491#endif /* DYNAHEADER */
1492
1493#ifdef DYNAHEADER
1494typedef FxU32( FX_CALL *grTexMinAddress_fpt )( GrChipID_t tmu );
1495#else
1496
1497FX_ENTRY FxU32 FX_CALL
1498grTexMinAddress( GrChipID_t tmu );
1499
1500#endif /* DYNAHEADER */
1501
1502
1503#ifdef DYNAHEADER
1504typedef FxU32( FX_CALL *grTexMaxAddress_fpt )( GrChipID_t tmu );
1505#else
1506
1507FX_ENTRY FxU32 FX_CALL
1508grTexMaxAddress( GrChipID_t tmu );
1509
1510#endif /* DYNAHEADER */
1511
1512
1513#ifdef DYNAHEADER
1514typedef void( FX_CALL *grTexNCCTable_fpt )( GrChipID_t tmu, GrNCCTable_t table );
1515#else
1516
1517FX_ENTRY void FX_CALL
1518grTexNCCTable( GrChipID_t tmu, GrNCCTable_t table );
1519
1520#endif /* DYNAHEADER */
1521
1522#ifdef DYNAHEADER
1523typedef void( FX_CALL *grTexSource_fpt )( GrChipID_t tmu, FxU32 startAddress, FxU32 evenOdd, GrTexInfo *info );
1524#else
1525
1526FX_ENTRY void FX_CALL
1527grTexSource( GrChipID_t tmu,
1528             FxU32      startAddress,
1529             FxU32      evenOdd,
1530             GrTexInfo  *info );
1531
1532#endif /* DYNAHEADER */
1533
1534#ifdef DYNAHEADER
1535typedef void( FX_CALL *grTexClampMode_fpt )( GrChipID_t tmu, GrTextureClampMode_t s_clampmode, GrTextureClampMode_t t_clampmode );
1536#else
1537
1538FX_ENTRY void FX_CALL
1539grTexClampMode(
1540               GrChipID_t tmu,
1541               GrTextureClampMode_t s_clampmode,
1542               GrTextureClampMode_t t_clampmode
1543               );
1544
1545#endif /* DYNAHEADER */
1546
1547#ifdef DYNAHEADER
1548typedef void( FX_CALL *grTexCombine_fpt )( GrChipID_t tmu, GrCombineFunction_t rgb_function, GrCombineFactor_t rgb_factor, GrCombineFunction_t alpha_function, GrCombineFactor_t alpha_factor, FxBool rgb_invert, FxBool alpha_invert );
1549#else
1550
1551FX_ENTRY void FX_CALL
1552grTexCombine(
1553             GrChipID_t tmu,
1554             GrCombineFunction_t rgb_function,
1555             GrCombineFactor_t rgb_factor,
1556             GrCombineFunction_t alpha_function,
1557             GrCombineFactor_t alpha_factor,
1558             FxBool rgb_invert,
1559             FxBool alpha_invert
1560             );
1561
1562#endif /* DYNAHEADER */
1563
1564#ifdef DYNAHEADER
1565typedef void( FX_CALL *grTexCombineFunction_fpt )( GrChipID_t tmu, GrTextureCombineFnc_t fnc );
1566#else
1567
1568FX_ENTRY void FX_CALL
1569grTexCombineFunction(
1570                     GrChipID_t tmu,
1571                     GrTextureCombineFnc_t fnc
1572                     );
1573
1574#endif /* DYNAHEADER */
1575
1576#ifdef DYNAHEADER
1577typedef void( FX_CALL *grTexDetailControl_fpt )( GrChipID_t tmu, int lod_bias, FxU8 detail_scale, float detail_max );
1578#else
1579
1580FX_ENTRY void FX_CALL
1581grTexDetailControl(
1582                   GrChipID_t tmu,
1583                   int lod_bias,
1584                   FxU8 detail_scale,
1585                   float detail_max
1586                   );
1587
1588#endif /* DYNAHEADER */
1589
1590#ifdef DYNAHEADER
1591typedef void( FX_CALL *grTexFilterMode_fpt )( GrChipID_t tmu, GrTextureFilterMode_t minfilter_mode, GrTextureFilterMode_t magfilter_mode );
1592#else
1593
1594FX_ENTRY void FX_CALL
1595grTexFilterMode(
1596                GrChipID_t tmu,
1597                GrTextureFilterMode_t minfilter_mode,
1598                GrTextureFilterMode_t magfilter_mode
1599                );
1600
1601#endif /* DYNAHEADER */
1602
1603
1604#ifdef DYNAHEADER
1605typedef void( FX_CALL *grTexLodBiasValue_fpt )(GrChipID_t tmu, float bias );
1606#else
1607
1608FX_ENTRY void FX_CALL
1609grTexLodBiasValue(GrChipID_t tmu, float bias );
1610
1611#endif /* DYNAHEADER */
1612
1613#ifdef DYNAHEADER
1614typedef void( FX_CALL *grTexDownloadMipMap_fpt )( GrChipID_t tmu, FxU32 startAddress, FxU32 evenOdd, GrTexInfo *info );
1615#else
1616
1617FX_ENTRY void FX_CALL
1618grTexDownloadMipMap( GrChipID_t tmu,
1619                     FxU32      startAddress,
1620                     FxU32      evenOdd,
1621                     GrTexInfo  *info );
1622
1623#endif /* DYNAHEADER */
1624
1625#ifdef DYNAHEADER
1626typedef void( FX_CALL *grTexDownloadMipMapLevel_fpt )( GrChipID_t tmu, FxU32 startAddress, GrLOD_t thisLod, GrLOD_t largeLod, GrAspectRatio_t aspectRatio, GrTextureFormat_t format, FxU32 evenOdd, void *data );
1627#else
1628
1629FX_ENTRY void FX_CALL
1630grTexDownloadMipMapLevel( GrChipID_t        tmu,
1631                          FxU32             startAddress,
1632                          GrLOD_t           thisLod,
1633                          GrLOD_t           largeLod,
1634                          GrAspectRatio_t   aspectRatio,
1635                          GrTextureFormat_t format,
1636                          FxU32             evenOdd,
1637                          void              *data );
1638
1639#endif /* DYNAHEADER */
1640
1641#ifdef DYNAHEADER
1642typedef void( FX_CALL *grTexDownloadMipMapLevelPartial_fpt )( GrChipID_t tmu, FxU32 startAddress, GrLOD_t thisLod, GrLOD_t largeLod, GrAspectRatio_t aspectRatio, GrTextureFormat_t format, FxU32 evenOdd, void *data, int start, int end );
1643#else
1644
1645FX_ENTRY void FX_CALL
1646grTexDownloadMipMapLevelPartial( GrChipID_t        tmu,
1647                                 FxU32             startAddress,
1648                                 GrLOD_t           thisLod,
1649                                 GrLOD_t           largeLod,
1650                                 GrAspectRatio_t   aspectRatio,
1651                                 GrTextureFormat_t format,
1652                                 FxU32             evenOdd,
1653                                 void              *data,
1654                                 int               start,
1655                                 int               end );
1656
1657#endif /* DYNAHEADER */
1658
1659
1660#ifdef DYNAHEADER
1661typedef void( FX_CALL *ConvertAndDownloadRle_fpt )( GrChipID_t tmu, FxU32 startAddress, GrLOD_t thisLod, GrLOD_t largeLod, GrAspectRatio_t aspectRatio, GrTextureFormat_t format, FxU32 evenOdd, FxU8 *bm_data, long bm_h, FxU32 u0, FxU32 v0, FxU32 width, FxU32 height, FxU32 dest_width, FxU32 dest_height, FxU16 *tlut );
1662#else
1663
1664FX_ENTRY void FX_CALL
1665ConvertAndDownloadRle( GrChipID_t        tmu,
1666                        FxU32             startAddress,
1667                        GrLOD_t           thisLod,
1668                        GrLOD_t           largeLod,
1669                        GrAspectRatio_t   aspectRatio,
1670                        GrTextureFormat_t format,
1671                        FxU32             evenOdd,
1672                        FxU8              *bm_data,
1673                        long              bm_h,
1674                        FxU32             u0,
1675                        FxU32             v0,
1676                        FxU32             width,
1677                        FxU32             height,
1678                        FxU32             dest_width,
1679                        FxU32             dest_height,
1680                        FxU16             *tlut);
1681
1682#endif /* DYNAHEADER */
1683
1684#ifdef DYNAHEADER
1685typedef void( FX_CALL *grCheckForRoom_fpt )(FxI32 n );
1686#else
1687
1688FX_ENTRY void FX_CALL
1689grCheckForRoom(FxI32 n);
1690
1691#endif /* DYNAHEADER */
1692
1693#ifdef DYNAHEADER
1694typedef void( FX_CALL *grTexDownloadTable_fpt )( GrChipID_t tmu, GrTexTable_t type, void *data );
1695#else
1696
1697FX_ENTRY void FX_CALL
1698grTexDownloadTable( GrChipID_t   tmu,
1699                    GrTexTable_t type,
1700                    void         *data );
1701
1702#endif /* DYNAHEADER */
1703
1704#ifdef DYNAHEADER
1705typedef void( FX_CALL *grTexDownloadTablePartial_fpt )( GrChipID_t tmu, GrTexTable_t type, void *data, int start, int end );
1706#else
1707
1708FX_ENTRY void FX_CALL
1709grTexDownloadTablePartial( GrChipID_t   tmu,
1710                           GrTexTable_t type,
1711                           void         *data,
1712                           int          start,
1713                           int          end );
1714
1715#endif /* DYNAHEADER */
1716
1717#ifdef DYNAHEADER
1718typedef void( FX_CALL *grTexMipMapMode_fpt )( GrChipID_t tmu, GrMipMapMode_t mode, FxBool lodBlend );
1719#else
1720
1721FX_ENTRY void FX_CALL
1722grTexMipMapMode( GrChipID_t     tmu,
1723                 GrMipMapMode_t mode,
1724                 FxBool         lodBlend );
1725
1726#endif /* DYNAHEADER */
1727
1728#ifdef DYNAHEADER
1729typedef void( FX_CALL *grTexMultibase_fpt )( GrChipID_t tmu, FxBool enable );
1730#else
1731
1732FX_ENTRY void FX_CALL
1733grTexMultibase( GrChipID_t tmu,
1734                FxBool     enable );
1735
1736#endif /* DYNAHEADER */
1737
1738#ifdef DYNAHEADER
1739typedef void( FX_CALL *grTexMultibaseAddress_fpt )( GrChipID_t tmu, GrTexBaseRange_t range, FxU32 startAddress, FxU32 evenOdd, GrTexInfo *info );
1740#else
1741
1742FX_ENTRY void FX_CALL
1743grTexMultibaseAddress( GrChipID_t       tmu,
1744                       GrTexBaseRange_t range,
1745                       FxU32            startAddress,
1746                       FxU32            evenOdd,
1747                       GrTexInfo        *info );
1748
1749#endif /* DYNAHEADER */
1750
1751/*
1752** utility texture functions
1753*/
1754#ifdef DYNAHEADER
1755typedef GrMipMapId_t( FX_CALL *guTexAllocateMemory_fpt )( GrChipID_t tmu, FxU8 odd_even_mask, int width, int height, GrTextureFormat_t fmt, GrMipMapMode_t mm_mode, GrLOD_t smallest_lod, GrLOD_t largest_lod, GrAspectRatio_t aspect, GrTextureClampMode_t s_clamp_mode, GrTextureClampMode_t t_clamp_mode, GrTextureFilterMode_t minfilter_mode, GrTextureFilterMode_t magfilter_mode, float lod_bias, FxBool trilinear );
1756#else
1757
1758FX_ENTRY GrMipMapId_t FX_CALL
1759guTexAllocateMemory(
1760                    GrChipID_t tmu,
1761                    FxU8 odd_even_mask,
1762                    int width, int height,
1763                    GrTextureFormat_t fmt,
1764                    GrMipMapMode_t mm_mode,
1765                    GrLOD_t smallest_lod, GrLOD_t largest_lod,
1766                    GrAspectRatio_t aspect,
1767                    GrTextureClampMode_t s_clamp_mode,
1768                    GrTextureClampMode_t t_clamp_mode,
1769                    GrTextureFilterMode_t minfilter_mode,
1770                    GrTextureFilterMode_t magfilter_mode,
1771                    float lod_bias,
1772                    FxBool trilinear
1773                    );
1774
1775#endif /* DYNAHEADER */
1776
1777#ifdef DYNAHEADER
1778typedef FxBool( FX_CALL *guTexChangeAttributes_fpt )( GrMipMapId_t mmid, int width, int height, GrTextureFormat_t fmt, GrMipMapMode_t mm_mode, GrLOD_t smallest_lod, GrLOD_t largest_lod, GrAspectRatio_t aspect, GrTextureClampMode_t s_clamp_mode, GrTextureClampMode_t t_clamp_mode, GrTextureFilterMode_t minFilterMode, GrTextureFilterMode_t magFilterMode );
1779#else
1780
1781FX_ENTRY FxBool FX_CALL
1782guTexChangeAttributes(
1783                      GrMipMapId_t mmid,
1784                      int width, int height,
1785                      GrTextureFormat_t fmt,
1786                      GrMipMapMode_t mm_mode,
1787                      GrLOD_t smallest_lod, GrLOD_t largest_lod,
1788                      GrAspectRatio_t aspect,
1789                      GrTextureClampMode_t s_clamp_mode,
1790                      GrTextureClampMode_t t_clamp_mode,
1791                      GrTextureFilterMode_t minFilterMode,
1792                      GrTextureFilterMode_t magFilterMode
1793                      );
1794
1795#endif /* DYNAHEADER */
1796
1797#ifdef DYNAHEADER
1798typedef void( FX_CALL *guTexCombineFunction_fpt )( GrChipID_t tmu, GrTextureCombineFnc_t fnc );
1799#else
1800
1801FX_ENTRY void FX_CALL
1802guTexCombineFunction(
1803                     GrChipID_t tmu,
1804                     GrTextureCombineFnc_t fnc
1805                     );
1806
1807#endif /* DYNAHEADER */
1808
1809#ifdef DYNAHEADER
1810typedef GrMipMapId_t( FX_CALL *guTexGetCurrentMipMap_fpt )( GrChipID_t tmu );
1811#else
1812
1813FX_ENTRY GrMipMapId_t FX_CALL
1814guTexGetCurrentMipMap( GrChipID_t tmu );
1815
1816#endif /* DYNAHEADER */
1817
1818#ifdef DYNAHEADER
1819typedef GrMipMapInfo *( FX_CALL *guTexGetMipMapInfo_fpt )( GrMipMapId_t mmid );
1820#else
1821
1822FX_ENTRY GrMipMapInfo * FX_CALL
1823guTexGetMipMapInfo( GrMipMapId_t mmid );
1824
1825#endif /* DYNAHEADER */
1826
1827#ifdef DYNAHEADER
1828typedef FxU32( FX_CALL *guTexMemQueryAvail_fpt )( GrChipID_t tmu );
1829#else
1830
1831FX_ENTRY FxU32 FX_CALL
1832guTexMemQueryAvail( GrChipID_t tmu );
1833
1834#endif /* DYNAHEADER */
1835
1836#ifdef DYNAHEADER
1837typedef void( FX_CALL *guTexMemReset_fpt )( void );
1838#else
1839
1840FX_ENTRY void FX_CALL
1841guTexMemReset( void );
1842
1843#endif /* DYNAHEADER */
1844
1845#ifdef DYNAHEADER
1846typedef void( FX_CALL *guTexDownloadMipMap_fpt )( GrMipMapId_t mmid, const void *src, const GuNccTable *table );
1847#else
1848
1849FX_ENTRY void FX_CALL
1850guTexDownloadMipMap(
1851                    GrMipMapId_t mmid,
1852                    const void *src,
1853                    const GuNccTable *table
1854                    );
1855
1856#endif /* DYNAHEADER */
1857
1858#ifdef DYNAHEADER
1859typedef void( FX_CALL *guTexDownloadMipMapLevel_fpt )( GrMipMapId_t mmid, GrLOD_t lod, const void **src );
1860#else
1861
1862FX_ENTRY void FX_CALL
1863guTexDownloadMipMapLevel(
1864                         GrMipMapId_t mmid,
1865                         GrLOD_t lod,
1866                         const void **src
1867                         );
1868
1869#endif /* DYNAHEADER */
1870#ifdef DYNAHEADER
1871typedef void( FX_CALL *guTexSource_fpt )( GrMipMapId_t id );
1872#else
1873
1874FX_ENTRY void FX_CALL
1875guTexSource( GrMipMapId_t id );
1876
1877#endif /* DYNAHEADER */
1878
1879/*
1880** linear frame buffer functions
1881*/
1882
1883#ifdef DYNAHEADER
1884typedef FxBool( FX_CALL *grLfbLock_fpt )( GrLock_t type, GrBuffer_t buffer, GrLfbWriteMode_t writeMode, GrOriginLocation_t origin, FxBool pixelPipeline, GrLfbInfo_t *info );
1885#else
1886
1887FX_ENTRY FxBool FX_CALL
1888grLfbLock( GrLock_t type, GrBuffer_t buffer, GrLfbWriteMode_t writeMode,
1889           GrOriginLocation_t origin, FxBool pixelPipeline,
1890           GrLfbInfo_t *info );
1891
1892#endif /* DYNAHEADER */
1893
1894#ifdef DYNAHEADER
1895typedef FxBool( FX_CALL *grLfbUnlock_fpt )( GrLock_t type, GrBuffer_t buffer );
1896#else
1897
1898FX_ENTRY FxBool FX_CALL
1899grLfbUnlock( GrLock_t type, GrBuffer_t buffer );
1900
1901#endif /* DYNAHEADER */
1902
1903#ifdef DYNAHEADER
1904typedef void( FX_CALL *grLfbConstantAlpha_fpt )( GrAlpha_t alpha );
1905#else
1906
1907FX_ENTRY void FX_CALL
1908grLfbConstantAlpha( GrAlpha_t alpha );
1909
1910#endif /* DYNAHEADER */
1911
1912#ifdef DYNAHEADER
1913typedef void( FX_CALL *grLfbConstantDepth_fpt )( FxU16 depth );
1914#else
1915
1916FX_ENTRY void FX_CALL
1917grLfbConstantDepth( FxU16 depth );
1918
1919#endif /* DYNAHEADER */
1920
1921#ifdef DYNAHEADER
1922typedef void( FX_CALL *grLfbWriteColorSwizzle_fpt )(FxBool swizzleBytes, FxBool swapWords );
1923#else
1924
1925FX_ENTRY void FX_CALL
1926grLfbWriteColorSwizzle(FxBool swizzleBytes, FxBool swapWords);
1927
1928#endif /* DYNAHEADER */
1929
1930#ifdef DYNAHEADER
1931typedef void( FX_CALL *grLfbWriteColorFormat_fpt )(GrColorFormat_t colorFormat );
1932#else
1933
1934FX_ENTRY void FX_CALL
1935grLfbWriteColorFormat(GrColorFormat_t colorFormat);
1936
1937#endif /* DYNAHEADER */
1938
1939
1940#ifdef DYNAHEADER
1941typedef FxBool( FX_CALL *grLfbWriteRegion_fpt )( GrBuffer_t dst_buffer, FxU32 dst_x, FxU32 dst_y, GrLfbSrcFmt_t src_format, FxU32 src_width, FxU32 src_height, FxI32 src_stride, void *src_data );
1942#else
1943
1944FX_ENTRY FxBool FX_CALL
1945grLfbWriteRegion( GrBuffer_t dst_buffer,
1946                  FxU32 dst_x, FxU32 dst_y,
1947                  GrLfbSrcFmt_t src_format,
1948                  FxU32 src_width, FxU32 src_height,
1949                  FxI32 src_stride, void *src_data );
1950
1951#endif /* DYNAHEADER */
1952
1953#ifdef DYNAHEADER
1954typedef FxBool( FX_CALL *grLfbReadRegion_fpt )( GrBuffer_t src_buffer, FxU32 src_x, FxU32 src_y, FxU32 src_width, FxU32 src_height, FxU32 dst_stride, void *dst_data );
1955#else
1956
1957FX_ENTRY FxBool FX_CALL
1958grLfbReadRegion( GrBuffer_t src_buffer,
1959                 FxU32 src_x, FxU32 src_y,
1960                 FxU32 src_width, FxU32 src_height,
1961                 FxU32 dst_stride, void *dst_data );
1962
1963#endif /* DYNAHEADER */
1964
1965
1966/*
1967**  Antialiasing Functions
1968*/
1969#ifdef DYNAHEADER
1970typedef void( FX_CALL *grAADrawLine_fpt )(const GrVertex *v1, const GrVertex *v2 );
1971#else
1972
1973FX_ENTRY void FX_CALL
1974grAADrawLine(const GrVertex *v1, const GrVertex *v2);
1975
1976#endif /* DYNAHEADER */
1977
1978#ifdef DYNAHEADER
1979typedef void( FX_CALL *grAADrawPoint_fpt )(const GrVertex *pt );
1980#else
1981
1982FX_ENTRY void FX_CALL
1983grAADrawPoint(const GrVertex *pt );
1984
1985#endif /* DYNAHEADER */
1986
1987#ifdef DYNAHEADER
1988typedef void( FX_CALL *grAADrawPolygon_fpt )(const int nverts, const int ilist[], const GrVertex vlist[] );
1989#else
1990
1991FX_ENTRY void FX_CALL
1992grAADrawPolygon(const int nverts, const int ilist[], const GrVertex vlist[]);
1993
1994#endif /* DYNAHEADER */
1995
1996#ifdef DYNAHEADER
1997typedef void( FX_CALL *grAADrawPolygonVertexList_fpt )(const int nverts, const GrVertex vlist[] );
1998#else
1999
2000FX_ENTRY void FX_CALL
2001grAADrawPolygonVertexList(const int nverts, const GrVertex vlist[]);
2002
2003#endif /* DYNAHEADER */
2004
2005#ifdef DYNAHEADER
2006typedef void( FX_CALL *grAADrawTriangle_fpt )( const GrVertex *a, const GrVertex *b, const GrVertex *c, FxBool ab_antialias, FxBool bc_antialias, FxBool ca_antialias );
2007#else
2008
2009FX_ENTRY void FX_CALL
2010grAADrawTriangle(
2011                 const GrVertex *a, const GrVertex *b, const GrVertex *c,
2012                 FxBool ab_antialias, FxBool bc_antialias, FxBool ca_antialias
2013                 );
2014
2015#endif /* DYNAHEADER */
2016
2017/*
2018** glide management functions
2019*/
2020#ifdef DYNAHEADER
2021typedef void( FX_CALL *grGlideInit_fpt )( void );
2022#else
2023
2024FX_ENTRY void FX_CALL
2025grGlideInit( void );
2026
2027#endif /* DYNAHEADER */
2028
2029#ifdef DYNAHEADER
2030typedef void( FX_CALL *grGlideShutdown_fpt )( void );
2031#else
2032
2033FX_ENTRY void FX_CALL
2034grGlideShutdown( void );
2035
2036#endif /* DYNAHEADER */
2037
2038#ifdef DYNAHEADER
2039typedef void( FX_CALL *grGlideGetVersion_fpt )( char version[80] );
2040#else
2041
2042FX_ENTRY void FX_CALL
2043grGlideGetVersion( char version[80] );
2044
2045#endif /* DYNAHEADER */
2046
2047#ifdef DYNAHEADER
2048typedef void( FX_CALL *grGlideGetState_fpt )( GrState *state );
2049#else
2050
2051FX_ENTRY void FX_CALL
2052grGlideGetState( GrState *state );
2053
2054#endif /* DYNAHEADER */
2055
2056#ifdef DYNAHEADER
2057typedef void( FX_CALL *grGlideSetState_fpt )( const GrState *state );
2058#else
2059
2060FX_ENTRY void FX_CALL
2061grGlideSetState( const GrState *state );
2062
2063#endif /* DYNAHEADER */
2064
2065#ifdef DYNAHEADER
2066typedef void( FX_CALL *grGlideShamelessPlug_fpt )(const FxBool on );
2067#else
2068
2069FX_ENTRY void FX_CALL
2070grGlideShamelessPlug(const FxBool on);
2071
2072#endif /* DYNAHEADER */
2073
2074#ifdef DYNAHEADER
2075typedef void( FX_CALL *grHints_fpt )(GrHint_t hintType, FxU32 hintMask );
2076#else
2077
2078FX_ENTRY void FX_CALL
2079grHints(GrHint_t hintType, FxU32 hintMask);
2080
2081#endif /* DYNAHEADER */
2082
2083#endif /* FX_GLIDE_NO_FUNC_PROTO */
2084
2085#ifdef __cplusplus
2086}
2087#endif
2088
2089/* The following include has been replaced
2090 * by the processed text from the header file.
2091 * #include <glideutl.h>
2092 */
2093/*
2094** Copyright (c) 1995, 3Dfx Interactive, Inc.
2095** All Rights Reserved.
2096**
2097** This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.;
2098** the contents of this file may not be disclosed to third parties, copied or
2099** duplicated in any form, in whole or in part, without the prior written
2100** permission of 3Dfx Interactive, Inc.
2101**
2102** RESTRICTED RIGHTS LEGEND:
2103** Use, duplication or disclosure by the Government is subject to restrictions
2104** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
2105** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
2106** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
2107** rights reserved under the Copyright Laws of the United States.
2108**
2109** $Header: /u/crack/.cvs_code/i4/video/glide/glide.h,v 1.3 1997/11/21 19:18:47 jc Exp $
2110** $Log: glide.h,v $
2111** Revision 1.3  1997/11/21 19:18:47  jc
2112** *** empty log message ***
2113**
2114** Revision 1.2  1997/10/21 16:36:56  jc
2115** *** empty log message ***
2116**
2117** Revision 1.1  2017/10/20 10:52:51  trey
2118** *** empty log message ***
2119**
2120 *
2121 * 4     3/05/97 9:36p Jdt
2122 * Removed guFbWriteRegion added guEncodeRLE16
2123 *
2124 * 3     1/16/97 3:45p Dow
2125 * Embedded fn protos in ifndef FX_GLIDE_NO_FUNC_PROTO
2126*/
2127
2128/* Glide Utility routines */
2129
2130#ifndef __GLIDEUTL_H__
2131#define __GLIDEUTL_H__
2132
2133#ifdef __cplusplus
2134extern "C" {
2135#endif
2136
2137#ifndef FX_GLIDE_NO_FUNC_PROTO
2138/*
2139** rendering functions
2140*/
2141#ifdef DYNAHEADER
2142typedef void( FX_CALL *guAADrawTriangleWithClip_fpt )( const GrVertex *a, const GrVertex *b, const GrVertex *c );
2143#else
2144
2145FX_ENTRY void FX_CALL
2146guAADrawTriangleWithClip( const GrVertex *a, const GrVertex
2147                         *b, const GrVertex *c);
2148
2149#endif /* DYNAHEADER */
2150
2151#ifdef DYNAHEADER
2152typedef void( FX_CALL *guDrawTriangleWithClip_fpt )( const GrVertex *a, const GrVertex *b, const GrVertex *c );
2153#else
2154
2155FX_ENTRY void FX_CALL
2156guDrawTriangleWithClip(
2157                       const GrVertex *a,
2158                       const GrVertex *b,
2159                       const GrVertex *c
2160                       );
2161
2162#endif /* DYNAHEADER */
2163
2164#ifdef DYNAHEADER
2165typedef void( FX_CALL *guDrawPolygonVertexListWithClip_fpt )( int nverts, const GrVertex vlist[] );
2166#else
2167
2168FX_ENTRY void FX_CALL
2169guDrawPolygonVertexListWithClip( int nverts, const GrVertex vlist[] );
2170
2171#endif /* DYNAHEADER */
2172
2173/*
2174** hi-level rendering utility functions
2175*/
2176#ifdef DYNAHEADER
2177typedef void( FX_CALL *guAlphaSource_fpt )( GrAlphaSource_t mode );
2178#else
2179
2180FX_ENTRY void FX_CALL
2181guAlphaSource( GrAlphaSource_t mode );
2182
2183#endif /* DYNAHEADER */
2184
2185#ifdef DYNAHEADER
2186typedef void( FX_CALL *guColorCombineFunction_fpt )( GrColorCombineFnc_t fnc );
2187#else
2188
2189FX_ENTRY void FX_CALL
2190guColorCombineFunction( GrColorCombineFnc_t fnc );
2191
2192#endif /* DYNAHEADER */
2193
2194#ifdef DYNAHEADER
2195typedef int( FX_CALL *guEncodeRLE16_fpt )( void *dst, void *src, FxU32 width, FxU32 height );
2196#else
2197
2198FX_ENTRY int FX_CALL
2199guEncodeRLE16( void *dst,
2200               void *src,
2201               FxU32 width,
2202               FxU32 height );
2203
2204#endif /* DYNAHEADER */
2205
2206#ifdef DYNAHEADER
2207typedef FxU16 *( FX_CALL *guTexCreateColorMipMap_fpt )( void );
2208#else
2209
2210FX_ENTRY FxU16 * FX_CALL
2211guTexCreateColorMipMap( void );
2212
2213#endif /* DYNAHEADER */
2214
2215#if ( GLIDE_PLATFORM & GLIDE_SST_SIM )
2216/*
2217** movie capture stuff
2218*/
2219#ifdef DYNAHEADER
2220typedef void( FX_CALL *guMovieStart_fpt )( void );
2221#else
2222
2223FX_ENTRY void
2224FX_CALL guMovieStart( void );
2225
2226#endif /* DYNAHEADER */
2227
2228#ifdef DYNAHEADER
2229typedef void( FX_CALL *guMovieStop_fpt )( void );
2230#else
2231
2232FX_ENTRY void
2233FX_CALL guMovieStop( void );
2234
2235#endif /* DYNAHEADER */
2236
2237#ifdef DYNAHEADER
2238typedef void( FX_CALL *guMovieSetName_fpt )( const char *name );
2239#else
2240
2241FX_ENTRY void
2242FX_CALL guMovieSetName( const char *name );
2243
2244#endif /* DYNAHEADER */
2245#endif
2246
2247/*
2248** fog stuff
2249*/
2250#ifdef DYNAHEADER
2251typedef float( FX_CALL *guFogTableIndexToW_fpt )( int i );
2252#else
2253
2254FX_ENTRY float FX_CALL
2255guFogTableIndexToW( int i );
2256
2257#endif /* DYNAHEADER */
2258
2259#ifdef DYNAHEADER
2260typedef void( FX_CALL *guFogGenerateExp_fpt )( GrFog_t fogtable[GR_FOG_TABLE_SIZE], float density );
2261#else
2262
2263FX_ENTRY void FX_CALL
2264guFogGenerateExp( GrFog_t fogtable[GR_FOG_TABLE_SIZE], float density );
2265
2266#endif /* DYNAHEADER */
2267
2268#ifdef DYNAHEADER
2269typedef void( FX_CALL *guFogGenerateExp2_fpt )( GrFog_t fogtable[GR_FOG_TABLE_SIZE], float density );
2270#else
2271
2272FX_ENTRY void FX_CALL
2273guFogGenerateExp2( GrFog_t fogtable[GR_FOG_TABLE_SIZE], float density );
2274
2275#endif /* DYNAHEADER */
2276
2277#ifdef DYNAHEADER
2278typedef void( FX_CALL *guFogGenerateLinear_fpt )( GrFog_t fogtable[GR_FOG_TABLE_SIZE], float nearZ, float farZ );
2279#else
2280
2281FX_ENTRY void FX_CALL
2282guFogGenerateLinear(
2283                    GrFog_t fogtable[GR_FOG_TABLE_SIZE],
2284                    float nearZ, float farZ );
2285
2286#endif /* DYNAHEADER */
2287
2288/*
2289** endian stuff
2290*/
2291#ifdef DYNAHEADER
2292typedef FxU32( FX_CALL *guEndianSwapWords_fpt )( FxU32 value );
2293#else
2294
2295FX_ENTRY FxU32 FX_CALL
2296guEndianSwapWords( FxU32 value );
2297
2298#endif /* DYNAHEADER */
2299
2300#ifdef DYNAHEADER
2301typedef FxU16( FX_CALL *guEndianSwapBytes_fpt )( FxU16 value );
2302#else
2303
2304FX_ENTRY FxU16 FX_CALL
2305guEndianSwapBytes( FxU16 value );
2306
2307#endif /* DYNAHEADER */
2308
2309/*
2310** hi-level texture manipulation tools.
2311*/
2312#ifdef DYNAHEADER
2313typedef FxBool( FX_CALL *gu3dfGetInfo_fpt )( const char *filename, Gu3dfInfo *info );
2314#else
2315
2316FX_ENTRY FxBool FX_CALL
2317gu3dfGetInfo( const char *filename, Gu3dfInfo *info );
2318
2319#endif /* DYNAHEADER */
2320
2321#ifdef DYNAHEADER
2322typedef FxBool( FX_CALL *gu3dfLoad_fpt )( const char *filename, Gu3dfInfo *data );
2323#else
2324
2325FX_ENTRY FxBool FX_CALL
2326gu3dfLoad( const char *filename, Gu3dfInfo *data );
2327
2328#endif /* DYNAHEADER */
2329
2330#endif /* FX_GLIDE_NO_FUNC_PROTO */
2331
2332#ifdef __cplusplus
2333}
2334#endif
2335
2336#endif /* __GLIDEUTL_H__ */
2337
2338#if DYNAHEADER
2339extern ConvertAndDownloadRle_fpt ConvertAndDownloadRle;
2340extern grAADrawLine_fpt grAADrawLine;
2341extern grAADrawPoint_fpt grAADrawPoint;
2342extern grAADrawPolygon_fpt grAADrawPolygon;
2343extern grAADrawPolygonVertexList_fpt grAADrawPolygonVertexList;
2344extern grAADrawTriangle_fpt grAADrawTriangle;
2345extern grAlphaBlendFunction_fpt grAlphaBlendFunction;
2346extern grAlphaCombine_fpt grAlphaCombine;
2347extern grAlphaControlsITRGBLighting_fpt grAlphaControlsITRGBLighting;
2348extern grAlphaTestFunction_fpt grAlphaTestFunction;
2349extern grAlphaTestReferenceValue_fpt grAlphaTestReferenceValue;
2350extern grBufferClear_fpt grBufferClear;
2351extern grBufferNumPending_fpt grBufferNumPending;
2352extern grBufferSwap_fpt grBufferSwap;
2353extern grCheckForRoom_fpt grCheckForRoom;
2354extern grChromakeyMode_fpt grChromakeyMode;
2355extern grChromakeyValue_fpt grChromakeyValue;
2356extern grClipWindow_fpt grClipWindow;
2357extern grColorCombine_fpt grColorCombine;
2358extern grColorMask_fpt grColorMask;
2359extern grConstantColorValue_fpt grConstantColorValue;
2360extern grConstantColorValue4_fpt grConstantColorValue4;
2361extern grCullMode_fpt grCullMode;
2362extern grDepthBiasLevel_fpt grDepthBiasLevel;
2363extern grDepthBufferFunction_fpt grDepthBufferFunction;
2364extern grDepthBufferMode_fpt grDepthBufferMode;
2365extern grDepthMask_fpt grDepthMask;
2366extern grDisableAllEffects_fpt grDisableAllEffects;
2367extern grDitherMode_fpt grDitherMode;
2368extern grDrawLine_fpt grDrawLine;
2369extern grDrawPlanarPolygon_fpt grDrawPlanarPolygon;
2370extern grDrawPlanarPolygonVertexList_fpt grDrawPlanarPolygonVertexList;
2371extern grDrawPoint_fpt grDrawPoint;
2372extern grDrawPolygon_fpt grDrawPolygon;
2373extern grDrawPolygonVertexList_fpt grDrawPolygonVertexList;
2374extern grDrawTriangle_fpt grDrawTriangle;
2375extern grErrorSetCallback_fpt grErrorSetCallback;
2376extern grFogColorValue_fpt grFogColorValue;
2377extern grFogMode_fpt grFogMode;
2378extern grFogTable_fpt grFogTable;
2379extern grGammaCorrectionValue_fpt grGammaCorrectionValue;
2380extern grGlideGetState_fpt grGlideGetState;
2381extern grGlideGetVersion_fpt grGlideGetVersion;
2382extern grGlideInit_fpt grGlideInit;
2383extern grGlideSetState_fpt grGlideSetState;
2384extern grGlideShamelessPlug_fpt grGlideShamelessPlug;
2385extern grGlideShutdown_fpt grGlideShutdown;
2386extern grHints_fpt grHints;
2387extern grLfbConstantAlpha_fpt grLfbConstantAlpha;
2388extern grLfbConstantDepth_fpt grLfbConstantDepth;
2389extern grLfbLock_fpt grLfbLock;
2390extern grLfbReadRegion_fpt grLfbReadRegion;
2391extern grLfbUnlock_fpt grLfbUnlock;
2392extern grLfbWriteColorFormat_fpt grLfbWriteColorFormat;
2393extern grLfbWriteColorSwizzle_fpt grLfbWriteColorSwizzle;
2394extern grLfbWriteRegion_fpt grLfbWriteRegion;
2395extern grRenderBuffer_fpt grRenderBuffer;
2396extern grResetTriStats_fpt grResetTriStats;
2397extern grSplash_fpt grSplash;
2398extern grSstControl_fpt grSstControl;
2399extern grSstIdle_fpt grSstIdle;
2400extern grSstIsBusy_fpt grSstIsBusy;
2401extern grSstOrigin_fpt grSstOrigin;
2402extern grSstPerfStats_fpt grSstPerfStats;
2403extern grSstQueryBoards_fpt grSstQueryBoards;
2404extern grSstQueryHardware_fpt grSstQueryHardware;
2405extern grSstResetPerfStats_fpt grSstResetPerfStats;
2406extern grSstScreenHeight_fpt grSstScreenHeight;
2407extern grSstScreenWidth_fpt grSstScreenWidth;
2408extern grSstSelect_fpt grSstSelect;
2409extern grSstStatus_fpt grSstStatus;
2410extern grSstVRetraceOn_fpt grSstVRetraceOn;
2411extern grSstVideoLine_fpt grSstVideoLine;
2412extern grSstWinClose_fpt grSstWinClose;
2413extern grSstWinOpen_fpt grSstWinOpen;
2414extern grTexCalcMemRequired_fpt grTexCalcMemRequired;
2415extern grTexClampMode_fpt grTexClampMode;
2416extern grTexCombine_fpt grTexCombine;
2417extern grTexCombineFunction_fpt grTexCombineFunction;
2418extern grTexDetailControl_fpt grTexDetailControl;
2419extern grTexDownloadMipMap_fpt grTexDownloadMipMap;
2420extern grTexDownloadMipMapLevel_fpt grTexDownloadMipMapLevel;
2421extern grTexDownloadMipMapLevelPartial_fpt grTexDownloadMipMapLevelPartial;
2422extern grTexDownloadTable_fpt grTexDownloadTable;
2423extern grTexDownloadTablePartial_fpt grTexDownloadTablePartial;
2424extern grTexFilterMode_fpt grTexFilterMode;
2425extern grTexLodBiasValue_fpt grTexLodBiasValue;
2426extern grTexMaxAddress_fpt grTexMaxAddress;
2427extern grTexMinAddress_fpt grTexMinAddress;
2428extern grTexMipMapMode_fpt grTexMipMapMode;
2429extern grTexMultibase_fpt grTexMultibase;
2430extern grTexMultibaseAddress_fpt grTexMultibaseAddress;
2431extern grTexNCCTable_fpt grTexNCCTable;
2432extern grTexSource_fpt grTexSource;
2433extern grTexTextureMemRequired_fpt grTexTextureMemRequired;
2434extern grTriStats_fpt grTriStats;
2435extern gu3dfGetInfo_fpt gu3dfGetInfo;
2436extern gu3dfLoad_fpt gu3dfLoad;
2437extern guAADrawTriangleWithClip_fpt guAADrawTriangleWithClip;
2438extern guAlphaSource_fpt guAlphaSource;
2439extern guColorCombineFunction_fpt guColorCombineFunction;
2440extern guDrawPolygonVertexListWithClip_fpt guDrawPolygonVertexListWithClip;
2441extern guDrawTriangleWithClip_fpt guDrawTriangleWithClip;
2442extern guEncodeRLE16_fpt guEncodeRLE16;
2443extern guEndianSwapBytes_fpt guEndianSwapBytes;
2444extern guEndianSwapWords_fpt guEndianSwapWords;
2445extern guFogGenerateExp_fpt guFogGenerateExp;
2446extern guFogGenerateExp2_fpt guFogGenerateExp2;
2447extern guFogGenerateLinear_fpt guFogGenerateLinear;
2448extern guFogTableIndexToW_fpt guFogTableIndexToW;
2449extern guTexAllocateMemory_fpt guTexAllocateMemory;
2450extern guTexChangeAttributes_fpt guTexChangeAttributes;
2451extern guTexCombineFunction_fpt guTexCombineFunction;
2452extern guTexCreateColorMipMap_fpt guTexCreateColorMipMap;
2453extern guTexDownloadMipMap_fpt guTexDownloadMipMap;
2454extern guTexDownloadMipMapLevel_fpt guTexDownloadMipMapLevel;
2455extern guTexGetCurrentMipMap_fpt guTexGetCurrentMipMap;
2456extern guTexGetMipMapInfo_fpt guTexGetMipMapInfo;
2457extern guTexMemQueryAvail_fpt guTexMemQueryAvail;
2458extern guTexMemReset_fpt guTexMemReset;
2459extern guTexSource_fpt guTexSource;
2460#include <windows.h>
2461extern HINSTANCE glideDLLInst;
2462#endif /* DYNAHEADER */
2463
2464#endif /* __GLIDE_H__ */
2465
2466#else
2467
2468#include <glide.h>
2469
2470#endif
Note: See TracBrowser for help on using the repository browser.