Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/libmupen64plus/mupen64plus-video-glide64mk2/src/Glitch64/inc/g3ext.h
2 views
1
/*
2
** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
3
** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
4
** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
5
** INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
6
** DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC([email protected]).
7
** THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
8
** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
9
** FULL TEXT OF THE NON-WARRANTY PROVISIONS.
10
**
11
** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
12
** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN
13
** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013,
14
** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR
15
** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF
16
** THE UNITED STATES.
17
**
18
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
19
*/
20
21
/*
22
** H3EXT.H
23
**
24
** The following #defines are relevant when using Glide:
25
**
26
** One of the following "platform constants" must be defined during
27
** compilation:
28
**
29
** __DOS__ Defined for 32-bit DOS applications
30
** __WIN32__ Defined for 32-bit Windows applications
31
** __sparc__ Defined for Sun Solaris/SunOS
32
** __linux__ Defined for Linux applications
33
** __FreeBSD__ Defined for FreeBSD applications
34
** __NetBSD__ Defined for NetBSD applications
35
** __OpenBSD__ Defined for OpenBSD applications
36
** __IRIX__ Defined for SGI Irix applications
37
**
38
*/
39
#ifndef __H3EXT_H__
40
#define __H3EXT_H__
41
42
#include <3dfx.h>
43
#include <glidesys.h>
44
#include <sst1vid.h>
45
46
#ifdef __cplusplus
47
extern "C" {
48
#endif
49
50
/*
51
** -----------------------------------------------------------------------
52
** TYPE DEFINITIONS
53
** -----------------------------------------------------------------------
54
*/
55
/*
56
** -----------------------------------------------------------------------
57
** CONSTANTS AND TYPES
58
** -----------------------------------------------------------------------
59
*/
60
61
/*
62
* gregk 5/3/99
63
* Constants defined for SSTH3_ALPHADITHERMODE registry key
64
*/
65
66
#define OPTIMAL 1
67
#define SHARPER 2
68
#define SMOOTHER 3
69
70
/* tbext */
71
#define GR_BUFFER_TEXTUREBUFFER_EXT 0x6
72
#define GR_BUFFER_TEXTUREAUXBUFFER_EXT 0x7
73
74
typedef FxU32 GrPixelFormat_t;
75
76
#define GR_PIXFMT_I_8 0x0001
77
#define GR_PIXFMT_AI_88 0x0002
78
#define GR_PIXFMT_RGB_565 0x0003
79
#define GR_PIXFMT_ARGB_1555 0x0004
80
#define GR_PIXFMT_ARGB_8888 0x0005
81
#define GR_PIXFMT_AA_2_RGB_565 0x0006
82
#define GR_PIXFMT_AA_2_ARGB_1555 0x0007
83
#define GR_PIXFMT_AA_2_ARGB_8888 0x0008
84
#define GR_PIXFMT_AA_4_RGB_565 0x0009
85
#define GR_PIXFMT_AA_4_ARGB_1555 0x000a
86
#define GR_PIXFMT_AA_4_ARGB_8888 0x000b
87
#define GR_PIXFMT_AA_8_RGB_565 0x000c /* 8xaa */
88
#define GR_PIXFMT_AA_8_ARGB_1555 0x000d
89
#define GR_PIXFMT_AA_8_ARGB_8888 0x000e
90
91
92
#define GR_LFBWRITEMODE_Z32 0x0008
93
94
typedef FxU32 GrAAMode_t;
95
96
#define GR_AA_NONE 0x0000
97
#define GR_AA_4SAMPLES 0x0001
98
99
typedef FxU8 GrStencil_t;
100
101
typedef FxU32 GrStencilOp_t;
102
#define GR_STENCILOP_KEEP 0x00 /* keep current value */
103
#define GR_STENCILOP_ZERO 0x01 /* set to zero */
104
#define GR_STENCILOP_REPLACE 0x02 /* replace with reference value */
105
#define GR_STENCILOP_INCR_CLAMP 0x03 /* increment - clamp */
106
#define GR_STENCILOP_DECR_CLAMP 0x04 /* decrement - clamp */
107
#define GR_STENCILOP_INVERT 0x05 /* bitwise inversion */
108
#define GR_STENCILOP_INCR_WRAP 0x06 /* increment - wrap */
109
#define GR_STENCILOP_DECR_WRAP 0x07 /* decrement - wrap */
110
111
#define GR_TEXTURE_UMA_EXT 0x06
112
#define GR_STENCIL_MODE_EXT 0x07
113
#define GR_OPENGL_MODE_EXT 0x08
114
115
typedef FxU32 GrCCUColor_t;
116
117
typedef FxU32 GrACUColor_t;
118
119
typedef FxU32 GrTCCUColor_t;
120
121
typedef FxU32 GrTACUColor_t;
122
123
#define GR_CMBX_ZERO 0x00
124
#define GR_CMBX_TEXTURE_ALPHA 0x01
125
#define GR_CMBX_ALOCAL 0x02
126
#define GR_CMBX_AOTHER 0x03
127
#define GR_CMBX_B 0x04
128
#define GR_CMBX_CONSTANT_ALPHA 0x05
129
#define GR_CMBX_CONSTANT_COLOR 0x06
130
#define GR_CMBX_DETAIL_FACTOR 0x07
131
#define GR_CMBX_ITALPHA 0x08
132
#define GR_CMBX_ITRGB 0x09
133
#define GR_CMBX_LOCAL_TEXTURE_ALPHA 0x0a
134
#define GR_CMBX_LOCAL_TEXTURE_RGB 0x0b
135
#define GR_CMBX_LOD_FRAC 0x0c
136
#define GR_CMBX_OTHER_TEXTURE_ALPHA 0x0d
137
#define GR_CMBX_OTHER_TEXTURE_RGB 0x0e
138
#define GR_CMBX_TEXTURE_RGB 0x0f
139
#define GR_CMBX_TMU_CALPHA 0x10
140
#define GR_CMBX_TMU_CCOLOR 0x11
141
142
typedef FxU32 GrCombineMode_t;
143
#define GR_FUNC_MODE_ZERO 0x00
144
#define GR_FUNC_MODE_X 0x01
145
#define GR_FUNC_MODE_ONE_MINUS_X 0x02
146
#define GR_FUNC_MODE_NEGATIVE_X 0x03
147
#define GR_FUNC_MODE_X_MINUS_HALF 0x04
148
149
typedef FxU32 GrAlphaBlendOp_t;
150
#define GR_BLEND_OP_ADD 0x00
151
#define GR_BLEND_OP_SUB 0x01
152
#define GR_BLEND_OP_REVSUB 0x02
153
154
#define GR_BLEND_SAME_COLOR_EXT 0x08
155
#define GR_BLEND_ONE_MINUS_SAME_COLOR_EXT 0x09
156
157
/* Napalm extensions to GrTextureFormat_t */
158
#define GR_TEXFMT_ARGB_CMP_FXT1 0x11
159
#define GR_TEXFMT_ARGB_8888 0x12
160
#define GR_TEXFMT_YUYV_422 0x13
161
#define GR_TEXFMT_UYVY_422 0x14
162
#define GR_TEXFMT_AYUV_444 0x15
163
#define GR_TEXFMT_ARGB_CMP_DXT1 0x16
164
#define GR_TEXFMT_ARGB_CMP_DXT2 0x17
165
#define GR_TEXFMT_ARGB_CMP_DXT3 0x18
166
#define GR_TEXFMT_ARGB_CMP_DXT4 0x19
167
#define GR_TEXFMT_ARGB_CMP_DXT5 0x1A
168
#define GR_TEXTFMT_RGB_888 0xFF
169
170
/* Napalm extensions to GrLOD_t */
171
#define GR_LOD_LOG2_2048 0xb
172
#define GR_LOD_LOG2_1024 0xa
173
#define GR_LOD_LOG2_512 0x9
174
175
/* Napalm extensions to GrTexBaseRange_t */
176
#define GR_TEXBASE_2048 0x7
177
#define GR_TEXBASE_1024 0x6
178
#define GR_TEXBASE_512 0x5
179
#define GR_TEXBASE_256_TO_1 0x4
180
181
#ifdef __cplusplus
182
}
183
#endif
184
185
#include <glideutl.h>
186
187
#endif /* __H3EXT_H__ */
188
189