1 | /* $Id: config.h,v 1.3 2000-05-21 20:24:21 jeroen 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 |
|
---|
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 0.1
|
---|
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 | /* Subpixel precision for antialiasing, window coordinate snapping */
|
---|
119 | #define SUB_PIXEL_BITS 4
|
---|
120 |
|
---|
121 |
|
---|
122 |
|
---|
123 | /*
|
---|
124 | * Mesa-specific parameters
|
---|
125 | */
|
---|
126 |
|
---|
127 |
|
---|
128 | /*
|
---|
129 | * Bits per accumulation buffer color component: 8 or 16
|
---|
130 | */
|
---|
131 | #define ACCUM_BITS 16
|
---|
132 |
|
---|
133 |
|
---|
134 | /*
|
---|
135 | * Bits per depth buffer value: 16 or 32 (GLushort or GLuint)
|
---|
136 | * gl_create_visual() can select any depth in [0, 32].
|
---|
137 | */
|
---|
138 | #define DEFAULT_SOFTWARE_DEPTH_BITS 16
|
---|
139 | #define DEFAULT_SOFTWARE_DEPTH_TYPE GLushort
|
---|
140 |
|
---|
141 |
|
---|
142 |
|
---|
143 | /*
|
---|
144 | * Bits per stencil value: 8
|
---|
145 | */
|
---|
146 | #define STENCIL_BITS 8
|
---|
147 |
|
---|
148 |
|
---|
149 | /*
|
---|
150 | * Bits per color channel (must be 8 at this time!)
|
---|
151 | */
|
---|
152 | #define CHAN_BITS 8
|
---|
153 | #define CHAN_MAX ((1 << CHAN_BITS) - 1)
|
---|
154 | #define CHAN_MAXF ((GLfloat) CHAN_MAX)
|
---|
155 |
|
---|
156 |
|
---|
157 | /*
|
---|
158 | * Color channel component order
|
---|
159 | * (changes will almost certainly cause problems at this time)
|
---|
160 | */
|
---|
161 | #define RCOMP 0
|
---|
162 | #define GCOMP 1
|
---|
163 | #define BCOMP 2
|
---|
164 | #define ACOMP 3
|
---|
165 |
|
---|
166 |
|
---|
167 |
|
---|
168 | /* Vertex buffer size. KW: no restrictions on the divisibility of
|
---|
169 | * this number, though things may go better for you if you choose a
|
---|
170 | * value of 12n + 3.
|
---|
171 | */
|
---|
172 | #define VB_START 3
|
---|
173 |
|
---|
174 | #define VB_MAX (216 + VB_START)
|
---|
175 |
|
---|
176 |
|
---|
177 |
|
---|
178 | /*
|
---|
179 | * Actual vertex buffer size.
|
---|
180 | *
|
---|
181 | * Arrays must also accomodate new vertices from clipping, and
|
---|
182 | * potential overflow from primitives which don't fit into neatly into
|
---|
183 | * VB_MAX vertices. (This only happens when mixed primitives are
|
---|
184 | * sharing the vb).
|
---|
185 | */
|
---|
186 | #define VB_MAX_CLIPPED_VERTS ((2 * (6 + MAX_CLIP_PLANES))+1)
|
---|
187 | #define VB_SIZE (VB_MAX + VB_MAX_CLIPPED_VERTS)
|
---|
188 |
|
---|
189 |
|
---|
190 |
|
---|
191 | typedef struct gl_context GLcontext;
|
---|
192 | /* typedef struct gl_visual GLvisual;*/
|
---|
193 | /* typedef struct gl_frame_buffer GLframebuffer;*/
|
---|
194 |
|
---|
195 | extern void
|
---|
196 | gl_read_config_file( struct gl_context *ctx );
|
---|
197 |
|
---|
198 | extern void
|
---|
199 | gl_register_config_var(const char *name, void (*notify)( const char *, int ));
|
---|
200 |
|
---|
201 | #endif
|
---|