]>
Dogcows Code - chaz/rasterize/blob - config.h
3 * CS5600 University of Utah
5 * mcgarvey@eng.utah.edu
13 * If enabled, the software rasterizer will be bypassed and the scene will
14 * be rendered using OpenGL. The resulting image will not be exported;
15 * rather, GLUT will be used to display the scene in a window. This option
16 * overrides options effecting the software rasterizer. Also, the float
17 * size will be 32-bit regardless of the DOUBLE_FLOAT option.
20 #define IF_OPENGL(X) X
28 * If enabled, triangles that are facing away from the viewer, according to
29 * the right-hand rule and counter-clockwise winding of the verticies, will
30 * not be drawn. This option can improve performance in some situations, but
31 * it may also cause visual problems for models that aren't entirely closed.
34 #define IF_BACKFACE_CULLING(X) X
36 #define IF_BACKFACE_CULLING(X)
41 * If enabled, the blending function Crgb = (1 - Sa)Drgb + (Sa)Srgb is
42 * applied when calculating final colors on the raster.
45 #define IF_BLENDING(X) X
47 #define IF_BLENDING(X)
52 * If enabled, triangles will be not be drawn if they are entirely outside of
53 * the viewing volume. The number of pixels tested while rasterizing a
54 * triangle can also be minimized, which leads to a huge performance boost.
55 * For that reason, this is on unless explicitly disabled, and you really
56 * always want to leave it enabled. Note that this does not have anything to
57 * do with viewport clipping, which is always performed. Also note that any
58 * triangle which is partially within the viewing volume will be entirely
59 * drawn, which may be somewhat unexpected.
65 #define IF_CLIPPING(X) X
67 #define IF_CLIPPING(X)
72 * If enabled, a z-buffer will be used to perform some sort of depth testing,
73 * resulting in the generally desirable situation where triangles that are
74 * further away will not appear in front of triangles that are closer. There
75 * is a performance penalty for this, so it must be enabled.
78 #define IF_DEPTH_TEST(X) X
80 #define IF_DEPTH_TEST(X)
85 * If enabled, scalars will be of type double. This provides and insane level
86 * of precision at a performance cost. The default behavior just uses floats.
89 #define IF_DOUBLE_FLOAT(X) X
91 #define IF_DOUBLE_FLOAT(X)
96 * If enabled, each scene rasterization will be saved as a BMP image file.
97 * This is on unless explicitly disabled.
103 #define IF_EXPORT_BMP(X) X
105 #define IF_EXPORT_BMP(X)
110 * If enabled, each scene rasterization will be saved as a PPM image file.
111 * This is on unless explicitly disabled.
117 #define IF_EXPORT_PPM(X) X
119 #define IF_EXPORT_PPM(X)
124 * If enabled, functions that are defined in interface files will be marked as
125 * inline. The compiler will generally inline functions according to its own
126 * optimization heuristics, and this inline marking may persuade the compiler
127 * to inline a function that it otherwise would not. This option may bring a
128 * small performance boost, but it can also increase the size of the program
132 #define IF_EXTRA_INLINE(X) X
134 #define IF_EXTRA_INLINE(X)
139 * If enabled, local lighting will be used to increase realism of the scene.
140 * This option has a performance cost, but it can produce interesting visuals.
141 * The behavior of this option is effected by its precise value:
142 * 1 Phong lighting model with flat (per-face) interpolation.
143 * 2 Phong lighting model with Gouraud (per-vertex) interpolation.
144 * 3 Phong lighting model with Phong (per-pixel) interpolation.
147 #define IF_LIGHTING(X) X
149 #define IF_LIGHTING(X)
154 * If enabled, assertions and other nonessential checks will not be compiled
158 #define IF_NDEBUG(X) X
165 * If enabled, models will be saved to a quick-loading binary format after
166 * they are loaded. Or, if a cached version of a model is discovered when a
167 * model is requested to be loaded, it is loaded from the cache instead. This
168 * provides a decent speed improvement in cases where the model would
169 * otherwise be loaded from some kind of text format which would load slowly.
172 #define IF_CACHE_GEOMETRY(X) X
174 #define IF_CACHE_GEOMETRY(X)
179 * If enabled, per-vertex normals are calculated for models that don't come
180 * with pre-computed normals. This occurs at loading time. The normals are
181 * calculated by averaging the true normals of all the faces shared by each
182 * vertex. Otherwise, only per-face normals are calculated for such models,
183 * also at loading time.
186 #define IF_CALC_NORMALS(X) X
188 #define IF_CALC_NORMALS(X)
193 * If enabled, color will be interpolated across the face of a triangle.
194 * Otherwise, the color will flat, and the average color of the colors
195 * associated with each vertex will be used.
198 #define IF_SMOOTH_COLOR(X) X
200 #define IF_SMOOTH_COLOR(X)
205 * If enabled, a texture will be used to color models that have texture
206 * coordinates. The color from the texture will actually be multiplied
207 * (i.e. mixed) with the regular color associated with the geometry. Also,
208 * Phong interpolation lighting (LIGHTING >= 3) is required to get actual
209 * texturing; otherwise, only the color at the origin point of the texture
213 #define IF_TEXTURING(X) X
215 #define IF_TEXTURING(X)
220 * If enabled, texturing will have correct perspective on triangles which
221 * show depth. You typically always want this, so it's enabled by default.
222 * This option is useful only if TEXTURING is also enabled.
224 #ifndef PERSPECTIVE_FIX
225 #define PERSPECTIVE_FIX 1
228 #define IF_PERSPECTIVE_FIX(X) X
230 #define IF_PERSPECTIVE_FIX(X)
235 * If enabled, a description of what is happening will be printed to stdout.
236 * Otherwise, nothing is printed. The behavior of this option is effected by
238 * 1 Print just a few very general descriptions.
239 * 2 After rasterization, also print the triangle count and other
240 * information that may be interesting.
241 * 3 Also print the number of seconds it took to render the entire scene,
242 * according to wall time.
243 * 4 Also print the number of triangles as they are being rastered. This
244 * uses ANSI escape codes which may not be supported on all terminals.
245 * It also causes a lot to be printed, so it can actually decrease render
246 * performance, especially on a slow (or remote) terminal.
247 * The default setting for this option is 3.
253 #define IF_RASTER_STATS(X) X
255 #define IF_RASTER_STATS(X)
258 #define IF_RENDER_TIMER(X) X
260 #define IF_RENDER_TIMER(X)
263 #define IF_RENDER_PROGRESS(X) X
265 #define IF_RENDER_PROGRESS(X)
This page took 0.039912 seconds and 4 git commands to generate.