]>
Dogcows Code - chaz/rasterize/blob - config.h
3 * CS5600 University of Utah
5 * mcgarvey@eng.utah.edu
13 * If enabled, triangles that are facing away from the viewer, according to
14 * the right-hand rule and counter-clockwise winding of the verticies, will
15 * not be drawn. This option can improve performance in some situations, but
16 * it may also cause visual problems for models that aren't entirely closed.
19 #define IF_BACKFACE_CULLING(X) X
21 #define IF_BACKFACE_CULLING(X)
26 * If enabled, triangles will be not be drawn if they are entirely outside of
27 * the viewing volume. The number of pixels tested while rasterizing a
28 * triangle can also be minimized, which leads to a huge performance boost.
29 * For that reason, this is on unless explicitly disabled, and you really
30 * always want to leave it enabled. Note that this does not have anything to
31 * do with viewport clipping, which is always performed. Also note that any
32 * triangle which is partially within the viewing volume will be entirely
33 * drawn, which may be somewhat unexpected.
39 #define IF_CLIPPING(X) X
41 #define IF_CLIPPING(X)
46 * If enabled, a z-buffer will be used to perform some sort of depth testing,
47 * resulting in the generally desirable situation where triangles that are
48 * further away will not appear in front of triangles that are closer. There
49 * is a performance penalty for this, so it must be enabled.
52 #define IF_DEPTH_TEST(X) X
54 #define IF_DEPTH_TEST(X)
59 * If enabled, scalars will be of type double. This provides and insane level
60 * of precision at a performance cost. The default behavior just uses floats.
63 #define IF_DOUBLE_FLOAT(X) X
65 #define IF_DOUBLE_FLOAT(X)
70 * If enabled, each scene rasterization will be saved as a BMP image file.
71 * This is on unless explicitly disabled.
77 #define IF_EXPORT_BMP(X) X
79 #define IF_EXPORT_BMP(X)
84 * If enabled, each scene rasterization will be saved as a PPM image file.
85 * This is on unless explicitly disabled.
91 #define IF_EXPORT_PPM(X) X
93 #define IF_EXPORT_PPM(X)
98 * If enabled, functions that are defined in interface files will be marked as
99 * inline. The compiler will generally inline functions according to its own
100 * optimization heuristics, and this inline marking may persuade the compiler
101 * to inline a function that it otherwise would not. This option may bring a
102 * small performance boost, but it can also increase the size of the program
106 #define IF_EXTRA_INLINE(X) X
108 #define IF_EXTRA_INLINE(X)
113 * If enabled, local lighting will be used to increase realism of the scene.
114 * This option has a performance cost, but it can produce interesting visuals.
115 * The behavior of this option is effected by its precise value:
116 * 1 Phong lighting model with flat (per-face) interpolation.
117 * 2 Phong lighting model with Gouraud (per-vertex) interpolation.
118 * 3 Phong lighting model with Phong (per-pixel) interpolation.
121 #define IF_LIGHTING(X) X
123 #define IF_LIGHTING(X)
128 * If enabled, assertions and other nonessential checks will not be compiled
132 #define IF_NDEBUG(X) X
139 * If enabled, models will be saved to a quick-loading binary format after
140 * they are loaded. Or, if a cached version of a model is discovered when a
141 * model is requested to be loaded, it is loaded from the cache instead. This
142 * provides a decent speed improvement in cases where the model would
143 * otherwise be loaded from some kind of text format which would load slowly.
146 #define IF_CACHE_GEOMETRY(X) X
148 #define IF_CACHE_GEOMETRY(X)
153 * If enabled, per-vertex normals are calculated for models that don't come
154 * with pre-computed normals. This occurs at loading time. The normals are
155 * calculated by averaging the true normals of all the faces shared by each
156 * vertex. Otherwise, only per-face normals are calculated for such models,
157 * also at loading time.
160 #define IF_CALC_NORMALS(X) X
162 #define IF_CALC_NORMALS(X)
167 * If enabled, color will be interpolated across the face of a triangle.
168 * Otherwise, the color will flat, and the average color of the colors
169 * associated with each vertex will be used.
172 #define IF_SMOOTH_COLOR(X) X
174 #define IF_SMOOTH_COLOR(X)
179 * If enabled, a description of what is happening will be printed to stdout.
180 * Otherwise, nothing is printed. The behavior of this option is effected by
182 * 1 Print just a few very general descriptions.
183 * 2 After rasterization, also print the triangle count and other
184 * information that may be interesting.
185 * 3 Also print the number of seconds it took to render the entire scene,
186 * according to wall time.
187 * 4 Also print the number of triangles as they are being rastered. This
188 * uses ANSI escape codes which may not be supported on all terminals.
189 * It also causes a lot to be printed, so it can actually decrease render
190 * performance, especially on a slow (or remote) terminal.
191 * The default setting for this option is 3.
197 #define IF_RASTER_STATS(X) X
199 #define IF_RASTER_STATS(X)
202 #define IF_RENDER_TIMER(X) X
204 #define IF_RENDER_TIMER(X)
207 #define IF_RENDER_PROGRESS(X) X
209 #define IF_RENDER_PROGRESS(X)
This page took 0.038323 seconds and 5 git commands to generate.