#include "color.h" #include GLfloat ColorTable[][3] = { { 1.0, 0.0, 0.0 }, { 0.0, 1.0, 0.0 }, { 0.0, 0.0, 1.0 }, { 1.0, 1.0, 0.0 }, { 1.0, 0.0, 1.0 }, { 0.0, 1.0, 1.0 }, { 1.0, 1.0, 1.0 }, }; GLfloat * rotate_color() { static int index = COLOR_RED; index = (index + 1) % COLOR_WHITE; return ColorTable[index]; } GLfloat * random_color() { return ColorTable[rand() % COLOR_UNKNOWN]; }