source: trunk/src/opengl/mesa/config.h@ 3485

Last change on this file since 3485 was 2962, checked in by jeroen, 25 years ago

* empty log message *

File size: 4.9 KB
Line 
1/* $Id: config.h,v 1.2 2000-03-01 18:49:24 jeroen Exp $ */
2
3/*
4 * Mesa 3-D graphics library
5 * Version: 3.1
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
30
31
32/*
33 * Tunable configuration parameters.
34 */
35
36
37
38#ifndef CONFIG_H
39#define CONFIG_H
40
41#ifdef HAVE_CONFIG_H
42#include "conf.h"
43#endif
44
45/*
46 *
47 * OpenGL implementation limits
48 *
49 */
50
51
52/* Maximum modelview matrix stack depth: */
53#define MAX_MODELVIEW_STACK_DEPTH 32
54
55/* Maximum projection matrix stack depth: */
56#define MAX_PROJECTION_STACK_DEPTH 32
57
58/* Maximum texture matrix stack depth: */
59#define MAX_TEXTURE_STACK_DEPTH 10
60
61/* Maximum attribute stack depth: */
62#define MAX_ATTRIB_STACK_DEPTH 16
63
64/* Maximum client attribute stack depth: */
65#define MAX_CLIENT_ATTRIB_STACK_DEPTH 16
66
67/* Maximum recursion depth of display list calls: */
68#define MAX_LIST_NESTING 64
69
70/* Maximum number of lights: */
71#define MAX_LIGHTS 8
72
73/* Maximum user-defined clipping planes: */
74#define MAX_CLIP_PLANES 6
75
76/* Maximum pixel map lookup table size: */
77#define MAX_PIXEL_MAP_TABLE 256
78
79/* Number of auxillary color buffers: */
80#define NUM_AUX_BUFFERS 0
81
82/* Maximum order (degree) of curves: */
83#ifdef AMIGA
84# define MAX_EVAL_ORDER 12
85#else
86# define MAX_EVAL_ORDER 30
87#endif
88
89/* Maximum Name stack depth */
90#define MAX_NAME_STACK_DEPTH 64
91
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
96
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
101
102/* Max texture palette size */
103#define MAX_TEXTURE_PALETTE_SIZE 256
104
105/* Number of texture levels */
106#define MAX_TEXTURE_LEVELS 12
107
108/* Number of texture units - GL_ARB_multitexture */
109#define MAX_TEXTURE_UNITS 2
110
111/* Maximum viewport size: */
112#define MAX_WIDTH 1600
113#define MAX_HEIGHT 1200
114
115/* Maxmimum size for CVA. May be overridden by the drivers. */
116#define MAX_ARRAY_LOCK_SIZE 3000
117
118
119/*
120 *
121 * Mesa-specific parameters
122 *
123 */
124
125
126/*
127 * Bits per accumulation buffer color component: 8 or 16
128 */
129#define ACCUM_BITS 16
130
131
132#ifdef MESAD3D
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
138#else
139 /*
140 * Bits per depth buffer value: 16 or 32
141 */
142# define DEPTH_BITS 16
143# if 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)
149# else
150# error "illegal number of depth bits"
151# endif
152#endif
153
154
155/*
156 * Bits per stencil value: 8
157 */
158#define STENCIL_BITS 8
159
160
161/*
162 * Bits per color channel (must be 8 at this time!)
163 */
164#define CHAN_BITS 8
165
166
167
168/*
169 * Color channel component order
170 * (changes will almost certainly cause problems at this time)
171 */
172#define RCOMP 0
173#define GCOMP 1
174#define BCOMP 2
175#define ACOMP 3
176
177
178
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
181 * value of 12n + 3.
182 */
183
184#define VB_START 3
185
186#if defined(FX) && !defined(MITS)
187# define VB_MAX 72 + VB_START /* better performance */
188#else
189# define VB_MAX 480 + VB_START
190#endif
191
192/*
193 * Actual vertex buffer size.
194 *
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
198 * sharing the vb).
199 */
200#define VB_MAX_CLIPPED_VERTS (2 * (6 + MAX_CLIP_PLANES))
201#define VB_SIZE (VB_MAX + VB_MAX_CLIPPED_VERTS)
202
203
204/*
205 *
206 * For X11 driver only:
207 *
208 */
209
210/*
211 * When defined, use 6x6x6 dithering instead of 5x9x5.
212 * 5x9x5 better for general colors, 6x6x6 better for grayscale.
213 */
214/*#define DITHER666*/
215
216
217
218typedef struct gl_context GLcontext;
219typedef struct gl_visual GLvisual;
220typedef struct gl_frame_buffer GLframebuffer;
221
222extern void gl_read_config_file( struct gl_context *ctx );
223
224#endif
Note: See TracBrowser for help on using the repository browser.