changed a warning string
[mesa.git] / src / mesa / main / config.h
1 /* $Id: config.h,v 1.2 1999/11/11 01:22:25 brianp Exp $ */
2
3 /*
4 * Mesa 3-D graphics library
5 * Version: 3.3
6 *
7 * Copyright (C) 1999 Brian Paul All Rights Reserved.
8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice shall be included
17 * in all copies or substantial portions of the Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 */
26
27
28 /*
29 * Tunable configuration parameters.
30 */
31
32
33
34 #ifndef CONFIG_H
35 #define CONFIG_H
36
37 #ifdef HAVE_CONFIG_H
38 #include "conf.h"
39 #endif
40
41
42 /*
43 * OpenGL implementation limits
44 */
45
46 /* Maximum modelview matrix stack depth: */
47 #define MAX_MODELVIEW_STACK_DEPTH 32
48
49 /* Maximum projection matrix stack depth: */
50 #define MAX_PROJECTION_STACK_DEPTH 32
51
52 /* Maximum texture matrix stack depth: */
53 #define MAX_TEXTURE_STACK_DEPTH 10
54
55 /* Maximum attribute stack depth: */
56 #define MAX_ATTRIB_STACK_DEPTH 16
57
58 /* Maximum client attribute stack depth: */
59 #define MAX_CLIENT_ATTRIB_STACK_DEPTH 16
60
61 /* Maximum recursion depth of display list calls: */
62 #define MAX_LIST_NESTING 64
63
64 /* Maximum number of lights: */
65 #define MAX_LIGHTS 8
66
67 /* Maximum user-defined clipping planes: */
68 #define MAX_CLIP_PLANES 6
69
70 /* Maximum pixel map lookup table size: */
71 #define MAX_PIXEL_MAP_TABLE 256
72
73 /* Number of auxillary color buffers: */
74 #define NUM_AUX_BUFFERS 0
75
76 /* Maximum order (degree) of curves: */
77 #ifdef AMIGA
78 # define MAX_EVAL_ORDER 12
79 #else
80 # define MAX_EVAL_ORDER 30
81 #endif
82
83 /* Maximum Name stack depth */
84 #define MAX_NAME_STACK_DEPTH 64
85
86 /* Min and Max point sizes and granularity */
87 #define MIN_POINT_SIZE 1.0
88 #define MAX_POINT_SIZE 10.0
89 #define POINT_SIZE_GRANULARITY 0.1
90
91 /* Min and Max line widths and granularity */
92 #define MIN_LINE_WIDTH 1.0
93 #define MAX_LINE_WIDTH 10.0
94 #define LINE_WIDTH_GRANULARITY 1.0
95
96 /* Max texture palette size */
97 #define MAX_TEXTURE_PALETTE_SIZE 256
98
99 /* Number of texture levels */
100 #define MAX_TEXTURE_LEVELS 12
101
102 /* Number of texture units - GL_ARB_multitexture */
103 #define MAX_TEXTURE_UNITS 2
104
105 /* Maximum viewport size: */
106 #define MAX_WIDTH 1600
107 #define MAX_HEIGHT 1200
108
109 /* Maxmimum size for CVA. May be overridden by the drivers. */
110 #define MAX_ARRAY_LOCK_SIZE 3000
111
112
113
114 /*
115 * Mesa-specific parameters
116 */
117
118
119 /*
120 * Bits per accumulation buffer color component: 8 or 16
121 */
122 #define ACCUM_BITS 16
123
124
125 /*
126 * Bits per depth buffer value: 16 or 32
127 */
128 #ifdef MESAD3D
129 /* Mesa / Direct3D driver only */
130 extern float g_DepthScale, g_MaxDepth;
131 # define DEPTH_BITS 32
132 # define DEPTH_SCALE g_DepthScale
133 # define MAX_DEPTH g_MaxDepth
134 #else
135 # define DEPTH_BITS 16
136 # if DEPTH_BITS==16
137 # define MAX_DEPTH 0xffff
138 # define DEPTH_SCALE 65535.0F
139 # elif DEPTH_BITS==32
140 # define MAX_DEPTH 0x3fffffff
141 # define DEPTH_SCALE ((GLfloat) MAX_DEPTH)
142 # else
143 # error "illegal number of depth bits"
144 # endif
145 #endif
146
147
148 /*
149 * Bits per stencil value: 8
150 */
151 #define STENCIL_BITS 8
152
153
154 /*
155 * Bits per color channel (must be 8 at this time!)
156 */
157 #define CHAN_BITS 8
158
159
160
161 /*
162 * Color channel component order
163 * (changes will almost certainly cause problems at this time)
164 */
165 #define RCOMP 0
166 #define GCOMP 1
167 #define BCOMP 2
168 #define ACOMP 3
169
170
171
172 /* Vertex buffer size. KW: no restrictions on the divisibility of
173 * this number, though things may go better for you if you choose a
174 * value of 12n + 3.
175 */
176
177 #define VB_START 3
178
179 #if defined(FX) && !defined(MITS)
180 # define VB_MAX 72 + VB_START /* better performance */
181 #else
182 # define VB_MAX 480 + VB_START
183 #endif
184
185 /*
186 * Actual vertex buffer size.
187 *
188 * Arrays must also accomodate new vertices from clipping, and
189 * potential overflow from primitives which don't fit into neatly into
190 * VB_MAX vertices. (This only happens when mixed primitives are
191 * sharing the vb).
192 */
193 #define VB_MAX_CLIPPED_VERTS (2 * (6 + MAX_CLIP_PLANES))
194 #define VB_SIZE (VB_MAX + VB_MAX_CLIPPED_VERTS)
195
196
197
198 typedef struct gl_context GLcontext;
199
200 extern void gl_read_config_file( struct gl_context *ctx );
201
202 #endif