]> icculus.org git repositories - taylor/freespace2.git/blob - include/glideutl.h
Initial revision
[taylor/freespace2.git] / include / glideutl.h
1 /*
2 ** Copyright (c) 1995, 3Dfx Interactive, Inc.
3 ** All Rights Reserved.
4 **
5 ** This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, 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 3Dfx Interactive, 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 ** $Header$
18 ** $Log$
19 ** Revision 1.1  2002/05/03 03:28:12  root
20 ** Initial revision
21 **
22  * 
23  * 2     10/07/98 10:52a Dave
24  * Initial checkin.
25  * 
26  * 1     10/07/98 10:48a Dave
27  * 
28  * 2     2/27/98 3:25p Frank
29  * (John/Frank K.) updated to 2.43 headers
30  * 
31  * 1     10/16/97 11:51a Klier
32  * 
33  * 6     8/14/97 5:32p Pgj
34  * remove dead code per GMT
35  * 
36  * 5     6/12/97 5:19p Pgj
37  * Fix bug 578
38  * 
39  * 4     3/05/97 9:36p Jdt
40  * Removed guFbWriteRegion added guEncodeRLE16
41  * 
42  * 3     1/16/97 3:45p Dow
43  * Embedded fn protos in ifndef FX_GLIDE_NO_FUNC_PROTO 
44 */
45
46 /* Glide Utility routines */
47
48 #ifndef __GLIDEUTL_H__
49 #define __GLIDEUTL_H__
50
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
54
55 #ifndef FX_GLIDE_NO_FUNC_PROTO
56 /*
57 ** rendering functions
58 */
59 FX_ENTRY void FX_CALL
60 guAADrawTriangleWithClip( const GrVertex *a, const GrVertex
61                          *b, const GrVertex *c);
62
63 FX_ENTRY void FX_CALL
64 guDrawTriangleWithClip(
65                        const GrVertex *a,
66                        const GrVertex *b,
67                        const GrVertex *c
68                        );
69
70 FX_ENTRY void FX_CALL
71 guDrawPolygonVertexListWithClip( int nverts, const GrVertex vlist[] );
72
73 /*
74 ** hi-level rendering utility functions
75 */
76 FX_ENTRY void FX_CALL
77 guAlphaSource( GrAlphaSource_t mode );
78
79 FX_ENTRY void FX_CALL
80 guColorCombineFunction( GrColorCombineFnc_t fnc );
81
82 FX_ENTRY int FX_CALL
83 guEncodeRLE16( void *dst, 
84                void *src, 
85                FxU32 width, 
86                FxU32 height );
87
88 FX_ENTRY FxU16 * FX_CALL
89 guTexCreateColorMipMap( void );
90
91 /*
92 ** fog stuff
93 */
94 FX_ENTRY float FX_CALL
95 guFogTableIndexToW( int i );
96
97 FX_ENTRY void FX_CALL
98 guFogGenerateExp( GrFog_t fogtable[GR_FOG_TABLE_SIZE], float density );
99
100 FX_ENTRY void FX_CALL
101 guFogGenerateExp2( GrFog_t fogtable[GR_FOG_TABLE_SIZE], float density );
102
103 FX_ENTRY void FX_CALL
104 guFogGenerateLinear(
105                     GrFog_t fogtable[GR_FOG_TABLE_SIZE],
106                     float nearZ, float farZ );
107
108 /*
109 ** endian stuff
110 */
111 FX_ENTRY FxU32 FX_CALL
112 guEndianSwapWords( FxU32 value );
113
114 FX_ENTRY FxU16 FX_CALL
115 guEndianSwapBytes( FxU16 value );
116
117 /*
118 ** hi-level texture manipulation tools.
119 */
120 FX_ENTRY FxBool FX_CALL
121 gu3dfGetInfo( const char *filename, Gu3dfInfo *info );
122
123 FX_ENTRY FxBool FX_CALL
124 gu3dfLoad( const char *filename, Gu3dfInfo *data );
125
126 #endif /* FX_GLIDE_NO_FUNC_PROTO */
127
128 #ifdef __cplusplus
129 }
130 #endif
131
132 #endif /* __GLIDEUTL_H__ */
133