1 /* $Id: config.h,v 1.1 1999/08/19 00:55:41 jtg Exp $ */
4 * Mesa 3-D graphics library
7 * Copyright (C) 1999 Brian Paul All Rights Reserved.
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:
16 * The above copyright notice and this permission notice shall be included
17 * in all copies or substantial portions of the Software.
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.
33 * Tunable configuration parameters.
47 * OpenGL implementation limits
52 /* Maximum modelview matrix stack depth: */
53 #define MAX_MODELVIEW_STACK_DEPTH 32
55 /* Maximum projection matrix stack depth: */
56 #define MAX_PROJECTION_STACK_DEPTH 32
58 /* Maximum texture matrix stack depth: */
59 #define MAX_TEXTURE_STACK_DEPTH 10
61 /* Maximum attribute stack depth: */
62 #define MAX_ATTRIB_STACK_DEPTH 16
64 /* Maximum client attribute stack depth: */
65 #define MAX_CLIENT_ATTRIB_STACK_DEPTH 16
67 /* Maximum recursion depth of display list calls: */
68 #define MAX_LIST_NESTING 64
70 /* Maximum number of lights: */
73 /* Maximum user-defined clipping planes: */
74 #define MAX_CLIP_PLANES 6
76 /* Maximum pixel map lookup table size: */
77 #define MAX_PIXEL_MAP_TABLE 256
79 /* Number of auxillary color buffers: */
80 #define NUM_AUX_BUFFERS 0
82 /* Maximum order (degree) of curves: */
84 # define MAX_EVAL_ORDER 12
86 # define MAX_EVAL_ORDER 30
89 /* Maximum Name stack depth */
90 #define MAX_NAME_STACK_DEPTH 64
92 /* Min and Max point sizes and granularity */
93 #define MIN_POINT_SIZE 1.0
94 #define MAX_POINT_SIZE 10.0
95 #define POINT_SIZE_GRANULARITY 0.1
97 /* Min and Max line widths and granularity */
98 #define MIN_LINE_WIDTH 1.0
99 #define MAX_LINE_WIDTH 10.0
100 #define LINE_WIDTH_GRANULARITY 1.0
102 /* Max texture palette size */
103 #define MAX_TEXTURE_PALETTE_SIZE 256
105 /* Number of texture levels */
106 #define MAX_TEXTURE_LEVELS 12
108 /* Number of texture units - GL_ARB_multitexture */
109 #define MAX_TEXTURE_UNITS 2
111 /* Maximum viewport size: */
112 #define MAX_WIDTH 1600
113 #define MAX_HEIGHT 1200
115 /* Maxmimum size for CVA. May be overridden by the drivers. */
116 #define MAX_ARRAY_LOCK_SIZE 3000
121 * Mesa-specific parameters
127 * Bits per accumulation buffer color component: 8 or 16
129 #define ACCUM_BITS 16
133 /* Mesa / Direct3D driver only */
134 extern float g_DepthScale
, g_MaxDepth
;
135 # define DEPTH_BITS 32
136 # define DEPTH_SCALE g_DepthScale
137 # define MAX_DEPTH g_MaxDepth
140 * Bits per depth buffer value: 16 or 32
142 # define DEPTH_BITS 16
144 # define MAX_DEPTH 0xffff
145 # define DEPTH_SCALE 65535.0F
146 # elif DEPTH_BITS==32
147 # define MAX_DEPTH 0x3fffffff
148 # define DEPTH_SCALE ((GLfloat) MAX_DEPTH)
150 # error "illegal number of depth bits"
156 * Bits per stencil value: 8
158 #define STENCIL_BITS 8
162 * Bits per color channel (must be 8 at this time!)
169 * Color channel component order
170 * (changes will almost certainly cause problems at this time)
179 /* Vertex buffer size. KW: no restrictions on the divisibility of
180 * this number, though things may go better for you if you choose a
186 #if defined(FX) && !defined(MITS)
187 # define VB_MAX 72 + VB_START /* better performance */
189 # define VB_MAX 480 + VB_START
193 * Actual vertex buffer size.
195 * Arrays must also accomodate new vertices from clipping, and
196 * potential overflow from primitives which don't fit into neatly into
197 * VB_MAX vertices. (This only happens when mixed primitives are
200 #define VB_MAX_CLIPPED_VERTS (2 * (6 + MAX_CLIP_PLANES))
201 #define VB_SIZE (VB_MAX + VB_MAX_CLIPPED_VERTS)
206 * For X11 driver only:
211 * When defined, use 6x6x6 dithering instead of 5x9x5.
212 * 5x9x5 better for general colors, 6x6x6 better for grayscale.
214 /*#define DITHER666*/
218 typedef struct gl_context GLcontext
;
220 extern void gl_read_config_file( struct gl_context
*ctx
);