#define ICO_LIST 1 #define ICO_LIST_SKELETON 2 #define ICO_LIST_GLINT 3 #define MAXTEXS 15 #define HEAD 0 #define MOUSE 1 #define DURATION 3000 /* display duration, in ms */ struct point { float x; float y; float z; }; struct texpoint { float x; float y; }; struct color { float r; float g; float b; }; GtkWidget *window, *glarea; float dir[3]; /* view vector (from FOB) */ float upv[3]; /* up vector (from FOB) */ float eye[3]; /* head pos (from FOB) */ float ref[3]; /* ref pos (from FOB h,v) */ float f=1.0; float mid[3]; /* eye midpoint (from ISCAN) */ float d=10000.0; /* distance (for ref point) */ Fob *fob = NULL; GLUquadricObj *gsphere = NULL; int navigate; int glints; int lookup; gint create_window(); static gint main_loop(gpointer data); void main_quit(); void draw(void); void draw_cube(void); void draw_icos(void); struct point *vertices; struct point *normals; struct color *colors; struct texpoint *texpoints; char texfilenames[MAXTEXS][100]; GLfloat light0_ambient[] = { 0.0, 0.0, 0.0, 0.0 }; GLfloat light0_diffuse[] = { 0.0, 0.0, 0.0, 0.0 }; GLfloat light0_specular[4]; GLfloat light0_position[4]; GLfloat mat_ambient[] = {0.0,0.0,0.0,1.0}; GLfloat mat_diffuse[] = {0.0,0.0,0.0,1.0}; GLfloat mat_specular[4]; GLfloat mat_shininess[1]; void glinit(char *vdfname); void glint_init(char *gdfname); void texture_init(int i); gint key_press_event(GtkWidget *widget, GdkEventKey *event); gint glarea_expose(GtkWidget *widget, GdkEventExpose *event); gint glarea_motion_notify(GtkWidget *, GdkEventMotion *);