]>
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, normals are pre-computed while the triangles are loading.
140 * Otherwise, the normals are computed during rasterization. The behavior of
141 * this option is effected by its precise value:
142 * 1 Normals are computed per-face, according to the right-hand rule and
143 * counter-clockwise winding of the verticies.
144 * 2 Normals are computed per-vertex; the normal for a vertex that is shared
145 * between two or more faces will be the average of the normals of the
146 * faces. There is a performance penalty for this setting.
147 * 3 Same as 2, but the normals will be cached so that they will not need to
148 * be computed the next time the mesh is loaded.
151 #define IF_PRE_NORMALS(X) X
153 #define IF_PRE_NORMALS(X)
158 * If enabled, color will be interpolated across the face of a triangle.
159 * Otherwise, the color will flat, and the average color of the colors
160 * associated with each vertex will be used.
163 #define IF_SMOOTH_COLOR(X) X
165 #define IF_SMOOTH_COLOR(X)
170 * If enabled, a description of what is happening will be printed to stdout.
171 * Otherwise, nothing is printed. The behavior of this option is effected by
173 * 1 Print just a few very general descriptions.
174 * 2 After rasterization, also print the triangle count and other
175 * information that may be interesting.
176 * 3 Also print the number of seconds it took to render the entire scene,
177 * according to wall time.
178 * 4 Also print the number of triangles as they are being rastered. This
179 * uses ANSI escape codes which may not be supported on all terminals.
180 * It also causes a lot to be printed, so it can actually decrease render
181 * performance, especially on a slow (or remote) terminal.
182 * The default setting for this option is 3.
188 #define IF_RASTER_STATS(X) X
190 #define IF_RASTER_STATS(X)
193 #define IF_RENDER_TIMER(X) X
195 #define IF_RENDER_TIMER(X)
198 #define IF_RENDER_PROGRESS(X) X
200 #define IF_RENDER_PROGRESS(X)
This page took 0.03828 seconds and 4 git commands to generate.