2
===========================================================================
3
Copyright (C) 1999-2005 Id Software, Inc.
5
This file is part of Quake III Arena source code.
7
Quake III Arena source code is free software; you can redistribute it
8
and/or modify it under the terms of the GNU General Public License as
9
published by the Free Software Foundation; either version 2 of the License,
10
or (at your option) any later version.
12
Quake III Arena source code is distributed in the hope that it will be
13
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
17
You should have received a copy of the GNU General Public License
18
along with Quake III Arena source code; if not, write to the Free Software
19
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20
===========================================================================
27
#define MAX_DLIGHTS 32 // can't be increased, because bit flags are used on surfaces
28
#define MAX_ENTITIES 1023 // can't be increased without changing drawsurf bit packing
31
#define RF_MINLIGHT 1 // allways have some light (viewmodel, some items)
32
#define RF_THIRD_PERSON 2 // don't draw through eyes, only mirrors (player bodies, chat sprites)
33
#define RF_FIRST_PERSON 4 // only draw through eyes (view weapon, damage blood blob)
34
#define RF_DEPTHHACK 8 // for view weapon Z crunching
35
#define RF_NOSHADOW 64 // don't add stencil shadows
37
#define RF_LIGHTING_ORIGIN 128 // use refEntity->lightingOrigin instead of refEntity->origin
38
// for lighting. This allows entities to sink into the floor
39
// with their origin going solid, and allows all parts of a
40
// player to get the same lighting
41
#define RF_SHADOW_PLANE 256 // use refEntity->shadowPlane
42
#define RF_WRAP_FRAMES 512 // mod the model frames by the maxframes to allow continuous
43
// animation without needing to know the frame count
46
#define RDF_NOWORLDMODEL 1 // used for player configuration screen
47
#define RDF_HYPERSPACE 4 // teleportation effect
55
typedef struct poly_s {
69
RT_PORTALSURFACE, // doesn't draw anything, just info for portals
71
RT_MAX_REF_ENTITY_TYPE
75
refEntityType_t reType;
78
qhandle_t hModel; // opaque type outside refresh
81
vec3_t lightingOrigin; // so multi-part models can be lit identically (RF_LIGHTING_ORIGIN)
82
float shadowPlane; // projection shadows go here, stencils go slightly lower
84
vec3_t axis[3]; // rotation vectors
85
qboolean nonNormalizedAxes; // axis are not normalized, i.e. they have scale
86
float origin[3]; // also used as MODEL_BEAM's "from"
87
int frame; // also used as MODEL_BEAM's diameter
89
// previous data for frame interpolation
90
float oldorigin[3]; // also used as MODEL_BEAM's "to"
92
float backlerp; // 0.0 = current, 1.0 = old
95
int skinNum; // inline skin index
96
qhandle_t customSkin; // NULL for default skin
97
qhandle_t customShader; // use one image for the entire thing
100
byte shaderRGBA[4]; // colors used by rgbgen entity shaders
101
float shaderTexCoord[2]; // texture coordinates used by tcMod entity modifiers
102
float shaderTime; // subtracted from refdef time to control effect start times
104
// extra sprite information
110
#define MAX_RENDER_STRINGS 8
111
#define MAX_RENDER_STRING_LENGTH 32
114
int x, y, width, height;
117
vec3_t viewaxis[3]; // transformation matrix
119
// time in milliseconds for shader effects and other time dependent rendering issues
122
int rdflags; // RDF_NOWORLDMODEL, etc
124
// 1 bits will prevent the associated area from rendering at all
125
byte areamask[MAX_MAP_AREA_BYTES];
127
// text messages for deform text shaders
128
char text[MAX_RENDER_STRINGS][MAX_RENDER_STRING_LENGTH];
142
** Contains variables specific to the OpenGL configuration
143
** being run right now. These are constant once the OpenGL
144
** subsystem is initialized.
149
} textureCompression_t;
152
GLDRV_ICD, // driver is integrated with window system
153
// WARNING: there are tests that check for
154
// > GLDRV_ICD for minidriverness, so this
155
// should always be the lowest value in this
157
GLDRV_STANDALONE, // driver is a non-3Dfx standalone driver
158
GLDRV_VOODOO // driver is a 3Dfx standalone driver
162
GLHW_GENERIC, // where everthing works the way it should
163
GLHW_3DFX_2D3D, // Voodoo Banshee or Voodoo3, relevant since if this is
164
// the hardware type then there can NOT exist a secondary
166
GLHW_RIVA128, // where you can't interpolate alpha
167
GLHW_RAGEPRO, // where you can't modulate alpha on alpha textures
168
GLHW_PERMEDIA2 // where you don't have src*dst
172
char renderer_string[MAX_STRING_CHARS];
173
char vendor_string[MAX_STRING_CHARS];
174
char version_string[MAX_STRING_CHARS];
175
char extensions_string[BIG_INFO_STRING];
177
int maxTextureSize; // queried from GL
178
int maxActiveTextures; // multitexture ability
180
int colorBits, depthBits, stencilBits;
182
glDriverType_t driverType;
183
glHardwareType_t hardwareType;
185
qboolean deviceSupportsGamma;
186
textureCompression_t textureCompression;
187
qboolean textureEnvAddAvailable;
189
int vidWidth, vidHeight;
190
// aspect is the screen's physical width / height, which may be different
191
// than scrWidth / scrHeight if the pixels are non-square
192
// normal screens should be 4/3, but wide aspect monitors may be 16/9
195
int displayFrequency;
197
// synonymous with "does rendering consume the entire screen?", therefore
198
// a Voodoo or Voodoo2 will have this set to TRUE, as will a Win32 ICD that
200
qboolean isFullscreen;
201
qboolean stereoEnabled;
202
qboolean smpActive; // dual processor
205
// FIXME: VM should be OS agnostic .. in theory
210
#define _3DFX_DRIVER_NAME "Voodoo"
211
#define OPENGL_DRIVER_NAME "Default"
213
#elif defined(_WIN32)
216
#if defined(Q3_VM) || defined(_WIN32)
218
#define _3DFX_DRIVER_NAME "3dfxvgl"
219
#define OPENGL_DRIVER_NAME "opengl32"
221
#elif defined(MACOS_X)
223
#define _3DFX_DRIVER_NAME "libMesaVoodooGL.dylib"
224
#define OPENGL_DRIVER_NAME "/System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib"
228
#define _3DFX_DRIVER_NAME "libMesaVoodooGL.so"
229
// https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=524
230
#define OPENGL_DRIVER_NAME "libGL.so.1"
232
#endif // !defined _WIN32
234
#endif // __TR_TYPES_H