]>
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, the blending function Crgb = (1 - Sa)Drgb + (Sa)Srgb is
27 * applied when calculating final colors on the raster.
30 #define IF_BLENDING(X) X
32 #define IF_BLENDING(X)
37 * If enabled, triangles will be not be drawn if they are entirely outside of
38 * the viewing volume. The number of pixels tested while rasterizing a
39 * triangle can also be minimized, which leads to a huge performance boost.
40 * For that reason, this is on unless explicitly disabled, and you really
41 * always want to leave it enabled. Note that this does not have anything to
42 * do with viewport clipping, which is always performed. Also note that any
43 * triangle which is partially within the viewing volume will be entirely
44 * drawn, which may be somewhat unexpected.
50 #define IF_CLIPPING(X) X
52 #define IF_CLIPPING(X)
57 * If enabled, a z-buffer will be used to perform some sort of depth testing,
58 * resulting in the generally desirable situation where triangles that are
59 * further away will not appear in front of triangles that are closer. There
60 * is a performance penalty for this, so it must be enabled.
63 #define IF_DEPTH_TEST(X) X
65 #define IF_DEPTH_TEST(X)
70 * If enabled, scalars will be of type double. This provides and insane level
71 * of precision at a performance cost. The default behavior just uses floats.
74 #define IF_DOUBLE_FLOAT(X) X
76 #define IF_DOUBLE_FLOAT(X)
81 * If enabled, each scene rasterization will be saved as a BMP image file.
82 * This is on unless explicitly disabled.
88 #define IF_EXPORT_BMP(X) X
90 #define IF_EXPORT_BMP(X)
95 * If enabled, each scene rasterization will be saved as a PPM image file.
96 * This is on unless explicitly disabled.
102 #define IF_EXPORT_PPM(X) X
104 #define IF_EXPORT_PPM(X)
109 * If enabled, functions that are defined in interface files will be marked as
110 * inline. The compiler will generally inline functions according to its own
111 * optimization heuristics, and this inline marking may persuade the compiler
112 * to inline a function that it otherwise would not. This option may bring a
113 * small performance boost, but it can also increase the size of the program
117 #define IF_EXTRA_INLINE(X) X
119 #define IF_EXTRA_INLINE(X)
124 * If enabled, local lighting will be used to increase realism of the scene.
125 * This option has a performance cost, but it can produce interesting visuals.
126 * The behavior of this option is effected by its precise value:
127 * 1 Phong lighting model with flat (per-face) interpolation.
128 * 2 Phong lighting model with Gouraud (per-vertex) interpolation.
129 * 3 Phong lighting model with Phong (per-pixel) interpolation.
132 #define IF_LIGHTING(X) X
134 #define IF_LIGHTING(X)
139 * If enabled, assertions and other nonessential checks will not be compiled
143 #define IF_NDEBUG(X) X
150 * If enabled, models will be saved to a quick-loading binary format after
151 * they are loaded. Or, if a cached version of a model is discovered when a
152 * model is requested to be loaded, it is loaded from the cache instead. This
153 * provides a decent speed improvement in cases where the model would
154 * otherwise be loaded from some kind of text format which would load slowly.
157 #define IF_CACHE_GEOMETRY(X) X
159 #define IF_CACHE_GEOMETRY(X)
164 * If enabled, per-vertex normals are calculated for models that don't come
165 * with pre-computed normals. This occurs at loading time. The normals are
166 * calculated by averaging the true normals of all the faces shared by each
167 * vertex. Otherwise, only per-face normals are calculated for such models,
168 * also at loading time.
171 #define IF_CALC_NORMALS(X) X
173 #define IF_CALC_NORMALS(X)
178 * If enabled, color will be interpolated across the face of a triangle.
179 * Otherwise, the color will flat, and the average color of the colors
180 * associated with each vertex will be used.
183 #define IF_SMOOTH_COLOR(X) X
185 #define IF_SMOOTH_COLOR(X)
190 * If enabled, a texture will be used to color models that have texture
191 * coordinates. The color from the texture will actually be multiplied
192 * (i.e. mixed) with the regular color associated with the geometry. Also,
193 * Phong interpolation lighting (LIGHTING >= 3) is required to get actual
194 * texturing; otherwise, only the color at the origin point of the texture
198 #define IF_TEXTURING(X) X
200 #define IF_TEXTURING(X)
205 * If enabled, texturing will have correct perspective on triangles which
206 * show depth. You typically always want this, so it's enabled by default.
207 * This option is useful only if TEXTURING is also enabled.
209 #ifndef PERSPECTIVE_FIX
210 #define PERSPECTIVE_FIX 1
213 #define IF_PERSPECTIVE_FIX(X) X
215 #define IF_PERSPECTIVE_FIX(X)
220 * If enabled, a description of what is happening will be printed to stdout.
221 * Otherwise, nothing is printed. The behavior of this option is effected by
223 * 1 Print just a few very general descriptions.
224 * 2 After rasterization, also print the triangle count and other
225 * information that may be interesting.
226 * 3 Also print the number of seconds it took to render the entire scene,
227 * according to wall time.
228 * 4 Also print the number of triangles as they are being rastered. This
229 * uses ANSI escape codes which may not be supported on all terminals.
230 * It also causes a lot to be printed, so it can actually decrease render
231 * performance, especially on a slow (or remote) terminal.
232 * The default setting for this option is 3.
238 #define IF_RASTER_STATS(X) X
240 #define IF_RASTER_STATS(X)
243 #define IF_RENDER_TIMER(X) X
245 #define IF_RENDER_TIMER(X)
248 #define IF_RENDER_PROGRESS(X) X
250 #define IF_RENDER_PROGRESS(X)
This page took 0.046511 seconds and 4 git commands to generate.