X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=config.h;h=8c0fd39c782f463be26e527cb41ab243004c0a97;hb=bc662e293c854e1bdc9d46e9a410fe220247e6d4;hp=593043940e31b6d99d399aa27b27e54fc7510336;hpb=143da66e7f625b7f195a115b9740a748ee003534;p=chaz%2Frasterize diff --git a/config.h b/config.h index 5930439..8c0fd39 100644 --- a/config.h +++ b/config.h @@ -8,6 +8,21 @@ #ifndef _CONFIG_H_ #define _CONFIG_H_ +/* + * OPENGL + * If enabled, the software rasterizer will be bypassed and the scene will + * be rendered using OpenGL. The resulting image will not be exported; + * rather, GLUT will be used to display the scene in a window. This option + * overrides options effecting the software rasterizer. Also, the float + * size will be 32-bit regardless of the DOUBLE_FLOAT option. + */ +#if OPENGL +#define IF_OPENGL(X) X +#undef DOUBLE_FLOAT +#else +#define IF_OPENGL(X) +#endif + /* * BACKFACE_CULLING * If enabled, triangles that are facing away from the viewer, according to @@ -21,6 +36,17 @@ #define IF_BACKFACE_CULLING(X) #endif +/* + * BLENDING + * If enabled, the blending function Crgb = (1 - Sa)Drgb + (Sa)Srgb is + * applied when calculating final colors on the raster. + */ +#if BLENDING +#define IF_BLENDING(X) X +#else +#define IF_BLENDING(X) +#endif + /* * CLIPPING * If enabled, triangles will be not be drawn if they are entirely outside of @@ -174,6 +200,36 @@ #define IF_SMOOTH_COLOR(X) #endif +/* + * TEXTURING + * If enabled, a texture will be used to color models that have texture + * coordinates. The color from the texture will actually be multiplied + * (i.e. mixed) with the regular color associated with the geometry. Also, + * Phong interpolation lighting (LIGHTING >= 3) is required to get actual + * texturing; otherwise, only the color at the origin point of the texture + * will be used. + */ +#if TEXTURING +#define IF_TEXTURING(X) X +#else +#define IF_TEXTURING(X) +#endif + +/* + * PERSPECTIVE_FIX + * If enabled, texturing will have correct perspective on triangles which + * show depth. You typically always want this, so it's enabled by default. + * This option is useful only if TEXTURING is also enabled. + */ +#ifndef PERSPECTIVE_FIX +#define PERSPECTIVE_FIX 1 +#endif +#if PERSPECTIVE_FIX +#define IF_PERSPECTIVE_FIX(X) X +#else +#define IF_PERSPECTIVE_FIX(X) +#endif + /* * VERBOSITY * If enabled, a description of what is happening will be printed to stdout.