#define SMOOTH 1 #define FACETTED 0 #define PHONG_SPEC 0 #define BLINN 1 #define COOKE_TORRENCE 2 #define X_RES 1024 #define Y_RES 1024 #define PER_FACE 0 #define WRAPPED 1 #define FNAMELEN 256 #define MAXOBJS 250 #define MAXLIGHTS 100 #define SCREEN 0 typedef struct text_td { int type; char *name; float **texture; int u_size, v_size; int repetition; } text_td; typedef struct color_text_td { int type; char *name; rgb_td **texture; int u_size, v_size; int repetition; } color_text_td; typedef struct txt_u_td { float ax, cx, dx, a; } txt_u_td; typedef struct txt_v_td { float ay, cy, dy; } txt_v_td; typedef struct c_t_illum_td { rgb_td f_0, indx_refrac; } c_t_illum_td; typedef struct lght_parm_td { xyz_td position; xyz_td direction; rgb_td color; float angle; /* actually the cos of the angle */ long fall_off; } lght_parm_td; typedef struct illum_parm_td { rgb_td *color; rgb_td *specular; xyz_td *normal; /* actually ABS of it for texturing */ xyz_td *eye_vector; xyz_td **l_vector; xyz_td **h_vector; float amb_coef; float diff_coef; float spec_coef; float spec_power; float mintr; float maxtr; float indx_refrac; int back_face; /* display back faces ? */ int illum_type; /* illumination - phong, blinn, cooke-t */ int shade_type; /* shading type - facetted, phong */ int intensity_type; text_td intensity_txt; color_text_td color_txt; int color_type; /* constant, per poly, per vertex, mapped*/ int normal_type; /* constant, mapped, proc*/ text_td normal_txt; /* normal texture structure */ int env_type; /* env mapping type none,mapped, proc */ color_text_td env_map; /* environment mapping type */ int transp_type; /* transparency type none,mapped, proc */ text_td transp_txt; /* transparency texturing type */ float *transp; /* transparency per polygon */ /* the following two things refer to object space */ xyz_td scale_obj; /*how to scale obj to get into -1:1 space*/ xyz_td trans_obj; /*how to trans obj to get into -1:1 space*/ } illum_parm_td; typedef struct viewport_td { float vl, vr, vt, vb; } viewport_td;